From 3326abc501484724c7ecb8a1a5978a7b41356e5f Mon Sep 17 00:00:00 2001 From: Deepak Selvakumar <77007253+deepaksibm@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:20:02 +0530 Subject: [PATCH] feat(release): Update SDK to use API released on 2024-07-02 Signed-off-by: Deepak Selvakumar <77007253+deepaksibm@users.noreply.github.com> --- examples/test_vpc_v1_examples.py | 176 +- ibm_vpc/vpc_v1.py | 34456 +++++++++++++++------ requirements.txt | 2 +- test/integration/test_gen2.py | 126 +- test/unit/test_vpc_v1.py | 47877 ++++++++++++++++++++--------- 5 files changed, 58944 insertions(+), 23693 deletions(-) diff --git a/examples/test_vpc_v1_examples.py b/examples/test_vpc_v1_examples.py index b2eb902..6929e6f 100644 --- a/examples/test_vpc_v1_examples.py +++ b/examples/test_vpc_v1_examples.py @@ -1009,6 +1009,7 @@ def test_list_images_example(self): client=vpc_service, limit=10, visibility='private', + user_data_format='cloud_init', ) while pager.has_next(): next_page = pager.get_next() @@ -3596,6 +3597,7 @@ def test_create_share_example(self): # end-create_share print(json.dumps(share, indent=2)) data['shareId']=share['id'] + data['shareCRN']=share['crn'] data['shareReplicaId']=share_replica['id'] data['shareReplicaETag']=response_replica.get_headers()['ETag'] assert share is not None @@ -3605,6 +3607,36 @@ def test_create_share_example(self): except ApiException as e: pytest.fail(str(e)) + @needscredentials + def test_create_accessor_share_example(self): + """ + create_share request example + """ + try: + print('\ncreate_share() result:') + # begin-create_share + + share_identity = { + 'crn': data["shareCRN"] + } + share_prototype_model = { + 'origin_share': share_identity, + 'name': 'my-accessor-share', + } + + response = vpc_service.create_share( + share_prototype=share_prototype_model, + ) + share = response.get_result() + + # end-create_share + data['shareAccessorId']=share['id'] + assert share is not None + + + except ApiException as e: + pytest.fail(str(e)) + @needscredentials def test_get_share_example(self): """ @@ -3658,6 +3690,74 @@ def test_update_share_example(self): pytest.fail(str(e)) @needscredentials + def test_list_share_accessor_bindings_example(self): + """ + list_share_accessor_bindings request example + """ + try: + print('\nlist_share_accessor_bindings() result:') + + # begin-list_share_accessor_bindings + + all_results = [] + pager = ShareAccessorBindingsPager( + client=vpc_service, + id=data['shareId'], + limit=10, + ) + while pager.has_next(): + next_page = pager.get_next() + assert next_page is not None + all_results.extend(next_page) + + # end-list_share_accessor_bindings + data['shareAccessorBindingId'] = all_results[0]['id'] + except ApiException as e: + pytest.fail(str(e)) + + @needscredentials + def test_get_share_accessor_binding_example(self): + """ + get_share_accessor_binding request example + """ + try: + print('\nget_share_accessor_binding() result:') + + # begin-get_share_accessor_binding + + response = vpc_service.get_share_accessor_binding( + share_id=data['shareId'], + id=data['shareAccessorBindingId'], + ) + share_accessor_binding = response.get_result() + + print(json.dumps(share_accessor_binding, indent=2)) + + # end-get_share_accessor_binding + assert share_accessor_binding is not None + except ApiException as e: + pytest.fail(str(e)) + + @needscredentials + def test_delete_share_accessor_binding_example(self): + """ + delete_share_accessor_binding request example + """ + try: + # begin-delete_share_accessor_binding + + response = vpc_service.delete_share_accessor_binding( + share_id=data['shareId'], + id=data['shareAccessorBindingId'], + ) + + # end-delete_share_accessor_binding + print('\ndelete_share_accessor_binding() response status code: ', + response.get_status_code()) + + except ApiException as e: + pytest.fail(str(e)) + @needscredentials def test_failover_share_example(self): """ failover_share request example @@ -4857,8 +4957,8 @@ def test_create_vpn_gateway_connection_example(self): vpn_gateway_connection = vpc_service.create_vpn_gateway_connection( vpn_gateway_id=data['vpnGatewayId'], - vpn_gateway_connection_prototype= - vpn_gateway_connection_prototype_model).get_result() + vpn_gateway_connection_prototype=vpn_gateway_connection_prototype_model, + ).get_result() # end-create_vpn_gateway_connection @@ -4916,38 +5016,37 @@ def test_update_vpn_gateway_connection_example(self): pytest.fail(str(e)) @needscredentials - def test_add_vpn_gateway_connections_local_cidr_example(self): + def test_add_vpn_gateway_connection_local_cidr_example(self): """ - add_vpn_gateway_connections_local_cidr request example + add_vpn_gateway_connection_local_cidr request example """ try: - # begin-add_vpn_gateway_connections_local_cidr + # begin-add_vpn_gateway_connection_local_cidr response = vpc_service.add_vpn_gateway_connections_local_cidr( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId'], - cidr_prefix='192.134.0.0', - prefix_length='28') + cidr='192.144.0.0/28') - # end-add_vpn_gateway_connections_local_cidr + # end-add_vpn_gateway_connection_local_cidr assert response is not None except ApiException as e: pytest.fail(str(e)) @needscredentials - def test_list_vpn_gateway_connections_local_cidrs_example(self): + def test_list_vpn_gateway_connection_local_cidrs_example(self): """ - list_vpn_gateway_connections_local_cidrs request example + list_vpn_gateway_connection_local_cidrs request example """ try: - print('\nlist_vpn_gateway_connections_local_cidrs() result:') - # begin-list_vpn_gateway_connections_local_cidrs + print('\nlist_vpn_gateway_connection_local_cidrs() result:') + # begin-list_vpn_gateway_connection_local_cidrs vpn_gateway_connection_local_cid_rs = vpc_service.list_vpn_gateway_connections_local_cidrs( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId']).get_result() - # end-list_vpn_gateway_connections_local_cidrs + # end-list_vpn_gateway_connection_local_cidrs assert vpn_gateway_connection_local_cid_rs is not None @@ -4955,56 +5054,56 @@ def test_list_vpn_gateway_connections_local_cidrs_example(self): pytest.fail(str(e)) @needscredentials - def test_add_vpn_gateway_connections_peer_cidr_example(self): + def test_add_vpn_gateway_connection_peer_cidr_example(self): """ - add_vpn_gateway_connections_peer_cidr request example + add_vpn_gateway_connection_peer_cidr request example """ try: - # begin-add_vpn_gateway_connections_peer_cidr + # begin-add_vpn_gateway_connection_peer_cidr response = vpc_service.add_vpn_gateway_connections_peer_cidr( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId'], cidr='192.144.0.0/28') - # end-add_vpn_gateway_connections_peer_cidr + # end-add_vpn_gateway_connection_peer_cidr assert response is not None except ApiException as e: pytest.fail(str(e)) @needscredentials - def test_check_vpn_gateway_connections_local_cidr_example(self): + def test_check_vpn_gateway_connection_local_cidr_example(self): """ - check_vpn_gateway_connections_local_cidr request example + check_vpn_gateway_connection_local_cidr request example """ try: - # begin-check_vpn_gateway_connections_local_cidr + # begin-check_vpn_gateway_connection_local_cidr response = vpc_service.check_vpn_gateway_connections_local_cidr( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId'], cidr='192.144.0.0/28') - # end-check_vpn_gateway_connections_local_cidr + # end-check_vpn_gateway_connection_local_cidr assert response is not None except ApiException as e: pytest.fail(str(e)) @needscredentials - def test_list_vpn_gateway_connections_peer_cidrs_example(self): + def test_list_vpn_gateway_connection_peer_cidrs_example(self): """ - list_vpn_gateway_connections_peer_cidrs request example + list_vpn_gateway_connection_peer_cidrs request example """ try: - print('\nlist_vpn_gateway_connections_peer_cidrs() result:') - # begin-list_vpn_gateway_connections_peer_cidrs + print('\nlist_vpn_gateway_connection_peer_cidrs() result:') + # begin-list_vpn_gateway_connection_peer_cidrs vpn_gateway_connection_peer_cid_rs = vpc_service.list_vpn_gateway_connections_peer_cidrs( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId']).get_result() - # end-list_vpn_gateway_connections_peer_cidrs + # end-list_vpn_gateway_connection_peer_cidrs assert vpn_gateway_connection_peer_cid_rs is not None @@ -5012,19 +5111,19 @@ def test_list_vpn_gateway_connections_peer_cidrs_example(self): pytest.fail(str(e)) @needscredentials - def test_check_vpn_gateway_connections_peer_cidr_example(self): + def test_check_vpn_gateway_connection_peer_cidr_example(self): """ - check_vpn_gateway_connections_peer_cidr request example + check_vpn_gateway_connection_peer_cidr request example """ try: - # begin-check_vpn_gateway_connections_peer_cidr + # begin-check_vpn_gateway_connection_peer_cidr response = vpc_service.check_vpn_gateway_connections_peer_cidr( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId'], cidr='192.144.0.0/28') - # end-check_vpn_gateway_connections_peer_cidr + # end-check_vpn_gateway_connection_peer_cidr assert response is not None except ApiException as e: @@ -6522,6 +6621,7 @@ def test_create_bare_metal_server_example(self): 'name': data['zone'], } bare_metal_server_prototype_model = { + 'bandwidth': 10000, 'initialization': bare_metal_server_initialization_prototype_model, 'primary_network_interface': bare_metal_server_primary_network_interface_prototype_model, @@ -7452,38 +7552,38 @@ def test_delete_flow_log_collector_example(self): pytest.fail(str(e)) @needscredentials - def test_remove_vpn_gateway_connections_peer_cidr_example(self): + def test_remove_vpn_gateway_connection_peer_cidr_example(self): """ - remove_vpn_gateway_connections_peer_cidr request example + remove_vpn_gateway_connection_peer_cidr request example """ try: - # begin-remove_vpn_gateway_connections_peer_cidr + # begin-remove_vpn_gateway_connection_peer_cidr response = vpc_service.remove_vpn_gateway_connections_peer_cidr( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId'], cidr='192.144.0.0/28') - # end-remove_vpn_gateway_connections_peer_cidr + # end-remove_vpn_gateway_connection_peer_cidr assert response is not None except ApiException as e: pytest.fail(str(e)) @needscredentials - def test_remove_vpn_gateway_connections_local_cidr_example(self): + def test_remove_vpn_gateway_connection_local_cidr_example(self): """ - remove_vpn_gateway_connections_local_cidr request example + remove_vpn_gateway_connection_local_cidr request example """ try: - # begin-remove_vpn_gateway_connections_local_cidr + # begin-remove_vpn_gateway_connection_local_cidr response = vpc_service.remove_vpn_gateway_connections_local_cidr( vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId'], cidr='192.144.0.0/28') - # end-remove_vpn_gateway_connections_local_cidr + # end-remove_vpn_gateway_connection_local_cidr assert response is not None except ApiException as e: diff --git a/ibm_vpc/vpc_v1.py b/ibm_vpc/vpc_v1.py index 5bbf8c3..8350ee6 100644 --- a/ibm_vpc/vpc_v1.py +++ b/ibm_vpc/vpc_v1.py @@ -14,8 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# IBM OpenAPI SDK Code Generator Version: 3.90.0-5aad763d-20240506-203857 - +# IBM OpenAPI SDK Code Generator Version: 3.91.0-d9755c53-20240605-153412 """ The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual server instances, along with subnets, volumes, load balancers, and @@ -43,7 +42,8 @@ # Service ############################################################################## - +import logging +logging.basicConfig(level=logging.DEBUG) class VpcV1(BaseService): """The vpc V1 service.""" @@ -53,7 +53,7 @@ class VpcV1(BaseService): @classmethod def new_instance( cls, - version: str = '2024-04-30', + version: Optional[str] = "2024-07-02", service_name: str = DEFAULT_SERVICE_NAME, generation: Optional[int] = 2, ) -> 'VpcV1': @@ -63,7 +63,7 @@ def new_instance( :param str version: The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2024-04-30` and - `2024-05-10`. + `2024-07-03`. """ if version is None: raise ValueError('version must be provided') @@ -73,13 +73,13 @@ def new_instance( version, authenticator, generation, - ) + ) service.configure_service(service_name) return service def __init__( self, - version: str = '2024-04-30', + version: Optional[str] = "2024-07-02", authenticator: Authenticator = None, generation: Optional[int] = 2, ) -> None: @@ -88,7 +88,7 @@ def __init__( :param str version: The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2024-04-30` and - `2024-05-10`. + `2024-07-03`. :param Authenticator authenticator: The authenticator specifies the authentication mechanism. Get up to date information from https://github.com/IBM/python-sdk-core/blob/main/README.md @@ -97,7 +97,9 @@ def __init__( if version is None: raise ValueError('version must be provided') - BaseService.__init__(self, service_url=self.DEFAULT_SERVICE_URL, authenticator=authenticator) + BaseService.__init__(self, + service_url=self.DEFAULT_SERVICE_URL, + authenticator=authenticator) self.generation = generation self.version = version @@ -115,11 +117,11 @@ def list_vpcs( **kwargs, ) -> DetailedResponse: """ - List all VPCs. + List VPCs. - This request lists all VPCs in the region. A VPC is a virtual network that belongs - to an account and provides logical isolation from other networks. A VPC is made up - of resources in one or more zones. VPCs are regional, and each VPC can contain + This request lists VPCs in the region. A VPC is a virtual network that belongs to + an account and provides logical isolation from other networks. A VPC is made up of + resources in one or more zones. VPCs are regional, and each VPC can contain resources in multiple zones in a region. :param str start: (optional) A server-provided token determining what @@ -605,9 +607,9 @@ def list_vpc_address_prefixes( **kwargs, ) -> DetailedResponse: """ - List all address prefixes for a VPC. + List address prefixes for a VPC. - This request lists all address pool prefixes for a VPC. + This request lists address pool prefixes for a VPC. :param str vpc_id: The VPC identifier. :param str start: (optional) A server-provided token determining what @@ -932,9 +934,9 @@ def list_vpc_dns_resolution_bindings( **kwargs, ) -> DetailedResponse: """ - List all DNS resolution bindings for a VPC. + List DNS resolution bindings for a VPC. - This request lists all DNS resolution bindings for a VPC. A DNS resolution binding + This request lists DNS resolution bindings for a VPC. A DNS resolution binding represents an association with another VPC for centralizing DNS name resolution. If the VPC specified by the identifier in the URL is a DNS hub VPC (has `dns.enable_hub` set to `true`) then there is one binding for each VPC bound to @@ -1146,7 +1148,8 @@ def delete_vpc_dns_resolution_binding( path_param_keys = ['vpc_id', 'id'] path_param_values = self.encode_path_vars(vpc_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/dns_resolution_bindings/{id}'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/dns_resolution_bindings/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -1201,7 +1204,8 @@ def get_vpc_dns_resolution_binding( path_param_keys = ['vpc_id', 'id'] path_param_values = self.encode_path_vars(vpc_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/dns_resolution_bindings/{id}'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/dns_resolution_bindings/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -1242,8 +1246,10 @@ def update_vpc_dns_resolution_binding( raise ValueError('id must be provided') if vpcdns_resolution_binding_patch is None: raise ValueError('vpcdns_resolution_binding_patch must be provided') - if isinstance(vpcdns_resolution_binding_patch, VPCDNSResolutionBindingPatch): - vpcdns_resolution_binding_patch = convert_model(vpcdns_resolution_binding_patch) + if isinstance(vpcdns_resolution_binding_patch, + VPCDNSResolutionBindingPatch): + vpcdns_resolution_binding_patch = convert_model( + vpcdns_resolution_binding_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -1268,7 +1274,8 @@ def update_vpc_dns_resolution_binding( path_param_keys = ['vpc_id', 'id'] path_param_values = self.encode_path_vars(vpc_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/dns_resolution_bindings/{id}'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/dns_resolution_bindings/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -1290,9 +1297,9 @@ def list_vpc_routes( **kwargs, ) -> DetailedResponse: """ - List all routes in a VPC's default routing table. + List routes in a VPC's default routing table. - This request lists all routes in the VPC's default routing table. Each route is + This request lists routes in the VPC's default routing table. Each route is zone-specific and directs any packets matching its destination CIDR block to a `next_hop` IP address. The most specific route matching a packet's destination will be used. If multiple equally-specific routes exist, traffic will be @@ -1311,7 +1318,8 @@ def list_vpc_routes( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: list_vpc_routes') + logging.warning( + 'A deprecated operation has been invoked: list_vpc_routes') if not vpc_id: raise ValueError('vpc_id must be provided') @@ -1425,7 +1433,8 @@ def create_vpc_route( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: create_vpc_route') + logging.warning( + 'A deprecated operation has been invoked: create_vpc_route') if not vpc_id: raise ValueError('vpc_id must be provided') @@ -1502,7 +1511,8 @@ def delete_vpc_route( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: delete_vpc_route') + logging.warning( + 'A deprecated operation has been invoked: delete_vpc_route') if not vpc_id: raise ValueError('vpc_id must be provided') @@ -1559,7 +1569,8 @@ def get_vpc_route( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: get_vpc_route') + logging.warning( + 'A deprecated operation has been invoked: get_vpc_route') if not vpc_id: raise ValueError('vpc_id must be provided') @@ -1621,7 +1632,8 @@ def update_vpc_route( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: update_vpc_route') + logging.warning( + 'A deprecated operation has been invoked: update_vpc_route') if not vpc_id: raise ValueError('vpc_id must be provided') @@ -1677,14 +1689,13 @@ def list_vpc_routing_tables( **kwargs, ) -> DetailedResponse: """ - List all routing tables for a VPC. + List routing tables for a VPC. - This request lists all routing tables for a VPC. Each subnet in a VPC is - associated with a routing table, which controls delivery of packets sent on that - subnet according to the action of the most specific matching route in the table. - If multiple equally-specific routes exist, traffic will be distributed across - them. If no routes match, delivery will be controlled by the system's built-in - routes. + This request lists routing tables for a VPC. Each subnet in a VPC is associated + with a routing table, which controls delivery of packets sent on that subnet + according to the action of the most specific matching route in the table. If + multiple equally-specific routes exist, traffic will be distributed across them. + If no routes match, delivery will be controlled by the system's built-in routes. :param str vpc_id: The VPC identifier. :param str start: (optional) A server-provided token determining what @@ -2075,15 +2086,15 @@ def list_vpc_routing_table_routes( **kwargs, ) -> DetailedResponse: """ - List all routes in a VPC routing table. + List routes in a VPC routing table. - This request lists all routes in a VPC routing table. If subnets are associated - with this routing table, delivery of packets sent on a subnet is performed - according to the action of the most specific matching route in the table (provided - the subnet and route are in the same zone). If multiple equally-specific routes - exist, the route with the highest priority will be used. If two matching routes - have the same destination and priority, traffic will be distributed between them. - If no routes match, delivery will be controlled by the system's built-in routes. + This request lists routes in a VPC routing table. If subnets are associated with + this routing table, delivery of packets sent on a subnet is performed according to + the action of the most specific matching route in the table (provided the subnet + and route are in the same zone). If multiple equally-specific routes exist, the + route with the highest priority will be used. If two matching routes have the same + destination and priority, traffic will be distributed between them. If no routes + match, delivery will be controlled by the system's built-in routes. :param str vpc_id: The VPC identifier. :param str routing_table_id: The routing table identifier. @@ -2122,7 +2133,8 @@ def list_vpc_routing_table_routes( path_param_keys = ['vpc_id', 'routing_table_id'] path_param_values = self.encode_path_vars(vpc_id, routing_table_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -2252,7 +2264,8 @@ def create_vpc_routing_table_route( path_param_keys = ['vpc_id', 'routing_table_id'] path_param_values = self.encode_path_vars(vpc_id, routing_table_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -2311,7 +2324,8 @@ def delete_vpc_routing_table_route( path_param_keys = ['vpc_id', 'routing_table_id', 'id'] path_param_values = self.encode_path_vars(vpc_id, routing_table_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -2370,7 +2384,8 @@ def get_vpc_routing_table_route( path_param_keys = ['vpc_id', 'routing_table_id', 'id'] path_param_values = self.encode_path_vars(vpc_id, routing_table_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -2440,7 +2455,8 @@ def update_vpc_routing_table_route( path_param_keys = ['vpc_id', 'routing_table_id', 'id'] path_param_values = self.encode_path_vars(vpc_id, routing_table_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format(**path_param_dict) + url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -2471,9 +2487,9 @@ def list_subnets( **kwargs, ) -> DetailedResponse: """ - List all subnets. + List subnets. - This request lists all subnets in the region. Subnets are contiguous ranges of IP + This request lists subnets in the region. Subnets are contiguous ranges of IP addresses specified in CIDR block notation. Each subnet is within a particular zone and cannot span multiple zones or regions. @@ -3167,10 +3183,10 @@ def list_subnet_reserved_ips( **kwargs, ) -> DetailedResponse: """ - List all reserved IPs in a subnet. + List reserved IPs in a subnet. - This request lists all reserved IPs in a subnet. A reserved IP resource will exist - for every address in the subnet which is not available for use. + This request lists reserved IPs in a subnet. A reserved IP resource will exist for + every address in the subnet which is not available for use. :param str subnet_id: The subnet identifier. :param str start: (optional) A server-provided token determining what @@ -3516,14 +3532,15 @@ def list_images( name: Optional[str] = None, status: Optional[List[str]] = None, visibility: Optional[str] = None, + user_data_format: Optional[List[str]] = None, **kwargs, ) -> DetailedResponse: """ - List all images. + List images. - This request lists all images available in the region. An image provides source - data for a volume. Images are either system-provided, or created from another - source, such as importing from Cloud Object Storage. + This request lists images available in the region. An image provides source data + for a volume. Images are either system-provided, or created from another source, + such as importing from Cloud Object Storage. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -3537,6 +3554,9 @@ def list_images( `status` property matching one of the specified comma-separated values. :param str visibility: (optional) Filters the collection to images with a `visibility` property matching the specified value. + :param List[str] user_data_format: (optional) Filters the collection to + images with a `user_data_format` property matching one of the specified + comma-separated values. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse with `dict` result representing a `ImageCollection` object @@ -3559,6 +3579,7 @@ def list_images( 'name': name, 'status': convert_list(status), 'visibility': visibility, + 'user_data_format': convert_list(user_data_format), } if 'headers' in kwargs: @@ -3925,10 +3946,10 @@ def list_image_export_jobs( **kwargs, ) -> DetailedResponse: """ - List all image export jobs. + List export jobs for an image. - This request lists all export jobs for an image. Each job tracks the exporting of - the image to another location, such as a bucket within cloud object storage. + This request lists export jobs for an image. Each job tracks the exporting of the + image to another location, such as a bucket within cloud object storage. The jobs will be sorted by their `created_at` property values, with newest jobs first. Jobs with identical `created_at` property values will in turn be sorted by ascending @@ -3987,7 +4008,7 @@ def create_image_export_job( **kwargs, ) -> DetailedResponse: """ - Create an image export job. + Create an export job for an image. This request creates and queues a new export job for the image specified in the URL using the image export job prototype object. The image must be owned by the @@ -4248,9 +4269,9 @@ def list_operating_systems( **kwargs, ) -> DetailedResponse: """ - List all operating systems. + List operating systems. - This request lists all operating systems in the region. + This request lists operating systems in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -4353,10 +4374,10 @@ def list_keys( **kwargs, ) -> DetailedResponse: """ - List all keys. + List keys. - This request lists all keys in the region. A key contains a public SSH key which - may be installed on instances when they are created. Private keys are not stored. + This request lists keys in the region. A key contains a public SSH key which may + be installed on instances when they are created. Private keys are not stored. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -4645,7 +4666,7 @@ def list_instance_profiles( **kwargs, ) -> DetailedResponse: """ - List all instance profiles. + List instance profiles. This request lists provisionable [instance profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) in the region. An @@ -4741,9 +4762,9 @@ def list_instance_templates( **kwargs, ) -> DetailedResponse: """ - List all instance templates. + List instance templates. - This request lists all instance templates in the region. + This request lists instance templates in the region. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. @@ -4804,7 +4825,8 @@ def create_instance_template( if instance_template_prototype is None: raise ValueError('instance_template_prototype must be provided') if isinstance(instance_template_prototype, InstanceTemplatePrototype): - instance_template_prototype = convert_model(instance_template_prototype) + instance_template_prototype = convert_model( + instance_template_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -5024,9 +5046,9 @@ def list_instances( **kwargs, ) -> DetailedResponse: """ - List all instances. + List instances. - This request lists all instances in the region. + This request lists instances in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -5056,9 +5078,9 @@ def list_instances( :param str reservation_id: (optional) Filters the collection to resources with a `reservation.id` property matching the specified identifier. :param str reservation_crn: (optional) Filters the collection to resources - with a `reservation.crn` property matching the specified CRN. + with a `reservation.crn` property matching the specified identifier. :param str reservation_name: (optional) Filters the collection to resources - with a `reservation.name` property matching the exact specified name. + with a `reservation.name` property matching the specified identifier. :param str vpc_id: (optional) Filters the collection to resources with a `vpc.id` property matching the specified identifier. :param str vpc_crn: (optional) Filters the collection to resources with a @@ -5533,7 +5555,8 @@ def create_instance_console_access_token( path_param_keys = ['instance_id'] path_param_values = self.encode_path_vars(instance_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/console_access_token'.format(**path_param_dict) + url = '/instances/{instance_id}/console_access_token'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -5551,12 +5574,12 @@ def list_instance_disks( **kwargs, ) -> DetailedResponse: """ - List all disks on an instance. + List disks on an instance. - This request lists all disks on an instance. A disk is a block device that is - locally attached to the instance's physical host and is also referred to as - instance storage. By default, the listed disks are sorted by their `created_at` - property values, with the newest disk first. + This request lists disks on an instance. A disk is a block device that is locally + attached to the instance's physical host and is also referred to as instance + storage. By default, the listed disks are sorted by their `created_at` property + values, with the newest disk first. :param str instance_id: The virtual server instance identifier. :param dict headers: A `dict` containing the request headers @@ -5723,9 +5746,9 @@ def list_instance_network_attachments( **kwargs, ) -> DetailedResponse: """ - List all network attachments on an instance. + List network attachments on an instance. - This request lists all network attachments on an instance. A network attachment + This request lists network attachments on an instance. A network attachment represents a device on the instance to which a virtual network interface is attached. The network attachments will be sorted by their `created_at` property values, with @@ -5761,7 +5784,8 @@ def list_instance_network_attachments( path_param_keys = ['instance_id'] path_param_values = self.encode_path_vars(instance_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_attachments'.format(**path_param_dict) + url = '/instances/{instance_id}/network_attachments'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -5775,7 +5799,8 @@ def list_instance_network_attachments( def create_instance_network_attachment( self, instance_id: str, - virtual_network_interface: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterface', + virtual_network_interface: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterface', *, name: Optional[str] = None, **kwargs, @@ -5840,7 +5865,8 @@ def create_instance_network_attachment( path_param_keys = ['instance_id'] path_param_values = self.encode_path_vars(instance_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_attachments'.format(**path_param_dict) + url = '/instances/{instance_id}/network_attachments'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -5898,7 +5924,8 @@ def delete_instance_network_attachment( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_attachments/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -5953,7 +5980,8 @@ def get_instance_network_attachment( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_attachments/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -5993,9 +6021,12 @@ def update_instance_network_attachment( if not id: raise ValueError('id must be provided') if instance_network_attachment_patch is None: - raise ValueError('instance_network_attachment_patch must be provided') - if isinstance(instance_network_attachment_patch, InstanceNetworkAttachmentPatch): - instance_network_attachment_patch = convert_model(instance_network_attachment_patch) + raise ValueError( + 'instance_network_attachment_patch must be provided') + if isinstance(instance_network_attachment_patch, + InstanceNetworkAttachmentPatch): + instance_network_attachment_patch = convert_model( + instance_network_attachment_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -6020,7 +6051,8 @@ def update_instance_network_attachment( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_attachments/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -6038,9 +6070,9 @@ def list_instance_network_interfaces( **kwargs, ) -> DetailedResponse: """ - List all network interfaces on an instance. + List network interfaces on an instance. - This request lists all network interfaces on an instance. An instance network + This request lists network interfaces on an instance. An instance network interface is an abstract representation of a network device and attaches an instance to a single subnet. Each network interface on an instance can attach to any subnet in the zone, including subnets that are already attached to the @@ -6081,7 +6113,8 @@ def list_instance_network_interfaces( path_param_keys = ['instance_id'] path_param_values = self.encode_path_vars(instance_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -6189,7 +6222,8 @@ def create_instance_network_interface( path_param_keys = ['instance_id'] path_param_values = self.encode_path_vars(instance_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -6251,7 +6285,8 @@ def delete_instance_network_interface( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -6311,7 +6346,8 @@ def get_instance_network_interface( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -6382,7 +6418,8 @@ def update_instance_network_interface( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -6401,9 +6438,9 @@ def list_instance_network_interface_floating_ips( **kwargs, ) -> DetailedResponse: """ - List all floating IPs associated with an instance network interface. + List floating IPs associated with an instance network interface. - This request lists all floating IPs associated with an instance network interface. + This request lists floating IPs associated with an instance network interface. :param str instance_id: The virtual server instance identifier. :param str network_interface_id: The instance network interface identifier. @@ -6435,9 +6472,11 @@ def list_instance_network_interface_floating_ips( headers['Accept'] = 'application/json' path_param_keys = ['instance_id', 'network_interface_id'] - path_param_values = self.encode_path_vars(instance_id, network_interface_id) + path_param_values = self.encode_path_vars(instance_id, + network_interface_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -6493,9 +6532,11 @@ def remove_instance_network_interface_floating_ip( del kwargs['headers'] path_param_keys = ['instance_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(instance_id, network_interface_id, id) + path_param_values = self.encode_path_vars(instance_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -6552,9 +6593,11 @@ def get_instance_network_interface_floating_ip( headers['Accept'] = 'application/json' path_param_keys = ['instance_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(instance_id, network_interface_id, id) + path_param_values = self.encode_path_vars(instance_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -6615,9 +6658,11 @@ def add_instance_network_interface_floating_ip( headers['Accept'] = 'application/json' path_param_keys = ['instance_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(instance_id, network_interface_id, id) + path_param_values = self.encode_path_vars(instance_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -6654,7 +6699,9 @@ def list_instance_network_interface_ips( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: list_instance_network_interface_ips') + logging.warning( + 'A deprecated operation has been invoked: list_instance_network_interface_ips' + ) if not instance_id: raise ValueError('instance_id must be provided') @@ -6681,9 +6728,11 @@ def list_instance_network_interface_ips( headers['Accept'] = 'application/json' path_param_keys = ['instance_id', 'network_interface_id'] - path_param_values = self.encode_path_vars(instance_id, network_interface_id) + path_param_values = self.encode_path_vars(instance_id, + network_interface_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/ips'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/ips'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -6716,7 +6765,9 @@ def get_instance_network_interface_ip( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: get_instance_network_interface_ip') + logging.warning( + 'A deprecated operation has been invoked: get_instance_network_interface_ip' + ) if not instance_id: raise ValueError('instance_id must be provided') @@ -6743,9 +6794,11 @@ def get_instance_network_interface_ip( headers['Accept'] = 'application/json' path_param_keys = ['instance_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(instance_id, network_interface_id, id) + path_param_values = self.encode_path_vars(instance_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/ips/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -6762,11 +6815,11 @@ def list_instance_volume_attachments( **kwargs, ) -> DetailedResponse: """ - List all volumes attachments on an instance. + List volumes attachments on an instance. - This request lists all volume attachments on an instance. A volume attachment - connects a volume to an instance. Each instance may have many volume attachments - but each volume attachment connects exactly one instance to exactly one volume. + This request lists volume attachments on an instance. A volume attachment connects + a volume to an instance. Each instance may have many volume attachments but each + volume attachment connects exactly one instance to exactly one volume. :param str instance_id: The virtual server instance identifier. :param dict headers: A `dict` containing the request headers @@ -6797,7 +6850,8 @@ def list_instance_volume_attachments( path_param_keys = ['instance_id'] path_param_values = self.encode_path_vars(instance_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/volume_attachments'.format(**path_param_dict) + url = '/instances/{instance_id}/volume_attachments'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -6858,9 +6912,12 @@ def create_instance_volume_attachment( } data = { - 'volume': volume, - 'delete_volume_on_instance_delete': delete_volume_on_instance_delete, - 'name': name, + 'volume': + volume, + 'delete_volume_on_instance_delete': + delete_volume_on_instance_delete, + 'name': + name, } data = {k: v for (k, v) in data.items() if v is not None} data = json.dumps(data) @@ -6874,7 +6931,8 @@ def create_instance_volume_attachment( path_param_keys = ['instance_id'] path_param_values = self.encode_path_vars(instance_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/volume_attachments'.format(**path_param_dict) + url = '/instances/{instance_id}/volume_attachments'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -6930,7 +6988,8 @@ def delete_instance_volume_attachment( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/volume_attachments/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/volume_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -6985,7 +7044,8 @@ def get_instance_volume_attachment( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/volume_attachments/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/volume_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -7052,7 +7112,8 @@ def update_instance_volume_attachment( path_param_keys = ['instance_id', 'id'] path_param_values = self.encode_path_vars(instance_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instances/{instance_id}/volume_attachments/{id}'.format(**path_param_dict) + url = '/instances/{instance_id}/volume_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -7076,9 +7137,9 @@ def list_instance_groups( **kwargs, ) -> DetailedResponse: """ - List all instance groups. + List instance groups. - This request lists all instance groups in the region. + This request lists instance groups in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -7437,7 +7498,8 @@ def delete_instance_group_load_balancer( path_param_keys = ['instance_group_id'] path_param_values = self.encode_path_vars(instance_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/load_balancer'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/load_balancer'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -7457,9 +7519,9 @@ def list_instance_group_managers( **kwargs, ) -> DetailedResponse: """ - List all managers for an instance group. + List managers for an instance group. - This request lists all managers for an instance group. + This request lists managers for an instance group. :param str instance_group_id: The instance group identifier. :param str start: (optional) A server-provided token determining what @@ -7495,7 +7557,8 @@ def list_instance_group_managers( path_param_keys = ['instance_group_id'] path_param_values = self.encode_path_vars(instance_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -7528,9 +7591,12 @@ def create_instance_group_manager( if not instance_group_id: raise ValueError('instance_group_id must be provided') if instance_group_manager_prototype is None: - raise ValueError('instance_group_manager_prototype must be provided') - if isinstance(instance_group_manager_prototype, InstanceGroupManagerPrototype): - instance_group_manager_prototype = convert_model(instance_group_manager_prototype) + raise ValueError( + 'instance_group_manager_prototype must be provided') + if isinstance(instance_group_manager_prototype, + InstanceGroupManagerPrototype): + instance_group_manager_prototype = convert_model( + instance_group_manager_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -7555,7 +7621,8 @@ def create_instance_group_manager( path_param_keys = ['instance_group_id'] path_param_values = self.encode_path_vars(instance_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -7609,7 +7676,8 @@ def delete_instance_group_manager( path_param_keys = ['instance_group_id', 'id'] path_param_values = self.encode_path_vars(instance_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -7664,7 +7732,8 @@ def get_instance_group_manager( path_param_keys = ['instance_group_id', 'id'] path_param_values = self.encode_path_vars(instance_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -7704,7 +7773,8 @@ def update_instance_group_manager( if instance_group_manager_patch is None: raise ValueError('instance_group_manager_patch must be provided') if isinstance(instance_group_manager_patch, InstanceGroupManagerPatch): - instance_group_manager_patch = convert_model(instance_group_manager_patch) + instance_group_manager_patch = convert_model( + instance_group_manager_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -7729,7 +7799,8 @@ def update_instance_group_manager( path_param_keys = ['instance_group_id', 'id'] path_param_values = self.encode_path_vars(instance_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -7751,9 +7822,9 @@ def list_instance_group_manager_actions( **kwargs, ) -> DetailedResponse: """ - List all actions for an instance group manager. + List actions for an instance group manager. - This request lists all instance group actions for an instance group manager. + This request lists instance group actions for an instance group manager. :param str instance_group_id: The instance group identifier. :param str instance_group_manager_id: The instance group manager @@ -7791,9 +7862,11 @@ def list_instance_group_manager_actions( headers['Accept'] = 'application/json' path_param_keys = ['instance_group_id', 'instance_group_manager_id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id) + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -7808,7 +7881,8 @@ def create_instance_group_manager_action( self, instance_group_id: str, instance_group_manager_id: str, - instance_group_manager_action_prototype: 'InstanceGroupManagerActionPrototype', + instance_group_manager_action_prototype: + 'InstanceGroupManagerActionPrototype', **kwargs, ) -> DetailedResponse: """ @@ -7832,9 +7906,12 @@ def create_instance_group_manager_action( if not instance_group_manager_id: raise ValueError('instance_group_manager_id must be provided') if instance_group_manager_action_prototype is None: - raise ValueError('instance_group_manager_action_prototype must be provided') - if isinstance(instance_group_manager_action_prototype, InstanceGroupManagerActionPrototype): - instance_group_manager_action_prototype = convert_model(instance_group_manager_action_prototype) + raise ValueError( + 'instance_group_manager_action_prototype must be provided') + if isinstance(instance_group_manager_action_prototype, + InstanceGroupManagerActionPrototype): + instance_group_manager_action_prototype = convert_model( + instance_group_manager_action_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -7857,9 +7934,11 @@ def create_instance_group_manager_action( headers['Accept'] = 'application/json' path_param_keys = ['instance_group_id', 'instance_group_manager_id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id) + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -7916,10 +7995,14 @@ def delete_instance_group_manager_action( headers.update(kwargs.get('headers')) del kwargs['headers'] - path_param_keys = ['instance_group_id', 'instance_group_manager_id', 'id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id, id) + path_param_keys = [ + 'instance_group_id', 'instance_group_manager_id', 'id' + ] + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -7976,10 +8059,14 @@ def get_instance_group_manager_action( del kwargs['headers'] headers['Accept'] = 'application/json' - path_param_keys = ['instance_group_id', 'instance_group_manager_id', 'id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id, id) + path_param_keys = [ + 'instance_group_id', 'instance_group_manager_id', 'id' + ] + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -8021,9 +8108,12 @@ def update_instance_group_manager_action( if not id: raise ValueError('id must be provided') if instance_group_manager_action_patch is None: - raise ValueError('instance_group_manager_action_patch must be provided') - if isinstance(instance_group_manager_action_patch, InstanceGroupManagerActionPatch): - instance_group_manager_action_patch = convert_model(instance_group_manager_action_patch) + raise ValueError( + 'instance_group_manager_action_patch must be provided') + if isinstance(instance_group_manager_action_patch, + InstanceGroupManagerActionPatch): + instance_group_manager_action_patch = convert_model( + instance_group_manager_action_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -8045,10 +8135,14 @@ def update_instance_group_manager_action( del kwargs['headers'] headers['Accept'] = 'application/json' - path_param_keys = ['instance_group_id', 'instance_group_manager_id', 'id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id, id) + path_param_keys = [ + 'instance_group_id', 'instance_group_manager_id', 'id' + ] + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -8070,9 +8164,9 @@ def list_instance_group_manager_policies( **kwargs, ) -> DetailedResponse: """ - List all policies for an instance group manager. + List policies for an instance group manager. - This request lists all policies for an instance group manager. + This request lists policies for an instance group manager. :param str instance_group_id: The instance group identifier. :param str instance_group_manager_id: The instance group manager @@ -8110,9 +8204,11 @@ def list_instance_group_manager_policies( headers['Accept'] = 'application/json' path_param_keys = ['instance_group_id', 'instance_group_manager_id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id) + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -8127,7 +8223,8 @@ def create_instance_group_manager_policy( self, instance_group_id: str, instance_group_manager_id: str, - instance_group_manager_policy_prototype: 'InstanceGroupManagerPolicyPrototype', + instance_group_manager_policy_prototype: + 'InstanceGroupManagerPolicyPrototype', **kwargs, ) -> DetailedResponse: """ @@ -8151,9 +8248,12 @@ def create_instance_group_manager_policy( if not instance_group_manager_id: raise ValueError('instance_group_manager_id must be provided') if instance_group_manager_policy_prototype is None: - raise ValueError('instance_group_manager_policy_prototype must be provided') - if isinstance(instance_group_manager_policy_prototype, InstanceGroupManagerPolicyPrototype): - instance_group_manager_policy_prototype = convert_model(instance_group_manager_policy_prototype) + raise ValueError( + 'instance_group_manager_policy_prototype must be provided') + if isinstance(instance_group_manager_policy_prototype, + InstanceGroupManagerPolicyPrototype): + instance_group_manager_policy_prototype = convert_model( + instance_group_manager_policy_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -8176,9 +8276,11 @@ def create_instance_group_manager_policy( headers['Accept'] = 'application/json' path_param_keys = ['instance_group_id', 'instance_group_manager_id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id) + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -8235,10 +8337,14 @@ def delete_instance_group_manager_policy( headers.update(kwargs.get('headers')) del kwargs['headers'] - path_param_keys = ['instance_group_id', 'instance_group_manager_id', 'id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id, id) + path_param_keys = [ + 'instance_group_id', 'instance_group_manager_id', 'id' + ] + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -8295,10 +8401,14 @@ def get_instance_group_manager_policy( del kwargs['headers'] headers['Accept'] = 'application/json' - path_param_keys = ['instance_group_id', 'instance_group_manager_id', 'id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id, id) + path_param_keys = [ + 'instance_group_id', 'instance_group_manager_id', 'id' + ] + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -8340,9 +8450,12 @@ def update_instance_group_manager_policy( if not id: raise ValueError('id must be provided') if instance_group_manager_policy_patch is None: - raise ValueError('instance_group_manager_policy_patch must be provided') - if isinstance(instance_group_manager_policy_patch, InstanceGroupManagerPolicyPatch): - instance_group_manager_policy_patch = convert_model(instance_group_manager_policy_patch) + raise ValueError( + 'instance_group_manager_policy_patch must be provided') + if isinstance(instance_group_manager_policy_patch, + InstanceGroupManagerPolicyPatch): + instance_group_manager_policy_patch = convert_model( + instance_group_manager_policy_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -8364,10 +8477,14 @@ def update_instance_group_manager_policy( del kwargs['headers'] headers['Accept'] = 'application/json' - path_param_keys = ['instance_group_id', 'instance_group_manager_id', 'id'] - path_param_values = self.encode_path_vars(instance_group_id, instance_group_manager_id, id) + path_param_keys = [ + 'instance_group_id', 'instance_group_manager_id', 'id' + ] + path_param_values = self.encode_path_vars(instance_group_id, + instance_group_manager_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -8385,12 +8502,11 @@ def delete_instance_group_memberships( **kwargs, ) -> DetailedResponse: """ - Delete all memberships from an instance group. + Delete memberships from an instance group. - This request deletes all memberships of an instance group. This operation cannot - be reversed. reversed. Any memberships that have - `delete_instance_on_membership_delete` set to `true` will also have their - instances deleted. + This request deletes memberships of an instance group. This operation cannot be + reversed. Memberships that have `delete_instance_on_membership_delete` set to + `true` will also have their instances deleted. :param str instance_group_id: The instance group identifier. :param dict headers: A `dict` containing the request headers @@ -8420,7 +8536,8 @@ def delete_instance_group_memberships( path_param_keys = ['instance_group_id'] path_param_values = self.encode_path_vars(instance_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/memberships'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/memberships'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -8440,9 +8557,9 @@ def list_instance_group_memberships( **kwargs, ) -> DetailedResponse: """ - List all memberships for an instance group. + List memberships for an instance group. - This request lists all instance group memberships for an instance group. + This request lists instance group memberships for an instance group. :param str instance_group_id: The instance group identifier. :param str start: (optional) A server-provided token determining what @@ -8478,7 +8595,8 @@ def list_instance_group_memberships( path_param_keys = ['instance_group_id'] path_param_values = self.encode_path_vars(instance_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/memberships'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/memberships'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -8533,7 +8651,8 @@ def delete_instance_group_membership( path_param_keys = ['instance_group_id', 'id'] path_param_values = self.encode_path_vars(instance_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/memberships/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/memberships/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -8588,7 +8707,8 @@ def get_instance_group_membership( path_param_keys = ['instance_group_id', 'id'] path_param_values = self.encode_path_vars(instance_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/memberships/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/memberships/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -8627,8 +8747,10 @@ def update_instance_group_membership( raise ValueError('id must be provided') if instance_group_membership_patch is None: raise ValueError('instance_group_membership_patch must be provided') - if isinstance(instance_group_membership_patch, InstanceGroupMembershipPatch): - instance_group_membership_patch = convert_model(instance_group_membership_patch) + if isinstance(instance_group_membership_patch, + InstanceGroupMembershipPatch): + instance_group_membership_patch = convert_model( + instance_group_membership_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -8653,7 +8775,8 @@ def update_instance_group_membership( path_param_keys = ['instance_group_id', 'id'] path_param_values = self.encode_path_vars(instance_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/instance_groups/{instance_group_id}/memberships/{id}'.format(**path_param_dict) + url = '/instance_groups/{instance_group_id}/memberships/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -8680,9 +8803,9 @@ def list_reservations( **kwargs, ) -> DetailedResponse: """ - List all reservations. + List reservations. - This request lists all reservations in the region. A reservation provides reserved + This request lists reservations in the region. A reservation provides reserved capacity for a specified profile in a specified zone. A reservation can also include a long-term committed use discount. The reservations will be sorted by their `created_at` property values, with newest @@ -9066,9 +9189,9 @@ def list_dedicated_host_groups( **kwargs, ) -> DetailedResponse: """ - List all dedicated host groups. + List dedicated host groups. - This request lists all dedicated host groups in the region. Host groups are a + This request lists dedicated host groups in the region. Host groups are a collection of dedicated hosts for placement of instances. Each dedicated host must belong to one and only one group. Host groups do not span zones. @@ -9331,7 +9454,8 @@ def update_dedicated_host_group( if dedicated_host_group_patch is None: raise ValueError('dedicated_host_group_patch must be provided') if isinstance(dedicated_host_group_patch, DedicatedHostGroupPatch): - dedicated_host_group_patch = convert_model(dedicated_host_group_patch) + dedicated_host_group_patch = convert_model( + dedicated_host_group_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -9376,7 +9500,7 @@ def list_dedicated_host_profiles( **kwargs, ) -> DetailedResponse: """ - List all dedicated host profiles. + List dedicated host profiles. This request lists provisionable [dedicated host profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) in the region. A @@ -9485,9 +9609,9 @@ def list_dedicated_hosts( **kwargs, ) -> DetailedResponse: """ - List all dedicated hosts. + List dedicated hosts. - This request lists all dedicated hosts in the region. + This request lists dedicated hosts in the region. :param str dedicated_host_group_id: (optional) Filters the collection to dedicated hosts with a `group.id` property matching the specified @@ -9602,11 +9726,11 @@ def list_dedicated_host_disks( **kwargs, ) -> DetailedResponse: """ - List all disks on a dedicated host. + List disks on a dedicated host. - This request lists all disks on a dedicated host. A disk is a physical device - that is locally attached to the compute node. By default, the listed disks are - sorted by their + This request lists disks on a dedicated host. A disk is a physical device that is + locally attached to the compute node. By default, the listed disks are sorted by + their `created_at` property values, with the newest disk first. :param str dedicated_host_id: The dedicated host identifier. @@ -9638,7 +9762,8 @@ def list_dedicated_host_disks( path_param_keys = ['dedicated_host_id'] path_param_values = self.encode_path_vars(dedicated_host_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/dedicated_hosts/{dedicated_host_id}/disks'.format(**path_param_dict) + url = '/dedicated_hosts/{dedicated_host_id}/disks'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -9693,7 +9818,8 @@ def get_dedicated_host_disk( path_param_keys = ['dedicated_host_id', 'id'] path_param_values = self.encode_path_vars(dedicated_host_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/dedicated_hosts/{dedicated_host_id}/disks/{id}'.format(**path_param_dict) + url = '/dedicated_hosts/{dedicated_host_id}/disks/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -9758,7 +9884,8 @@ def update_dedicated_host_disk( path_param_keys = ['dedicated_host_id', 'id'] path_param_values = self.encode_path_vars(dedicated_host_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/dedicated_hosts/{dedicated_host_id}/disks/{id}'.format(**path_param_dict) + url = '/dedicated_hosts/{dedicated_host_id}/disks/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -9944,9 +10071,9 @@ def list_placement_groups( **kwargs, ) -> DetailedResponse: """ - List all placement groups. + List placement groups. - This request lists all placement groups in the region. + This request lists placement groups in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -10238,9 +10365,9 @@ def list_bare_metal_server_profiles( **kwargs, ) -> DetailedResponse: """ - List all bare metal server profiles. + List bare metal server profiles. - This request lists all [bare metal server + This request lists [bare metal server profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) available in the region. A bare metal server profile specifies the performance characteristics and pricing model for a bare metal server. @@ -10348,9 +10475,9 @@ def list_bare_metal_servers( **kwargs, ) -> DetailedResponse: """ - List all bare metal servers. + List bare metal servers. - This request lists all bare metal servers in the region. + This request lists bare metal servers in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -10430,7 +10557,8 @@ def create_bare_metal_server( if bare_metal_server_prototype is None: raise ValueError('bare_metal_server_prototype must be provided') if isinstance(bare_metal_server_prototype, BareMetalServerPrototype): - bare_metal_server_prototype = convert_model(bare_metal_server_prototype) + bare_metal_server_prototype = convert_model( + bare_metal_server_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -10479,7 +10607,9 @@ def create_bare_metal_server_console_access_token( server. All console configuration is provided at token create time, and the token is subsequently used in the `access_token` query parameter for the WebSocket request. The access token is only valid for a short period of time, and a maximum - of one token is valid for a given bare metal server at a time. + of one token is valid for a given bare metal server at a time. For this request + to succeed, the server must have a `status` of `stopped`, `starting`, or + `running`. :param str bare_metal_server_id: The bare metal server identifier. :param str console_type: The bare metal server console type for which this @@ -10527,7 +10657,8 @@ def create_bare_metal_server_console_access_token( path_param_keys = ['bare_metal_server_id'] path_param_values = self.encode_path_vars(bare_metal_server_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/console_access_token'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/console_access_token'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -10545,10 +10676,10 @@ def list_bare_metal_server_disks( **kwargs, ) -> DetailedResponse: """ - List all disks on a bare metal server. + List disks on a bare metal server. - This request lists all disks on a bare metal server. A disk is a block device - that is locally attached to the physical server. By default, the listed disks are + This request lists disks on a bare metal server. A disk is a block device that + is locally attached to the physical server. By default, the listed disks are sorted by their `created_at` property values, with the newest disk first. :param str bare_metal_server_id: The bare metal server identifier. @@ -10580,7 +10711,8 @@ def list_bare_metal_server_disks( path_param_keys = ['bare_metal_server_id'] path_param_values = self.encode_path_vars(bare_metal_server_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/disks'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/disks'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -10634,7 +10766,8 @@ def get_bare_metal_server_disk( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/disks/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/disks/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -10674,7 +10807,8 @@ def update_bare_metal_server_disk( if bare_metal_server_disk_patch is None: raise ValueError('bare_metal_server_disk_patch must be provided') if isinstance(bare_metal_server_disk_patch, BareMetalServerDiskPatch): - bare_metal_server_disk_patch = convert_model(bare_metal_server_disk_patch) + bare_metal_server_disk_patch = convert_model( + bare_metal_server_disk_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -10699,7 +10833,8 @@ def update_bare_metal_server_disk( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/disks/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/disks/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -10720,13 +10855,13 @@ def list_bare_metal_server_network_attachments( **kwargs, ) -> DetailedResponse: """ - List all network attachments on a bare metal server. + List network attachments on a bare metal server. - This request lists all network attachments on a bare metal server. A bare metal - server network attachment is an abstract representation of a network device and - attaches a bare metal server to a single subnet. Each network interface on a bare - metal server can attach to any subnet in the zone, including subnets that are - already attached to the bare metal server. + This request lists network attachments on a bare metal server. A bare metal server + network attachment is an abstract representation of a network device and attaches + a bare metal server to a single subnet. Each network interface on a bare metal + server can attach to any subnet in the zone, including subnets that are already + attached to the bare metal server. The network attachments will be sorted by their `created_at` property values, with newest network attachments first. Network attachments with identical `created_at` property values will in turn be sorted by ascending `name` property values. @@ -10765,7 +10900,8 @@ def list_bare_metal_server_network_attachments( path_param_keys = ['bare_metal_server_id'] path_param_values = self.encode_path_vars(bare_metal_server_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -10779,7 +10915,8 @@ def list_bare_metal_server_network_attachments( def create_bare_metal_server_network_attachment( self, bare_metal_server_id: str, - bare_metal_server_network_attachment_prototype: 'BareMetalServerNetworkAttachmentPrototype', + bare_metal_server_network_attachment_prototype: + 'BareMetalServerNetworkAttachmentPrototype', **kwargs, ) -> DetailedResponse: """ @@ -10802,9 +10939,13 @@ def create_bare_metal_server_network_attachment( if not bare_metal_server_id: raise ValueError('bare_metal_server_id must be provided') if bare_metal_server_network_attachment_prototype is None: - raise ValueError('bare_metal_server_network_attachment_prototype must be provided') - if isinstance(bare_metal_server_network_attachment_prototype, BareMetalServerNetworkAttachmentPrototype): - bare_metal_server_network_attachment_prototype = convert_model(bare_metal_server_network_attachment_prototype) + raise ValueError( + 'bare_metal_server_network_attachment_prototype must be provided' + ) + if isinstance(bare_metal_server_network_attachment_prototype, + BareMetalServerNetworkAttachmentPrototype): + bare_metal_server_network_attachment_prototype = convert_model( + bare_metal_server_network_attachment_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -10829,7 +10970,8 @@ def create_bare_metal_server_network_attachment( path_param_keys = ['bare_metal_server_id'] path_param_values = self.encode_path_vars(bare_metal_server_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -10886,7 +11028,8 @@ def delete_bare_metal_server_network_attachment( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -10941,7 +11084,8 @@ def get_bare_metal_server_network_attachment( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -10956,7 +11100,8 @@ def update_bare_metal_server_network_attachment( self, bare_metal_server_id: str, id: str, - bare_metal_server_network_attachment_patch: 'BareMetalServerNetworkAttachmentPatch', + bare_metal_server_network_attachment_patch: + 'BareMetalServerNetworkAttachmentPatch', **kwargs, ) -> DetailedResponse: """ @@ -10983,9 +11128,12 @@ def update_bare_metal_server_network_attachment( if not id: raise ValueError('id must be provided') if bare_metal_server_network_attachment_patch is None: - raise ValueError('bare_metal_server_network_attachment_patch must be provided') - if isinstance(bare_metal_server_network_attachment_patch, BareMetalServerNetworkAttachmentPatch): - bare_metal_server_network_attachment_patch = convert_model(bare_metal_server_network_attachment_patch) + raise ValueError( + 'bare_metal_server_network_attachment_patch must be provided') + if isinstance(bare_metal_server_network_attachment_patch, + BareMetalServerNetworkAttachmentPatch): + bare_metal_server_network_attachment_patch = convert_model( + bare_metal_server_network_attachment_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -11010,7 +11158,8 @@ def update_bare_metal_server_network_attachment( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_attachments/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -11031,13 +11180,13 @@ def list_bare_metal_server_network_interfaces( **kwargs, ) -> DetailedResponse: """ - List all network interfaces on a bare metal server. + List network interfaces on a bare metal server. - This request lists all network interfaces on a bare metal server. A bare metal - server network interface is an abstract representation of a network device and - attaches a bare metal server to a single subnet. Each network interface on a bare - metal server can attach to any subnet in the zone, including subnets that are - already attached to the bare metal server. + This request lists network interfaces on a bare metal server. A bare metal server + network interface is an abstract representation of a network device and attaches a + bare metal server to a single subnet. Each network interface on a bare metal + server can attach to any subnet in the zone, including subnets that are already + attached to the bare metal server. If this bare metal server has network attachments, each returned network interface is a [read-only representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) @@ -11078,7 +11227,8 @@ def list_bare_metal_server_network_interfaces( path_param_keys = ['bare_metal_server_id'] path_param_values = self.encode_path_vars(bare_metal_server_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -11092,7 +11242,8 @@ def list_bare_metal_server_network_interfaces( def create_bare_metal_server_network_interface( self, bare_metal_server_id: str, - bare_metal_server_network_interface_prototype: 'BareMetalServerNetworkInterfacePrototype', + bare_metal_server_network_interface_prototype: + 'BareMetalServerNetworkInterfacePrototype', **kwargs, ) -> DetailedResponse: """ @@ -11123,9 +11274,13 @@ def create_bare_metal_server_network_interface( if not bare_metal_server_id: raise ValueError('bare_metal_server_id must be provided') if bare_metal_server_network_interface_prototype is None: - raise ValueError('bare_metal_server_network_interface_prototype must be provided') - if isinstance(bare_metal_server_network_interface_prototype, BareMetalServerNetworkInterfacePrototype): - bare_metal_server_network_interface_prototype = convert_model(bare_metal_server_network_interface_prototype) + raise ValueError( + 'bare_metal_server_network_interface_prototype must be provided' + ) + if isinstance(bare_metal_server_network_interface_prototype, + BareMetalServerNetworkInterfacePrototype): + bare_metal_server_network_interface_prototype = convert_model( + bare_metal_server_network_interface_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -11150,7 +11305,8 @@ def create_bare_metal_server_network_interface( path_param_keys = ['bare_metal_server_id'] path_param_values = self.encode_path_vars(bare_metal_server_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -11212,7 +11368,8 @@ def delete_bare_metal_server_network_interface( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -11272,7 +11429,8 @@ def get_bare_metal_server_network_interface( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -11287,7 +11445,8 @@ def update_bare_metal_server_network_interface( self, bare_metal_server_id: str, id: str, - bare_metal_server_network_interface_patch: 'BareMetalServerNetworkInterfacePatch', + bare_metal_server_network_interface_patch: + 'BareMetalServerNetworkInterfacePatch', **kwargs, ) -> DetailedResponse: """ @@ -11319,9 +11478,12 @@ def update_bare_metal_server_network_interface( if not id: raise ValueError('id must be provided') if bare_metal_server_network_interface_patch is None: - raise ValueError('bare_metal_server_network_interface_patch must be provided') - if isinstance(bare_metal_server_network_interface_patch, BareMetalServerNetworkInterfacePatch): - bare_metal_server_network_interface_patch = convert_model(bare_metal_server_network_interface_patch) + raise ValueError( + 'bare_metal_server_network_interface_patch must be provided') + if isinstance(bare_metal_server_network_interface_patch, + BareMetalServerNetworkInterfacePatch): + bare_metal_server_network_interface_patch = convert_model( + bare_metal_server_network_interface_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -11346,7 +11508,8 @@ def update_bare_metal_server_network_interface( path_param_keys = ['bare_metal_server_id', 'id'] path_param_values = self.encode_path_vars(bare_metal_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -11365,9 +11528,9 @@ def list_bare_metal_server_network_interface_floating_ips( **kwargs, ) -> DetailedResponse: """ - List all floating IPs associated with a bare metal server network interface. + List floating IPs associated with a bare metal server network interface. - This request lists all floating IPs associated with a bare metal server network + This request lists floating IPs associated with a bare metal server network interface. :param str bare_metal_server_id: The bare metal server identifier. @@ -11401,9 +11564,11 @@ def list_bare_metal_server_network_interface_floating_ips( headers['Accept'] = 'application/json' path_param_keys = ['bare_metal_server_id', 'network_interface_id'] - path_param_values = self.encode_path_vars(bare_metal_server_id, network_interface_id) + path_param_values = self.encode_path_vars(bare_metal_server_id, + network_interface_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -11446,7 +11611,8 @@ def remove_bare_metal_server_network_interface_floating_ip( sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, service_version='V1', - operation_id='remove_bare_metal_server_network_interface_floating_ip', + operation_id= + 'remove_bare_metal_server_network_interface_floating_ip', ) headers.update(sdk_headers) @@ -11460,9 +11626,11 @@ def remove_bare_metal_server_network_interface_floating_ip( del kwargs['headers'] path_param_keys = ['bare_metal_server_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(bare_metal_server_id, network_interface_id, id) + path_param_values = self.encode_path_vars(bare_metal_server_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -11520,9 +11688,11 @@ def get_bare_metal_server_network_interface_floating_ip( headers['Accept'] = 'application/json' path_param_keys = ['bare_metal_server_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(bare_metal_server_id, network_interface_id, id) + path_param_values = self.encode_path_vars(bare_metal_server_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -11586,9 +11756,11 @@ def add_bare_metal_server_network_interface_floating_ip( headers['Accept'] = 'application/json' path_param_keys = ['bare_metal_server_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(bare_metal_server_id, network_interface_id, id) + path_param_values = self.encode_path_vars(bare_metal_server_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -11621,7 +11793,9 @@ def list_bare_metal_server_network_interface_ips( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: list_bare_metal_server_network_interface_ips') + logging.warning( + 'A deprecated operation has been invoked: list_bare_metal_server_network_interface_ips' + ) if not bare_metal_server_id: raise ValueError('bare_metal_server_id must be provided') @@ -11646,9 +11820,11 @@ def list_bare_metal_server_network_interface_ips( headers['Accept'] = 'application/json' path_param_keys = ['bare_metal_server_id', 'network_interface_id'] - path_param_values = self.encode_path_vars(bare_metal_server_id, network_interface_id) + path_param_values = self.encode_path_vars(bare_metal_server_id, + network_interface_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -11683,7 +11859,9 @@ def get_bare_metal_server_network_interface_ip( Deprecated: this method is deprecated and may be removed in a future release. """ - logging.warning('A deprecated operation has been invoked: get_bare_metal_server_network_interface_ip') + logging.warning( + 'A deprecated operation has been invoked: get_bare_metal_server_network_interface_ip' + ) if not bare_metal_server_id: raise ValueError('bare_metal_server_id must be provided') @@ -11710,9 +11888,11 @@ def get_bare_metal_server_network_interface_ip( headers['Accept'] = 'application/json' path_param_keys = ['bare_metal_server_id', 'network_interface_id', 'id'] - path_param_values = self.encode_path_vars(bare_metal_server_id, network_interface_id, id) + path_param_values = self.encode_path_vars(bare_metal_server_id, + network_interface_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips/{id}'.format(**path_param_dict) + url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -11929,7 +12109,8 @@ def get_bare_metal_server_initialization( path_param_keys = ['id'] path_param_values = self.encode_path_vars(id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/bare_metal_servers/{id}/initialization'.format(**path_param_dict) + url = '/bare_metal_servers/{id}/initialization'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -11948,8 +12129,8 @@ def restart_bare_metal_server( """ Restart a bare metal server. - This request restarts a bare metal server. It will run immediately regardless of - the state of the server. + This request immediately restarts a bare metal server. For this request to + succeed, the server must have a `status` of `running`. :param str id: The bare metal server identifier. :param dict headers: A `dict` containing the request headers @@ -12117,9 +12298,9 @@ def list_volume_profiles( **kwargs, ) -> DetailedResponse: """ - List all volume profiles. + List volume profiles. - This request lists all [volume + This request lists [volume profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) available in the region. A volume profile specifies the performance characteristics and pricing model for a volume. @@ -12228,9 +12409,9 @@ def list_volumes( **kwargs, ) -> DetailedResponse: """ - List all volumes. + List volumes. - This request lists all volumes in the region. Volumes are network-connected block + This request lists volumes in the region. Volumes are network-connected block storage devices that may be attached to one or more instances in the same region. :param str start: (optional) A server-provided token determining what @@ -12547,9 +12728,9 @@ def list_snapshot_consistency_groups( **kwargs, ) -> DetailedResponse: """ - List all snapshot consistency groups. + List snapshot consistency groups. - This request lists all snapshot consistency groups in the region. A snapshot + This request lists snapshot consistency groups in the region. A snapshot consistency group is a collection of individual snapshots taken at the same time. :param str start: (optional) A server-provided token determining what @@ -12610,7 +12791,8 @@ def list_snapshot_consistency_groups( def create_snapshot_consistency_group( self, - snapshot_consistency_group_prototype: 'SnapshotConsistencyGroupPrototype', + snapshot_consistency_group_prototype: + 'SnapshotConsistencyGroupPrototype', **kwargs, ) -> DetailedResponse: """ @@ -12630,9 +12812,12 @@ def create_snapshot_consistency_group( """ if snapshot_consistency_group_prototype is None: - raise ValueError('snapshot_consistency_group_prototype must be provided') - if isinstance(snapshot_consistency_group_prototype, SnapshotConsistencyGroupPrototype): - snapshot_consistency_group_prototype = convert_model(snapshot_consistency_group_prototype) + raise ValueError( + 'snapshot_consistency_group_prototype must be provided') + if isinstance(snapshot_consistency_group_prototype, + SnapshotConsistencyGroupPrototype): + snapshot_consistency_group_prototype = convert_model( + snapshot_consistency_group_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -12799,9 +12984,12 @@ def update_snapshot_consistency_group( if not id: raise ValueError('id must be provided') if snapshot_consistency_group_patch is None: - raise ValueError('snapshot_consistency_group_patch must be provided') - if isinstance(snapshot_consistency_group_patch, SnapshotConsistencyGroupPatch): - snapshot_consistency_group_patch = convert_model(snapshot_consistency_group_patch) + raise ValueError( + 'snapshot_consistency_group_patch must be provided') + if isinstance(snapshot_consistency_group_patch, + SnapshotConsistencyGroupPatch): + snapshot_consistency_group_patch = convert_model( + snapshot_consistency_group_patch) headers = { 'If-Match': if_match, } @@ -12848,7 +13036,8 @@ def delete_snapshots( """ Delete a filtered collection of snapshots. - This request deletes all snapshots created from a specific source volume. + This request deletes snapshots that match the specified filter. This operation + cannot be reversed. :param str source_volume_id: Filters the collection to resources with a `source_volume.id` property matching the specified identifier. @@ -12916,9 +13105,9 @@ def list_snapshots( **kwargs, ) -> DetailedResponse: """ - List all snapshots. + List snapshots. - This request lists all snapshots in the region. A snapshot preserves the data of a + This request lists snapshots in the region. A snapshot preserves the data of a volume at the time the snapshot is created. :param str start: (optional) A server-provided token determining what @@ -13000,30 +13189,54 @@ def list_snapshots( headers.update(sdk_headers) params = { - 'version': self.version, - 'generation': self.generation, - 'start': start, - 'limit': limit, - 'tag': tag, - 'resource_group.id': resource_group_id, - 'name': name, - 'source_volume.id': source_volume_id, - 'source_volume.crn': source_volume_crn, - 'source_image.id': source_image_id, - 'source_image.crn': source_image_crn, - 'sort': sort, - 'backup_policy_plan.id': backup_policy_plan_id, - 'copies[].id': copies_id, - 'copies[].name': copies_name, - 'copies[].crn': copies_crn, - 'copies[].remote.region.name': copies_remote_region_name, - 'source_snapshot.id': source_snapshot_id, - 'source_snapshot.remote.region.name': source_snapshot_remote_region_name, - 'source_volume.remote.region.name': source_volume_remote_region_name, - 'source_image.remote.region.name': source_image_remote_region_name, - 'clones[].zone.name': clones_zone_name, - 'snapshot_consistency_group.id': snapshot_consistency_group_id, - 'snapshot_consistency_group.crn': snapshot_consistency_group_crn, + 'version': + self.version, + 'generation': + self.generation, + 'start': + start, + 'limit': + limit, + 'tag': + tag, + 'resource_group.id': + resource_group_id, + 'name': + name, + 'source_volume.id': + source_volume_id, + 'source_volume.crn': + source_volume_crn, + 'source_image.id': + source_image_id, + 'source_image.crn': + source_image_crn, + 'sort': + sort, + 'backup_policy_plan.id': + backup_policy_plan_id, + 'copies[].id': + copies_id, + 'copies[].name': + copies_name, + 'copies[].crn': + copies_crn, + 'copies[].remote.region.name': + copies_remote_region_name, + 'source_snapshot.id': + source_snapshot_id, + 'source_snapshot.remote.region.name': + source_snapshot_remote_region_name, + 'source_volume.remote.region.name': + source_volume_remote_region_name, + 'source_image.remote.region.name': + source_image_remote_region_name, + 'clones[].zone.name': + clones_zone_name, + 'snapshot_consistency_group.id': + snapshot_consistency_group_id, + 'snapshot_consistency_group.crn': + snapshot_consistency_group_crn, } if 'headers' in kwargs: @@ -13277,9 +13490,9 @@ def list_snapshot_clones( **kwargs, ) -> DetailedResponse: """ - List all clones for a snapshot. + List clones for a snapshot. - This request lists all clones for a snapshot. Use a clone to quickly restore a + This request lists clones for a snapshot. Use a clone to quickly restore a snapshot within the clone's zone. :param str id: The snapshot identifier. @@ -13500,9 +13713,9 @@ def list_share_profiles( **kwargs, ) -> DetailedResponse: """ - List all file share profiles. + List file share profiles. - This request lists all [file share + This request lists [file share profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) available in the region. A file share profile specifies the performance characteristics and pricing model for a file share. @@ -13615,9 +13828,9 @@ def list_shares( **kwargs, ) -> DetailedResponse: """ - List all file shares. + List file shares. - This request lists all file shares in the region. + This request lists file shares in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -13912,6 +14125,177 @@ def update_share( response = self.send(request, **kwargs) return response + def list_share_accessor_bindings( + self, + id: str, + *, + start: Optional[str] = None, + limit: Optional[int] = None, + **kwargs, + ) -> DetailedResponse: + """ + List accessor bindings for a share. + + This request lists accessor bindings for a share. Each accessor binding identifies + a resource (possibly in another account) with access to this file share's data. + The share accessor bindings will be sorted by their `created_at` property values, + with newest bindings first. + + :param str id: The file share identifier. + :param str start: (optional) A server-provided token determining what + resource to start the page on. + :param int limit: (optional) The number of resources to return on a page. + :param dict headers: A `dict` containing the request headers + :return: A `DetailedResponse` containing the result, headers and HTTP status code. + :rtype: DetailedResponse with `dict` result representing a `ShareAccessorBindingCollection` object + """ + + if not id: + raise ValueError('id must be provided') + headers = {} + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='list_share_accessor_bindings', + ) + headers.update(sdk_headers) + + params = { + 'version': self.version, + 'generation': self.generation, + 'start': start, + 'limit': limit, + } + + if 'headers' in kwargs: + headers.update(kwargs.get('headers')) + del kwargs['headers'] + headers['Accept'] = 'application/json' + + path_param_keys = ['id'] + path_param_values = self.encode_path_vars(id) + path_param_dict = dict(zip(path_param_keys, path_param_values)) + url = '/shares/{id}/accessor_bindings'.format(**path_param_dict) + request = self.prepare_request( + method='GET', + url=url, + headers=headers, + params=params, + ) + + response = self.send(request, **kwargs) + return response + + def delete_share_accessor_binding( + self, + share_id: str, + id: str, + **kwargs, + ) -> DetailedResponse: + """ + Delete a share accessor binding. + + This request deletes a share accessor binding. This operation cannot be reversed. + + :param str share_id: The file share identifier. + :param str id: The file share accessor binding identifier. + :param dict headers: A `dict` containing the request headers + :return: A `DetailedResponse` containing the result, headers and HTTP status code. + :rtype: DetailedResponse + """ + + if not share_id: + raise ValueError('share_id must be provided') + if not id: + raise ValueError('id must be provided') + headers = {} + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='delete_share_accessor_binding', + ) + headers.update(sdk_headers) + + params = { + 'version': self.version, + 'generation': self.generation, + } + + if 'headers' in kwargs: + headers.update(kwargs.get('headers')) + del kwargs['headers'] + + path_param_keys = ['share_id', 'id'] + path_param_values = self.encode_path_vars(share_id, id) + path_param_dict = dict(zip(path_param_keys, path_param_values)) + url = '/shares/{share_id}/accessor_bindings/{id}'.format( + **path_param_dict) + request = self.prepare_request( + method='DELETE', + url=url, + headers=headers, + params=params, + ) + + response = self.send(request, **kwargs) + return response + + def get_share_accessor_binding( + self, + share_id: str, + id: str, + **kwargs, + ) -> DetailedResponse: + """ + Retrieve a share accessor binding. + + This request retrieves a single accessor binding specified by the identifier in + the URL. + + :param str share_id: The file share identifier. + :param str id: The file share accessor binding identifier. + :param dict headers: A `dict` containing the request headers + :return: A `DetailedResponse` containing the result, headers and HTTP status code. + :rtype: DetailedResponse with `dict` result representing a `ShareAccessorBinding` object + """ + + if not share_id: + raise ValueError('share_id must be provided') + if not id: + raise ValueError('id must be provided') + headers = {} + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='get_share_accessor_binding', + ) + headers.update(sdk_headers) + + params = { + 'version': self.version, + 'generation': self.generation, + } + + if 'headers' in kwargs: + headers.update(kwargs.get('headers')) + del kwargs['headers'] + headers['Accept'] = 'application/json' + + path_param_keys = ['share_id', 'id'] + path_param_values = self.encode_path_vars(share_id, id) + path_param_dict = dict(zip(path_param_keys, path_param_values)) + url = '/shares/{share_id}/accessor_bindings/{id}'.format( + **path_param_dict) + request = self.prepare_request( + method='GET', + url=url, + headers=headers, + params=params, + ) + + response = self.send(request, **kwargs) + return response + def failover_share( self, share_id: str, @@ -14001,12 +14385,11 @@ def list_share_mount_targets( **kwargs, ) -> DetailedResponse: """ - List all mount targets for a file share. + List mount targets for a file share. - This request retrieves all share mount targets for a file share. A share mount - target is a network endpoint at which a file share may be mounted. The file share - can be mounted by clients in the same VPC and zone after creating share mount - targets. + This request lists mount targets for a file share. A mount target is a network + endpoint at which a file share may be mounted. The file share can be mounted by + clients in the same VPC and zone after creating share mount targets. The share mount targets will be sorted by their `created_at` property values, with newest targets first. @@ -14086,7 +14469,8 @@ def create_share_mount_target( if share_mount_target_prototype is None: raise ValueError('share_mount_target_prototype must be provided') if isinstance(share_mount_target_prototype, ShareMountTargetPrototype): - share_mount_target_prototype = convert_model(share_mount_target_prototype) + share_mount_target_prototype = convert_model( + share_mount_target_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -14422,11 +14806,11 @@ def list_backup_policies( **kwargs, ) -> DetailedResponse: """ - List all backup policies. + List backup policies. - This request lists all backup policies in the region. Backup policies control - which sources are selected for backup and include a set of backup policy plans - that provide the backup schedules and deletion triggers. + This request lists backup policies in the region. Backup policies control which + sources are selected for backup and include a set of backup policy plans that + provide the backup schedules and deletion triggers. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -14548,9 +14932,9 @@ def list_backup_policy_jobs( **kwargs, ) -> DetailedResponse: """ - List all jobs for a backup policy. + List jobs for a backup policy. - This request retrieves all jobs for a backup policy. A backup job represents the + This request retrieves jobs for a backup policy. A backup job represents the execution of a backup policy plan for a resource matching the policy's criteria. :param str backup_policy_id: The backup policy identifier. @@ -14611,7 +14995,8 @@ def list_backup_policy_jobs( path_param_keys = ['backup_policy_id'] path_param_values = self.encode_path_vars(backup_policy_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/backup_policies/{backup_policy_id}/jobs'.format(**path_param_dict) + url = '/backup_policies/{backup_policy_id}/jobs'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -14666,7 +15051,8 @@ def get_backup_policy_job( path_param_keys = ['backup_policy_id', 'id'] path_param_values = self.encode_path_vars(backup_policy_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/backup_policies/{backup_policy_id}/jobs/{id}'.format(**path_param_dict) + url = '/backup_policies/{backup_policy_id}/jobs/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -14685,10 +15071,10 @@ def list_backup_policy_plans( **kwargs, ) -> DetailedResponse: """ - List all plans for a backup policy. + List plans for a backup policy. - This request retrieves all plans for a backup policy. Backup plans provide the - backup schedule and deletion triggers. + This request retrieves plans for a backup policy. Backup plans provide the backup + schedule and deletion triggers. :param str backup_policy_id: The backup policy identifier. :param str name: (optional) Filters the collection to resources with a @@ -14722,7 +15108,8 @@ def list_backup_policy_plans( path_param_keys = ['backup_policy_id'] path_param_values = self.encode_path_vars(backup_policy_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/backup_policies/{backup_policy_id}/plans'.format(**path_param_dict) + url = '/backup_policies/{backup_policy_id}/plans'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -14742,9 +15129,11 @@ def create_backup_policy_plan( attach_user_tags: Optional[List[str]] = None, clone_policy: Optional['BackupPolicyPlanClonePolicyPrototype'] = None, copy_user_tags: Optional[bool] = None, - deletion_trigger: Optional['BackupPolicyPlanDeletionTriggerPrototype'] = None, + deletion_trigger: Optional[ + 'BackupPolicyPlanDeletionTriggerPrototype'] = None, name: Optional[str] = None, - remote_region_policies: Optional[List['BackupPolicyPlanRemoteRegionPolicyPrototype']] = None, + remote_region_policies: Optional[ + List['BackupPolicyPlanRemoteRegionPolicyPrototype']] = None, **kwargs, ) -> DetailedResponse: """ @@ -14795,7 +15184,9 @@ def create_backup_policy_plan( if deletion_trigger is not None: deletion_trigger = convert_model(deletion_trigger) if remote_region_policies is not None: - remote_region_policies = [convert_model(x) for x in remote_region_policies] + remote_region_policies = [ + convert_model(x) for x in remote_region_policies + ] headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -14831,7 +15222,8 @@ def create_backup_policy_plan( path_param_keys = ['backup_policy_id'] path_param_values = self.encode_path_vars(backup_policy_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/backup_policies/{backup_policy_id}/plans'.format(**path_param_dict) + url = '/backup_policies/{backup_policy_id}/plans'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -14898,7 +15290,8 @@ def delete_backup_policy_plan( path_param_keys = ['backup_policy_id', 'id'] path_param_values = self.encode_path_vars(backup_policy_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/backup_policies/{backup_policy_id}/plans/{id}'.format(**path_param_dict) + url = '/backup_policies/{backup_policy_id}/plans/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -14953,7 +15346,8 @@ def get_backup_policy_plan( path_param_keys = ['backup_policy_id', 'id'] path_param_values = self.encode_path_vars(backup_policy_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/backup_policies/{backup_policy_id}/plans/{id}'.format(**path_param_dict) + url = '/backup_policies/{backup_policy_id}/plans/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -15026,7 +15420,8 @@ def update_backup_policy_plan( path_param_keys = ['backup_policy_id', 'id'] path_param_values = self.encode_path_vars(backup_policy_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/backup_policies/{backup_policy_id}/plans/{id}'.format(**path_param_dict) + url = '/backup_policies/{backup_policy_id}/plans/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -15226,9 +15621,9 @@ def list_regions( **kwargs, ) -> DetailedResponse: """ - List all regions. + List regions. - This request lists all regions. Each region is a separate geographic area that + This request lists regions. Each region is a separate geographic area that contains multiple isolated zones. Resources can be provisioned into one or more zones in a region. Each zone is isolated, but connected to other zones in the same region with low-latency and high-bandwidth links. Regions represent the top-level @@ -15325,9 +15720,9 @@ def list_region_zones( **kwargs, ) -> DetailedResponse: """ - List all zones in a region. + List zones in a region. - This request lists all zones in a region. Zones represent logically-isolated data + This request lists zones in a region. Zones represent logically-isolated data centers with high-bandwidth and low-latency interconnects to other zones in the same region. Faults in a zone do not affect other zones. @@ -15439,9 +15834,9 @@ def list_virtual_network_interfaces( **kwargs, ) -> DetailedResponse: """ - List all virtual network interfaces. + List virtual network interfaces. - This request lists all virtual network interfaces in the region. A virtual network + This request lists virtual network interfaces in the region. A virtual network interface is a logical abstraction of a virtual network interface in a subnet, and may be attached to a target resource. The virtual network interfaces will be sorted by their `created_at` property @@ -15501,7 +15896,9 @@ def create_virtual_network_interface( enable_infrastructure_nat: Optional[bool] = None, ips: Optional[List['VirtualNetworkInterfaceIPPrototype']] = None, name: Optional[str] = None, - primary_ip: Optional['VirtualNetworkInterfacePrimaryIPPrototype'] = None, + primary_ip: Optional[ + 'VirtualNetworkInterfacePrimaryIPPrototype'] = None, + protocol_state_filtering_mode: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, security_groups: Optional[List['SecurityGroupIdentity']] = None, subnet: Optional['SubnetIdentity'] = None, @@ -15562,6 +15959,18 @@ def create_virtual_network_interface( specified, an available address on the subnet will be automatically selected and reserved. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on + the current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. :param ResourceGroupIdentity resource_group: (optional) The resource group to use. If unspecified, the account's [default resource group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be @@ -15607,6 +16016,7 @@ def create_virtual_network_interface( 'ips': ips, 'name': name, 'primary_ip': primary_ip, + 'protocol_state_filtering_mode': protocol_state_filtering_mode, 'resource_group': resource_group, 'security_groups': security_groups, 'subnet': subnet, @@ -15761,8 +16171,10 @@ def update_virtual_network_interface( raise ValueError('id must be provided') if virtual_network_interface_patch is None: raise ValueError('virtual_network_interface_patch must be provided') - if isinstance(virtual_network_interface_patch, VirtualNetworkInterfacePatch): - virtual_network_interface_patch = convert_model(virtual_network_interface_patch) + if isinstance(virtual_network_interface_patch, + VirtualNetworkInterfacePatch): + virtual_network_interface_patch = convert_model( + virtual_network_interface_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -15809,9 +16221,9 @@ def list_network_interface_floating_ips( **kwargs, ) -> DetailedResponse: """ - List all floating IPs associated with a virtual network interface. + List floating IPs associated with a virtual network interface. - This request lists all floating IPs associated with a virtual network interface. + This request lists floating IPs associated with a virtual network interface. :param str virtual_network_interface_id: The virtual network interface identifier. @@ -15854,7 +16266,8 @@ def list_network_interface_floating_ips( path_param_keys = ['virtual_network_interface_id'] path_param_values = self.encode_path_vars(virtual_network_interface_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -15907,9 +16320,11 @@ def remove_network_interface_floating_ip( del kwargs['headers'] path_param_keys = ['virtual_network_interface_id', 'id'] - path_param_values = self.encode_path_vars(virtual_network_interface_id, id) + path_param_values = self.encode_path_vars(virtual_network_interface_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -15963,9 +16378,11 @@ def get_network_interface_floating_ip( headers['Accept'] = 'application/json' path_param_keys = ['virtual_network_interface_id', 'id'] - path_param_values = self.encode_path_vars(virtual_network_interface_id, id) + path_param_values = self.encode_path_vars(virtual_network_interface_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -16031,9 +16448,11 @@ def add_network_interface_floating_ip( headers['Accept'] = 'application/json' path_param_keys = ['virtual_network_interface_id', 'id'] - path_param_values = self.encode_path_vars(virtual_network_interface_id, id) + path_param_values = self.encode_path_vars(virtual_network_interface_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/floating_ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -16054,9 +16473,9 @@ def list_virtual_network_interface_ips( **kwargs, ) -> DetailedResponse: """ - List all reserved IPs bound to a virtual network interface. + List reserved IPs bound to a virtual network interface. - This request lists all reserved IPs bound to a virtual network interface. + This request lists reserved IPs bound to a virtual network interface. :param str virtual_network_interface_id: The virtual network interface identifier. @@ -16099,7 +16518,8 @@ def list_virtual_network_interface_ips( path_param_keys = ['virtual_network_interface_id'] path_param_values = self.encode_path_vars(virtual_network_interface_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -16154,9 +16574,11 @@ def remove_virtual_network_interface_ip( del kwargs['headers'] path_param_keys = ['virtual_network_interface_id', 'id'] - path_param_values = self.encode_path_vars(virtual_network_interface_id, id) + path_param_values = self.encode_path_vars(virtual_network_interface_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -16210,9 +16632,11 @@ def get_virtual_network_interface_ip( headers['Accept'] = 'application/json' path_param_keys = ['virtual_network_interface_id', 'id'] - path_param_values = self.encode_path_vars(virtual_network_interface_id, id) + path_param_values = self.encode_path_vars(virtual_network_interface_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -16269,9 +16693,11 @@ def add_virtual_network_interface_ip( headers['Accept'] = 'application/json' path_param_keys = ['virtual_network_interface_id', 'id'] - path_param_values = self.encode_path_vars(virtual_network_interface_id, id) + path_param_values = self.encode_path_vars(virtual_network_interface_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}'.format(**path_param_dict) + url = '/virtual_network_interfaces/{virtual_network_interface_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -16295,12 +16721,12 @@ def list_public_gateways( **kwargs, ) -> DetailedResponse: """ - List all public gateways. + List public gateways. - This request lists all public gateways in the region. A public gateway is a - virtual network device associated with a VPC, which allows access to the Internet. - A public gateway resides in a zone and can be connected to subnets in the same - zone only. + This request lists public gateways in the region. A public gateway is a virtual + network device associated with a VPC, which allows access to the Internet. A + public gateway resides in a zone and can be connected to subnets in the same zone + only. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -16613,9 +17039,9 @@ def list_floating_ips( **kwargs, ) -> DetailedResponse: """ - List all floating IPs. + List floating IPs. - This request lists all floating IPs in the region. Floating IPs allow inbound and + This request lists floating IPs in the region. Floating IPs allow inbound and outbound traffic from the Internet to an instance. :param str start: (optional) A server-provided token determining what @@ -16909,9 +17335,9 @@ def list_network_acls( **kwargs, ) -> DetailedResponse: """ - List all network ACLs. + List network ACLs. - This request lists all network ACLs in the region. A network ACL defines a set of + This request lists network ACLs in the region. A network ACL defines a set of packet filtering (5-tuple) rules for all traffic in and out of a subnet. Both allow and deny rules can be defined, and rules are stateless such that reverse traffic in response to allowed traffic is not automatically permitted. @@ -17187,10 +17613,10 @@ def list_network_acl_rules( **kwargs, ) -> DetailedResponse: """ - List all rules for a network ACL. + List rules for a network ACL. - This request lists all rules for a network ACL. These rules can allow or deny - traffic between a source CIDR block and a destination CIDR block over a particular + This request lists rules for a network ACL. These rules can allow or deny traffic + between a source CIDR block and a destination CIDR block over a particular protocol and port range. :param str network_acl_id: The network ACL identifier. @@ -17267,7 +17693,8 @@ def create_network_acl_rule( if network_acl_rule_prototype is None: raise ValueError('network_acl_rule_prototype must be provided') if isinstance(network_acl_rule_prototype, NetworkACLRulePrototype): - network_acl_rule_prototype = convert_model(network_acl_rule_prototype) + network_acl_rule_prototype = convert_model( + network_acl_rule_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -17346,7 +17773,8 @@ def delete_network_acl_rule( path_param_keys = ['network_acl_id', 'id'] path_param_values = self.encode_path_vars(network_acl_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/network_acls/{network_acl_id}/rules/{id}'.format(**path_param_dict) + url = '/network_acls/{network_acl_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -17400,7 +17828,8 @@ def get_network_acl_rule( path_param_keys = ['network_acl_id', 'id'] path_param_values = self.encode_path_vars(network_acl_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/network_acls/{network_acl_id}/rules/{id}'.format(**path_param_dict) + url = '/network_acls/{network_acl_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -17466,7 +17895,8 @@ def update_network_acl_rule( path_param_keys = ['network_acl_id', 'id'] path_param_values = self.encode_path_vars(network_acl_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/network_acls/{network_acl_id}/rules/{id}'.format(**path_param_dict) + url = '/network_acls/{network_acl_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -17494,14 +17924,13 @@ def list_security_groups( **kwargs, ) -> DetailedResponse: """ - List all security groups. + List security groups. - This request lists all security groups in the region. Security groups provide a - way to apply IP filtering rules to instances in the associated VPC. With security - groups, all traffic is denied by default, and rules added to security groups - define which traffic the security group permits. Security group rules are stateful - such that reverse traffic in response to allowed traffic is automatically - permitted. + This request lists security groups in the region. Security groups provide a way to + apply IP filtering rules to instances in the associated VPC. With security groups, + all traffic is denied by default, and rules added to security groups define which + traffic the security group permits. Security group rules are stateful such that + reverse traffic in response to allowed traffic is automatically permitted. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -17807,10 +18236,10 @@ def list_security_group_rules( **kwargs, ) -> DetailedResponse: """ - List all rules in a security group. + List rules in a security group. - This request lists all rules in a security group. These rules define what traffic - the security group permits. Security group rules are stateful, such that reverse + This request lists rules in a security group. These rules define what traffic the + security group permits. Security group rules are stateful, such that reverse traffic in response to allowed traffic is automatically permitted. :param str security_group_id: The security group identifier. @@ -17842,7 +18271,8 @@ def list_security_group_rules( path_param_keys = ['security_group_id'] path_param_values = self.encode_path_vars(security_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/rules'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/rules'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -17884,8 +18314,10 @@ def create_security_group_rule( raise ValueError('security_group_id must be provided') if security_group_rule_prototype is None: raise ValueError('security_group_rule_prototype must be provided') - if isinstance(security_group_rule_prototype, SecurityGroupRulePrototype): - security_group_rule_prototype = convert_model(security_group_rule_prototype) + if isinstance(security_group_rule_prototype, + SecurityGroupRulePrototype): + security_group_rule_prototype = convert_model( + security_group_rule_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -17910,7 +18342,8 @@ def create_security_group_rule( path_param_keys = ['security_group_id'] path_param_values = self.encode_path_vars(security_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/rules'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/rules'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -17966,7 +18399,8 @@ def delete_security_group_rule( path_param_keys = ['security_group_id', 'id'] path_param_values = self.encode_path_vars(security_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/rules/{id}'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -18021,7 +18455,8 @@ def get_security_group_rule( path_param_keys = ['security_group_id', 'id'] path_param_values = self.encode_path_vars(security_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/rules/{id}'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -18087,7 +18522,8 @@ def update_security_group_rule( path_param_keys = ['security_group_id', 'id'] path_param_values = self.encode_path_vars(security_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/rules/{id}'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -18108,10 +18544,10 @@ def list_security_group_targets( **kwargs, ) -> DetailedResponse: """ - List all targets associated with a security group. + List targets associated with a security group. - This request lists all targets associated with a security group, to which the - rules in the security group are applied. + This request lists targets associated with a security group, to which the rules in + the security group are applied. :param str security_group_id: The security group identifier. :param str start: (optional) A server-provided token determining what @@ -18147,7 +18583,8 @@ def list_security_group_targets( path_param_keys = ['security_group_id'] path_param_values = self.encode_path_vars(security_group_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/targets'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/targets'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -18210,7 +18647,8 @@ def delete_security_group_target_binding( path_param_keys = ['security_group_id', 'id'] path_param_values = self.encode_path_vars(security_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/targets/{id}'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/targets/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -18265,7 +18703,8 @@ def get_security_group_target( path_param_keys = ['security_group_id', 'id'] path_param_values = self.encode_path_vars(security_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/targets/{id}'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/targets/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -18328,7 +18767,8 @@ def create_security_group_target_binding( path_param_keys = ['security_group_id', 'id'] path_param_values = self.encode_path_vars(security_group_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/security_groups/{security_group_id}/targets/{id}'.format(**path_param_dict) + url = '/security_groups/{security_group_id}/targets/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -18351,9 +18791,9 @@ def list_ike_policies( **kwargs, ) -> DetailedResponse: """ - List all IKE policies. + List IKE policies. - This request lists all IKE policies in the region. + This request lists IKE policies in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -18645,17 +19085,23 @@ def update_ike_policy( def list_ike_policy_connections( self, id: str, + *, + start: Optional[str] = None, + limit: Optional[int] = None, **kwargs, ) -> DetailedResponse: """ - List all VPN gateway connections that use a specified IKE policy. + List VPN gateway connections that use a specified IKE policy. - This request lists all VPN gateway connections that use a policy. + This request lists VPN gateway connections that use a IKE policy. :param str id: The IKE policy identifier. + :param str start: (optional) A server-provided token determining what + resource to start the page on. + :param int limit: (optional) The number of resources to return on a page. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. - :rtype: DetailedResponse with `dict` result representing a `VPNGatewayConnectionCollection` object + :rtype: DetailedResponse with `dict` result representing a `IKEPolicyConnectionCollection` object """ if not id: @@ -18671,6 +19117,8 @@ def list_ike_policy_connections( params = { 'version': self.version, 'generation': self.generation, + 'start': start, + 'limit': limit, } if 'headers' in kwargs: @@ -18700,9 +19148,9 @@ def list_ipsec_policies( **kwargs, ) -> DetailedResponse: """ - List all IPsec policies. + List IPsec policies. - This request lists all IPsec policies in the region. + This request lists IPsec policies in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -18995,17 +19443,23 @@ def update_ipsec_policy( def list_ipsec_policy_connections( self, id: str, + *, + start: Optional[str] = None, + limit: Optional[int] = None, **kwargs, ) -> DetailedResponse: """ - List all VPN gateway connections that use a specified IPsec policy. + List VPN gateway connections that use a specified IPsec policy. - This request lists all VPN gateway connections that use a policy. + This request lists VPN gateway connections that use a IPsec policy. :param str id: The IPsec policy identifier. + :param str start: (optional) A server-provided token determining what + resource to start the page on. + :param int limit: (optional) The number of resources to return on a page. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. - :rtype: DetailedResponse with `dict` result representing a `VPNGatewayConnectionCollection` object + :rtype: DetailedResponse with `dict` result representing a `IPsecPolicyConnectionCollection` object """ if not id: @@ -19021,6 +19475,8 @@ def list_ipsec_policy_connections( params = { 'version': self.version, 'generation': self.generation, + 'start': start, + 'limit': limit, } if 'headers' in kwargs: @@ -19053,9 +19509,9 @@ def list_vpn_gateways( **kwargs, ) -> DetailedResponse: """ - List all VPN gateways. + List VPN gateways. - This request lists all VPN gateways in the region. + This request lists VPN gateways in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -19330,15 +19786,20 @@ def list_vpn_gateway_connections( self, vpn_gateway_id: str, *, + start: Optional[str] = None, + limit: Optional[int] = None, status: Optional[str] = None, **kwargs, ) -> DetailedResponse: """ - List all connections of a VPN gateway. + List connections of a VPN gateway. - This request lists all connections of a VPN gateway. + This request lists connections of a VPN gateway. :param str vpn_gateway_id: The VPN gateway identifier. + :param str start: (optional) A server-provided token determining what + resource to start the page on. + :param int limit: (optional) The number of resources to return on a page. :param str status: (optional) Filters the collection to VPN gateway connections with a `status` property matching the specified value. :param dict headers: A `dict` containing the request headers @@ -19359,6 +19820,8 @@ def list_vpn_gateway_connections( params = { 'version': self.version, 'generation': self.generation, + 'start': start, + 'limit': limit, 'status': status, } @@ -19370,7 +19833,8 @@ def list_vpn_gateway_connections( path_param_keys = ['vpn_gateway_id'] path_param_values = self.encode_path_vars(vpn_gateway_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -19403,9 +19867,12 @@ def create_vpn_gateway_connection( if not vpn_gateway_id: raise ValueError('vpn_gateway_id must be provided') if vpn_gateway_connection_prototype is None: - raise ValueError('vpn_gateway_connection_prototype must be provided') - if isinstance(vpn_gateway_connection_prototype, VPNGatewayConnectionPrototype): - vpn_gateway_connection_prototype = convert_model(vpn_gateway_connection_prototype) + raise ValueError( + 'vpn_gateway_connection_prototype must be provided') + if isinstance(vpn_gateway_connection_prototype, + VPNGatewayConnectionPrototype): + vpn_gateway_connection_prototype = convert_model( + vpn_gateway_connection_prototype) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -19430,7 +19897,8 @@ def create_vpn_gateway_connection( path_param_keys = ['vpn_gateway_id'] path_param_values = self.encode_path_vars(vpn_gateway_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -19486,7 +19954,8 @@ def delete_vpn_gateway_connection( path_param_keys = ['vpn_gateway_id', 'id'] path_param_values = self.encode_path_vars(vpn_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -19541,7 +20010,8 @@ def get_vpn_gateway_connection( path_param_keys = ['vpn_gateway_id', 'id'] path_param_values = self.encode_path_vars(vpn_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -19580,7 +20050,8 @@ def update_vpn_gateway_connection( if vpn_gateway_connection_patch is None: raise ValueError('vpn_gateway_connection_patch must be provided') if isinstance(vpn_gateway_connection_patch, VPNGatewayConnectionPatch): - vpn_gateway_connection_patch = convert_model(vpn_gateway_connection_patch) + vpn_gateway_connection_patch = convert_model( + vpn_gateway_connection_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -19605,7 +20076,8 @@ def update_vpn_gateway_connection( path_param_keys = ['vpn_gateway_id', 'id'] path_param_values = self.encode_path_vars(vpn_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -19624,9 +20096,9 @@ def list_vpn_gateway_connections_local_cidrs( **kwargs, ) -> DetailedResponse: """ - List all local CIDRs for a VPN gateway connection. + List local CIDRs for a VPN gateway connection. - This request lists all local CIDRs for a VPN gateway connection. + This request lists local CIDRs for a VPN gateway connection. This request is only supported for policy mode VPN gateways. :param str vpn_gateway_id: The VPN gateway identifier. @@ -19661,7 +20133,8 @@ def list_vpn_gateway_connections_local_cidrs( path_param_keys = ['vpn_gateway_id', 'id'] path_param_values = self.encode_path_vars(vpn_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -19719,7 +20192,8 @@ def remove_vpn_gateway_connections_local_cidr( path_param_keys = ['vpn_gateway_id', 'id', 'cidr'] path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -19778,7 +20252,8 @@ def check_vpn_gateway_connections_local_cidr( path_param_keys = ['vpn_gateway_id', 'id', 'cidr'] path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -19838,7 +20313,8 @@ def add_vpn_gateway_connections_local_cidr( path_param_keys = ['vpn_gateway_id', 'id', 'cidr'] path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local/cidrs/{cidr}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -19856,9 +20332,9 @@ def list_vpn_gateway_connections_peer_cidrs( **kwargs, ) -> DetailedResponse: """ - List all peer CIDRs for a VPN gateway connection. + List peer CIDRs for a VPN gateway connection. - This request lists all peer CIDRs for a VPN gateway connection. + This request lists peer CIDRs for a VPN gateway connection. This request is only supported for policy mode VPN gateways. :param str vpn_gateway_id: The VPN gateway identifier. @@ -19893,7 +20369,8 @@ def list_vpn_gateway_connections_peer_cidrs( path_param_keys = ['vpn_gateway_id', 'id'] path_param_values = self.encode_path_vars(vpn_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -19951,7 +20428,8 @@ def remove_vpn_gateway_connections_peer_cidr( path_param_keys = ['vpn_gateway_id', 'id', 'cidr'] path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -20010,7 +20488,8 @@ def check_vpn_gateway_connections_peer_cidr( path_param_keys = ['vpn_gateway_id', 'id', 'cidr'] path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -20070,7 +20549,8 @@ def add_vpn_gateway_connections_peer_cidr( path_param_keys = ['vpn_gateway_id', 'id', 'cidr'] path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}'.format(**path_param_dict) + url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer/cidrs/{cidr}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -20096,9 +20576,9 @@ def list_vpn_servers( **kwargs, ) -> DetailedResponse: """ - List all VPN servers. + List VPN servers. - This request lists all VPN servers. + This request lists VPN servers. :param str name: (optional) Filters the collection to resources with a `name` property matching the exact specified name. @@ -20227,10 +20707,14 @@ def create_vpn_server( if subnets is None: raise ValueError('subnets must be provided') certificate = convert_model(certificate) - client_authentication = [convert_model(x) for x in client_authentication] + client_authentication = [ + convert_model(x) for x in client_authentication + ] subnets = [convert_model(x) for x in subnets] if client_dns_server_ips is not None: - client_dns_server_ips = [convert_model(x) for x in client_dns_server_ips] + client_dns_server_ips = [ + convert_model(x) for x in client_dns_server_ips + ] if resource_group is not None: resource_group = convert_model(resource_group) if security_groups is not None: @@ -20399,9 +20883,8 @@ def update_vpn_server( """ Update a VPN server. - This request updates the properties of an existing VPN server. Any property - changes will cause all connected VPN clients are disconnected from this VPN server - except for the name change. + This request updates the properties of an existing VPN server. Any updates other + than to `name` will cause all connected VPN clients to be disconnected. :param str id: The VPN server identifier. :param VPNServerPatch vpn_server_patch: The VPN server patch. @@ -20519,9 +21002,9 @@ def list_vpn_server_clients( **kwargs, ) -> DetailedResponse: """ - List all VPN clients for a VPN server. + List VPN clients for a VPN server. - This request retrieves all connected VPN clients, and any disconnected VPN clients + This request retrieves connected VPN clients, and any disconnected VPN clients that the VPN server has not yet deleted based on its auto-deletion policy. :param str vpn_server_id: The VPN server identifier. @@ -20618,7 +21101,8 @@ def delete_vpn_server_client( path_param_keys = ['vpn_server_id', 'id'] path_param_values = self.encode_path_vars(vpn_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_servers/{vpn_server_id}/clients/{id}'.format(**path_param_dict) + url = '/vpn_servers/{vpn_server_id}/clients/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -20672,7 +21156,8 @@ def get_vpn_server_client( path_param_keys = ['vpn_server_id', 'id'] path_param_values = self.encode_path_vars(vpn_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_servers/{vpn_server_id}/clients/{id}'.format(**path_param_dict) + url = '/vpn_servers/{vpn_server_id}/clients/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -20728,7 +21213,8 @@ def disconnect_vpn_client( path_param_keys = ['vpn_server_id', 'id'] path_param_values = self.encode_path_vars(vpn_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_servers/{vpn_server_id}/clients/{id}/disconnect'.format(**path_param_dict) + url = '/vpn_servers/{vpn_server_id}/clients/{id}/disconnect'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -20749,10 +21235,10 @@ def list_vpn_server_routes( **kwargs, ) -> DetailedResponse: """ - List all VPN routes for a VPN server. + List VPN routes for a VPN server. - This request lists all VPN routes in a VPN server. All VPN routes are provided to - the VPN client when the connection is established. Packets received from the VPN + This request lists VPN routes in a VPN server. All VPN routes are provided to the + VPN client when the connection is established. Packets received from the VPN client will be dropped by the VPN server if there is no VPN route matching their specified destinations. All VPN routes must be unique within the VPN server. @@ -20823,7 +21309,7 @@ def create_vpn_server_route( provided to the VPN client when the connection is established. Packets received from the VPN client will be dropped by the VPN server if there is no VPN route matching their specified destinations. All VPN routes must be unique within the - VPN server. destination of the packet. + VPN server. :param str vpn_server_id: The VPN server identifier. :param str destination: The destination to use for this VPN route in the @@ -20932,7 +21418,8 @@ def delete_vpn_server_route( path_param_keys = ['vpn_server_id', 'id'] path_param_values = self.encode_path_vars(vpn_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format(**path_param_dict) + url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -20986,7 +21473,8 @@ def get_vpn_server_route( path_param_keys = ['vpn_server_id', 'id'] path_param_values = self.encode_path_vars(vpn_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format(**path_param_dict) + url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -21051,7 +21539,8 @@ def update_vpn_server_route( path_param_keys = ['vpn_server_id', 'id'] path_param_values = self.encode_path_vars(vpn_server_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format(**path_param_dict) + url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -21075,11 +21564,11 @@ def list_load_balancer_profiles( **kwargs, ) -> DetailedResponse: """ - List all load balancer profiles. + List load balancer profiles. - This request lists all load balancer profiles available in the region. A load - balancer profile specifies the performance characteristics and pricing model for a - load balancer. + This request lists load balancer profiles available in the region. A load balancer + profile specifies the performance characteristics and pricing model for a load + balancer. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -21178,9 +21667,9 @@ def list_load_balancers( **kwargs, ) -> DetailedResponse: """ - List all load balancers. + List load balancers. - This request lists all load balancers in the region. + This request lists load balancers in the region. :param str start: (optional) A server-provided token determining what resource to start the page on. @@ -21227,7 +21716,8 @@ def create_load_balancer( subnets: List['SubnetIdentity'], *, dns: Optional['LoadBalancerDNSPrototype'] = None, - listeners: Optional[List['LoadBalancerListenerPrototypeLoadBalancerContext']] = None, + listeners: Optional[ + List['LoadBalancerListenerPrototypeLoadBalancerContext']] = None, logging: Optional['LoadBalancerLoggingPrototype'] = None, name: Optional[str] = None, pools: Optional[List['LoadBalancerPoolPrototype']] = None, @@ -21542,7 +22032,7 @@ def get_load_balancer_statistics( **kwargs, ) -> DetailedResponse: """ - List all statistics of a load balancer. + List statistics of a load balancer. This request lists statistics of a load balancer. @@ -21592,9 +22082,9 @@ def list_load_balancer_listeners( **kwargs, ) -> DetailedResponse: """ - List all listeners for a load balancer. + List listeners for a load balancer. - This request lists all listeners for a load balancer. + This request lists listeners for a load balancer. :param str load_balancer_id: The load balancer identifier. :param dict headers: A `dict` containing the request headers @@ -21625,7 +22115,8 @@ def list_load_balancer_listeners( path_param_keys = ['load_balancer_id'] path_param_values = self.encode_path_vars(load_balancer_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -21645,7 +22136,8 @@ def create_load_balancer_listener( certificate_instance: Optional['CertificateInstanceIdentity'] = None, connection_limit: Optional[int] = None, default_pool: Optional['LoadBalancerPoolIdentity'] = None, - https_redirect: Optional['LoadBalancerListenerHTTPSRedirectPrototype'] = None, + https_redirect: Optional[ + 'LoadBalancerListenerHTTPSRedirectPrototype'] = None, idle_connection_timeout: Optional[int] = None, policies: Optional[List['LoadBalancerListenerPolicyPrototype']] = None, port: Optional[int] = None, @@ -21789,7 +22281,8 @@ def create_load_balancer_listener( path_param_keys = ['load_balancer_id'] path_param_values = self.encode_path_vars(load_balancer_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -21845,7 +22338,8 @@ def delete_load_balancer_listener( path_param_keys = ['load_balancer_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -21900,7 +22394,8 @@ def get_load_balancer_listener( path_param_keys = ['load_balancer_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -21939,7 +22434,8 @@ def update_load_balancer_listener( if load_balancer_listener_patch is None: raise ValueError('load_balancer_listener_patch must be provided') if isinstance(load_balancer_listener_patch, LoadBalancerListenerPatch): - load_balancer_listener_patch = convert_model(load_balancer_listener_patch) + load_balancer_listener_patch = convert_model( + load_balancer_listener_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -21964,7 +22460,8 @@ def update_load_balancer_listener( path_param_keys = ['load_balancer_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -21983,9 +22480,9 @@ def list_load_balancer_listener_policies( **kwargs, ) -> DetailedResponse: """ - List all policies for a load balancer listener. + List policies for a load balancer listener. - This request lists all policies for a load balancer listener. A policy consists of + This request lists policies for a load balancer listener. A policy consists of rules to match against each incoming request, and an action to apply to the request if a rule matches. @@ -22021,7 +22518,8 @@ def list_load_balancer_listener_policies( path_param_keys = ['load_balancer_id', 'listener_id'] path_param_values = self.encode_path_vars(load_balancer_id, listener_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -22129,7 +22627,8 @@ def create_load_balancer_listener_policy( path_param_keys = ['load_balancer_id', 'listener_id'] path_param_values = self.encode_path_vars(load_balancer_id, listener_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -22185,9 +22684,11 @@ def delete_load_balancer_listener_policy( del kwargs['headers'] path_param_keys = ['load_balancer_id', 'listener_id', 'id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -22243,9 +22744,11 @@ def get_load_balancer_listener_policy( headers['Accept'] = 'application/json' path_param_keys = ['load_balancer_id', 'listener_id', 'id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -22288,9 +22791,12 @@ def update_load_balancer_listener_policy( if not id: raise ValueError('id must be provided') if load_balancer_listener_policy_patch is None: - raise ValueError('load_balancer_listener_policy_patch must be provided') - if isinstance(load_balancer_listener_policy_patch, LoadBalancerListenerPolicyPatch): - load_balancer_listener_policy_patch = convert_model(load_balancer_listener_policy_patch) + raise ValueError( + 'load_balancer_listener_policy_patch must be provided') + if isinstance(load_balancer_listener_policy_patch, + LoadBalancerListenerPolicyPatch): + load_balancer_listener_policy_patch = convert_model( + load_balancer_listener_policy_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -22313,9 +22819,11 @@ def update_load_balancer_listener_policy( headers['Accept'] = 'application/json' path_param_keys = ['load_balancer_id', 'listener_id', 'id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -22335,9 +22843,9 @@ def list_load_balancer_listener_policy_rules( **kwargs, ) -> DetailedResponse: """ - List all rules of a load balancer listener policy. + List rules of a load balancer listener policy. - This request lists all rules of a load balancer listener policy. + This request lists rules of a load balancer listener policy. :param str load_balancer_id: The load balancer identifier. :param str listener_id: The listener identifier. @@ -22372,9 +22880,11 @@ def list_load_balancer_listener_policy_rules( headers['Accept'] = 'application/json' path_param_keys = ['load_balancer_id', 'listener_id', 'policy_id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, policy_id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + policy_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -22465,9 +22975,11 @@ def create_load_balancer_listener_policy_rule( headers['Accept'] = 'application/json' path_param_keys = ['load_balancer_id', 'listener_id', 'policy_id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, policy_id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + policy_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -22528,9 +23040,11 @@ def delete_load_balancer_listener_policy_rule( del kwargs['headers'] path_param_keys = ['load_balancer_id', 'listener_id', 'policy_id', 'id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, policy_id, id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + policy_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -22590,9 +23104,11 @@ def get_load_balancer_listener_policy_rule( headers['Accept'] = 'application/json' path_param_keys = ['load_balancer_id', 'listener_id', 'policy_id', 'id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, policy_id, id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + policy_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -22609,7 +23125,8 @@ def update_load_balancer_listener_policy_rule( listener_id: str, policy_id: str, id: str, - load_balancer_listener_policy_rule_patch: 'LoadBalancerListenerPolicyRulePatch', + load_balancer_listener_policy_rule_patch: + 'LoadBalancerListenerPolicyRulePatch', **kwargs, ) -> DetailedResponse: """ @@ -22637,9 +23154,12 @@ def update_load_balancer_listener_policy_rule( if not id: raise ValueError('id must be provided') if load_balancer_listener_policy_rule_patch is None: - raise ValueError('load_balancer_listener_policy_rule_patch must be provided') - if isinstance(load_balancer_listener_policy_rule_patch, LoadBalancerListenerPolicyRulePatch): - load_balancer_listener_policy_rule_patch = convert_model(load_balancer_listener_policy_rule_patch) + raise ValueError( + 'load_balancer_listener_policy_rule_patch must be provided') + if isinstance(load_balancer_listener_policy_rule_patch, + LoadBalancerListenerPolicyRulePatch): + load_balancer_listener_policy_rule_patch = convert_model( + load_balancer_listener_policy_rule_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -22662,9 +23182,11 @@ def update_load_balancer_listener_policy_rule( headers['Accept'] = 'application/json' path_param_keys = ['load_balancer_id', 'listener_id', 'policy_id', 'id'] - path_param_values = self.encode_path_vars(load_balancer_id, listener_id, policy_id, id) + path_param_values = self.encode_path_vars(load_balancer_id, listener_id, + policy_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -22682,9 +23204,9 @@ def list_load_balancer_pools( **kwargs, ) -> DetailedResponse: """ - List all pools of a load balancer. + List pools of a load balancer. - This request lists all pools of a load balancer. + This request lists pools of a load balancer. :param str load_balancer_id: The load balancer identifier. :param dict headers: A `dict` containing the request headers @@ -22715,7 +23237,8 @@ def list_load_balancer_pools( path_param_keys = ['load_balancer_id'] path_param_values = self.encode_path_vars(load_balancer_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -22736,7 +23259,8 @@ def create_load_balancer_pool( members: Optional[List['LoadBalancerPoolMemberPrototype']] = None, name: Optional[str] = None, proxy_protocol: Optional[str] = None, - session_persistence: Optional['LoadBalancerPoolSessionPersistencePrototype'] = None, + session_persistence: Optional[ + 'LoadBalancerPoolSessionPersistencePrototype'] = None, **kwargs, ) -> DetailedResponse: """ @@ -22824,7 +23348,8 @@ def create_load_balancer_pool( path_param_keys = ['load_balancer_id'] path_param_values = self.encode_path_vars(load_balancer_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -22879,7 +23404,8 @@ def delete_load_balancer_pool( path_param_keys = ['load_balancer_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -22933,7 +23459,8 @@ def get_load_balancer_pool( path_param_keys = ['load_balancer_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -22997,7 +23524,8 @@ def update_load_balancer_pool( path_param_keys = ['load_balancer_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -23016,9 +23544,9 @@ def list_load_balancer_pool_members( **kwargs, ) -> DetailedResponse: """ - List all members of a load balancer pool. + List members of a load balancer pool. - This request lists all members of a load balancer pool. + This request lists members of a load balancer pool. :param str load_balancer_id: The load balancer identifier. :param str pool_id: The pool identifier. @@ -23052,7 +23580,8 @@ def list_load_balancer_pool_members( path_param_keys = ['load_balancer_id', 'pool_id'] path_param_values = self.encode_path_vars(load_balancer_id, pool_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -23143,7 +23672,8 @@ def create_load_balancer_pool_member( path_param_keys = ['load_balancer_id', 'pool_id'] path_param_values = self.encode_path_vars(load_balancer_id, pool_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format( + **path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -23212,7 +23742,8 @@ def replace_load_balancer_pool_members( path_param_keys = ['load_balancer_id', 'pool_id'] path_param_values = self.encode_path_vars(load_balancer_id, pool_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -23270,7 +23801,8 @@ def delete_load_balancer_pool_member( path_param_keys = ['load_balancer_id', 'pool_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, pool_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -23329,7 +23861,8 @@ def get_load_balancer_pool_member( path_param_keys = ['load_balancer_id', 'pool_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, pool_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -23371,8 +23904,10 @@ def update_load_balancer_pool_member( raise ValueError('id must be provided') if load_balancer_pool_member_patch is None: raise ValueError('load_balancer_pool_member_patch must be provided') - if isinstance(load_balancer_pool_member_patch, LoadBalancerPoolMemberPatch): - load_balancer_pool_member_patch = convert_model(load_balancer_pool_member_patch) + if isinstance(load_balancer_pool_member_patch, + LoadBalancerPoolMemberPatch): + load_balancer_pool_member_patch = convert_model( + load_balancer_pool_member_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -23397,7 +23932,8 @@ def update_load_balancer_pool_member( path_param_keys = ['load_balancer_id', 'pool_id', 'id'] path_param_values = self.encode_path_vars(load_balancer_id, pool_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format(**path_param_dict) + url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -23427,10 +23963,10 @@ def list_endpoint_gateways( **kwargs, ) -> DetailedResponse: """ - List all endpoint gateways. + List endpoint gateways. - This request lists all endpoint gateways in the region. An endpoint gateway maps - one or more reserved IPs in a VPC to a target outside the VPC. + This request lists endpoint gateways in the region. An endpoint gateway maps one + or more reserved IPs in a VPC to a target outside the VPC. :param str name: (optional) Filters the collection to resources with a `name` property matching the exact specified name. @@ -23602,9 +24138,9 @@ def list_endpoint_gateway_ips( **kwargs, ) -> DetailedResponse: """ - List all reserved IPs bound to an endpoint gateway. + List reserved IPs bound to an endpoint gateway. - This request lists all reserved IPs bound to an endpoint gateway. + This request lists reserved IPs bound to an endpoint gateway. :param str endpoint_gateway_id: The endpoint gateway identifier. :param str start: (optional) A server-provided token determining what @@ -23646,7 +24182,8 @@ def list_endpoint_gateway_ips( path_param_keys = ['endpoint_gateway_id'] path_param_values = self.encode_path_vars(endpoint_gateway_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/endpoint_gateways/{endpoint_gateway_id}/ips'.format(**path_param_dict) + url = '/endpoint_gateways/{endpoint_gateway_id}/ips'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -23701,7 +24238,8 @@ def remove_endpoint_gateway_ip( path_param_keys = ['endpoint_gateway_id', 'id'] path_param_values = self.encode_path_vars(endpoint_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format(**path_param_dict) + url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -23756,7 +24294,8 @@ def get_endpoint_gateway_ip( path_param_keys = ['endpoint_gateway_id', 'id'] path_param_values = self.encode_path_vars(endpoint_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format(**path_param_dict) + url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -23814,7 +24353,8 @@ def add_endpoint_gateway_ip( path_param_keys = ['endpoint_gateway_id', 'id'] path_param_values = self.encode_path_vars(endpoint_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format(**path_param_dict) + url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format( + **path_param_dict) request = self.prepare_request( method='PUT', url=url, @@ -24007,9 +24547,9 @@ def list_flow_log_collectors( **kwargs, ) -> DetailedResponse: """ - List all flow log collectors. + List flow log collectors. - This request lists all flow log collectors in the region. A flow log collector + This request lists flow log collectors in the region. A flow log collector summarizes data sent over the instance network interfaces and instance network attachments contained within its target. @@ -24396,6 +24936,7 @@ class Status(str, Enum): OBSOLETE = 'obsolete' PENDING = 'pending' UNUSABLE = 'unusable' + class Visibility(str, Enum): """ Filters the collection to images with a `visibility` property matching the @@ -24405,6 +24946,16 @@ class Visibility(str, Enum): PRIVATE = 'private' PUBLIC = 'public' + class UserDataFormat(str, Enum): + """ + Filters the collection to images with a `user_data_format` property matching one + of the specified comma-separated values. + """ + + CLOUD_INIT = 'cloud_init' + ESXI_KICKSTART = 'esxi_kickstart' + IPXE = 'ipxe' + class ListVolumesEnums: """ @@ -24420,6 +24971,7 @@ class AttachmentState(str, Enum): ATTACHED = 'attached' UNATTACHED = 'unattached' UNUSABLE = 'unusable' + class Encryption(str, Enum): """ Filters the collection to resources with an `encryption` property matching the @@ -24500,6 +25052,7 @@ class Sort(str, Enum): CREATED_AT = 'created_at' NAME = 'name' + class ReplicationRole(str, Enum): """ Filters the collection to file shares with a `replication_role` property matching @@ -24525,6 +25078,7 @@ class Status(str, Enum): FAILED = 'failed' RUNNING = 'running' SUCCEEDED = 'succeeded' + class Sort(str, Enum): """ Sorts the returned collection by the specified property name in ascending order. A @@ -24623,6 +25177,7 @@ class Sort(str, Enum): CREATED_AT = 'created_at' NAME = 'name' + class Mode(str, Enum): """ Filters the collection to VPN gateways with a `mode` property matching the @@ -24753,11 +25308,14 @@ def from_dict(cls, _dict: Dict) -> 'AccountReference': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in AccountReference JSON') + raise ValueError( + 'Required property \'id\' not present in AccountReference JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in AccountReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in AccountReference JSON' + ) return cls(**args) @classmethod @@ -24800,7 +25358,6 @@ class ResourceTypeEnum(str, Enum): ACCOUNT = 'account' - class AddressPrefix: """ AddressPrefix. @@ -24864,35 +25421,46 @@ def from_dict(cls, _dict: Dict) -> 'AddressPrefix': if (cidr := _dict.get('cidr')) is not None: args['cidr'] = cidr else: - raise ValueError('Required property \'cidr\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'cidr\' not present in AddressPrefix JSON') if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'created_at\' not present in AddressPrefix JSON' + ) if (has_subnets := _dict.get('has_subnets')) is not None: args['has_subnets'] = has_subnets else: - raise ValueError('Required property \'has_subnets\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'has_subnets\' not present in AddressPrefix JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'href\' not present in AddressPrefix JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'id\' not present in AddressPrefix JSON') if (is_default := _dict.get('is_default')) is not None: args['is_default'] = is_default else: - raise ValueError('Required property \'is_default\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'is_default\' not present in AddressPrefix JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'name\' not present in AddressPrefix JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in AddressPrefix JSON') + raise ValueError( + 'Required property \'zone\' not present in AddressPrefix JSON') return cls(**args) @classmethod @@ -24992,23 +25560,33 @@ def from_dict(cls, _dict: Dict) -> 'AddressPrefixCollection': """Initialize a AddressPrefixCollection object from a json dictionary.""" args = {} if (address_prefixes := _dict.get('address_prefixes')) is not None: - args['address_prefixes'] = [AddressPrefix.from_dict(v) for v in address_prefixes] + args['address_prefixes'] = [ + AddressPrefix.from_dict(v) for v in address_prefixes + ] else: - raise ValueError('Required property \'address_prefixes\' not present in AddressPrefixCollection JSON') + raise ValueError( + 'Required property \'address_prefixes\' not present in AddressPrefixCollection JSON' + ) if (first := _dict.get('first')) is not None: args['first'] = AddressPrefixCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in AddressPrefixCollection JSON') + raise ValueError( + 'Required property \'first\' not present in AddressPrefixCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in AddressPrefixCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in AddressPrefixCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = AddressPrefixCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in AddressPrefixCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in AddressPrefixCollection JSON' + ) return cls(**args) @classmethod @@ -25019,7 +25597,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'address_prefixes') and self.address_prefixes is not None: + if hasattr(self, + 'address_prefixes') and self.address_prefixes is not None: address_prefixes_list = [] for v in self.address_prefixes: if isinstance(v, dict): @@ -25087,7 +25666,9 @@ def from_dict(cls, _dict: Dict) -> 'AddressPrefixCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in AddressPrefixCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in AddressPrefixCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -25147,7 +25728,9 @@ def from_dict(cls, _dict: Dict) -> 'AddressPrefixCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in AddressPrefixCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in AddressPrefixCollectionNext JSON' + ) return cls(**args) @classmethod @@ -25365,8 +25948,10 @@ def __init__( If absent, no job has yet completed for this backup policy. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BackupPolicyMatchResourceTypeInstance', 'BackupPolicyMatchResourceTypeVolume']) - ) + ", ".join([ + 'BackupPolicyMatchResourceTypeInstance', + 'BackupPolicyMatchResourceTypeVolume' + ])) raise Exception(msg) class HealthStateEnum(str, Enum): @@ -25386,7 +25971,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the backup policy. @@ -25400,7 +25984,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class MatchResourceTypeEnum(str, Enum): """ The resource type this backup policy applies to. Resources that have both a @@ -25413,7 +25996,6 @@ class MatchResourceTypeEnum(str, Enum): INSTANCE = 'instance' VOLUME = 'volume' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -25422,7 +26004,6 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY = 'backup_policy' - class BackupPolicyCollection: """ BackupPolicyCollection. @@ -25472,21 +26053,29 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyCollection': if (backup_policies := _dict.get('backup_policies')) is not None: args['backup_policies'] = backup_policies else: - raise ValueError('Required property \'backup_policies\' not present in BackupPolicyCollection JSON') + raise ValueError( + 'Required property \'backup_policies\' not present in BackupPolicyCollection JSON' + ) if (first := _dict.get('first')) is not None: args['first'] = BackupPolicyCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in BackupPolicyCollection JSON') + raise ValueError( + 'Required property \'first\' not present in BackupPolicyCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in BackupPolicyCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in BackupPolicyCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = BackupPolicyCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in BackupPolicyCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in BackupPolicyCollection JSON' + ) return cls(**args) @classmethod @@ -25497,7 +26086,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'backup_policies') and self.backup_policies is not None: + if hasattr(self, + 'backup_policies') and self.backup_policies is not None: backup_policies_list = [] for v in self.backup_policies: if isinstance(v, dict): @@ -25565,7 +26155,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -25625,7 +26217,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyCollectionNext JSON' + ) return cls(**args) @classmethod @@ -25695,11 +26289,15 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in BackupPolicyHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in BackupPolicyHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in BackupPolicyHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in BackupPolicyHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -25746,7 +26344,6 @@ class CodeEnum(str, Enum): MISSING_SERVICE_AUTHORIZATION_POLICIES = 'missing_service_authorization_policies' - class BackupPolicyJob: """ BackupPolicyJob. @@ -25861,53 +26458,81 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJob': if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete else: - raise ValueError('Required property \'auto_delete\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'auto_delete\' not present in BackupPolicyJob JSON' + ) if (auto_delete_after := _dict.get('auto_delete_after')) is not None: args['auto_delete_after'] = auto_delete_after else: - raise ValueError('Required property \'auto_delete_after\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'auto_delete_after\' not present in BackupPolicyJob JSON' + ) if (backup_policy_plan := _dict.get('backup_policy_plan')) is not None: - args['backup_policy_plan'] = BackupPolicyPlanReference.from_dict(backup_policy_plan) + args['backup_policy_plan'] = BackupPolicyPlanReference.from_dict( + backup_policy_plan) else: - raise ValueError('Required property \'backup_policy_plan\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'backup_policy_plan\' not present in BackupPolicyJob JSON' + ) if (completed_at := _dict.get('completed_at')) is not None: args['completed_at'] = string_to_datetime(completed_at) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'created_at\' not present in BackupPolicyJob JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyJob JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'id\' not present in BackupPolicyJob JSON') if (job_type := _dict.get('job_type')) is not None: args['job_type'] = job_type else: - raise ValueError('Required property \'job_type\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'job_type\' not present in BackupPolicyJob JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyJob JSON' + ) if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'source\' not present in BackupPolicyJob JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'status\' not present in BackupPolicyJob JSON' + ) if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [BackupPolicyJobStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + BackupPolicyJobStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in BackupPolicyJob JSON' + ) if (target_snapshots := _dict.get('target_snapshots')) is not None: - args['target_snapshots'] = [SnapshotReference.from_dict(v) for v in target_snapshots] + args['target_snapshots'] = [ + SnapshotReference.from_dict(v) for v in target_snapshots + ] else: - raise ValueError('Required property \'target_snapshots\' not present in BackupPolicyJob JSON') + raise ValueError( + 'Required property \'target_snapshots\' not present in BackupPolicyJob JSON' + ) return cls(**args) @classmethod @@ -25920,9 +26545,12 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete - if hasattr(self, 'auto_delete_after') and self.auto_delete_after is not None: + if hasattr(self, + 'auto_delete_after') and self.auto_delete_after is not None: _dict['auto_delete_after'] = self.auto_delete_after - if hasattr(self, 'backup_policy_plan') and self.backup_policy_plan is not None: + if hasattr( + self, + 'backup_policy_plan') and self.backup_policy_plan is not None: if isinstance(self.backup_policy_plan, dict): _dict['backup_policy_plan'] = self.backup_policy_plan else: @@ -25954,7 +26582,8 @@ def to_dict(self) -> Dict: else: status_reasons_list.append(v.to_dict()) _dict['status_reasons'] = status_reasons_list - if hasattr(self, 'target_snapshots') and self.target_snapshots is not None: + if hasattr(self, + 'target_snapshots') and self.target_snapshots is not None: target_snapshots_list = [] for v in self.target_snapshots: if isinstance(v, dict): @@ -25993,7 +26622,6 @@ class JobTypeEnum(str, Enum): CREATION = 'creation' DELETION = 'deletion' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -26001,7 +26629,6 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY_JOB = 'backup_policy_job' - class StatusEnum(str, Enum): """ The status of the backup policy job. @@ -26015,7 +26642,6 @@ class StatusEnum(str, Enum): SUCCEEDED = 'succeeded' - class BackupPolicyJobCollection: """ BackupPolicyJobCollection. @@ -26066,21 +26692,29 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJobCollection': if (first := _dict.get('first')) is not None: args['first'] = BackupPolicyJobCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in BackupPolicyJobCollection JSON') + raise ValueError( + 'Required property \'first\' not present in BackupPolicyJobCollection JSON' + ) if (jobs := _dict.get('jobs')) is not None: args['jobs'] = [BackupPolicyJob.from_dict(v) for v in jobs] else: - raise ValueError('Required property \'jobs\' not present in BackupPolicyJobCollection JSON') + raise ValueError( + 'Required property \'jobs\' not present in BackupPolicyJobCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in BackupPolicyJobCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in BackupPolicyJobCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = BackupPolicyJobCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in BackupPolicyJobCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in BackupPolicyJobCollection JSON' + ) return cls(**args) @classmethod @@ -26159,7 +26793,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJobCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyJobCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyJobCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -26219,7 +26855,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJobCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyJobCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyJobCollectionNext JSON' + ) return cls(**args) @classmethod @@ -26260,16 +26898,16 @@ class BackupPolicyJobSource: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BackupPolicyJobSource object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BackupPolicyJobSourceVolumeReference', 'BackupPolicyJobSourceInstanceReference']) - ) + ", ".join([ + 'BackupPolicyJobSourceVolumeReference', + 'BackupPolicyJobSourceInstanceReference' + ])) raise Exception(msg) @@ -26328,11 +26966,15 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJobStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in BackupPolicyJobStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in BackupPolicyJobStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in BackupPolicyJobStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in BackupPolicyJobStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -26391,7 +27033,6 @@ class CodeEnum(str, Enum): SOURCE_VOLUME_BUSY = 'source_volume_busy' - class BackupPolicyPatch: """ BackupPolicyPatch. @@ -26452,9 +27093,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'included_content') and self.included_content is not None: + if hasattr(self, + 'included_content') and self.included_content is not None: _dict['included_content'] = self.included_content - if hasattr(self, 'match_user_tags') and self.match_user_tags is not None: + if hasattr(self, + 'match_user_tags') and self.match_user_tags is not None: _dict['match_user_tags'] = self.match_user_tags if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -26487,7 +27130,6 @@ class IncludedContentEnum(str, Enum): DATA_VOLUMES = 'data_volumes' - class BackupPolicyPlan: """ BackupPolicyPlan. @@ -26581,55 +27223,87 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlan': if (active := _dict.get('active')) is not None: args['active'] = active else: - raise ValueError('Required property \'active\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'active\' not present in BackupPolicyPlan JSON' + ) if (attach_user_tags := _dict.get('attach_user_tags')) is not None: args['attach_user_tags'] = attach_user_tags else: - raise ValueError('Required property \'attach_user_tags\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'attach_user_tags\' not present in BackupPolicyPlan JSON' + ) if (clone_policy := _dict.get('clone_policy')) is not None: - args['clone_policy'] = BackupPolicyPlanClonePolicy.from_dict(clone_policy) + args['clone_policy'] = BackupPolicyPlanClonePolicy.from_dict( + clone_policy) else: - raise ValueError('Required property \'clone_policy\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'clone_policy\' not present in BackupPolicyPlan JSON' + ) if (copy_user_tags := _dict.get('copy_user_tags')) is not None: args['copy_user_tags'] = copy_user_tags else: - raise ValueError('Required property \'copy_user_tags\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'copy_user_tags\' not present in BackupPolicyPlan JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'created_at\' not present in BackupPolicyPlan JSON' + ) if (cron_spec := _dict.get('cron_spec')) is not None: args['cron_spec'] = cron_spec else: - raise ValueError('Required property \'cron_spec\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'cron_spec\' not present in BackupPolicyPlan JSON' + ) if (deletion_trigger := _dict.get('deletion_trigger')) is not None: - args['deletion_trigger'] = BackupPolicyPlanDeletionTrigger.from_dict(deletion_trigger) + args[ + 'deletion_trigger'] = BackupPolicyPlanDeletionTrigger.from_dict( + deletion_trigger) else: - raise ValueError('Required property \'deletion_trigger\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'deletion_trigger\' not present in BackupPolicyPlan JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyPlan JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'id\' not present in BackupPolicyPlan JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in BackupPolicyPlan JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BackupPolicyPlan JSON') - if (remote_region_policies := _dict.get('remote_region_policies')) is not None: - args['remote_region_policies'] = [BackupPolicyPlanRemoteRegionPolicy.from_dict(v) for v in remote_region_policies] - else: - raise ValueError('Required property \'remote_region_policies\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'name\' not present in BackupPolicyPlan JSON' + ) + if (remote_region_policies := + _dict.get('remote_region_policies')) is not None: + args['remote_region_policies'] = [ + BackupPolicyPlanRemoteRegionPolicy.from_dict(v) + for v in remote_region_policies + ] + else: + raise ValueError( + 'Required property \'remote_region_policies\' not present in BackupPolicyPlan JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyPlan JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyPlan JSON' + ) return cls(**args) @classmethod @@ -26642,7 +27316,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'active') and self.active is not None: _dict['active'] = self.active - if hasattr(self, 'attach_user_tags') and self.attach_user_tags is not None: + if hasattr(self, + 'attach_user_tags') and self.attach_user_tags is not None: _dict['attach_user_tags'] = self.attach_user_tags if hasattr(self, 'clone_policy') and self.clone_policy is not None: if isinstance(self.clone_policy, dict): @@ -26655,7 +27330,8 @@ def to_dict(self) -> Dict: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'cron_spec') and self.cron_spec is not None: _dict['cron_spec'] = self.cron_spec - if hasattr(self, 'deletion_trigger') and self.deletion_trigger is not None: + if hasattr(self, + 'deletion_trigger') and self.deletion_trigger is not None: if isinstance(self.deletion_trigger, dict): _dict['deletion_trigger'] = self.deletion_trigger else: @@ -26664,11 +27340,13 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'remote_region_policies') and self.remote_region_policies is not None: + if hasattr(self, 'remote_region_policies' + ) and self.remote_region_policies is not None: remote_region_policies_list = [] for v in self.remote_region_policies: if isinstance(v, dict): @@ -26711,7 +27389,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -26720,7 +27397,6 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY_PLAN = 'backup_policy_plan' - class BackupPolicyPlanClonePolicy: """ BackupPolicyPlanClonePolicy. @@ -26754,11 +27430,15 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanClonePolicy': if (max_snapshots := _dict.get('max_snapshots')) is not None: args['max_snapshots'] = max_snapshots else: - raise ValueError('Required property \'max_snapshots\' not present in BackupPolicyPlanClonePolicy JSON') + raise ValueError( + 'Required property \'max_snapshots\' not present in BackupPolicyPlanClonePolicy JSON' + ) if (zones := _dict.get('zones')) is not None: args['zones'] = [ZoneReference.from_dict(v) for v in zones] else: - raise ValueError('Required property \'zones\' not present in BackupPolicyPlanClonePolicy JSON') + raise ValueError( + 'Required property \'zones\' not present in BackupPolicyPlanClonePolicy JSON' + ) return cls(**args) @classmethod @@ -26914,7 +27594,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanClonePolicyPrototype': if (zones := _dict.get('zones')) is not None: args['zones'] = zones else: - raise ValueError('Required property \'zones\' not present in BackupPolicyPlanClonePolicyPrototype JSON') + raise ValueError( + 'Required property \'zones\' not present in BackupPolicyPlanClonePolicyPrototype JSON' + ) return cls(**args) @classmethod @@ -27006,21 +27688,29 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanCollection': if (first := _dict.get('first')) is not None: args['first'] = BackupPolicyPlanCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in BackupPolicyPlanCollection JSON') + raise ValueError( + 'Required property \'first\' not present in BackupPolicyPlanCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in BackupPolicyPlanCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in BackupPolicyPlanCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = BackupPolicyPlanCollectionNext.from_dict(next) if (plans := _dict.get('plans')) is not None: args['plans'] = [BackupPolicyPlan.from_dict(v) for v in plans] else: - raise ValueError('Required property \'plans\' not present in BackupPolicyPlanCollection JSON') + raise ValueError( + 'Required property \'plans\' not present in BackupPolicyPlanCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in BackupPolicyPlanCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in BackupPolicyPlanCollection JSON' + ) return cls(**args) @classmethod @@ -27099,7 +27789,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyPlanCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyPlanCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -27159,7 +27851,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyPlanCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyPlanCollectionNext JSON' + ) return cls(**args) @classmethod @@ -27227,7 +27921,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanDeletionTrigger': if (delete_after := _dict.get('delete_after')) is not None: args['delete_after'] = delete_after else: - raise ValueError('Required property \'delete_after\' not present in BackupPolicyPlanDeletionTrigger JSON') + raise ValueError( + 'Required property \'delete_after\' not present in BackupPolicyPlanDeletionTrigger JSON' + ) if (delete_over_count := _dict.get('delete_over_count')) is not None: args['delete_over_count'] = delete_over_count return cls(**args) @@ -27242,7 +27938,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'delete_after') and self.delete_after is not None: _dict['delete_after'] = self.delete_after - if hasattr(self, 'delete_over_count') and self.delete_over_count is not None: + if hasattr(self, + 'delete_over_count') and self.delete_over_count is not None: _dict['delete_over_count'] = self.delete_over_count return _dict @@ -27312,7 +28009,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'delete_after') and self.delete_after is not None: _dict['delete_after'] = self.delete_after - if hasattr(self, 'delete_over_count') and self.delete_over_count is not None: + if hasattr(self, + 'delete_over_count') and self.delete_over_count is not None: _dict['delete_over_count'] = self.delete_over_count return _dict @@ -27363,7 +28061,8 @@ def __init__( self.delete_over_count = delete_over_count @classmethod - def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanDeletionTriggerPrototype': + def from_dict(cls, + _dict: Dict) -> 'BackupPolicyPlanDeletionTriggerPrototype': """Initialize a BackupPolicyPlanDeletionTriggerPrototype object from a json dictionary.""" args = {} if (delete_after := _dict.get('delete_after')) is not None: @@ -27382,7 +28081,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'delete_after') and self.delete_after is not None: _dict['delete_after'] = self.delete_after - if hasattr(self, 'delete_over_count') and self.delete_over_count is not None: + if hasattr(self, + 'delete_over_count') and self.delete_over_count is not None: _dict['delete_over_count'] = self.delete_over_count return _dict @@ -27438,9 +28138,11 @@ def __init__( clone_policy: Optional['BackupPolicyPlanClonePolicyPatch'] = None, copy_user_tags: Optional[bool] = None, cron_spec: Optional[str] = None, - deletion_trigger: Optional['BackupPolicyPlanDeletionTriggerPatch'] = None, + deletion_trigger: Optional[ + 'BackupPolicyPlanDeletionTriggerPatch'] = None, name: Optional[str] = None, - remote_region_policies: Optional[List['BackupPolicyPlanRemoteRegionPolicyPrototype']] = None, + remote_region_policies: Optional[ + List['BackupPolicyPlanRemoteRegionPolicyPrototype']] = None, ) -> None: """ Initialize a BackupPolicyPlanPatch object. @@ -27484,17 +28186,24 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanPatch': if (attach_user_tags := _dict.get('attach_user_tags')) is not None: args['attach_user_tags'] = attach_user_tags if (clone_policy := _dict.get('clone_policy')) is not None: - args['clone_policy'] = BackupPolicyPlanClonePolicyPatch.from_dict(clone_policy) + args['clone_policy'] = BackupPolicyPlanClonePolicyPatch.from_dict( + clone_policy) if (copy_user_tags := _dict.get('copy_user_tags')) is not None: args['copy_user_tags'] = copy_user_tags if (cron_spec := _dict.get('cron_spec')) is not None: args['cron_spec'] = cron_spec if (deletion_trigger := _dict.get('deletion_trigger')) is not None: - args['deletion_trigger'] = BackupPolicyPlanDeletionTriggerPatch.from_dict(deletion_trigger) + args[ + 'deletion_trigger'] = BackupPolicyPlanDeletionTriggerPatch.from_dict( + deletion_trigger) if (name := _dict.get('name')) is not None: args['name'] = name - if (remote_region_policies := _dict.get('remote_region_policies')) is not None: - args['remote_region_policies'] = [BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(v) for v in remote_region_policies] + if (remote_region_policies := + _dict.get('remote_region_policies')) is not None: + args['remote_region_policies'] = [ + BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(v) + for v in remote_region_policies + ] return cls(**args) @classmethod @@ -27507,7 +28216,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'active') and self.active is not None: _dict['active'] = self.active - if hasattr(self, 'attach_user_tags') and self.attach_user_tags is not None: + if hasattr(self, + 'attach_user_tags') and self.attach_user_tags is not None: _dict['attach_user_tags'] = self.attach_user_tags if hasattr(self, 'clone_policy') and self.clone_policy is not None: if isinstance(self.clone_policy, dict): @@ -27518,14 +28228,16 @@ def to_dict(self) -> Dict: _dict['copy_user_tags'] = self.copy_user_tags if hasattr(self, 'cron_spec') and self.cron_spec is not None: _dict['cron_spec'] = self.cron_spec - if hasattr(self, 'deletion_trigger') and self.deletion_trigger is not None: + if hasattr(self, + 'deletion_trigger') and self.deletion_trigger is not None: if isinstance(self.deletion_trigger, dict): _dict['deletion_trigger'] = self.deletion_trigger else: _dict['deletion_trigger'] = self.deletion_trigger.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'remote_region_policies') and self.remote_region_policies is not None: + if hasattr(self, 'remote_region_policies' + ) and self.remote_region_policies is not None: remote_region_policies_list = [] for v in self.remote_region_policies: if isinstance(v, dict): @@ -27586,9 +28298,11 @@ def __init__( attach_user_tags: Optional[List[str]] = None, clone_policy: Optional['BackupPolicyPlanClonePolicyPrototype'] = None, copy_user_tags: Optional[bool] = None, - deletion_trigger: Optional['BackupPolicyPlanDeletionTriggerPrototype'] = None, + deletion_trigger: Optional[ + 'BackupPolicyPlanDeletionTriggerPrototype'] = None, name: Optional[str] = None, - remote_region_policies: Optional[List['BackupPolicyPlanRemoteRegionPolicyPrototype']] = None, + remote_region_policies: Optional[ + List['BackupPolicyPlanRemoteRegionPolicyPrototype']] = None, ) -> None: """ Initialize a BackupPolicyPlanPrototype object. @@ -27633,19 +28347,29 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanPrototype': if (attach_user_tags := _dict.get('attach_user_tags')) is not None: args['attach_user_tags'] = attach_user_tags if (clone_policy := _dict.get('clone_policy')) is not None: - args['clone_policy'] = BackupPolicyPlanClonePolicyPrototype.from_dict(clone_policy) + args[ + 'clone_policy'] = BackupPolicyPlanClonePolicyPrototype.from_dict( + clone_policy) if (copy_user_tags := _dict.get('copy_user_tags')) is not None: args['copy_user_tags'] = copy_user_tags if (cron_spec := _dict.get('cron_spec')) is not None: args['cron_spec'] = cron_spec else: - raise ValueError('Required property \'cron_spec\' not present in BackupPolicyPlanPrototype JSON') + raise ValueError( + 'Required property \'cron_spec\' not present in BackupPolicyPlanPrototype JSON' + ) if (deletion_trigger := _dict.get('deletion_trigger')) is not None: - args['deletion_trigger'] = BackupPolicyPlanDeletionTriggerPrototype.from_dict(deletion_trigger) + args[ + 'deletion_trigger'] = BackupPolicyPlanDeletionTriggerPrototype.from_dict( + deletion_trigger) if (name := _dict.get('name')) is not None: args['name'] = name - if (remote_region_policies := _dict.get('remote_region_policies')) is not None: - args['remote_region_policies'] = [BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(v) for v in remote_region_policies] + if (remote_region_policies := + _dict.get('remote_region_policies')) is not None: + args['remote_region_policies'] = [ + BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(v) + for v in remote_region_policies + ] return cls(**args) @classmethod @@ -27658,7 +28382,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'active') and self.active is not None: _dict['active'] = self.active - if hasattr(self, 'attach_user_tags') and self.attach_user_tags is not None: + if hasattr(self, + 'attach_user_tags') and self.attach_user_tags is not None: _dict['attach_user_tags'] = self.attach_user_tags if hasattr(self, 'clone_policy') and self.clone_policy is not None: if isinstance(self.clone_policy, dict): @@ -27669,14 +28394,16 @@ def to_dict(self) -> Dict: _dict['copy_user_tags'] = self.copy_user_tags if hasattr(self, 'cron_spec') and self.cron_spec is not None: _dict['cron_spec'] = self.cron_spec - if hasattr(self, 'deletion_trigger') and self.deletion_trigger is not None: + if hasattr(self, + 'deletion_trigger') and self.deletion_trigger is not None: if isinstance(self.deletion_trigger, dict): _dict['deletion_trigger'] = self.deletion_trigger else: _dict['deletion_trigger'] = self.deletion_trigger.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'remote_region_policies') and self.remote_region_policies is not None: + if hasattr(self, 'remote_region_policies' + ) and self.remote_region_policies is not None: remote_region_policies_list = [] for v in self.remote_region_policies: if isinstance(v, dict): @@ -27760,25 +28487,34 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanReference': """Initialize a BackupPolicyPlanReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = BackupPolicyPlanReferenceDeleted.from_dict(deleted) + args['deleted'] = BackupPolicyPlanReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyPlanReference JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyPlanReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyPlanReference JSON') + raise ValueError( + 'Required property \'id\' not present in BackupPolicyPlanReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BackupPolicyPlanReference JSON') + raise ValueError( + 'Required property \'name\' not present in BackupPolicyPlanReference JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = BackupPolicyPlanRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyPlanReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyPlanReference JSON' + ) return cls(**args) @classmethod @@ -27835,7 +28571,6 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY_PLAN = 'backup_policy_plan' - class BackupPolicyPlanReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -27862,7 +28597,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in BackupPolicyPlanReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in BackupPolicyPlanReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -28001,15 +28738,22 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanRemoteRegionPolicy': if (delete_over_count := _dict.get('delete_over_count')) is not None: args['delete_over_count'] = delete_over_count else: - raise ValueError('Required property \'delete_over_count\' not present in BackupPolicyPlanRemoteRegionPolicy JSON') + raise ValueError( + 'Required property \'delete_over_count\' not present in BackupPolicyPlanRemoteRegionPolicy JSON' + ) if (encryption_key := _dict.get('encryption_key')) is not None: - args['encryption_key'] = EncryptionKeyReference.from_dict(encryption_key) + args['encryption_key'] = EncryptionKeyReference.from_dict( + encryption_key) else: - raise ValueError('Required property \'encryption_key\' not present in BackupPolicyPlanRemoteRegionPolicy JSON') + raise ValueError( + 'Required property \'encryption_key\' not present in BackupPolicyPlanRemoteRegionPolicy JSON' + ) if (region := _dict.get('region')) is not None: args['region'] = RegionReference.from_dict(region) else: - raise ValueError('Required property \'region\' not present in BackupPolicyPlanRemoteRegionPolicy JSON') + raise ValueError( + 'Required property \'region\' not present in BackupPolicyPlanRemoteRegionPolicy JSON' + ) return cls(**args) @classmethod @@ -28020,7 +28764,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_over_count') and self.delete_over_count is not None: + if hasattr(self, + 'delete_over_count') and self.delete_over_count is not None: _dict['delete_over_count'] = self.delete_over_count if hasattr(self, 'encryption_key') and self.encryption_key is not None: if isinstance(self.encryption_key, dict): @@ -28091,7 +28836,8 @@ def __init__( self.region = region @classmethod - def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanRemoteRegionPolicyPrototype': + def from_dict(cls, + _dict: Dict) -> 'BackupPolicyPlanRemoteRegionPolicyPrototype': """Initialize a BackupPolicyPlanRemoteRegionPolicyPrototype object from a json dictionary.""" args = {} if (delete_over_count := _dict.get('delete_over_count')) is not None: @@ -28101,7 +28847,9 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanRemoteRegionPolicyPrototype' if (region := _dict.get('region')) is not None: args['region'] = region else: - raise ValueError('Required property \'region\' not present in BackupPolicyPlanRemoteRegionPolicyPrototype JSON') + raise ValueError( + 'Required property \'region\' not present in BackupPolicyPlanRemoteRegionPolicyPrototype JSON' + ) return cls(**args) @classmethod @@ -28112,7 +28860,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_over_count') and self.delete_over_count is not None: + if hasattr(self, + 'delete_over_count') and self.delete_over_count is not None: _dict['delete_over_count'] = self.delete_over_count if hasattr(self, 'encryption_key') and self.encryption_key is not None: if isinstance(self.encryption_key, dict): @@ -28134,13 +28883,15 @@ def __str__(self) -> str: """Return a `str` version of this BackupPolicyPlanRemoteRegionPolicyPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BackupPolicyPlanRemoteRegionPolicyPrototype') -> bool: + def __eq__(self, + other: 'BackupPolicyPlanRemoteRegionPolicyPrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BackupPolicyPlanRemoteRegionPolicyPrototype') -> bool: + def __ne__(self, + other: 'BackupPolicyPlanRemoteRegionPolicyPrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -28202,8 +28953,10 @@ def __init__( If unspecified, the policy will be scoped to the account. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype', 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype']) - ) + ", ".join([ + 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype', + 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype' + ])) raise Exception(msg) class MatchResourceTypeEnum(str, Enum): @@ -28216,23 +28969,22 @@ class MatchResourceTypeEnum(str, Enum): VOLUME = 'volume' - class BackupPolicyScope: """ The scope for this backup policy. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BackupPolicyScope object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BackupPolicyScopeEnterpriseReference', 'BackupPolicyScopeAccountReference']) - ) + ", ".join([ + 'BackupPolicyScopeEnterpriseReference', + 'BackupPolicyScopeAccountReference' + ])) raise Exception(msg) @@ -28243,16 +28995,13 @@ class BackupPolicyScopePrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BackupPolicyScopePrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BackupPolicyScopePrototypeEnterpriseIdentity']) - ) + ", ".join(['BackupPolicyScopePrototypeEnterpriseIdentity'])) raise Exception(msg) @@ -28346,8 +29095,10 @@ def __init__( lifecycle_state: str, memory: int, name: str, - network_interfaces: List['NetworkInterfaceBareMetalServerContextReference'], - primary_network_interface: 'NetworkInterfaceBareMetalServerContextReference', + network_interfaces: List[ + 'NetworkInterfaceBareMetalServerContextReference'], + primary_network_interface: + 'NetworkInterfaceBareMetalServerContextReference', profile: 'BareMetalServerProfileReference', resource_group: 'ResourceGroupReference', resource_type: str, @@ -28357,8 +29108,10 @@ def __init__( vpc: 'VPCReference', zone: 'ZoneReference', *, - network_attachments: Optional[List['BareMetalServerNetworkAttachmentReference']] = None, - primary_network_attachment: Optional['BareMetalServerNetworkAttachmentReference'] = None, + network_attachments: Optional[ + List['BareMetalServerNetworkAttachmentReference']] = None, + primary_network_attachment: Optional[ + 'BareMetalServerNetworkAttachmentReference'] = None, ) -> None: """ Initialize a BareMetalServer object. @@ -28470,99 +29223,163 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServer': if (bandwidth := _dict.get('bandwidth')) is not None: args['bandwidth'] = bandwidth else: - raise ValueError('Required property \'bandwidth\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'bandwidth\' not present in BareMetalServer JSON' + ) if (boot_target := _dict.get('boot_target')) is not None: args['boot_target'] = boot_target else: - raise ValueError('Required property \'boot_target\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'boot_target\' not present in BareMetalServer JSON' + ) if (cpu := _dict.get('cpu')) is not None: args['cpu'] = BareMetalServerCPU.from_dict(cpu) else: - raise ValueError('Required property \'cpu\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'cpu\' not present in BareMetalServer JSON') if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServer JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'crn\' not present in BareMetalServer JSON') if (disks := _dict.get('disks')) is not None: args['disks'] = [BareMetalServerDisk.from_dict(v) for v in disks] else: - raise ValueError('Required property \'disks\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'disks\' not present in BareMetalServer JSON' + ) if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: args['enable_secure_boot'] = enable_secure_boot else: - raise ValueError('Required property \'enable_secure_boot\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'enable_secure_boot\' not present in BareMetalServer JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServer JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServer JSON') if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [BareMetalServerLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + BareMetalServerLifecycleReason.from_dict(v) + for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in BareMetalServer JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in BareMetalServer JSON' + ) if (memory := _dict.get('memory')) is not None: args['memory'] = memory else: - raise ValueError('Required property \'memory\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'memory\' not present in BareMetalServer JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServer JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [BareMetalServerNetworkAttachmentReference.from_dict(v) for v in network_attachments] + raise ValueError( + 'Required property \'name\' not present in BareMetalServer JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + BareMetalServerNetworkAttachmentReference.from_dict(v) + for v in network_attachments + ] if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfaceBareMetalServerContextReference.from_dict(v) for v in network_interfaces] + args['network_interfaces'] = [ + NetworkInterfaceBareMetalServerContextReference.from_dict(v) + for v in network_interfaces + ] else: - raise ValueError('Required property \'network_interfaces\' not present in BareMetalServer JSON') - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = BareMetalServerNetworkAttachmentReference.from_dict(primary_network_attachment) - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfaceBareMetalServerContextReference.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'network_interfaces\' not present in BareMetalServer JSON' + ) + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = BareMetalServerNetworkAttachmentReference.from_dict( + primary_network_attachment) + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfaceBareMetalServerContextReference.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in BareMetalServer JSON' + ) if (profile := _dict.get('profile')) is not None: args['profile'] = BareMetalServerProfileReference.from_dict(profile) else: - raise ValueError('Required property \'profile\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'profile\' not present in BareMetalServer JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'resource_group\' not present in BareMetalServer JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServer JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'status\' not present in BareMetalServer JSON' + ) if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [BareMetalServerStatusReason.from_dict(v) for v in status_reasons] - else: - raise ValueError('Required property \'status_reasons\' not present in BareMetalServer JSON') - if (trusted_platform_module := _dict.get('trusted_platform_module')) is not None: - args['trusted_platform_module'] = BareMetalServerTrustedPlatformModule.from_dict(trusted_platform_module) + args['status_reasons'] = [ + BareMetalServerStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'trusted_platform_module\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in BareMetalServer JSON' + ) + if (trusted_platform_module := + _dict.get('trusted_platform_module')) is not None: + args[ + 'trusted_platform_module'] = BareMetalServerTrustedPlatformModule.from_dict( + trusted_platform_module) + else: + raise ValueError( + 'Required property \'trusted_platform_module\' not present in BareMetalServer JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'vpc\' not present in BareMetalServer JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in BareMetalServer JSON') + raise ValueError( + 'Required property \'zone\' not present in BareMetalServer JSON' + ) return cls(**args) @classmethod @@ -28597,13 +29414,16 @@ def to_dict(self) -> Dict: else: disks_list.append(v.to_dict()) _dict['disks'] = disks_list - if hasattr(self, 'enable_secure_boot') and self.enable_secure_boot is not None: + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -28611,13 +29431,16 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'memory') and self.memory is not None: _dict['memory'] = self.memory if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -28625,7 +29448,9 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -28633,16 +29458,24 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment - else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment + else: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) if hasattr(self, 'profile') and self.profile is not None: if isinstance(self.profile, dict): _dict['profile'] = self.profile @@ -28665,11 +29498,14 @@ def to_dict(self) -> Dict: else: status_reasons_list.append(v.to_dict()) _dict['status_reasons'] = status_reasons_list - if hasattr(self, 'trusted_platform_module') and self.trusted_platform_module is not None: + if hasattr(self, 'trusted_platform_module' + ) and self.trusted_platform_module is not None: if isinstance(self.trusted_platform_module, dict): _dict['trusted_platform_module'] = self.trusted_platform_module else: - _dict['trusted_platform_module'] = self.trusted_platform_module.to_dict() + _dict[ + 'trusted_platform_module'] = self.trusted_platform_module.to_dict( + ) if hasattr(self, 'vpc') and self.vpc is not None: if isinstance(self.vpc, dict): _dict['vpc'] = self.vpc @@ -28713,7 +29549,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -28721,7 +29556,6 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER = 'bare_metal_server' - class StatusEnum(str, Enum): """ The status of this bare metal server: @@ -28748,7 +29582,6 @@ class StatusEnum(str, Enum): STOPPED = 'stopped' - class BareMetalServerBootTarget: """ The resource from which this bare metal server is booted. @@ -28757,16 +29590,14 @@ class BareMetalServerBootTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerBootTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerBootTargetBareMetalServerDiskReference']) - ) + ", ".join(['BareMetalServerBootTargetBareMetalServerDiskReference' + ])) raise Exception(msg) @@ -28807,19 +29638,27 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerCPU': if (architecture := _dict.get('architecture')) is not None: args['architecture'] = architecture else: - raise ValueError('Required property \'architecture\' not present in BareMetalServerCPU JSON') + raise ValueError( + 'Required property \'architecture\' not present in BareMetalServerCPU JSON' + ) if (core_count := _dict.get('core_count')) is not None: args['core_count'] = core_count else: - raise ValueError('Required property \'core_count\' not present in BareMetalServerCPU JSON') + raise ValueError( + 'Required property \'core_count\' not present in BareMetalServerCPU JSON' + ) if (socket_count := _dict.get('socket_count')) is not None: args['socket_count'] = socket_count else: - raise ValueError('Required property \'socket_count\' not present in BareMetalServerCPU JSON') + raise ValueError( + 'Required property \'socket_count\' not present in BareMetalServerCPU JSON' + ) if (threads_per_core := _dict.get('threads_per_core')) is not None: args['threads_per_core'] = threads_per_core else: - raise ValueError('Required property \'threads_per_core\' not present in BareMetalServerCPU JSON') + raise ValueError( + 'Required property \'threads_per_core\' not present in BareMetalServerCPU JSON' + ) return cls(**args) @classmethod @@ -28836,7 +29675,8 @@ def to_dict(self) -> Dict: _dict['core_count'] = self.core_count if hasattr(self, 'socket_count') and self.socket_count is not None: _dict['socket_count'] = self.socket_count - if hasattr(self, 'threads_per_core') and self.threads_per_core is not None: + if hasattr(self, + 'threads_per_core') and self.threads_per_core is not None: _dict['threads_per_core'] = self.threads_per_core return _dict @@ -28909,23 +29749,33 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerCollection': """Initialize a BareMetalServerCollection object from a json dictionary.""" args = {} if (bare_metal_servers := _dict.get('bare_metal_servers')) is not None: - args['bare_metal_servers'] = [BareMetalServer.from_dict(v) for v in bare_metal_servers] + args['bare_metal_servers'] = [ + BareMetalServer.from_dict(v) for v in bare_metal_servers + ] else: - raise ValueError('Required property \'bare_metal_servers\' not present in BareMetalServerCollection JSON') + raise ValueError( + 'Required property \'bare_metal_servers\' not present in BareMetalServerCollection JSON' + ) if (first := _dict.get('first')) is not None: args['first'] = BareMetalServerCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in BareMetalServerCollection JSON') + raise ValueError( + 'Required property \'first\' not present in BareMetalServerCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in BareMetalServerCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in BareMetalServerCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = BareMetalServerCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in BareMetalServerCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in BareMetalServerCollection JSON' + ) return cls(**args) @classmethod @@ -28936,7 +29786,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'bare_metal_servers') and self.bare_metal_servers is not None: + if hasattr( + self, + 'bare_metal_servers') and self.bare_metal_servers is not None: bare_metal_servers_list = [] for v in self.bare_metal_servers: if isinstance(v, dict): @@ -29004,7 +29856,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -29064,7 +29918,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerCollectionNext JSON' + ) return cls(**args) @classmethod @@ -29153,27 +30009,39 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerConsoleAccessToken': if (access_token := _dict.get('access_token')) is not None: args['access_token'] = access_token else: - raise ValueError('Required property \'access_token\' not present in BareMetalServerConsoleAccessToken JSON') + raise ValueError( + 'Required property \'access_token\' not present in BareMetalServerConsoleAccessToken JSON' + ) if (console_type := _dict.get('console_type')) is not None: args['console_type'] = console_type else: - raise ValueError('Required property \'console_type\' not present in BareMetalServerConsoleAccessToken JSON') + raise ValueError( + 'Required property \'console_type\' not present in BareMetalServerConsoleAccessToken JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServerConsoleAccessToken JSON') + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServerConsoleAccessToken JSON' + ) if (expires_at := _dict.get('expires_at')) is not None: args['expires_at'] = string_to_datetime(expires_at) else: - raise ValueError('Required property \'expires_at\' not present in BareMetalServerConsoleAccessToken JSON') + raise ValueError( + 'Required property \'expires_at\' not present in BareMetalServerConsoleAccessToken JSON' + ) if (force := _dict.get('force')) is not None: args['force'] = force else: - raise ValueError('Required property \'force\' not present in BareMetalServerConsoleAccessToken JSON') + raise ValueError( + 'Required property \'force\' not present in BareMetalServerConsoleAccessToken JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerConsoleAccessToken JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerConsoleAccessToken JSON' + ) return cls(**args) @classmethod @@ -29225,7 +30093,6 @@ class ConsoleTypeEnum(str, Enum): VNC = 'vnc' - class BareMetalServerDisk: """ BareMetalServerDisk. @@ -29289,31 +30156,45 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerDisk': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServerDisk JSON') + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServerDisk JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerDisk JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerDisk JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerDisk JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerDisk JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerDisk JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerDisk JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerDisk JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerDisk JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerDisk JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerDisk JSON' + ) if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in BareMetalServerDisk JSON') + raise ValueError( + 'Required property \'size\' not present in BareMetalServerDisk JSON' + ) return cls(**args) @classmethod @@ -29373,7 +30254,6 @@ class InterfaceTypeEnum(str, Enum): NVME = 'nvme' SATA = 'sata' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -29382,7 +30262,6 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_DISK = 'bare_metal_server_disk' - class BareMetalServerDiskCollection: """ BareMetalServerDiskCollection. @@ -29410,7 +30289,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerDiskCollection': if (disks := _dict.get('disks')) is not None: args['disks'] = [BareMetalServerDisk.from_dict(v) for v in disks] else: - raise ValueError('Required property \'disks\' not present in BareMetalServerDiskCollection JSON') + raise ValueError( + 'Required property \'disks\' not present in BareMetalServerDiskCollection JSON' + ) return cls(**args) @classmethod @@ -29536,7 +30417,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerDiskReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in BareMetalServerDiskReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in BareMetalServerDiskReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -29609,15 +30492,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerInitialization': if (image := _dict.get('image')) is not None: args['image'] = ImageReference.from_dict(image) else: - raise ValueError('Required property \'image\' not present in BareMetalServerInitialization JSON') + raise ValueError( + 'Required property \'image\' not present in BareMetalServerInitialization JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = [KeyReference.from_dict(v) for v in keys] else: - raise ValueError('Required property \'keys\' not present in BareMetalServerInitialization JSON') + raise ValueError( + 'Required property \'keys\' not present in BareMetalServerInitialization JSON' + ) if (user_accounts := _dict.get('user_accounts')) is not None: args['user_accounts'] = user_accounts else: - raise ValueError('Required property \'user_accounts\' not present in BareMetalServerInitialization JSON') + raise ValueError( + 'Required property \'user_accounts\' not present in BareMetalServerInitialization JSON' + ) return cls(**args) @classmethod @@ -29686,6 +30575,7 @@ class BareMetalServerInitializationPrototype: image provides another means of access. :param str user_data: (optional) User data to be made available when initializing the bare metal server. + If unspecified, no user data will be made available. """ def __init__( @@ -29710,6 +30600,7 @@ def __init__( unless the specified image provides another means of access. :param str user_data: (optional) User data to be made available when initializing the bare metal server. + If unspecified, no user data will be made available. """ self.image = image self.keys = keys @@ -29722,11 +30613,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerInitializationPrototype': if (image := _dict.get('image')) is not None: args['image'] = image else: - raise ValueError('Required property \'image\' not present in BareMetalServerInitializationPrototype JSON') + raise ValueError( + 'Required property \'image\' not present in BareMetalServerInitializationPrototype JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = keys else: - raise ValueError('Required property \'keys\' not present in BareMetalServerInitializationPrototype JSON') + raise ValueError( + 'Required property \'keys\' not present in BareMetalServerInitializationPrototype JSON' + ) if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data return cls(**args) @@ -29781,16 +30676,15 @@ class BareMetalServerInitializationUserAccount: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerInitializationUserAccount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount']) - ) + ", ".join([ + 'BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount' + ])) raise Exception(msg) @@ -29843,11 +30737,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in BareMetalServerLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in BareMetalServerLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in BareMetalServerLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in BareMetalServerLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -29901,7 +30799,6 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class BareMetalServerNetworkAttachment: """ BareMetalServerNetworkAttachment. @@ -29958,7 +30855,8 @@ def __init__( resource_type: str, subnet: 'SubnetReference', type: str, - virtual_network_interface: 'VirtualNetworkInterfaceReferenceAttachmentContext', + virtual_network_interface: + 'VirtualNetworkInterfaceReferenceAttachmentContext', ) -> None: """ Initialize a BareMetalServerNetworkAttachment object. @@ -30003,8 +30901,10 @@ def __init__( metal server network attachment. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerNetworkAttachmentByPCI', 'BareMetalServerNetworkAttachmentByVLAN']) - ) + ", ".join([ + 'BareMetalServerNetworkAttachmentByPCI', + 'BareMetalServerNetworkAttachmentByVLAN' + ])) raise Exception(msg) class InterfaceTypeEnum(str, Enum): @@ -30028,7 +30928,6 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' VLAN = 'vlan' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the bare metal server network attachment. @@ -30042,7 +30941,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -30050,7 +30948,6 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_NETWORK_ATTACHMENT = 'bare_metal_server_network_attachment' - class TypeEnum(str, Enum): """ The bare metal server network attachment type. @@ -30060,7 +30957,6 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' - class BareMetalServerNetworkAttachmentCollection: """ BareMetalServerNetworkAttachmentCollection. @@ -30107,27 +31003,41 @@ def __init__( self.total_count = total_count @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentCollection': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerNetworkAttachmentCollection': """Initialize a BareMetalServerNetworkAttachmentCollection object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = BareMetalServerNetworkAttachmentCollectionFirst.from_dict(first) + args[ + 'first'] = BareMetalServerNetworkAttachmentCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in BareMetalServerNetworkAttachmentCollection JSON') + raise ValueError( + 'Required property \'first\' not present in BareMetalServerNetworkAttachmentCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in BareMetalServerNetworkAttachmentCollection JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: + raise ValueError( + 'Required property \'limit\' not present in BareMetalServerNetworkAttachmentCollection JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: args['network_attachments'] = network_attachments else: - raise ValueError('Required property \'network_attachments\' not present in BareMetalServerNetworkAttachmentCollection JSON') + raise ValueError( + 'Required property \'network_attachments\' not present in BareMetalServerNetworkAttachmentCollection JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = BareMetalServerNetworkAttachmentCollectionNext.from_dict(next) + args[ + 'next'] = BareMetalServerNetworkAttachmentCollectionNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in BareMetalServerNetworkAttachmentCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in BareMetalServerNetworkAttachmentCollection JSON' + ) return cls(**args) @classmethod @@ -30145,7 +31055,9 @@ def to_dict(self) -> Dict: _dict['first'] = self.first.to_dict() if hasattr(self, 'limit') and self.limit is not None: _dict['limit'] = self.limit - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -30170,13 +31082,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentCollection object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentCollection') -> bool: + def __eq__(self, + other: 'BareMetalServerNetworkAttachmentCollection') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentCollection') -> bool: + def __ne__(self, + other: 'BareMetalServerNetworkAttachmentCollection') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -30200,13 +31114,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentCollectionFirst': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerNetworkAttachmentCollectionFirst': """Initialize a BareMetalServerNetworkAttachmentCollectionFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkAttachmentCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkAttachmentCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -30229,13 +31147,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentCollectionFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentCollectionFirst') -> bool: + def __eq__( + self, + other: 'BareMetalServerNetworkAttachmentCollectionFirst') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentCollectionFirst') -> bool: + def __ne__( + self, + other: 'BareMetalServerNetworkAttachmentCollectionFirst') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -30260,13 +31182,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentCollectionNext': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerNetworkAttachmentCollectionNext': """Initialize a BareMetalServerNetworkAttachmentCollectionNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkAttachmentCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkAttachmentCollectionNext JSON' + ) return cls(**args) @classmethod @@ -30289,13 +31215,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentCollectionNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentCollectionNext') -> bool: + def __eq__(self, + other: 'BareMetalServerNetworkAttachmentCollectionNext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentCollectionNext') -> bool: + def __ne__(self, + other: 'BareMetalServerNetworkAttachmentCollectionNext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -30410,7 +31338,8 @@ class BareMetalServerNetworkAttachmentPrototype: def __init__( self, interface_type: str, - virtual_network_interface: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', + virtual_network_interface: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', *, name: Optional[str] = None, ) -> None: @@ -30448,8 +31377,10 @@ def __init__( of randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype', 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype']) - ) + ", ".join([ + 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype', + 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype' + ])) raise Exception(msg) class InterfaceTypeEnum(str, Enum): @@ -30473,7 +31404,6 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' - class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface: """ A virtual network interface for the bare metal server network attachment. This can be @@ -30484,16 +31414,16 @@ class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext', 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity']) - ) + ", ".join([ + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext', + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity' + ])) raise Exception(msg) @@ -30528,7 +31458,8 @@ def __init__( resource_type: str, subnet: 'SubnetReference', *, - deleted: Optional['BareMetalServerNetworkAttachmentReferenceDeleted'] = None, + deleted: Optional[ + 'BareMetalServerNetworkAttachmentReferenceDeleted'] = None, ) -> None: """ Initialize a BareMetalServerNetworkAttachmentReference object. @@ -30560,35 +31491,50 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentReference': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerNetworkAttachmentReference': """Initialize a BareMetalServerNetworkAttachmentReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = BareMetalServerNetworkAttachmentReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = BareMetalServerNetworkAttachmentReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkAttachmentReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerNetworkAttachmentReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerNetworkAttachmentReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in BareMetalServerNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in BareMetalServerNetworkAttachmentReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerNetworkAttachmentReference JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkAttachmentReference JSON' + ) return cls(**args) @classmethod @@ -30632,13 +31578,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentReference') -> bool: + def __eq__(self, + other: 'BareMetalServerNetworkAttachmentReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentReference') -> bool: + def __ne__(self, + other: 'BareMetalServerNetworkAttachmentReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -30650,7 +31598,6 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_NETWORK_ATTACHMENT = 'bare_metal_server_network_attachment' - class BareMetalServerNetworkAttachmentReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -30671,13 +31618,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentReferenceDeleted': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerNetworkAttachmentReferenceDeleted': """Initialize a BareMetalServerNetworkAttachmentReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in BareMetalServerNetworkAttachmentReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in BareMetalServerNetworkAttachmentReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -30700,13 +31651,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentReferenceDeleted') -> bool: + def __eq__( + self, + other: 'BareMetalServerNetworkAttachmentReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentReferenceDeleted') -> bool: + def __ne__( + self, + other: 'BareMetalServerNetworkAttachmentReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -30992,8 +31947,11 @@ def __init__( interface, and the type is that of its corresponding network attachment. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerNetworkInterfaceByHiperSocket', 'BareMetalServerNetworkInterfaceByPCI', 'BareMetalServerNetworkInterfaceByVLAN']) - ) + ", ".join([ + 'BareMetalServerNetworkInterfaceByHiperSocket', + 'BareMetalServerNetworkInterfaceByPCI', + 'BareMetalServerNetworkInterfaceByVLAN' + ])) raise Exception(msg) @classmethod @@ -31003,8 +31961,11 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterface': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'BareMetalServerNetworkInterface'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['BareMetalServerNetworkInterfaceByHiperSocket', 'BareMetalServerNetworkInterfaceByPCI', 'BareMetalServerNetworkInterfaceByVLAN']) - ) + ", ".join([ + 'BareMetalServerNetworkInterfaceByHiperSocket', + 'BareMetalServerNetworkInterfaceByPCI', + 'BareMetalServerNetworkInterfaceByVLAN' + ])) raise Exception(msg) @classmethod @@ -31020,7 +31981,9 @@ def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping['vlan'] = 'BareMetalServerNetworkInterfaceByVLAN' disc_value = _dict.get('interface_type') if disc_value is None: - raise ValueError('Discriminator property \'interface_type\' not found in BareMetalServerNetworkInterface JSON') + raise ValueError( + 'Discriminator property \'interface_type\' not found in BareMetalServerNetworkInterface JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -31062,7 +32025,6 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' VLAN = 'vlan' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -31070,7 +32032,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -31085,7 +32046,6 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' - class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -31100,7 +32060,6 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' - class BareMetalServerNetworkInterfaceCollection: """ BareMetalServerNetworkInterfaceCollection. @@ -31147,27 +32106,43 @@ def __init__( self.total_count = total_count @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceCollection': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerNetworkInterfaceCollection': """Initialize a BareMetalServerNetworkInterfaceCollection object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = BareMetalServerNetworkInterfaceCollectionFirst.from_dict(first) + args[ + 'first'] = BareMetalServerNetworkInterfaceCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in BareMetalServerNetworkInterfaceCollection JSON') + raise ValueError( + 'Required property \'first\' not present in BareMetalServerNetworkInterfaceCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in BareMetalServerNetworkInterfaceCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in BareMetalServerNetworkInterfaceCollection JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [BareMetalServerNetworkInterface.from_dict(v) for v in network_interfaces] + args['network_interfaces'] = [ + BareMetalServerNetworkInterface.from_dict(v) + for v in network_interfaces + ] else: - raise ValueError('Required property \'network_interfaces\' not present in BareMetalServerNetworkInterfaceCollection JSON') + raise ValueError( + 'Required property \'network_interfaces\' not present in BareMetalServerNetworkInterfaceCollection JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = BareMetalServerNetworkInterfaceCollectionNext.from_dict(next) + args[ + 'next'] = BareMetalServerNetworkInterfaceCollectionNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in BareMetalServerNetworkInterfaceCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in BareMetalServerNetworkInterfaceCollection JSON' + ) return cls(**args) @classmethod @@ -31185,7 +32160,9 @@ def to_dict(self) -> Dict: _dict['first'] = self.first.to_dict() if hasattr(self, 'limit') and self.limit is not None: _dict['limit'] = self.limit - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -31210,13 +32187,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfaceCollection object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfaceCollection') -> bool: + def __eq__(self, + other: 'BareMetalServerNetworkInterfaceCollection') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfaceCollection') -> bool: + def __ne__(self, + other: 'BareMetalServerNetworkInterfaceCollection') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -31240,13 +32219,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceCollectionFirst': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerNetworkInterfaceCollectionFirst': """Initialize a BareMetalServerNetworkInterfaceCollectionFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkInterfaceCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkInterfaceCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -31269,13 +32252,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfaceCollectionFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfaceCollectionFirst') -> bool: + def __eq__(self, + other: 'BareMetalServerNetworkInterfaceCollectionFirst') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfaceCollectionFirst') -> bool: + def __ne__(self, + other: 'BareMetalServerNetworkInterfaceCollectionFirst') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -31300,13 +32285,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceCollectionNext': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerNetworkInterfaceCollectionNext': """Initialize a BareMetalServerNetworkInterfaceCollectionNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkInterfaceCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkInterfaceCollectionNext JSON' + ) return cls(**args) @classmethod @@ -31329,13 +32318,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfaceCollectionNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfaceCollectionNext') -> bool: + def __eq__(self, + other: 'BareMetalServerNetworkInterfaceCollectionNext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfaceCollectionNext') -> bool: + def __ne__(self, + other: 'BareMetalServerNetworkInterfaceCollectionNext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -31432,7 +32423,8 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePatch': args['allow_ip_spoofing'] = allow_ip_spoofing if (allowed_vlans := _dict.get('allowed_vlans')) is not None: args['allowed_vlans'] = allowed_vlans - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (name := _dict.get('name')) is not None: args['name'] = name @@ -31446,11 +32438,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'allowed_vlans') and self.allowed_vlans is not None: _dict['allowed_vlans'] = self.allowed_vlans - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -31622,19 +32616,26 @@ def __init__( the VPC's default security group is used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype']) - ) + ", ".join([ + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype', + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype', + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype' + ])) raise Exception(msg) @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototype': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototype': """Initialize a BareMetalServerNetworkInterfacePrototype object from a json dictionary.""" disc_class = cls._get_class_by_discriminator(_dict) if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'BareMetalServerNetworkInterfacePrototype'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype']) - ) + ", ".join([ + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype', + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype', + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype' + ])) raise Exception(msg) @classmethod @@ -31645,12 +32646,17 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['hipersocket'] = 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype' - mapping['pci'] = 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype' - mapping['vlan'] = 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype' + mapping[ + 'hipersocket'] = 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype' + mapping[ + 'pci'] = 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype' + mapping[ + 'vlan'] = 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype' disc_value = _dict.get('interface_type') if disc_value is None: - raise ValueError('Discriminator property \'interface_type\' not found in BareMetalServerNetworkInterfacePrototype JSON') + raise ValueError( + 'Discriminator property \'interface_type\' not found in BareMetalServerNetworkInterfacePrototype JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -31688,7 +32694,6 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' - class BareMetalServerNetworkInterfaceReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -31709,13 +32714,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceReferenceDeleted': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerNetworkInterfaceReferenceDeleted': """Initialize a BareMetalServerNetworkInterfaceReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in BareMetalServerNetworkInterfaceReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in BareMetalServerNetworkInterfaceReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -31738,13 +32747,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfaceReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfaceReferenceDeleted') -> bool: + def __eq__( + self, + other: 'BareMetalServerNetworkInterfaceReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfaceReferenceDeleted') -> bool: + def __ne__( + self, + other: 'BareMetalServerNetworkInterfaceReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -31769,13 +32782,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted': """Initialize a BareMetalServerNetworkInterfaceReferenceTargetContextDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in BareMetalServerNetworkInterfaceReferenceTargetContextDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in BareMetalServerNetworkInterfaceReferenceTargetContextDeleted JSON' + ) return cls(**args) @classmethod @@ -31798,13 +32815,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfaceReferenceTargetContextDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted') -> bool: + def __eq__( + self, + other: 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted') -> bool: + def __ne__( + self, + other: 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -31813,6 +32836,9 @@ class BareMetalServerPatch: """ BareMetalServerPatch. + :param int bandwidth: (optional) The total bandwidth (in megabits per second) + shared across the bare metal server's network interfaces. The specified value + must match one of the bandwidth values in the bare metal server's profile. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the bare metal server will fail to boot. @@ -31828,13 +32854,19 @@ class BareMetalServerPatch: def __init__( self, *, + bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, - trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePatch'] = None, + trusted_platform_module: Optional[ + 'BareMetalServerTrustedPlatformModulePatch'] = None, ) -> None: """ Initialize a BareMetalServerPatch object. + :param int bandwidth: (optional) The total bandwidth (in megabits per + second) shared across the bare metal server's network interfaces. The + specified value must match one of the bandwidth values in the bare metal + server's profile. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the bare metal server will fail to boot. @@ -31847,6 +32879,7 @@ def __init__( :param BareMetalServerTrustedPlatformModulePatch trusted_platform_module: (optional) """ + self.bandwidth = bandwidth self.enable_secure_boot = enable_secure_boot self.name = name self.trusted_platform_module = trusted_platform_module @@ -31855,12 +32888,17 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'BareMetalServerPatch': """Initialize a BareMetalServerPatch object from a json dictionary.""" args = {} + if (bandwidth := _dict.get('bandwidth')) is not None: + args['bandwidth'] = bandwidth if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: args['enable_secure_boot'] = enable_secure_boot if (name := _dict.get('name')) is not None: args['name'] = name - if (trusted_platform_module := _dict.get('trusted_platform_module')) is not None: - args['trusted_platform_module'] = BareMetalServerTrustedPlatformModulePatch.from_dict(trusted_platform_module) + if (trusted_platform_module := + _dict.get('trusted_platform_module')) is not None: + args[ + 'trusted_platform_module'] = BareMetalServerTrustedPlatformModulePatch.from_dict( + trusted_platform_module) return cls(**args) @classmethod @@ -31871,15 +32909,22 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'enable_secure_boot') and self.enable_secure_boot is not None: + if hasattr(self, 'bandwidth') and self.bandwidth is not None: + _dict['bandwidth'] = self.bandwidth + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'trusted_platform_module') and self.trusted_platform_module is not None: + if hasattr(self, 'trusted_platform_module' + ) and self.trusted_platform_module is not None: if isinstance(self.trusted_platform_module, dict): _dict['trusted_platform_module'] = self.trusted_platform_module else: - _dict['trusted_platform_module'] = self.trusted_platform_module.to_dict() + _dict[ + 'trusted_platform_module'] = self.trusted_platform_module.to_dict( + ) return _dict def _to_dict(self): @@ -31931,7 +32976,8 @@ class BareMetalServerPrimaryNetworkAttachmentPrototype: def __init__( self, - virtual_network_interface: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', + virtual_network_interface: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', *, interface_type: Optional[str] = None, name: Optional[str] = None, @@ -31965,8 +33011,9 @@ def __init__( of randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype']) - ) + ", ".join([ + 'BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype' + ])) raise Exception(msg) class InterfaceTypeEnum(str, Enum): @@ -31985,7 +33032,6 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' - class BareMetalServerPrimaryNetworkInterfacePrototype: """ BareMetalServerPrimaryNetworkInterfacePrototype. @@ -32143,14 +33189,17 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerPrimaryNetworkInterfacePrototype': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerPrimaryNetworkInterfacePrototype': """Initialize a BareMetalServerPrimaryNetworkInterfacePrototype object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing if (allowed_vlans := _dict.get('allowed_vlans')) is not None: args['allowed_vlans'] = allowed_vlans - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type @@ -32163,7 +33212,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerPrimaryNetworkInterfaceProtot if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerPrimaryNetworkInterfacePrototype JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerPrimaryNetworkInterfacePrototype JSON' + ) return cls(**args) @classmethod @@ -32174,11 +33225,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'allowed_vlans') and self.allowed_vlans is not None: _dict['allowed_vlans'] = self.allowed_vlans - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'interface_type') and self.interface_type is not None: _dict['interface_type'] = self.interface_type @@ -32189,7 +33242,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -32212,13 +33266,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerPrimaryNetworkInterfacePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerPrimaryNetworkInterfacePrototype') -> bool: + def __eq__( + self, + other: 'BareMetalServerPrimaryNetworkInterfacePrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerPrimaryNetworkInterfacePrototype') -> bool: + def __ne__( + self, + other: 'BareMetalServerPrimaryNetworkInterfacePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -32242,7 +33300,6 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' - class BareMetalServerProfile: """ BareMetalServerProfile. @@ -32287,8 +33344,10 @@ def __init__( network_interface_count: 'BareMetalServerProfileNetworkInterfaceCount', os_architecture: 'BareMetalServerProfileOSArchitecture', resource_type: str, - supported_trusted_platform_module_modes: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes', - virtual_network_interfaces_supported: 'BareMetalServerProfileVirtualNetworkInterfacesSupported', + supported_trusted_platform_module_modes: + 'BareMetalServerProfileSupportedTrustedPlatformModuleModes', + virtual_network_interfaces_supported: + 'BareMetalServerProfileVirtualNetworkInterfacesSupported', ) -> None: """ Initialize a BareMetalServerProfile object. @@ -32342,67 +33401,116 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfile': if (bandwidth := _dict.get('bandwidth')) is not None: args['bandwidth'] = bandwidth else: - raise ValueError('Required property \'bandwidth\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'bandwidth\' not present in BareMetalServerProfile JSON' + ) if (console_types := _dict.get('console_types')) is not None: - args['console_types'] = BareMetalServerProfileConsoleTypes.from_dict(console_types) + args[ + 'console_types'] = BareMetalServerProfileConsoleTypes.from_dict( + console_types) else: - raise ValueError('Required property \'console_types\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'console_types\' not present in BareMetalServerProfile JSON' + ) if (cpu_architecture := _dict.get('cpu_architecture')) is not None: - args['cpu_architecture'] = BareMetalServerProfileCPUArchitecture.from_dict(cpu_architecture) + args[ + 'cpu_architecture'] = BareMetalServerProfileCPUArchitecture.from_dict( + cpu_architecture) else: - raise ValueError('Required property \'cpu_architecture\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'cpu_architecture\' not present in BareMetalServerProfile JSON' + ) if (cpu_core_count := _dict.get('cpu_core_count')) is not None: args['cpu_core_count'] = cpu_core_count else: - raise ValueError('Required property \'cpu_core_count\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'cpu_core_count\' not present in BareMetalServerProfile JSON' + ) if (cpu_socket_count := _dict.get('cpu_socket_count')) is not None: args['cpu_socket_count'] = cpu_socket_count else: - raise ValueError('Required property \'cpu_socket_count\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'cpu_socket_count\' not present in BareMetalServerProfile JSON' + ) if (disks := _dict.get('disks')) is not None: - args['disks'] = [BareMetalServerProfileDisk.from_dict(v) for v in disks] + args['disks'] = [ + BareMetalServerProfileDisk.from_dict(v) for v in disks + ] else: - raise ValueError('Required property \'disks\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'disks\' not present in BareMetalServerProfile JSON' + ) if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'family\' not present in BareMetalServerProfile JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerProfile JSON' + ) if (memory := _dict.get('memory')) is not None: args['memory'] = memory else: - raise ValueError('Required property \'memory\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'memory\' not present in BareMetalServerProfile JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerProfile JSON') - if (network_attachment_count := _dict.get('network_attachment_count')) is not None: + raise ValueError( + 'Required property \'name\' not present in BareMetalServerProfile JSON' + ) + if (network_attachment_count := + _dict.get('network_attachment_count')) is not None: args['network_attachment_count'] = network_attachment_count else: - raise ValueError('Required property \'network_attachment_count\' not present in BareMetalServerProfile JSON') - if (network_interface_count := _dict.get('network_interface_count')) is not None: + raise ValueError( + 'Required property \'network_attachment_count\' not present in BareMetalServerProfile JSON' + ) + if (network_interface_count := + _dict.get('network_interface_count')) is not None: args['network_interface_count'] = network_interface_count else: - raise ValueError('Required property \'network_interface_count\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'network_interface_count\' not present in BareMetalServerProfile JSON' + ) if (os_architecture := _dict.get('os_architecture')) is not None: - args['os_architecture'] = BareMetalServerProfileOSArchitecture.from_dict(os_architecture) + args[ + 'os_architecture'] = BareMetalServerProfileOSArchitecture.from_dict( + os_architecture) else: - raise ValueError('Required property \'os_architecture\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'os_architecture\' not present in BareMetalServerProfile JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerProfile JSON') - if (supported_trusted_platform_module_modes := _dict.get('supported_trusted_platform_module_modes')) is not None: - args['supported_trusted_platform_module_modes'] = BareMetalServerProfileSupportedTrustedPlatformModuleModes.from_dict(supported_trusted_platform_module_modes) - else: - raise ValueError('Required property \'supported_trusted_platform_module_modes\' not present in BareMetalServerProfile JSON') - if (virtual_network_interfaces_supported := _dict.get('virtual_network_interfaces_supported')) is not None: - args['virtual_network_interfaces_supported'] = BareMetalServerProfileVirtualNetworkInterfacesSupported.from_dict(virtual_network_interfaces_supported) - else: - raise ValueError('Required property \'virtual_network_interfaces_supported\' not present in BareMetalServerProfile JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerProfile JSON' + ) + if (supported_trusted_platform_module_modes := + _dict.get('supported_trusted_platform_module_modes') + ) is not None: + args[ + 'supported_trusted_platform_module_modes'] = BareMetalServerProfileSupportedTrustedPlatformModuleModes.from_dict( + supported_trusted_platform_module_modes) + else: + raise ValueError( + 'Required property \'supported_trusted_platform_module_modes\' not present in BareMetalServerProfile JSON' + ) + if (virtual_network_interfaces_supported := + _dict.get('virtual_network_interfaces_supported')) is not None: + args[ + 'virtual_network_interfaces_supported'] = BareMetalServerProfileVirtualNetworkInterfacesSupported.from_dict( + virtual_network_interfaces_supported) + else: + raise ValueError( + 'Required property \'virtual_network_interfaces_supported\' not present in BareMetalServerProfile JSON' + ) return cls(**args) @classmethod @@ -32423,7 +33531,8 @@ def to_dict(self) -> Dict: _dict['console_types'] = self.console_types else: _dict['console_types'] = self.console_types.to_dict() - if hasattr(self, 'cpu_architecture') and self.cpu_architecture is not None: + if hasattr(self, + 'cpu_architecture') and self.cpu_architecture is not None: if isinstance(self.cpu_architecture, dict): _dict['cpu_architecture'] = self.cpu_architecture else: @@ -32433,7 +33542,8 @@ def to_dict(self) -> Dict: _dict['cpu_core_count'] = self.cpu_core_count else: _dict['cpu_core_count'] = self.cpu_core_count.to_dict() - if hasattr(self, 'cpu_socket_count') and self.cpu_socket_count is not None: + if hasattr(self, + 'cpu_socket_count') and self.cpu_socket_count is not None: if isinstance(self.cpu_socket_count, dict): _dict['cpu_socket_count'] = self.cpu_socket_count else: @@ -32457,33 +33567,50 @@ def to_dict(self) -> Dict: _dict['memory'] = self.memory.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'network_attachment_count') and self.network_attachment_count is not None: + if hasattr(self, 'network_attachment_count' + ) and self.network_attachment_count is not None: if isinstance(self.network_attachment_count, dict): - _dict['network_attachment_count'] = self.network_attachment_count - else: - _dict['network_attachment_count'] = self.network_attachment_count.to_dict() - if hasattr(self, 'network_interface_count') and self.network_interface_count is not None: + _dict[ + 'network_attachment_count'] = self.network_attachment_count + else: + _dict[ + 'network_attachment_count'] = self.network_attachment_count.to_dict( + ) + if hasattr(self, 'network_interface_count' + ) and self.network_interface_count is not None: if isinstance(self.network_interface_count, dict): _dict['network_interface_count'] = self.network_interface_count else: - _dict['network_interface_count'] = self.network_interface_count.to_dict() - if hasattr(self, 'os_architecture') and self.os_architecture is not None: + _dict[ + 'network_interface_count'] = self.network_interface_count.to_dict( + ) + if hasattr(self, + 'os_architecture') and self.os_architecture is not None: if isinstance(self.os_architecture, dict): _dict['os_architecture'] = self.os_architecture else: _dict['os_architecture'] = self.os_architecture.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'supported_trusted_platform_module_modes') and self.supported_trusted_platform_module_modes is not None: + if hasattr( + self, 'supported_trusted_platform_module_modes' + ) and self.supported_trusted_platform_module_modes is not None: if isinstance(self.supported_trusted_platform_module_modes, dict): - _dict['supported_trusted_platform_module_modes'] = self.supported_trusted_platform_module_modes - else: - _dict['supported_trusted_platform_module_modes'] = self.supported_trusted_platform_module_modes.to_dict() - if hasattr(self, 'virtual_network_interfaces_supported') and self.virtual_network_interfaces_supported is not None: + _dict[ + 'supported_trusted_platform_module_modes'] = self.supported_trusted_platform_module_modes + else: + _dict[ + 'supported_trusted_platform_module_modes'] = self.supported_trusted_platform_module_modes.to_dict( + ) + if hasattr(self, 'virtual_network_interfaces_supported' + ) and self.virtual_network_interfaces_supported is not None: if isinstance(self.virtual_network_interfaces_supported, dict): - _dict['virtual_network_interfaces_supported'] = self.virtual_network_interfaces_supported + _dict[ + 'virtual_network_interfaces_supported'] = self.virtual_network_interfaces_supported else: - _dict['virtual_network_interfaces_supported'] = self.virtual_network_interfaces_supported.to_dict() + _dict[ + 'virtual_network_interfaces_supported'] = self.virtual_network_interfaces_supported.to_dict( + ) return _dict def _to_dict(self): @@ -32512,23 +33639,24 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile' - class BareMetalServerProfileBandwidth: """ BareMetalServerProfileBandwidth. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileBandwidth object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileBandwidthFixed', 'BareMetalServerProfileBandwidthRange', 'BareMetalServerProfileBandwidthEnum', 'BareMetalServerProfileBandwidthDependent']) - ) + ", ".join([ + 'BareMetalServerProfileBandwidthFixed', + 'BareMetalServerProfileBandwidthRange', + 'BareMetalServerProfileBandwidthEnum', + 'BareMetalServerProfileBandwidthDependent' + ])) raise Exception(msg) @@ -32572,11 +33700,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUArchitecture': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUArchitecture JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUArchitecture JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileCPUArchitecture JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileCPUArchitecture JSON' + ) return cls(**args) @classmethod @@ -32621,23 +33753,24 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class BareMetalServerProfileCPUCoreCount: """ BareMetalServerProfileCPUCoreCount. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileCPUCoreCount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileCPUCoreCountFixed', 'BareMetalServerProfileCPUCoreCountRange', 'BareMetalServerProfileCPUCoreCountEnum', 'BareMetalServerProfileCPUCoreCountDependent']) - ) + ", ".join([ + 'BareMetalServerProfileCPUCoreCountFixed', + 'BareMetalServerProfileCPUCoreCountRange', + 'BareMetalServerProfileCPUCoreCountEnum', + 'BareMetalServerProfileCPUCoreCountDependent' + ])) raise Exception(msg) @@ -32647,16 +33780,18 @@ class BareMetalServerProfileCPUSocketCount: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileCPUSocketCount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileCPUSocketCountFixed', 'BareMetalServerProfileCPUSocketCountRange', 'BareMetalServerProfileCPUSocketCountEnum', 'BareMetalServerProfileCPUSocketCountDependent']) - ) + ", ".join([ + 'BareMetalServerProfileCPUSocketCountFixed', + 'BareMetalServerProfileCPUSocketCountRange', + 'BareMetalServerProfileCPUSocketCountEnum', + 'BareMetalServerProfileCPUSocketCountDependent' + ])) raise Exception(msg) @@ -32710,23 +33845,34 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCollection': """Initialize a BareMetalServerProfileCollection object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = BareMetalServerProfileCollectionFirst.from_dict(first) + args['first'] = BareMetalServerProfileCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in BareMetalServerProfileCollection JSON') + raise ValueError( + 'Required property \'first\' not present in BareMetalServerProfileCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in BareMetalServerProfileCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in BareMetalServerProfileCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = BareMetalServerProfileCollectionNext.from_dict(next) if (profiles := _dict.get('profiles')) is not None: - args['profiles'] = [BareMetalServerProfile.from_dict(v) for v in profiles] + args['profiles'] = [ + BareMetalServerProfile.from_dict(v) for v in profiles + ] else: - raise ValueError('Required property \'profiles\' not present in BareMetalServerProfileCollection JSON') + raise ValueError( + 'Required property \'profiles\' not present in BareMetalServerProfileCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in BareMetalServerProfileCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in BareMetalServerProfileCollection JSON' + ) return cls(**args) @classmethod @@ -32805,7 +33951,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerProfileCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerProfileCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -32865,7 +34013,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerProfileCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerProfileCollectionNext JSON' + ) return cls(**args) @classmethod @@ -32930,11 +34080,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileConsoleTypes': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileConsoleTypes JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileConsoleTypes JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileConsoleTypes JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileConsoleTypes JSON' + ) return cls(**args) @classmethod @@ -32976,7 +34130,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class ValuesEnum(str, Enum): """ A console type. @@ -32986,7 +34139,6 @@ class ValuesEnum(str, Enum): VNC = 'vnc' - class BareMetalServerProfileDisk: """ Disks provided by this profile. @@ -33000,7 +34152,8 @@ def __init__( self, quantity: 'BareMetalServerProfileDiskQuantity', size: 'BareMetalServerProfileDiskSize', - supported_interface_types: 'BareMetalServerProfileDiskSupportedInterfaces', + supported_interface_types: + 'BareMetalServerProfileDiskSupportedInterfaces', ) -> None: """ Initialize a BareMetalServerProfileDisk object. @@ -33021,15 +34174,24 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDisk': if (quantity := _dict.get('quantity')) is not None: args['quantity'] = quantity else: - raise ValueError('Required property \'quantity\' not present in BareMetalServerProfileDisk JSON') + raise ValueError( + 'Required property \'quantity\' not present in BareMetalServerProfileDisk JSON' + ) if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in BareMetalServerProfileDisk JSON') - if (supported_interface_types := _dict.get('supported_interface_types')) is not None: - args['supported_interface_types'] = BareMetalServerProfileDiskSupportedInterfaces.from_dict(supported_interface_types) - else: - raise ValueError('Required property \'supported_interface_types\' not present in BareMetalServerProfileDisk JSON') + raise ValueError( + 'Required property \'size\' not present in BareMetalServerProfileDisk JSON' + ) + if (supported_interface_types := + _dict.get('supported_interface_types')) is not None: + args[ + 'supported_interface_types'] = BareMetalServerProfileDiskSupportedInterfaces.from_dict( + supported_interface_types) + else: + raise ValueError( + 'Required property \'supported_interface_types\' not present in BareMetalServerProfileDisk JSON' + ) return cls(**args) @classmethod @@ -33050,11 +34212,15 @@ def to_dict(self) -> Dict: _dict['size'] = self.size else: _dict['size'] = self.size.to_dict() - if hasattr(self, 'supported_interface_types') and self.supported_interface_types is not None: + if hasattr(self, 'supported_interface_types' + ) and self.supported_interface_types is not None: if isinstance(self.supported_interface_types, dict): - _dict['supported_interface_types'] = self.supported_interface_types + _dict[ + 'supported_interface_types'] = self.supported_interface_types else: - _dict['supported_interface_types'] = self.supported_interface_types.to_dict() + _dict[ + 'supported_interface_types'] = self.supported_interface_types.to_dict( + ) return _dict def _to_dict(self): @@ -33082,16 +34248,18 @@ class BareMetalServerProfileDiskQuantity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileDiskQuantity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileDiskQuantityFixed', 'BareMetalServerProfileDiskQuantityRange', 'BareMetalServerProfileDiskQuantityEnum', 'BareMetalServerProfileDiskQuantityDependent']) - ) + ", ".join([ + 'BareMetalServerProfileDiskQuantityFixed', + 'BareMetalServerProfileDiskQuantityRange', + 'BareMetalServerProfileDiskQuantityEnum', + 'BareMetalServerProfileDiskQuantityDependent' + ])) raise Exception(msg) @@ -33101,16 +34269,18 @@ class BareMetalServerProfileDiskSize: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileDiskSize object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileDiskSizeFixed', 'BareMetalServerProfileDiskSizeRange', 'BareMetalServerProfileDiskSizeEnum', 'BareMetalServerProfileDiskSizeDependent']) - ) + ", ".join([ + 'BareMetalServerProfileDiskSizeFixed', + 'BareMetalServerProfileDiskSizeRange', + 'BareMetalServerProfileDiskSizeEnum', + 'BareMetalServerProfileDiskSizeDependent' + ])) raise Exception(msg) @@ -33155,21 +34325,29 @@ def __init__( self.values = values @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskSupportedInterfaces': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerProfileDiskSupportedInterfaces': """Initialize a BareMetalServerProfileDiskSupportedInterfaces object from a json dictionary.""" args = {} if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileDiskSupportedInterfaces JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskSupportedInterfaces JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileDiskSupportedInterfaces JSON' + ) return cls(**args) @classmethod @@ -33196,13 +34374,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileDiskSupportedInterfaces object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileDiskSupportedInterfaces') -> bool: + def __eq__(self, + other: 'BareMetalServerProfileDiskSupportedInterfaces') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileDiskSupportedInterfaces') -> bool: + def __ne__(self, + other: 'BareMetalServerProfileDiskSupportedInterfaces') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -33221,7 +34401,6 @@ class DefaultEnum(str, Enum): NVME = 'nvme' SATA = 'sata' - class TypeEnum(str, Enum): """ The type for this profile field. @@ -33229,7 +34408,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class ValuesEnum(str, Enum): """ The disk interface used for attaching the disk: @@ -33246,23 +34424,22 @@ class ValuesEnum(str, Enum): SATA = 'sata' - class BareMetalServerProfileIdentity: """ Identifies a bare metal server profile by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileIdentityByName', 'BareMetalServerProfileIdentityByHref']) - ) + ", ".join([ + 'BareMetalServerProfileIdentityByName', + 'BareMetalServerProfileIdentityByHref' + ])) raise Exception(msg) @@ -33272,16 +34449,18 @@ class BareMetalServerProfileMemory: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileMemory object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileMemoryFixed', 'BareMetalServerProfileMemoryRange', 'BareMetalServerProfileMemoryEnum', 'BareMetalServerProfileMemoryDependent']) - ) + ", ".join([ + 'BareMetalServerProfileMemoryFixed', + 'BareMetalServerProfileMemoryRange', + 'BareMetalServerProfileMemoryEnum', + 'BareMetalServerProfileMemoryDependent' + ])) raise Exception(msg) @@ -33291,16 +34470,16 @@ class BareMetalServerProfileNetworkAttachmentCount: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileNetworkAttachmentCount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileNetworkAttachmentCountRange', 'BareMetalServerProfileNetworkAttachmentCountDependent']) - ) + ", ".join([ + 'BareMetalServerProfileNetworkAttachmentCountRange', + 'BareMetalServerProfileNetworkAttachmentCountDependent' + ])) raise Exception(msg) @@ -33310,16 +34489,16 @@ class BareMetalServerProfileNetworkInterfaceCount: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerProfileNetworkInterfaceCount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerProfileNetworkInterfaceCountRange', 'BareMetalServerProfileNetworkInterfaceCountDependent']) - ) + ", ".join([ + 'BareMetalServerProfileNetworkInterfaceCountRange', + 'BareMetalServerProfileNetworkInterfaceCountDependent' + ])) raise Exception(msg) @@ -33360,15 +34539,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileOSArchitecture': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileOSArchitecture JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileOSArchitecture JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileOSArchitecture JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileOSArchitecture JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileOSArchitecture JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileOSArchitecture JSON' + ) return cls(**args) @classmethod @@ -33413,7 +34598,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class BareMetalServerProfileReference: """ BareMetalServerProfileReference. @@ -33447,15 +34631,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerProfileReference JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerProfileReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerProfileReference JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerProfileReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerProfileReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerProfileReference JSON' + ) return cls(**args) @classmethod @@ -33500,11 +34690,12 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile' - class BareMetalServerProfileSupportedTrustedPlatformModuleModes: """ The supported trusted platform module modes for this bare metal server profile. + :param str default: (optional) The default trusted platform module for a bare + metal server with this profile. :param str type: The type for this profile field. :param List[str] values: The supported trusted platform module modes. """ @@ -33513,28 +34704,41 @@ def __init__( self, type: str, values: List[str], + *, + default: Optional[str] = None, ) -> None: """ Initialize a BareMetalServerProfileSupportedTrustedPlatformModuleModes object. :param str type: The type for this profile field. :param List[str] values: The supported trusted platform module modes. + :param str default: (optional) The default trusted platform module for a + bare metal server with this profile. """ + self.default = default self.type = type self.values = values @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileSupportedTrustedPlatformModuleModes': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerProfileSupportedTrustedPlatformModuleModes': """Initialize a BareMetalServerProfileSupportedTrustedPlatformModuleModes object from a json dictionary.""" args = {} + if (default := _dict.get('default')) is not None: + args['default'] = default if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileSupportedTrustedPlatformModuleModes JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileSupportedTrustedPlatformModuleModes JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileSupportedTrustedPlatformModuleModes JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileSupportedTrustedPlatformModuleModes JSON' + ) return cls(**args) @classmethod @@ -33545,6 +34749,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'default') and self.default is not None: + _dict['default'] = self.default if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'values') and self.values is not None: @@ -33559,16 +34765,28 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileSupportedTrustedPlatformModuleModes object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes') -> bool: + def __eq__( + self, other: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes') -> bool: + def __ne__( + self, other: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class DefaultEnum(str, Enum): + """ + The default trusted platform module for a bare metal server with this profile. + """ + + DISABLED = 'disabled' + TPM_2 = 'tpm_2' + class TypeEnum(str, Enum): """ The type for this profile field. @@ -33576,7 +34794,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class ValuesEnum(str, Enum): """ The trusted platform module (TPM) mode: @@ -33591,7 +34808,6 @@ class ValuesEnum(str, Enum): TPM_2 = 'tpm_2' - class BareMetalServerProfileVirtualNetworkInterfacesSupported: """ Indicates whether this profile supports virtual network interfaces. @@ -33615,17 +34831,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileVirtualNetworkInterfacesSupported': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerProfileVirtualNetworkInterfacesSupported': """Initialize a BareMetalServerProfileVirtualNetworkInterfacesSupported object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileVirtualNetworkInterfacesSupported JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileVirtualNetworkInterfacesSupported JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileVirtualNetworkInterfacesSupported JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileVirtualNetworkInterfacesSupported JSON' + ) return cls(**args) @classmethod @@ -33650,13 +34872,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileVirtualNetworkInterfacesSupported object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileVirtualNetworkInterfacesSupported') -> bool: + def __eq__( + self, other: 'BareMetalServerProfileVirtualNetworkInterfacesSupported' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileVirtualNetworkInterfacesSupported') -> bool: + def __ne__( + self, other: 'BareMetalServerProfileVirtualNetworkInterfacesSupported' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -33668,11 +34894,14 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class BareMetalServerPrototype: """ BareMetalServerPrototype. + :param int bandwidth: (optional) The total bandwidth (in megabits per second) + shared across the bare metal server's network interfaces. The specified value + must match one of the bandwidth values in the bare metal server's profile. If + unspecified, the default value from the profile will be used. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the server will fail to boot. @@ -33704,10 +34933,12 @@ def __init__( profile: 'BareMetalServerProfileIdentity', zone: 'ZoneIdentity', *, + bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, - trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePrototype'] = None, + trusted_platform_module: Optional[ + 'BareMetalServerTrustedPlatformModulePrototype'] = None, vpc: Optional['VPCIdentity'] = None, ) -> None: """ @@ -33718,6 +34949,11 @@ def __init__( [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) to use for this bare metal server. :param ZoneIdentity zone: The zone this bare metal server will reside in. + :param int bandwidth: (optional) The total bandwidth (in megabits per + second) shared across the bare metal server's network interfaces. The + specified value must match one of the bandwidth values in the bare metal + server's profile. If unspecified, the default value from the profile will + be used. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the server will fail to boot. @@ -33738,8 +34974,10 @@ def __init__( network interfaces of the bare metal server are attached to. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerPrototypeBareMetalServerByNetworkAttachment', 'BareMetalServerPrototypeBareMetalServerByNetworkInterface']) - ) + ", ".join([ + 'BareMetalServerPrototypeBareMetalServerByNetworkAttachment', + 'BareMetalServerPrototypeBareMetalServerByNetworkInterface' + ])) raise Exception(msg) @@ -33797,11 +35035,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in BareMetalServerStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in BareMetalServerStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in BareMetalServerStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in BareMetalServerStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -33860,7 +35102,6 @@ class CodeEnum(str, Enum): CANNOT_START_NETWORK = 'cannot_start_network' - class BareMetalServerTrustedPlatformModule: """ BareMetalServerTrustedPlatformModule. @@ -33906,15 +35147,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerTrustedPlatformModule': if (enabled := _dict.get('enabled')) is not None: args['enabled'] = enabled else: - raise ValueError('Required property \'enabled\' not present in BareMetalServerTrustedPlatformModule JSON') + raise ValueError( + 'Required property \'enabled\' not present in BareMetalServerTrustedPlatformModule JSON' + ) if (mode := _dict.get('mode')) is not None: args['mode'] = mode else: - raise ValueError('Required property \'mode\' not present in BareMetalServerTrustedPlatformModule JSON') + raise ValueError( + 'Required property \'mode\' not present in BareMetalServerTrustedPlatformModule JSON' + ) if (supported_modes := _dict.get('supported_modes')) is not None: args['supported_modes'] = supported_modes else: - raise ValueError('Required property \'supported_modes\' not present in BareMetalServerTrustedPlatformModule JSON') + raise ValueError( + 'Required property \'supported_modes\' not present in BareMetalServerTrustedPlatformModule JSON' + ) return cls(**args) @classmethod @@ -33929,7 +35176,8 @@ def to_dict(self) -> Dict: _dict['enabled'] = self.enabled if hasattr(self, 'mode') and self.mode is not None: _dict['mode'] = self.mode - if hasattr(self, 'supported_modes') and self.supported_modes is not None: + if hasattr(self, + 'supported_modes') and self.supported_modes is not None: _dict['supported_modes'] = self.supported_modes return _dict @@ -33964,7 +35212,6 @@ class ModeEnum(str, Enum): DISABLED = 'disabled' TPM_2 = 'tpm_2' - class SupportedModesEnum(str, Enum): """ The trusted platform module (TPM) mode: @@ -33979,7 +35226,6 @@ class SupportedModesEnum(str, Enum): TPM_2 = 'tpm_2' - class BareMetalServerTrustedPlatformModulePatch: """ BareMetalServerTrustedPlatformModulePatch. @@ -34007,7 +35253,8 @@ def __init__( self.mode = mode @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerTrustedPlatformModulePatch': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerTrustedPlatformModulePatch': """Initialize a BareMetalServerTrustedPlatformModulePatch object from a json dictionary.""" args = {} if (mode := _dict.get('mode')) is not None: @@ -34034,13 +35281,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerTrustedPlatformModulePatch object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerTrustedPlatformModulePatch') -> bool: + def __eq__(self, + other: 'BareMetalServerTrustedPlatformModulePatch') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerTrustedPlatformModulePatch') -> bool: + def __ne__(self, + other: 'BareMetalServerTrustedPlatformModulePatch') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -34056,7 +35305,6 @@ class ModeEnum(str, Enum): TPM_2 = 'tpm_2' - class BareMetalServerTrustedPlatformModulePrototype: """ BareMetalServerTrustedPlatformModulePrototype. @@ -34064,6 +35312,8 @@ class BareMetalServerTrustedPlatformModulePrototype: :param str mode: (optional) The trusted platform module mode to use. The specified value must be listed in the bare metal server profile's `supported_trusted_platform_module_modes`. + If unspecified, the default trusted platform module mode from the profile will + be used. """ def __init__( @@ -34077,11 +35327,15 @@ def __init__( :param str mode: (optional) The trusted platform module mode to use. The specified value must be listed in the bare metal server profile's `supported_trusted_platform_module_modes`. + If unspecified, the default trusted platform module mode from the profile + will be used. """ self.mode = mode @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerTrustedPlatformModulePrototype': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerTrustedPlatformModulePrototype': """Initialize a BareMetalServerTrustedPlatformModulePrototype object from a json dictionary.""" args = {} if (mode := _dict.get('mode')) is not None: @@ -34108,13 +35362,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerTrustedPlatformModulePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerTrustedPlatformModulePrototype') -> bool: + def __eq__(self, + other: 'BareMetalServerTrustedPlatformModulePrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerTrustedPlatformModulePrototype') -> bool: + def __ne__(self, + other: 'BareMetalServerTrustedPlatformModulePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -34122,13 +35378,14 @@ class ModeEnum(str, Enum): """ The trusted platform module mode to use. The specified value must be listed in the bare metal server profile's `supported_trusted_platform_module_modes`. + If unspecified, the default trusted platform module mode from the profile will be + used. """ DISABLED = 'disabled' TPM_2 = 'tpm_2' - class CatalogOfferingIdentity: """ Identifies a @@ -34137,16 +35394,13 @@ class CatalogOfferingIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a CatalogOfferingIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['CatalogOfferingIdentityCatalogOfferingByCRN']) - ) + ", ".join(['CatalogOfferingIdentityCatalogOfferingByCRN'])) raise Exception(msg) @@ -34158,19 +35412,185 @@ class CatalogOfferingVersionIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a CatalogOfferingVersionIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN']) - ) + ", ".join( + ['CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN'])) + raise Exception(msg) + + +class CatalogOfferingVersionPlanIdentity: + """ + Identifies a catalog offering version's billing plan by a unique property. + + """ + + def __init__(self,) -> None: + """ + Initialize a CatalogOfferingVersionPlanIdentity object. + + """ + msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( + ", ".join([ + 'CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN' + ])) raise Exception(msg) +class CatalogOfferingVersionPlanReference: + """ + CatalogOfferingVersionPlanReference. + + :param str crn: The CRN for this + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version's billing plan. + :param CatalogOfferingVersionPlanReferenceDeleted deleted: (optional) If + present, this property indicates the referenced resource has been deleted, and + provides + some supplementary information. + """ + + def __init__( + self, + crn: str, + *, + deleted: Optional['CatalogOfferingVersionPlanReferenceDeleted'] = None, + ) -> None: + """ + Initialize a CatalogOfferingVersionPlanReference object. + + :param str crn: The CRN for this + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version's billing plan. + :param CatalogOfferingVersionPlanReferenceDeleted deleted: (optional) If + present, this property indicates the referenced resource has been deleted, + and provides + some supplementary information. + """ + self.crn = crn + self.deleted = deleted + + @classmethod + def from_dict(cls, _dict: Dict) -> 'CatalogOfferingVersionPlanReference': + """Initialize a CatalogOfferingVersionPlanReference object from a json dictionary.""" + args = {} + if (crn := _dict.get('crn')) is not None: + args['crn'] = crn + else: + raise ValueError( + 'Required property \'crn\' not present in CatalogOfferingVersionPlanReference JSON' + ) + if (deleted := _dict.get('deleted')) is not None: + args[ + 'deleted'] = CatalogOfferingVersionPlanReferenceDeleted.from_dict( + deleted) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a CatalogOfferingVersionPlanReference object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn + if hasattr(self, 'deleted') and self.deleted is not None: + if isinstance(self.deleted, dict): + _dict['deleted'] = self.deleted + else: + _dict['deleted'] = self.deleted.to_dict() + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this CatalogOfferingVersionPlanReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'CatalogOfferingVersionPlanReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'CatalogOfferingVersionPlanReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class CatalogOfferingVersionPlanReferenceDeleted: + """ + If present, this property indicates the referenced resource has been deleted, and + provides some supplementary information. + + :param str more_info: Link to documentation about deleted resources. + """ + + def __init__( + self, + more_info: str, + ) -> None: + """ + Initialize a CatalogOfferingVersionPlanReferenceDeleted object. + + :param str more_info: Link to documentation about deleted resources. + """ + self.more_info = more_info + + @classmethod + def from_dict(cls, + _dict: Dict) -> 'CatalogOfferingVersionPlanReferenceDeleted': + """Initialize a CatalogOfferingVersionPlanReferenceDeleted object from a json dictionary.""" + args = {} + if (more_info := _dict.get('more_info')) is not None: + args['more_info'] = more_info + else: + raise ValueError( + 'Required property \'more_info\' not present in CatalogOfferingVersionPlanReferenceDeleted JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a CatalogOfferingVersionPlanReferenceDeleted object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'more_info') and self.more_info is not None: + _dict['more_info'] = self.more_info + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this CatalogOfferingVersionPlanReferenceDeleted object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, + other: 'CatalogOfferingVersionPlanReferenceDeleted') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, + other: 'CatalogOfferingVersionPlanReferenceDeleted') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class CatalogOfferingVersionReference: """ CatalogOfferingVersionReference. @@ -34200,7 +35620,9 @@ def from_dict(cls, _dict: Dict) -> 'CatalogOfferingVersionReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in CatalogOfferingVersionReference JSON') + raise ValueError( + 'Required property \'crn\' not present in CatalogOfferingVersionReference JSON' + ) return cls(**args) @classmethod @@ -34240,16 +35662,13 @@ class CertificateInstanceIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a CertificateInstanceIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['CertificateInstanceIdentityByCRN']) - ) + ", ".join(['CertificateInstanceIdentityByCRN'])) raise Exception(msg) @@ -34278,7 +35697,9 @@ def from_dict(cls, _dict: Dict) -> 'CertificateInstanceReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in CertificateInstanceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in CertificateInstanceReference JSON' + ) return cls(**args) @classmethod @@ -34318,16 +35739,16 @@ class CloudObjectStorageBucketIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a CloudObjectStorageBucketIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName', 'CloudObjectStorageBucketIdentityByCRN']) - ) + ", ".join([ + 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName', + 'CloudObjectStorageBucketIdentityByCRN' + ])) raise Exception(msg) @@ -34361,11 +35782,15 @@ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageBucketReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in CloudObjectStorageBucketReference JSON') + raise ValueError( + 'Required property \'crn\' not present in CloudObjectStorageBucketReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in CloudObjectStorageBucketReference JSON') + raise ValueError( + 'Required property \'name\' not present in CloudObjectStorageBucketReference JSON' + ) return cls(**args) @classmethod @@ -34428,7 +35853,9 @@ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageObjectReference': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in CloudObjectStorageObjectReference JSON') + raise ValueError( + 'Required property \'name\' not present in CloudObjectStorageObjectReference JSON' + ) return cls(**args) @classmethod @@ -34468,22 +35895,19 @@ class DNSInstanceIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a DNSInstanceIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DNSInstanceIdentityByCRN']) - ) + ", ".join(['DNSInstanceIdentityByCRN'])) raise Exception(msg) -class DNSInstanceReference: +class DNSInstanceReferenceLoadBalancerDNSContext: """ - DNSInstanceReference. + DNSInstanceReferenceLoadBalancerDNSContext. :param str crn: The CRN for this DNS instance. """ @@ -34493,25 +35917,28 @@ def __init__( crn: str, ) -> None: """ - Initialize a DNSInstanceReference object. + Initialize a DNSInstanceReferenceLoadBalancerDNSContext object. :param str crn: The CRN for this DNS instance. """ self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'DNSInstanceReference': - """Initialize a DNSInstanceReference object from a json dictionary.""" + def from_dict(cls, + _dict: Dict) -> 'DNSInstanceReferenceLoadBalancerDNSContext': + """Initialize a DNSInstanceReferenceLoadBalancerDNSContext object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DNSInstanceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in DNSInstanceReferenceLoadBalancerDNSContext JSON' + ) return cls(**args) @classmethod def _from_dict(cls, _dict): - """Initialize a DNSInstanceReference object from a json dictionary.""" + """Initialize a DNSInstanceReferenceLoadBalancerDNSContext object from a json dictionary.""" return cls.from_dict(_dict) def to_dict(self) -> Dict: @@ -34526,16 +35953,18 @@ def _to_dict(self): return self.to_dict() def __str__(self) -> str: - """Return a `str` version of this DNSInstanceReference object.""" + """Return a `str` version of this DNSInstanceReferenceLoadBalancerDNSContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'DNSInstanceReference') -> bool: + def __eq__(self, + other: 'DNSInstanceReferenceLoadBalancerDNSContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'DNSInstanceReference') -> bool: + def __ne__(self, + other: 'DNSInstanceReferenceLoadBalancerDNSContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -34578,7 +36007,8 @@ def from_dict(cls, _dict: Dict) -> 'DNSServer': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in DNSServer JSON') + raise ValueError( + 'Required property \'address\' not present in DNSServer JSON') if (zone_affinity := _dict.get('zone_affinity')) is not None: args['zone_affinity'] = ZoneReference.from_dict(zone_affinity) return cls(**args) @@ -34657,7 +36087,9 @@ def from_dict(cls, _dict: Dict) -> 'DNSServerPrototype': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in DNSServerPrototype JSON') + raise ValueError( + 'Required property \'address\' not present in DNSServerPrototype JSON' + ) if (zone_affinity := _dict.get('zone_affinity')) is not None: args['zone_affinity'] = zone_affinity return cls(**args) @@ -34704,16 +36136,13 @@ class DNSZoneIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a DNSZoneIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DNSZoneIdentityById']) - ) + ", ".join(['DNSZoneIdentityById'])) raise Exception(msg) @@ -34742,7 +36171,8 @@ def from_dict(cls, _dict: Dict) -> 'DNSZoneReference': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DNSZoneReference JSON') + raise ValueError( + 'Required property \'id\' not present in DNSZoneReference JSON') return cls(**args) @classmethod @@ -34918,95 +36348,139 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHost': if (available_memory := _dict.get('available_memory')) is not None: args['available_memory'] = available_memory else: - raise ValueError('Required property \'available_memory\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'available_memory\' not present in DedicatedHost JSON' + ) if (available_vcpu := _dict.get('available_vcpu')) is not None: args['available_vcpu'] = VCPU.from_dict(available_vcpu) else: - raise ValueError('Required property \'available_vcpu\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'available_vcpu\' not present in DedicatedHost JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'created_at\' not present in DedicatedHost JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'crn\' not present in DedicatedHost JSON') if (disks := _dict.get('disks')) is not None: args['disks'] = [DedicatedHostDisk.from_dict(v) for v in disks] else: - raise ValueError('Required property \'disks\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'disks\' not present in DedicatedHost JSON') if (group := _dict.get('group')) is not None: args['group'] = DedicatedHostGroupReference.from_dict(group) else: - raise ValueError('Required property \'group\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'group\' not present in DedicatedHost JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHost JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DedicatedHost JSON') - if (instance_placement_enabled := _dict.get('instance_placement_enabled')) is not None: + raise ValueError( + 'Required property \'id\' not present in DedicatedHost JSON') + if (instance_placement_enabled := + _dict.get('instance_placement_enabled')) is not None: args['instance_placement_enabled'] = instance_placement_enabled else: - raise ValueError('Required property \'instance_placement_enabled\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'instance_placement_enabled\' not present in DedicatedHost JSON' + ) if (instances := _dict.get('instances')) is not None: - args['instances'] = [InstanceReference.from_dict(v) for v in instances] + args['instances'] = [ + InstanceReference.from_dict(v) for v in instances + ] else: - raise ValueError('Required property \'instances\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'instances\' not present in DedicatedHost JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in DedicatedHost JSON' + ) if (memory := _dict.get('memory')) is not None: args['memory'] = memory else: - raise ValueError('Required property \'memory\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'memory\' not present in DedicatedHost JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHost JSON') if (numa := _dict.get('numa')) is not None: args['numa'] = DedicatedHostNUMA.from_dict(numa) else: - raise ValueError('Required property \'numa\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'numa\' not present in DedicatedHost JSON') if (profile := _dict.get('profile')) is not None: args['profile'] = DedicatedHostProfileReference.from_dict(profile) else: - raise ValueError('Required property \'profile\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'profile\' not present in DedicatedHost JSON' + ) if (provisionable := _dict.get('provisionable')) is not None: args['provisionable'] = provisionable else: - raise ValueError('Required property \'provisionable\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'provisionable\' not present in DedicatedHost JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'resource_group\' not present in DedicatedHost JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'resource_type\' not present in DedicatedHost JSON' + ) if (socket_count := _dict.get('socket_count')) is not None: args['socket_count'] = socket_count else: - raise ValueError('Required property \'socket_count\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'socket_count\' not present in DedicatedHost JSON' + ) if (state := _dict.get('state')) is not None: args['state'] = state else: - raise ValueError('Required property \'state\' not present in DedicatedHost JSON') - if (supported_instance_profiles := _dict.get('supported_instance_profiles')) is not None: - args['supported_instance_profiles'] = [InstanceProfileReference.from_dict(v) for v in supported_instance_profiles] - else: - raise ValueError('Required property \'supported_instance_profiles\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'state\' not present in DedicatedHost JSON') + if (supported_instance_profiles := + _dict.get('supported_instance_profiles')) is not None: + args['supported_instance_profiles'] = [ + InstanceProfileReference.from_dict(v) + for v in supported_instance_profiles + ] + else: + raise ValueError( + 'Required property \'supported_instance_profiles\' not present in DedicatedHost JSON' + ) if (vcpu := _dict.get('vcpu')) is not None: args['vcpu'] = VCPU.from_dict(vcpu) else: - raise ValueError('Required property \'vcpu\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'vcpu\' not present in DedicatedHost JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in DedicatedHost JSON') + raise ValueError( + 'Required property \'zone\' not present in DedicatedHost JSON') return cls(**args) @classmethod @@ -35017,7 +36491,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'available_memory') and self.available_memory is not None: + if hasattr(self, + 'available_memory') and self.available_memory is not None: _dict['available_memory'] = self.available_memory if hasattr(self, 'available_vcpu') and self.available_vcpu is not None: if isinstance(self.available_vcpu, dict): @@ -35045,8 +36520,10 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'instance_placement_enabled') and self.instance_placement_enabled is not None: - _dict['instance_placement_enabled'] = self.instance_placement_enabled + if hasattr(self, 'instance_placement_enabled' + ) and self.instance_placement_enabled is not None: + _dict[ + 'instance_placement_enabled'] = self.instance_placement_enabled if hasattr(self, 'instances') and self.instances is not None: instances_list = [] for v in self.instances: @@ -35055,7 +36532,8 @@ def to_dict(self) -> Dict: else: instances_list.append(v.to_dict()) _dict['instances'] = instances_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'memory') and self.memory is not None: _dict['memory'] = self.memory @@ -35084,14 +36562,16 @@ def to_dict(self) -> Dict: _dict['socket_count'] = self.socket_count if hasattr(self, 'state') and self.state is not None: _dict['state'] = self.state - if hasattr(self, 'supported_instance_profiles') and self.supported_instance_profiles is not None: + if hasattr(self, 'supported_instance_profiles' + ) and self.supported_instance_profiles is not None: supported_instance_profiles_list = [] for v in self.supported_instance_profiles: if isinstance(v, dict): supported_instance_profiles_list.append(v) else: supported_instance_profiles_list.append(v.to_dict()) - _dict['supported_instance_profiles'] = supported_instance_profiles_list + _dict[ + 'supported_instance_profiles'] = supported_instance_profiles_list if hasattr(self, 'vcpu') and self.vcpu is not None: if isinstance(self.vcpu, dict): _dict['vcpu'] = self.vcpu @@ -35135,7 +36615,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -35143,7 +36622,6 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST = 'dedicated_host' - class StateEnum(str, Enum): """ The administrative state of the dedicated host. @@ -35158,7 +36636,6 @@ class StateEnum(str, Enum): UNAVAILABLE = 'unavailable' - class DedicatedHostCollection: """ DedicatedHostCollection. @@ -35207,23 +36684,33 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostCollection': """Initialize a DedicatedHostCollection object from a json dictionary.""" args = {} if (dedicated_hosts := _dict.get('dedicated_hosts')) is not None: - args['dedicated_hosts'] = [DedicatedHost.from_dict(v) for v in dedicated_hosts] + args['dedicated_hosts'] = [ + DedicatedHost.from_dict(v) for v in dedicated_hosts + ] else: - raise ValueError('Required property \'dedicated_hosts\' not present in DedicatedHostCollection JSON') + raise ValueError( + 'Required property \'dedicated_hosts\' not present in DedicatedHostCollection JSON' + ) if (first := _dict.get('first')) is not None: args['first'] = DedicatedHostCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in DedicatedHostCollection JSON') + raise ValueError( + 'Required property \'first\' not present in DedicatedHostCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in DedicatedHostCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in DedicatedHostCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = DedicatedHostCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in DedicatedHostCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in DedicatedHostCollection JSON' + ) return cls(**args) @classmethod @@ -35234,7 +36721,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'dedicated_hosts') and self.dedicated_hosts is not None: + if hasattr(self, + 'dedicated_hosts') and self.dedicated_hosts is not None: dedicated_hosts_list = [] for v in self.dedicated_hosts: if isinstance(v, dict): @@ -35302,7 +36790,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -35362,7 +36852,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostCollectionNext JSON' + ) return cls(**args) @classmethod @@ -35484,49 +36976,75 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostDisk': if (available := _dict.get('available')) is not None: args['available'] = available else: - raise ValueError('Required property \'available\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'available\' not present in DedicatedHostDisk JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'created_at\' not present in DedicatedHostDisk JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostDisk JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'id\' not present in DedicatedHostDisk JSON' + ) if (instance_disks := _dict.get('instance_disks')) is not None: - args['instance_disks'] = [InstanceDiskReference.from_dict(v) for v in instance_disks] + args['instance_disks'] = [ + InstanceDiskReference.from_dict(v) for v in instance_disks + ] else: - raise ValueError('Required property \'instance_disks\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'instance_disks\' not present in DedicatedHostDisk JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'interface_type\' not present in DedicatedHostDisk JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHostDisk JSON' + ) if (provisionable := _dict.get('provisionable')) is not None: args['provisionable'] = provisionable else: - raise ValueError('Required property \'provisionable\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'provisionable\' not present in DedicatedHostDisk JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'resource_type\' not present in DedicatedHostDisk JSON' + ) if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in DedicatedHostDisk JSON') - if (supported_instance_interface_types := _dict.get('supported_instance_interface_types')) is not None: - args['supported_instance_interface_types'] = supported_instance_interface_types + raise ValueError( + 'Required property \'size\' not present in DedicatedHostDisk JSON' + ) + if (supported_instance_interface_types := + _dict.get('supported_instance_interface_types')) is not None: + args[ + 'supported_instance_interface_types'] = supported_instance_interface_types else: - raise ValueError('Required property \'supported_instance_interface_types\' not present in DedicatedHostDisk JSON') + raise ValueError( + 'Required property \'supported_instance_interface_types\' not present in DedicatedHostDisk JSON' + ) return cls(**args) @classmethod @@ -35555,7 +37073,8 @@ def to_dict(self) -> Dict: _dict['instance_disks'] = instance_disks_list if hasattr(self, 'interface_type') and self.interface_type is not None: _dict['interface_type'] = self.interface_type - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -35565,8 +37084,10 @@ def to_dict(self) -> Dict: _dict['resource_type'] = self.resource_type if hasattr(self, 'size') and self.size is not None: _dict['size'] = self.size - if hasattr(self, 'supported_instance_interface_types') and self.supported_instance_interface_types is not None: - _dict['supported_instance_interface_types'] = self.supported_instance_interface_types + if hasattr(self, 'supported_instance_interface_types' + ) and self.supported_instance_interface_types is not None: + _dict[ + 'supported_instance_interface_types'] = self.supported_instance_interface_types return _dict def _to_dict(self): @@ -35597,7 +37118,6 @@ class InterfaceTypeEnum(str, Enum): NVME = 'nvme' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of this dedicated host disk. @@ -35611,7 +37131,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -35619,7 +37138,6 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_DISK = 'dedicated_host_disk' - class SupportedInstanceInterfaceTypesEnum(str, Enum): """ The disk interface used for attaching the disk. @@ -35632,7 +37150,6 @@ class SupportedInstanceInterfaceTypesEnum(str, Enum): VIRTIO_BLK = 'virtio_blk' - class DedicatedHostDiskCollection: """ DedicatedHostDiskCollection. @@ -35659,7 +37176,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostDiskCollection': if (disks := _dict.get('disks')) is not None: args['disks'] = [DedicatedHostDisk.from_dict(v) for v in disks] else: - raise ValueError('Required property \'disks\' not present in DedicatedHostDiskCollection JSON') + raise ValueError( + 'Required property \'disks\' not present in DedicatedHostDiskCollection JSON' + ) return cls(**args) @classmethod @@ -35840,51 +37359,82 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroup': if (class_ := _dict.get('class')) is not None: args['class_'] = class_ else: - raise ValueError('Required property \'class\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'class\' not present in DedicatedHostGroup JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'created_at\' not present in DedicatedHostGroup JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'crn\' not present in DedicatedHostGroup JSON' + ) if (dedicated_hosts := _dict.get('dedicated_hosts')) is not None: - args['dedicated_hosts'] = [DedicatedHostReference.from_dict(v) for v in dedicated_hosts] + args['dedicated_hosts'] = [ + DedicatedHostReference.from_dict(v) for v in dedicated_hosts + ] else: - raise ValueError('Required property \'dedicated_hosts\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'dedicated_hosts\' not present in DedicatedHostGroup JSON' + ) if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'family\' not present in DedicatedHostGroup JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostGroup JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'id\' not present in DedicatedHostGroup JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHostGroup JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'resource_group\' not present in DedicatedHostGroup JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in DedicatedHostGroup JSON') - if (supported_instance_profiles := _dict.get('supported_instance_profiles')) is not None: - args['supported_instance_profiles'] = [InstanceProfileReference.from_dict(v) for v in supported_instance_profiles] - else: - raise ValueError('Required property \'supported_instance_profiles\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'resource_type\' not present in DedicatedHostGroup JSON' + ) + if (supported_instance_profiles := + _dict.get('supported_instance_profiles')) is not None: + args['supported_instance_profiles'] = [ + InstanceProfileReference.from_dict(v) + for v in supported_instance_profiles + ] + else: + raise ValueError( + 'Required property \'supported_instance_profiles\' not present in DedicatedHostGroup JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in DedicatedHostGroup JSON') + raise ValueError( + 'Required property \'zone\' not present in DedicatedHostGroup JSON' + ) return cls(**args) @classmethod @@ -35901,7 +37451,8 @@ def to_dict(self) -> Dict: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'dedicated_hosts') and self.dedicated_hosts is not None: + if hasattr(self, + 'dedicated_hosts') and self.dedicated_hosts is not None: dedicated_hosts_list = [] for v in self.dedicated_hosts: if isinstance(v, dict): @@ -35924,14 +37475,16 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'supported_instance_profiles') and self.supported_instance_profiles is not None: + if hasattr(self, 'supported_instance_profiles' + ) and self.supported_instance_profiles is not None: supported_instance_profiles_list = [] for v in self.supported_instance_profiles: if isinstance(v, dict): supported_instance_profiles_list.append(v) else: supported_instance_profiles_list.append(v.to_dict()) - _dict['supported_instance_profiles'] = supported_instance_profiles_list + _dict[ + 'supported_instance_profiles'] = supported_instance_profiles_list if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone @@ -35966,7 +37519,6 @@ class FamilyEnum(str, Enum): COMPUTE = 'compute' MEMORY = 'memory' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -35975,7 +37527,6 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_GROUP = 'dedicated_host_group' - class DedicatedHostGroupCollection: """ DedicatedHostGroupCollection. @@ -36027,21 +37578,29 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupCollection': if (first := _dict.get('first')) is not None: args['first'] = DedicatedHostGroupCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in DedicatedHostGroupCollection JSON') + raise ValueError( + 'Required property \'first\' not present in DedicatedHostGroupCollection JSON' + ) if (groups := _dict.get('groups')) is not None: args['groups'] = [DedicatedHostGroup.from_dict(v) for v in groups] else: - raise ValueError('Required property \'groups\' not present in DedicatedHostGroupCollection JSON') + raise ValueError( + 'Required property \'groups\' not present in DedicatedHostGroupCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in DedicatedHostGroupCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in DedicatedHostGroupCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = DedicatedHostGroupCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in DedicatedHostGroupCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in DedicatedHostGroupCollection JSON' + ) return cls(**args) @classmethod @@ -36120,7 +37679,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostGroupCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostGroupCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -36180,7 +37741,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostGroupCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostGroupCollectionNext JSON' + ) return cls(**args) @classmethod @@ -36220,16 +37783,17 @@ class DedicatedHostGroupIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a DedicatedHostGroupIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DedicatedHostGroupIdentityById', 'DedicatedHostGroupIdentityByCRN', 'DedicatedHostGroupIdentityByHref']) - ) + ", ".join([ + 'DedicatedHostGroupIdentityById', + 'DedicatedHostGroupIdentityByCRN', + 'DedicatedHostGroupIdentityByHref' + ])) raise Exception(msg) @@ -36323,7 +37887,9 @@ def __init__( self.resource_group = resource_group @classmethod - def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext': + def from_dict( + cls, _dict: Dict + ) -> 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext': """Initialize a DedicatedHostGroupPrototypeDedicatedHostByZoneContext object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -36357,13 +37923,17 @@ def __str__(self) -> str: """Return a `str` version of this DedicatedHostGroupPrototypeDedicatedHostByZoneContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext') -> bool: + def __eq__( + self, other: 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext') -> bool: + def __ne__( + self, other: 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -36421,25 +37991,36 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'crn\' not present in DedicatedHostGroupReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = DedicatedHostGroupReferenceDeleted.from_dict(deleted) + args['deleted'] = DedicatedHostGroupReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in DedicatedHostGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHostGroupReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in DedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in DedicatedHostGroupReference JSON' + ) return cls(**args) @classmethod @@ -36493,7 +38074,6 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_GROUP = 'dedicated_host_group' - class DedicatedHostGroupReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -36520,7 +38100,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in DedicatedHostGroupReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in DedicatedHostGroupReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -36585,11 +38167,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostNUMA': if (count := _dict.get('count')) is not None: args['count'] = count else: - raise ValueError('Required property \'count\' not present in DedicatedHostNUMA JSON') + raise ValueError( + 'Required property \'count\' not present in DedicatedHostNUMA JSON' + ) if (nodes := _dict.get('nodes')) is not None: args['nodes'] = [DedicatedHostNUMANode.from_dict(v) for v in nodes] else: - raise ValueError('Required property \'nodes\' not present in DedicatedHostNUMA JSON') + raise ValueError( + 'Required property \'nodes\' not present in DedicatedHostNUMA JSON' + ) return cls(**args) @classmethod @@ -36660,11 +38246,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostNUMANode': if (available_vcpu := _dict.get('available_vcpu')) is not None: args['available_vcpu'] = available_vcpu else: - raise ValueError('Required property \'available_vcpu\' not present in DedicatedHostNUMANode JSON') + raise ValueError( + 'Required property \'available_vcpu\' not present in DedicatedHostNUMANode JSON' + ) if (vcpu := _dict.get('vcpu')) is not None: args['vcpu'] = vcpu else: - raise ValueError('Required property \'vcpu\' not present in DedicatedHostNUMANode JSON') + raise ValueError( + 'Required property \'vcpu\' not present in DedicatedHostNUMANode JSON' + ) return cls(**args) @classmethod @@ -36731,7 +38321,8 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'DedicatedHostPatch': """Initialize a DedicatedHostPatch object from a json dictionary.""" args = {} - if (instance_placement_enabled := _dict.get('instance_placement_enabled')) is not None: + if (instance_placement_enabled := + _dict.get('instance_placement_enabled')) is not None: args['instance_placement_enabled'] = instance_placement_enabled if (name := _dict.get('name')) is not None: args['name'] = name @@ -36745,8 +38336,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'instance_placement_enabled') and self.instance_placement_enabled is not None: - _dict['instance_placement_enabled'] = self.instance_placement_enabled + if hasattr(self, 'instance_placement_enabled' + ) and self.instance_placement_enabled is not None: + _dict[ + 'instance_placement_enabled'] = self.instance_placement_enabled if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name return _dict @@ -36875,51 +38468,85 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfile': if (class_ := _dict.get('class')) is not None: args['class_'] = class_ else: - raise ValueError('Required property \'class\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'class\' not present in DedicatedHostProfile JSON' + ) if (disks := _dict.get('disks')) is not None: - args['disks'] = [DedicatedHostProfileDisk.from_dict(v) for v in disks] + args['disks'] = [ + DedicatedHostProfileDisk.from_dict(v) for v in disks + ] else: - raise ValueError('Required property \'disks\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'disks\' not present in DedicatedHostProfile JSON' + ) if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'family\' not present in DedicatedHostProfile JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostProfile JSON' + ) if (memory := _dict.get('memory')) is not None: args['memory'] = memory else: - raise ValueError('Required property \'memory\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'memory\' not present in DedicatedHostProfile JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHostProfile JSON' + ) if (socket_count := _dict.get('socket_count')) is not None: args['socket_count'] = socket_count else: - raise ValueError('Required property \'socket_count\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'socket_count\' not present in DedicatedHostProfile JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in DedicatedHostProfile JSON') - if (supported_instance_profiles := _dict.get('supported_instance_profiles')) is not None: - args['supported_instance_profiles'] = [InstanceProfileReference.from_dict(v) for v in supported_instance_profiles] - else: - raise ValueError('Required property \'supported_instance_profiles\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'status\' not present in DedicatedHostProfile JSON' + ) + if (supported_instance_profiles := + _dict.get('supported_instance_profiles')) is not None: + args['supported_instance_profiles'] = [ + InstanceProfileReference.from_dict(v) + for v in supported_instance_profiles + ] + else: + raise ValueError( + 'Required property \'supported_instance_profiles\' not present in DedicatedHostProfile JSON' + ) if (vcpu_architecture := _dict.get('vcpu_architecture')) is not None: - args['vcpu_architecture'] = DedicatedHostProfileVCPUArchitecture.from_dict(vcpu_architecture) + args[ + 'vcpu_architecture'] = DedicatedHostProfileVCPUArchitecture.from_dict( + vcpu_architecture) else: - raise ValueError('Required property \'vcpu_architecture\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'vcpu_architecture\' not present in DedicatedHostProfile JSON' + ) if (vcpu_count := _dict.get('vcpu_count')) is not None: args['vcpu_count'] = vcpu_count else: - raise ValueError('Required property \'vcpu_count\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'vcpu_count\' not present in DedicatedHostProfile JSON' + ) if (vcpu_manufacturer := _dict.get('vcpu_manufacturer')) is not None: - args['vcpu_manufacturer'] = DedicatedHostProfileVCPUManufacturer.from_dict(vcpu_manufacturer) + args[ + 'vcpu_manufacturer'] = DedicatedHostProfileVCPUManufacturer.from_dict( + vcpu_manufacturer) else: - raise ValueError('Required property \'vcpu_manufacturer\' not present in DedicatedHostProfile JSON') + raise ValueError( + 'Required property \'vcpu_manufacturer\' not present in DedicatedHostProfile JSON' + ) return cls(**args) @classmethod @@ -36958,15 +38585,18 @@ def to_dict(self) -> Dict: _dict['socket_count'] = self.socket_count.to_dict() if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status - if hasattr(self, 'supported_instance_profiles') and self.supported_instance_profiles is not None: + if hasattr(self, 'supported_instance_profiles' + ) and self.supported_instance_profiles is not None: supported_instance_profiles_list = [] for v in self.supported_instance_profiles: if isinstance(v, dict): supported_instance_profiles_list.append(v) else: supported_instance_profiles_list.append(v.to_dict()) - _dict['supported_instance_profiles'] = supported_instance_profiles_list - if hasattr(self, 'vcpu_architecture') and self.vcpu_architecture is not None: + _dict[ + 'supported_instance_profiles'] = supported_instance_profiles_list + if hasattr(self, + 'vcpu_architecture') and self.vcpu_architecture is not None: if isinstance(self.vcpu_architecture, dict): _dict['vcpu_architecture'] = self.vcpu_architecture else: @@ -36976,7 +38606,8 @@ def to_dict(self) -> Dict: _dict['vcpu_count'] = self.vcpu_count else: _dict['vcpu_count'] = self.vcpu_count.to_dict() - if hasattr(self, 'vcpu_manufacturer') and self.vcpu_manufacturer is not None: + if hasattr(self, + 'vcpu_manufacturer') and self.vcpu_manufacturer is not None: if isinstance(self.vcpu_manufacturer, dict): _dict['vcpu_manufacturer'] = self.vcpu_manufacturer else: @@ -37013,7 +38644,6 @@ class FamilyEnum(str, Enum): COMPUTE = 'compute' MEMORY = 'memory' - class StatusEnum(str, Enum): """ The status of the dedicated host profile: @@ -37034,7 +38664,6 @@ class StatusEnum(str, Enum): PREVIOUS = 'previous' - class DedicatedHostProfileCollection: """ DedicatedHostProfileCollection. @@ -37087,21 +38716,31 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileCollection': if (first := _dict.get('first')) is not None: args['first'] = DedicatedHostProfileCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in DedicatedHostProfileCollection JSON') + raise ValueError( + 'Required property \'first\' not present in DedicatedHostProfileCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in DedicatedHostProfileCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in DedicatedHostProfileCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = DedicatedHostProfileCollectionNext.from_dict(next) if (profiles := _dict.get('profiles')) is not None: - args['profiles'] = [DedicatedHostProfile.from_dict(v) for v in profiles] + args['profiles'] = [ + DedicatedHostProfile.from_dict(v) for v in profiles + ] else: - raise ValueError('Required property \'profiles\' not present in DedicatedHostProfileCollection JSON') + raise ValueError( + 'Required property \'profiles\' not present in DedicatedHostProfileCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in DedicatedHostProfileCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in DedicatedHostProfileCollection JSON' + ) return cls(**args) @classmethod @@ -37180,7 +38819,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostProfileCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostProfileCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -37240,7 +38881,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostProfileCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostProfileCollectionNext JSON' + ) return cls(**args) @classmethod @@ -37292,7 +38935,8 @@ def __init__( interface_type: 'DedicatedHostProfileDiskInterface', quantity: 'DedicatedHostProfileDiskQuantity', size: 'DedicatedHostProfileDiskSize', - supported_instance_interface_types: 'DedicatedHostProfileDiskSupportedInterfaces', + supported_instance_interface_types: + 'DedicatedHostProfileDiskSupportedInterfaces', ) -> None: """ Initialize a DedicatedHostProfileDisk object. @@ -37315,21 +38959,35 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileDisk': """Initialize a DedicatedHostProfileDisk object from a json dictionary.""" args = {} if (interface_type := _dict.get('interface_type')) is not None: - args['interface_type'] = DedicatedHostProfileDiskInterface.from_dict(interface_type) + args[ + 'interface_type'] = DedicatedHostProfileDiskInterface.from_dict( + interface_type) else: - raise ValueError('Required property \'interface_type\' not present in DedicatedHostProfileDisk JSON') + raise ValueError( + 'Required property \'interface_type\' not present in DedicatedHostProfileDisk JSON' + ) if (quantity := _dict.get('quantity')) is not None: - args['quantity'] = DedicatedHostProfileDiskQuantity.from_dict(quantity) + args['quantity'] = DedicatedHostProfileDiskQuantity.from_dict( + quantity) else: - raise ValueError('Required property \'quantity\' not present in DedicatedHostProfileDisk JSON') + raise ValueError( + 'Required property \'quantity\' not present in DedicatedHostProfileDisk JSON' + ) if (size := _dict.get('size')) is not None: args['size'] = DedicatedHostProfileDiskSize.from_dict(size) else: - raise ValueError('Required property \'size\' not present in DedicatedHostProfileDisk JSON') - if (supported_instance_interface_types := _dict.get('supported_instance_interface_types')) is not None: - args['supported_instance_interface_types'] = DedicatedHostProfileDiskSupportedInterfaces.from_dict(supported_instance_interface_types) - else: - raise ValueError('Required property \'supported_instance_interface_types\' not present in DedicatedHostProfileDisk JSON') + raise ValueError( + 'Required property \'size\' not present in DedicatedHostProfileDisk JSON' + ) + if (supported_instance_interface_types := + _dict.get('supported_instance_interface_types')) is not None: + args[ + 'supported_instance_interface_types'] = DedicatedHostProfileDiskSupportedInterfaces.from_dict( + supported_instance_interface_types) + else: + raise ValueError( + 'Required property \'supported_instance_interface_types\' not present in DedicatedHostProfileDisk JSON' + ) return cls(**args) @classmethod @@ -37355,11 +39013,15 @@ def to_dict(self) -> Dict: _dict['size'] = self.size else: _dict['size'] = self.size.to_dict() - if hasattr(self, 'supported_instance_interface_types') and self.supported_instance_interface_types is not None: + if hasattr(self, 'supported_instance_interface_types' + ) and self.supported_instance_interface_types is not None: if isinstance(self.supported_instance_interface_types, dict): - _dict['supported_instance_interface_types'] = self.supported_instance_interface_types + _dict[ + 'supported_instance_interface_types'] = self.supported_instance_interface_types else: - _dict['supported_instance_interface_types'] = self.supported_instance_interface_types.to_dict() + _dict[ + 'supported_instance_interface_types'] = self.supported_instance_interface_types.to_dict( + ) return _dict def _to_dict(self): @@ -37418,11 +39080,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileDiskInterface': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileDiskInterface JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileDiskInterface JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileDiskInterface JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileDiskInterface JSON' + ) return cls(**args) @classmethod @@ -37464,7 +39130,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class ValueEnum(str, Enum): """ The interface of the disk for a dedicated host with this profile @@ -37476,7 +39141,6 @@ class ValueEnum(str, Enum): NVME = 'nvme' - class DedicatedHostProfileDiskQuantity: """ The number of disks of this type for a dedicated host with this profile. @@ -37506,11 +39170,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileDiskQuantity': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileDiskQuantity JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileDiskQuantity JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileDiskQuantity JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileDiskQuantity JSON' + ) return cls(**args) @classmethod @@ -37553,7 +39221,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class DedicatedHostProfileDiskSize: """ The size of the disk in GB (gigabytes). @@ -37583,11 +39250,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileDiskSize': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileDiskSize JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileDiskSize JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileDiskSize JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileDiskSize JSON' + ) return cls(**args) @classmethod @@ -37630,7 +39301,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class DedicatedHostProfileDiskSupportedInterfaces: """ DedicatedHostProfileDiskSupportedInterfaces. @@ -37656,17 +39326,22 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileDiskSupportedInterfaces': + def from_dict(cls, + _dict: Dict) -> 'DedicatedHostProfileDiskSupportedInterfaces': """Initialize a DedicatedHostProfileDiskSupportedInterfaces object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileDiskSupportedInterfaces JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileDiskSupportedInterfaces JSON' + ) return cls(**args) @classmethod @@ -37691,13 +39366,15 @@ def __str__(self) -> str: """Return a `str` version of this DedicatedHostProfileDiskSupportedInterfaces object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'DedicatedHostProfileDiskSupportedInterfaces') -> bool: + def __eq__(self, + other: 'DedicatedHostProfileDiskSupportedInterfaces') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'DedicatedHostProfileDiskSupportedInterfaces') -> bool: + def __ne__(self, + other: 'DedicatedHostProfileDiskSupportedInterfaces') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -37708,7 +39385,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class ValueEnum(str, Enum): """ The disk interface used for attaching the disk. @@ -37721,23 +39397,22 @@ class ValueEnum(str, Enum): VIRTIO_BLK = 'virtio_blk' - class DedicatedHostProfileIdentity: """ Identifies a dedicated host profile by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a DedicatedHostProfileIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DedicatedHostProfileIdentityByName', 'DedicatedHostProfileIdentityByHref']) - ) + ", ".join([ + 'DedicatedHostProfileIdentityByName', + 'DedicatedHostProfileIdentityByHref' + ])) raise Exception(msg) @@ -37747,16 +39422,18 @@ class DedicatedHostProfileMemory: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a DedicatedHostProfileMemory object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DedicatedHostProfileMemoryFixed', 'DedicatedHostProfileMemoryRange', 'DedicatedHostProfileMemoryEnum', 'DedicatedHostProfileMemoryDependent']) - ) + ", ".join([ + 'DedicatedHostProfileMemoryFixed', + 'DedicatedHostProfileMemoryRange', + 'DedicatedHostProfileMemoryEnum', + 'DedicatedHostProfileMemoryDependent' + ])) raise Exception(msg) @@ -37789,11 +39466,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostProfileReference JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostProfileReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHostProfileReference JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHostProfileReference JSON' + ) return cls(**args) @classmethod @@ -37835,16 +39516,18 @@ class DedicatedHostProfileSocket: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a DedicatedHostProfileSocket object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DedicatedHostProfileSocketFixed', 'DedicatedHostProfileSocketRange', 'DedicatedHostProfileSocketEnum', 'DedicatedHostProfileSocketDependent']) - ) + ", ".join([ + 'DedicatedHostProfileSocketFixed', + 'DedicatedHostProfileSocketRange', + 'DedicatedHostProfileSocketEnum', + 'DedicatedHostProfileSocketDependent' + ])) raise Exception(msg) @@ -37854,16 +39537,17 @@ class DedicatedHostProfileVCPU: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a DedicatedHostProfileVCPU object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DedicatedHostProfileVCPUFixed', 'DedicatedHostProfileVCPURange', 'DedicatedHostProfileVCPUEnum', 'DedicatedHostProfileVCPUDependent']) - ) + ", ".join([ + 'DedicatedHostProfileVCPUFixed', + 'DedicatedHostProfileVCPURange', 'DedicatedHostProfileVCPUEnum', + 'DedicatedHostProfileVCPUDependent' + ])) raise Exception(msg) @@ -37897,11 +39581,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileVCPUArchitecture': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileVCPUArchitecture JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileVCPUArchitecture JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileVCPUArchitecture JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileVCPUArchitecture JSON' + ) return cls(**args) @classmethod @@ -37944,7 +39632,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class DedicatedHostProfileVCPUManufacturer: """ DedicatedHostProfileVCPUManufacturer. @@ -37975,11 +39662,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileVCPUManufacturer': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileVCPUManufacturer JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileVCPUManufacturer JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileVCPUManufacturer JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileVCPUManufacturer JSON' + ) return cls(**args) @classmethod @@ -38022,7 +39713,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class DedicatedHostPrototype: """ DedicatedHostPrototype. @@ -38067,8 +39757,10 @@ def __init__( used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['DedicatedHostPrototypeDedicatedHostByGroup', 'DedicatedHostPrototypeDedicatedHostByZone']) - ) + ", ".join([ + 'DedicatedHostPrototypeDedicatedHostByGroup', + 'DedicatedHostPrototypeDedicatedHostByZone' + ])) raise Exception(msg) @@ -38124,25 +39816,35 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DedicatedHostReference JSON') + raise ValueError( + 'Required property \'crn\' not present in DedicatedHostReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = DedicatedHostReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostReference JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DedicatedHostReference JSON') + raise ValueError( + 'Required property \'id\' not present in DedicatedHostReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHostReference JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHostReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in DedicatedHostReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in DedicatedHostReference JSON' + ) return cls(**args) @classmethod @@ -38196,7 +39898,6 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST = 'dedicated_host' - class DedicatedHostReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -38223,7 +39924,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in DedicatedHostReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in DedicatedHostReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -38331,39 +40034,58 @@ def from_dict(cls, _dict: Dict) -> 'DefaultNetworkACL': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'created_at\' not present in DefaultNetworkACL JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'crn\' not present in DefaultNetworkACL JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'href\' not present in DefaultNetworkACL JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'id\' not present in DefaultNetworkACL JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'name\' not present in DefaultNetworkACL JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'resource_group\' not present in DefaultNetworkACL JSON' + ) if (rules := _dict.get('rules')) is not None: args['rules'] = [NetworkACLRuleItem.from_dict(v) for v in rules] else: - raise ValueError('Required property \'rules\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'rules\' not present in DefaultNetworkACL JSON' + ) if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [SubnetReference.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'subnets\' not present in DefaultNetworkACL JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in DefaultNetworkACL JSON') + raise ValueError( + 'Required property \'vpc\' not present in DefaultNetworkACL JSON' + ) return cls(**args) @classmethod @@ -38612,65 +40334,103 @@ def from_dict(cls, _dict: Dict) -> 'DefaultRoutingTable': """Initialize a DefaultRoutingTable object from a json dictionary.""" args = {} if (accept_routes_from := _dict.get('accept_routes_from')) is not None: - args['accept_routes_from'] = [ResourceFilter.from_dict(v) for v in accept_routes_from] + args['accept_routes_from'] = [ + ResourceFilter.from_dict(v) for v in accept_routes_from + ] else: - raise ValueError('Required property \'accept_routes_from\' not present in DefaultRoutingTable JSON') - if (advertise_routes_to := _dict.get('advertise_routes_to')) is not None: + raise ValueError( + 'Required property \'accept_routes_from\' not present in DefaultRoutingTable JSON' + ) + if (advertise_routes_to := + _dict.get('advertise_routes_to')) is not None: args['advertise_routes_to'] = advertise_routes_to else: - raise ValueError('Required property \'advertise_routes_to\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'advertise_routes_to\' not present in DefaultRoutingTable JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'created_at\' not present in DefaultRoutingTable JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'href\' not present in DefaultRoutingTable JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'id\' not present in DefaultRoutingTable JSON' + ) if (is_default := _dict.get('is_default')) is not None: args['is_default'] = is_default else: - raise ValueError('Required property \'is_default\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'is_default\' not present in DefaultRoutingTable JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in DefaultRoutingTable JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'name\' not present in DefaultRoutingTable JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in DefaultRoutingTable JSON') - if (route_direct_link_ingress := _dict.get('route_direct_link_ingress')) is not None: + raise ValueError( + 'Required property \'resource_type\' not present in DefaultRoutingTable JSON' + ) + if (route_direct_link_ingress := + _dict.get('route_direct_link_ingress')) is not None: args['route_direct_link_ingress'] = route_direct_link_ingress else: - raise ValueError('Required property \'route_direct_link_ingress\' not present in DefaultRoutingTable JSON') - if (route_internet_ingress := _dict.get('route_internet_ingress')) is not None: + raise ValueError( + 'Required property \'route_direct_link_ingress\' not present in DefaultRoutingTable JSON' + ) + if (route_internet_ingress := + _dict.get('route_internet_ingress')) is not None: args['route_internet_ingress'] = route_internet_ingress else: - raise ValueError('Required property \'route_internet_ingress\' not present in DefaultRoutingTable JSON') - if (route_transit_gateway_ingress := _dict.get('route_transit_gateway_ingress')) is not None: - args['route_transit_gateway_ingress'] = route_transit_gateway_ingress + raise ValueError( + 'Required property \'route_internet_ingress\' not present in DefaultRoutingTable JSON' + ) + if (route_transit_gateway_ingress := + _dict.get('route_transit_gateway_ingress')) is not None: + args[ + 'route_transit_gateway_ingress'] = route_transit_gateway_ingress else: - raise ValueError('Required property \'route_transit_gateway_ingress\' not present in DefaultRoutingTable JSON') - if (route_vpc_zone_ingress := _dict.get('route_vpc_zone_ingress')) is not None: + raise ValueError( + 'Required property \'route_transit_gateway_ingress\' not present in DefaultRoutingTable JSON' + ) + if (route_vpc_zone_ingress := + _dict.get('route_vpc_zone_ingress')) is not None: args['route_vpc_zone_ingress'] = route_vpc_zone_ingress else: - raise ValueError('Required property \'route_vpc_zone_ingress\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'route_vpc_zone_ingress\' not present in DefaultRoutingTable JSON' + ) if (routes := _dict.get('routes')) is not None: args['routes'] = [RouteReference.from_dict(v) for v in routes] else: - raise ValueError('Required property \'routes\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'routes\' not present in DefaultRoutingTable JSON' + ) if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [SubnetReference.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in DefaultRoutingTable JSON') + raise ValueError( + 'Required property \'subnets\' not present in DefaultRoutingTable JSON' + ) return cls(**args) @classmethod @@ -38681,7 +40441,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'accept_routes_from') and self.accept_routes_from is not None: + if hasattr( + self, + 'accept_routes_from') and self.accept_routes_from is not None: accept_routes_from_list = [] for v in self.accept_routes_from: if isinstance(v, dict): @@ -38689,7 +40451,9 @@ def to_dict(self) -> Dict: else: accept_routes_from_list.append(v.to_dict()) _dict['accept_routes_from'] = accept_routes_from_list - if hasattr(self, 'advertise_routes_to') and self.advertise_routes_to is not None: + if hasattr( + self, + 'advertise_routes_to') and self.advertise_routes_to is not None: _dict['advertise_routes_to'] = self.advertise_routes_to if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -38699,19 +40463,25 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'is_default') and self.is_default is not None: _dict['is_default'] = self.is_default - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'route_direct_link_ingress') and self.route_direct_link_ingress is not None: + if hasattr(self, 'route_direct_link_ingress' + ) and self.route_direct_link_ingress is not None: _dict['route_direct_link_ingress'] = self.route_direct_link_ingress - if hasattr(self, 'route_internet_ingress') and self.route_internet_ingress is not None: + if hasattr(self, 'route_internet_ingress' + ) and self.route_internet_ingress is not None: _dict['route_internet_ingress'] = self.route_internet_ingress - if hasattr(self, 'route_transit_gateway_ingress') and self.route_transit_gateway_ingress is not None: - _dict['route_transit_gateway_ingress'] = self.route_transit_gateway_ingress - if hasattr(self, 'route_vpc_zone_ingress') and self.route_vpc_zone_ingress is not None: + if hasattr(self, 'route_transit_gateway_ingress' + ) and self.route_transit_gateway_ingress is not None: + _dict[ + 'route_transit_gateway_ingress'] = self.route_transit_gateway_ingress + if hasattr(self, 'route_vpc_zone_ingress' + ) and self.route_vpc_zone_ingress is not None: _dict['route_vpc_zone_ingress'] = self.route_vpc_zone_ingress if hasattr(self, 'routes') and self.routes is not None: routes_list = [] @@ -38759,7 +40529,6 @@ class AdvertiseRoutesToEnum(str, Enum): DIRECT_LINK = 'direct_link' TRANSIT_GATEWAY = 'transit_gateway' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the routing table. @@ -38773,7 +40542,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -38782,7 +40550,6 @@ class ResourceTypeEnum(str, Enum): ROUTING_TABLE = 'routing_table' - class DefaultSecurityGroup: """ DefaultSecurityGroup. @@ -38857,39 +40624,58 @@ def from_dict(cls, _dict: Dict) -> 'DefaultSecurityGroup': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'created_at\' not present in DefaultSecurityGroup JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'crn\' not present in DefaultSecurityGroup JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'href\' not present in DefaultSecurityGroup JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'id\' not present in DefaultSecurityGroup JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'name\' not present in DefaultSecurityGroup JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'resource_group\' not present in DefaultSecurityGroup JSON' + ) if (rules := _dict.get('rules')) is not None: args['rules'] = [SecurityGroupRule.from_dict(v) for v in rules] else: - raise ValueError('Required property \'rules\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'rules\' not present in DefaultSecurityGroup JSON' + ) if (targets := _dict.get('targets')) is not None: args['targets'] = targets else: - raise ValueError('Required property \'targets\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'targets\' not present in DefaultSecurityGroup JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in DefaultSecurityGroup JSON') + raise ValueError( + 'Required property \'vpc\' not present in DefaultSecurityGroup JSON' + ) return cls(**args) @classmethod @@ -38963,16 +40749,13 @@ class EncryptionKeyIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a EncryptionKeyIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['EncryptionKeyIdentityByCRN']) - ) + ", ".join(['EncryptionKeyIdentityByCRN'])) raise Exception(msg) @@ -39009,7 +40792,9 @@ def from_dict(cls, _dict: Dict) -> 'EncryptionKeyReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in EncryptionKeyReference JSON') + raise ValueError( + 'Required property \'crn\' not present in EncryptionKeyReference JSON' + ) return cls(**args) @classmethod @@ -39172,72 +40957,107 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'EndpointGateway': """Initialize a EndpointGateway object from a json dictionary.""" args = {} - if (allow_dns_resolution_binding := _dict.get('allow_dns_resolution_binding')) is not None: + if (allow_dns_resolution_binding := + _dict.get('allow_dns_resolution_binding')) is not None: args['allow_dns_resolution_binding'] = allow_dns_resolution_binding else: - raise ValueError('Required property \'allow_dns_resolution_binding\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'allow_dns_resolution_binding\' not present in EndpointGateway JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'created_at\' not present in EndpointGateway JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'crn\' not present in EndpointGateway JSON') if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'health_state\' not present in EndpointGateway JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'href\' not present in EndpointGateway JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'id\' not present in EndpointGateway JSON') if (ips := _dict.get('ips')) is not None: args['ips'] = [ReservedIPReference.from_dict(v) for v in ips] else: - raise ValueError('Required property \'ips\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'ips\' not present in EndpointGateway JSON') if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [EndpointGatewayLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + EndpointGatewayLifecycleReason.from_dict(v) + for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in EndpointGateway JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in EndpointGateway JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'name\' not present in EndpointGateway JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'resource_group\' not present in EndpointGateway JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'resource_type\' not present in EndpointGateway JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'security_groups\' not present in EndpointGateway JSON' + ) if (service_endpoint := _dict.get('service_endpoint')) is not None: args['service_endpoint'] = service_endpoint if (service_endpoints := _dict.get('service_endpoints')) is not None: args['service_endpoints'] = service_endpoints else: - raise ValueError('Required property \'service_endpoints\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'service_endpoints\' not present in EndpointGateway JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = target else: - raise ValueError('Required property \'target\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'target\' not present in EndpointGateway JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in EndpointGateway JSON') + raise ValueError( + 'Required property \'vpc\' not present in EndpointGateway JSON') return cls(**args) @classmethod @@ -39248,8 +41068,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_dns_resolution_binding') and self.allow_dns_resolution_binding is not None: - _dict['allow_dns_resolution_binding'] = self.allow_dns_resolution_binding + if hasattr(self, 'allow_dns_resolution_binding' + ) and self.allow_dns_resolution_binding is not None: + _dict[ + 'allow_dns_resolution_binding'] = self.allow_dns_resolution_binding if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: @@ -39268,7 +41090,8 @@ def to_dict(self) -> Dict: else: ips_list.append(v.to_dict()) _dict['ips'] = ips_list - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -39276,7 +41099,8 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -39287,7 +41111,8 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -39295,9 +41120,11 @@ def to_dict(self) -> Dict: else: security_groups_list.append(v.to_dict()) _dict['security_groups'] = security_groups_list - if hasattr(self, 'service_endpoint') and self.service_endpoint is not None: + if hasattr(self, + 'service_endpoint') and self.service_endpoint is not None: _dict['service_endpoint'] = self.service_endpoint - if hasattr(self, 'service_endpoints') and self.service_endpoints is not None: + if hasattr(self, + 'service_endpoints') and self.service_endpoints is not None: _dict['service_endpoints'] = self.service_endpoints if hasattr(self, 'target') and self.target is not None: if isinstance(self.target, dict): @@ -39346,7 +41173,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the endpoint gateway. @@ -39360,7 +41186,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -39369,7 +41194,6 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' - class EndpointGatewayCollection: """ EndpointGatewayCollection. @@ -39419,23 +41243,33 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayCollection': """Initialize a EndpointGatewayCollection object from a json dictionary.""" args = {} if (endpoint_gateways := _dict.get('endpoint_gateways')) is not None: - args['endpoint_gateways'] = [EndpointGateway.from_dict(v) for v in endpoint_gateways] + args['endpoint_gateways'] = [ + EndpointGateway.from_dict(v) for v in endpoint_gateways + ] else: - raise ValueError('Required property \'endpoint_gateways\' not present in EndpointGatewayCollection JSON') + raise ValueError( + 'Required property \'endpoint_gateways\' not present in EndpointGatewayCollection JSON' + ) if (first := _dict.get('first')) is not None: args['first'] = EndpointGatewayCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in EndpointGatewayCollection JSON') + raise ValueError( + 'Required property \'first\' not present in EndpointGatewayCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in EndpointGatewayCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in EndpointGatewayCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = EndpointGatewayCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in EndpointGatewayCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in EndpointGatewayCollection JSON' + ) return cls(**args) @classmethod @@ -39446,7 +41280,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'endpoint_gateways') and self.endpoint_gateways is not None: + if hasattr(self, + 'endpoint_gateways') and self.endpoint_gateways is not None: endpoint_gateways_list = [] for v in self.endpoint_gateways: if isinstance(v, dict): @@ -39514,7 +41349,9 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in EndpointGatewayCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in EndpointGatewayCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -39574,7 +41411,9 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in EndpointGatewayCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in EndpointGatewayCollectionNext JSON' + ) return cls(**args) @classmethod @@ -39660,11 +41499,15 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in EndpointGatewayLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in EndpointGatewayLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in EndpointGatewayLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in EndpointGatewayLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -39720,7 +41563,6 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class EndpointGatewayPatch: """ EndpointGatewayPatch. @@ -39762,7 +41604,8 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'EndpointGatewayPatch': """Initialize a EndpointGatewayPatch object from a json dictionary.""" args = {} - if (allow_dns_resolution_binding := _dict.get('allow_dns_resolution_binding')) is not None: + if (allow_dns_resolution_binding := + _dict.get('allow_dns_resolution_binding')) is not None: args['allow_dns_resolution_binding'] = allow_dns_resolution_binding if (name := _dict.get('name')) is not None: args['name'] = name @@ -39776,8 +41619,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_dns_resolution_binding') and self.allow_dns_resolution_binding is not None: - _dict['allow_dns_resolution_binding'] = self.allow_dns_resolution_binding + if hasattr(self, 'allow_dns_resolution_binding' + ) and self.allow_dns_resolution_binding is not None: + _dict[ + 'allow_dns_resolution_binding'] = self.allow_dns_resolution_binding if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name return _dict @@ -39827,7 +41672,9 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in EndpointGatewayReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in EndpointGatewayReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -39913,25 +41760,35 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReferenceRemote': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in EndpointGatewayReferenceRemote JSON') + raise ValueError( + 'Required property \'crn\' not present in EndpointGatewayReferenceRemote JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in EndpointGatewayReferenceRemote JSON') + raise ValueError( + 'Required property \'href\' not present in EndpointGatewayReferenceRemote JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in EndpointGatewayReferenceRemote JSON') + raise ValueError( + 'Required property \'id\' not present in EndpointGatewayReferenceRemote JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in EndpointGatewayReferenceRemote JSON') + raise ValueError( + 'Required property \'name\' not present in EndpointGatewayReferenceRemote JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = EndpointGatewayRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in EndpointGatewayReferenceRemote JSON') + raise ValueError( + 'Required property \'resource_type\' not present in EndpointGatewayReferenceRemote JSON' + ) return cls(**args) @classmethod @@ -39985,7 +41842,6 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' - class EndpointGatewayRemote: """ If present, this property indicates that the resource associated with this reference @@ -40076,16 +41932,16 @@ class EndpointGatewayReservedIP: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a EndpointGatewayReservedIP object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['EndpointGatewayReservedIPReservedIPIdentity', 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext']) - ) + ", ".join([ + 'EndpointGatewayReservedIPReservedIPIdentity', + 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext' + ])) raise Exception(msg) @@ -40095,16 +41951,16 @@ class EndpointGatewayTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a EndpointGatewayTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['EndpointGatewayTargetProviderCloudServiceReference', 'EndpointGatewayTargetProviderInfrastructureServiceReference']) - ) + ", ".join([ + 'EndpointGatewayTargetProviderCloudServiceReference', + 'EndpointGatewayTargetProviderInfrastructureServiceReference' + ])) raise Exception(msg) @@ -40126,8 +41982,10 @@ def __init__( :param str resource_type: The type of target for this endpoint gateway. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity']) - ) + ", ".join([ + 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', + 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity' + ])) raise Exception(msg) @classmethod @@ -40137,8 +41995,10 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrototype': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'EndpointGatewayTargetPrototype'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity']) - ) + ", ".join([ + 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', + 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity' + ])) raise Exception(msg) @classmethod @@ -40149,11 +42009,15 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['provider_cloud_service'] = 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentity' - mapping['provider_infrastructure_service'] = 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity' + mapping[ + 'provider_cloud_service'] = 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentity' + mapping[ + 'provider_infrastructure_service'] = 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity' disc_value = _dict.get('resource_type') if disc_value is None: - raise ValueError('Discriminator property \'resource_type\' not found in EndpointGatewayTargetPrototype JSON') + raise ValueError( + 'Discriminator property \'resource_type\' not found in EndpointGatewayTargetPrototype JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -40172,7 +42036,6 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' - class FloatingIP: """ FloatingIP. @@ -40240,41 +42103,53 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'address\' not present in FloatingIP JSON') if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'created_at\' not present in FloatingIP JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'crn\' not present in FloatingIP JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIP JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIP JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'name\' not present in FloatingIP JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'resource_group\' not present in FloatingIP JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'status\' not present in FloatingIP JSON') if (target := _dict.get('target')) is not None: args['target'] = target if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in FloatingIP JSON') + raise ValueError( + 'Required property \'zone\' not present in FloatingIP JSON') return cls(**args) @classmethod @@ -40345,7 +42220,6 @@ class StatusEnum(str, Enum): PENDING = 'pending' - class FloatingIPCollection: """ FloatingIPCollection. @@ -40395,21 +42269,31 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPCollection': if (first := _dict.get('first')) is not None: args['first'] = FloatingIPCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in FloatingIPCollection JSON') + raise ValueError( + 'Required property \'first\' not present in FloatingIPCollection JSON' + ) if (floating_ips := _dict.get('floating_ips')) is not None: - args['floating_ips'] = [FloatingIP.from_dict(v) for v in floating_ips] + args['floating_ips'] = [ + FloatingIP.from_dict(v) for v in floating_ips + ] else: - raise ValueError('Required property \'floating_ips\' not present in FloatingIPCollection JSON') + raise ValueError( + 'Required property \'floating_ips\' not present in FloatingIPCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in FloatingIPCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in FloatingIPCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = FloatingIPCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in FloatingIPCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in FloatingIPCollection JSON' + ) return cls(**args) @classmethod @@ -40488,7 +42372,9 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -40548,7 +42434,9 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPCollectionNext JSON' + ) return cls(**args) @classmethod @@ -40605,7 +42493,8 @@ def __init__( limit: int, total_count: int, *, - next: Optional['FloatingIPCollectionVirtualNetworkInterfaceContextNext'] = None, + next: Optional[ + 'FloatingIPCollectionVirtualNetworkInterfaceContextNext'] = None, ) -> None: """ Initialize a FloatingIPCollectionVirtualNetworkInterfaceContext object. @@ -40630,27 +42519,43 @@ def __init__( self.total_count = total_count @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPCollectionVirtualNetworkInterfaceContext': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPCollectionVirtualNetworkInterfaceContext': """Initialize a FloatingIPCollectionVirtualNetworkInterfaceContext object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = FloatingIPCollectionVirtualNetworkInterfaceContextFirst.from_dict(first) + args[ + 'first'] = FloatingIPCollectionVirtualNetworkInterfaceContextFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'first\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON' + ) if (floating_ips := _dict.get('floating_ips')) is not None: - args['floating_ips'] = [FloatingIPReference.from_dict(v) for v in floating_ips] + args['floating_ips'] = [ + FloatingIPReference.from_dict(v) for v in floating_ips + ] else: - raise ValueError('Required property \'floating_ips\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'floating_ips\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'limit\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = FloatingIPCollectionVirtualNetworkInterfaceContextNext.from_dict(next) + args[ + 'next'] = FloatingIPCollectionVirtualNetworkInterfaceContextNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'total_count\' not present in FloatingIPCollectionVirtualNetworkInterfaceContext JSON' + ) return cls(**args) @classmethod @@ -40693,13 +42598,17 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPCollectionVirtualNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContext') -> bool: + def __eq__( + self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContext') -> bool: + def __ne__( + self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -40723,13 +42632,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPCollectionVirtualNetworkInterfaceContextFirst': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPCollectionVirtualNetworkInterfaceContextFirst': """Initialize a FloatingIPCollectionVirtualNetworkInterfaceContextFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPCollectionVirtualNetworkInterfaceContextFirst JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPCollectionVirtualNetworkInterfaceContextFirst JSON' + ) return cls(**args) @classmethod @@ -40752,13 +42665,17 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPCollectionVirtualNetworkInterfaceContextFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextFirst') -> bool: + def __eq__( + self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextFirst') -> bool: + def __ne__( + self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -40783,13 +42700,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPCollectionVirtualNetworkInterfaceContextNext': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPCollectionVirtualNetworkInterfaceContextNext': """Initialize a FloatingIPCollectionVirtualNetworkInterfaceContextNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPCollectionVirtualNetworkInterfaceContextNext JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPCollectionVirtualNetworkInterfaceContextNext JSON' + ) return cls(**args) @classmethod @@ -40812,13 +42733,17 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPCollectionVirtualNetworkInterfaceContextNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextNext') -> bool: + def __eq__( + self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextNext') -> bool: + def __ne__( + self, other: 'FloatingIPCollectionVirtualNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -40948,8 +42873,10 @@ def __init__( used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPPrototypeFloatingIPByZone', 'FloatingIPPrototypeFloatingIPByTarget']) - ) + ", ".join([ + 'FloatingIPPrototypeFloatingIPByZone', + 'FloatingIPPrototypeFloatingIPByTarget' + ])) raise Exception(msg) @@ -41005,25 +42932,35 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPReference': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in FloatingIPReference JSON') + raise ValueError( + 'Required property \'address\' not present in FloatingIPReference JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FloatingIPReference JSON') + raise ValueError( + 'Required property \'crn\' not present in FloatingIPReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = FloatingIPReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPReference JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPReference JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FloatingIPReference JSON') + raise ValueError( + 'Required property \'name\' not present in FloatingIPReference JSON' + ) return cls(**args) @classmethod @@ -41096,7 +43033,9 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in FloatingIPReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in FloatingIPReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -41136,16 +43075,18 @@ class FloatingIPTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetNetworkInterfaceReference', 'FloatingIPTargetBareMetalServerNetworkInterfaceReference', 'FloatingIPTargetPublicGatewayReference', 'FloatingIPTargetVirtualNetworkInterfaceReference']) - ) + ", ".join([ + 'FloatingIPTargetNetworkInterfaceReference', + 'FloatingIPTargetBareMetalServerNetworkInterfaceReference', + 'FloatingIPTargetPublicGatewayReference', + 'FloatingIPTargetVirtualNetworkInterfaceReference' + ])) raise Exception(msg) @@ -41162,16 +43103,17 @@ class FloatingIPTargetPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity', 'FloatingIPTargetPatchNetworkInterfaceIdentity', 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentity']) - ) + ", ".join([ + 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity', + 'FloatingIPTargetPatchNetworkInterfaceIdentity', + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentity' + ])) raise Exception(msg) @@ -41186,16 +43128,17 @@ class FloatingIPTargetPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity', 'FloatingIPTargetPrototypeNetworkInterfaceIdentity', 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity']) - ) + ", ".join([ + 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity', + 'FloatingIPTargetPrototypeNetworkInterfaceIdentity', + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity' + ])) raise Exception(msg) @@ -41222,9 +43165,13 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPUnpaginatedCollection': """Initialize a FloatingIPUnpaginatedCollection object from a json dictionary.""" args = {} if (floating_ips := _dict.get('floating_ips')) is not None: - args['floating_ips'] = [FloatingIP.from_dict(v) for v in floating_ips] + args['floating_ips'] = [ + FloatingIP.from_dict(v) for v in floating_ips + ] else: - raise ValueError('Required property \'floating_ips\' not present in FloatingIPUnpaginatedCollection JSON') + raise ValueError( + 'Required property \'floating_ips\' not present in FloatingIPUnpaginatedCollection JSON' + ) return cls(**args) @classmethod @@ -41399,51 +43346,77 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollector': if (active := _dict.get('active')) is not None: args['active'] = active else: - raise ValueError('Required property \'active\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'active\' not present in FlowLogCollector JSON' + ) if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete else: - raise ValueError('Required property \'auto_delete\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'auto_delete\' not present in FlowLogCollector JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'created_at\' not present in FlowLogCollector JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollector JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollector JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollector JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in FlowLogCollector JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'name\' not present in FlowLogCollector JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'resource_group\' not present in FlowLogCollector JSON' + ) if (storage_bucket := _dict.get('storage_bucket')) is not None: - args['storage_bucket'] = LegacyCloudObjectStorageBucketReference.from_dict(storage_bucket) + args[ + 'storage_bucket'] = LegacyCloudObjectStorageBucketReference.from_dict( + storage_bucket) else: - raise ValueError('Required property \'storage_bucket\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'storage_bucket\' not present in FlowLogCollector JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = target else: - raise ValueError('Required property \'target\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'target\' not present in FlowLogCollector JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in FlowLogCollector JSON') + raise ValueError( + 'Required property \'vpc\' not present in FlowLogCollector JSON' + ) return cls(**args) @classmethod @@ -41466,7 +43439,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -41524,7 +43498,6 @@ class LifecycleStateEnum(str, Enum): WAITING = 'waiting' - class FlowLogCollectorCollection: """ FlowLogCollectorCollection. @@ -41577,21 +43550,32 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorCollection': if (first := _dict.get('first')) is not None: args['first'] = FlowLogCollectorCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in FlowLogCollectorCollection JSON') - if (flow_log_collectors := _dict.get('flow_log_collectors')) is not None: - args['flow_log_collectors'] = [FlowLogCollector.from_dict(v) for v in flow_log_collectors] - else: - raise ValueError('Required property \'flow_log_collectors\' not present in FlowLogCollectorCollection JSON') + raise ValueError( + 'Required property \'first\' not present in FlowLogCollectorCollection JSON' + ) + if (flow_log_collectors := + _dict.get('flow_log_collectors')) is not None: + args['flow_log_collectors'] = [ + FlowLogCollector.from_dict(v) for v in flow_log_collectors + ] + else: + raise ValueError( + 'Required property \'flow_log_collectors\' not present in FlowLogCollectorCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in FlowLogCollectorCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in FlowLogCollectorCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = FlowLogCollectorCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in FlowLogCollectorCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in FlowLogCollectorCollection JSON' + ) return cls(**args) @classmethod @@ -41607,7 +43591,9 @@ def to_dict(self) -> Dict: _dict['first'] = self.first else: _dict['first'] = self.first.to_dict() - if hasattr(self, 'flow_log_collectors') and self.flow_log_collectors is not None: + if hasattr( + self, + 'flow_log_collectors') and self.flow_log_collectors is not None: flow_log_collectors_list = [] for v in self.flow_log_collectors: if isinstance(v, dict): @@ -41670,7 +43656,9 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -41730,7 +43718,9 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorCollectionNext JSON' + ) return cls(**args) @classmethod @@ -41859,16 +43849,20 @@ class FlowLogCollectorTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext', 'FlowLogCollectorTargetInstanceReference', 'FlowLogCollectorTargetSubnetReference', 'FlowLogCollectorTargetVPCReference', 'FlowLogCollectorTargetInstanceNetworkAttachmentReference', 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext']) - ) + ", ".join([ + 'FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext', + 'FlowLogCollectorTargetInstanceReference', + 'FlowLogCollectorTargetSubnetReference', + 'FlowLogCollectorTargetVPCReference', + 'FlowLogCollectorTargetInstanceNetworkAttachmentReference', + 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext' + ])) raise Exception(msg) @@ -41884,16 +43878,20 @@ class FlowLogCollectorTargetPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTargetPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity', 'FlowLogCollectorTargetPrototypeInstanceIdentity', 'FlowLogCollectorTargetPrototypeSubnetIdentity', 'FlowLogCollectorTargetPrototypeVPCIdentity', 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity', 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity']) - ) + ", ".join([ + 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity', + 'FlowLogCollectorTargetPrototypeInstanceIdentity', + 'FlowLogCollectorTargetPrototypeSubnetIdentity', + 'FlowLogCollectorTargetPrototypeVPCIdentity', + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity', + 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity' + ])) raise Exception(msg) @@ -41923,7 +43921,9 @@ def from_dict(cls, _dict: Dict) -> 'GenericResourceReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in GenericResourceReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in GenericResourceReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -42041,58 +44041,85 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'IKEPolicy': """Initialize a IKEPolicy object from a json dictionary.""" args = {} - if (authentication_algorithm := _dict.get('authentication_algorithm')) is not None: + if (authentication_algorithm := + _dict.get('authentication_algorithm')) is not None: args['authentication_algorithm'] = authentication_algorithm else: - raise ValueError('Required property \'authentication_algorithm\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'authentication_algorithm\' not present in IKEPolicy JSON' + ) if (connections := _dict.get('connections')) is not None: - args['connections'] = [VPNGatewayConnectionReference.from_dict(v) for v in connections] + args['connections'] = [ + VPNGatewayConnectionReference.from_dict(v) for v in connections + ] else: - raise ValueError('Required property \'connections\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'connections\' not present in IKEPolicy JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'created_at\' not present in IKEPolicy JSON' + ) if (dh_group := _dict.get('dh_group')) is not None: args['dh_group'] = dh_group else: - raise ValueError('Required property \'dh_group\' not present in IKEPolicy JSON') - if (encryption_algorithm := _dict.get('encryption_algorithm')) is not None: + raise ValueError( + 'Required property \'dh_group\' not present in IKEPolicy JSON') + if (encryption_algorithm := + _dict.get('encryption_algorithm')) is not None: args['encryption_algorithm'] = encryption_algorithm else: - raise ValueError('Required property \'encryption_algorithm\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'encryption_algorithm\' not present in IKEPolicy JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'href\' not present in IKEPolicy JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'id\' not present in IKEPolicy JSON') if (ike_version := _dict.get('ike_version')) is not None: args['ike_version'] = ike_version else: - raise ValueError('Required property \'ike_version\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'ike_version\' not present in IKEPolicy JSON' + ) if (key_lifetime := _dict.get('key_lifetime')) is not None: args['key_lifetime'] = key_lifetime else: - raise ValueError('Required property \'key_lifetime\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'key_lifetime\' not present in IKEPolicy JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'name\' not present in IKEPolicy JSON') if (negotiation_mode := _dict.get('negotiation_mode')) is not None: args['negotiation_mode'] = negotiation_mode else: - raise ValueError('Required property \'negotiation_mode\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'negotiation_mode\' not present in IKEPolicy JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'resource_group\' not present in IKEPolicy JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in IKEPolicy JSON') + raise ValueError( + 'Required property \'resource_type\' not present in IKEPolicy JSON' + ) return cls(**args) @classmethod @@ -42103,7 +44130,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'authentication_algorithm') and self.authentication_algorithm is not None: + if hasattr(self, 'authentication_algorithm' + ) and self.authentication_algorithm is not None: _dict['authentication_algorithm'] = self.authentication_algorithm if hasattr(self, 'connections') and self.connections is not None: connections_list = [] @@ -42117,7 +44145,8 @@ def to_dict(self) -> Dict: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'dh_group') and self.dh_group is not None: _dict['dh_group'] = self.dh_group - if hasattr(self, 'encryption_algorithm') and self.encryption_algorithm is not None: + if hasattr(self, 'encryption_algorithm' + ) and self.encryption_algorithm is not None: _dict['encryption_algorithm'] = self.encryption_algorithm if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href @@ -42129,7 +44158,8 @@ def to_dict(self) -> Dict: _dict['key_lifetime'] = self.key_lifetime if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'negotiation_mode') and self.negotiation_mode is not None: + if hasattr(self, + 'negotiation_mode') and self.negotiation_mode is not None: _dict['negotiation_mode'] = self.negotiation_mode if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): @@ -42170,7 +44200,6 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' - class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm @@ -42182,7 +44211,6 @@ class EncryptionAlgorithmEnum(str, Enum): AES256 = 'aes256' TRIPLE_DES = 'triple_des' - class NegotiationModeEnum(str, Enum): """ The IKE negotiation mode. Only `main` is supported. @@ -42190,7 +44218,6 @@ class NegotiationModeEnum(str, Enum): MAIN = 'main' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -42199,7 +44226,6 @@ class ResourceTypeEnum(str, Enum): IKE_POLICY = 'ike_policy' - class IKEPolicyCollection: """ IKEPolicyCollection. @@ -42249,21 +44275,31 @@ def from_dict(cls, _dict: Dict) -> 'IKEPolicyCollection': if (first := _dict.get('first')) is not None: args['first'] = IKEPolicyCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in IKEPolicyCollection JSON') + raise ValueError( + 'Required property \'first\' not present in IKEPolicyCollection JSON' + ) if (ike_policies := _dict.get('ike_policies')) is not None: - args['ike_policies'] = [IKEPolicy.from_dict(v) for v in ike_policies] + args['ike_policies'] = [ + IKEPolicy.from_dict(v) for v in ike_policies + ] else: - raise ValueError('Required property \'ike_policies\' not present in IKEPolicyCollection JSON') + raise ValueError( + 'Required property \'ike_policies\' not present in IKEPolicyCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in IKEPolicyCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in IKEPolicyCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = IKEPolicyCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in IKEPolicyCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in IKEPolicyCollection JSON' + ) return cls(**args) @classmethod @@ -42342,7 +44378,9 @@ def from_dict(cls, _dict: Dict) -> 'IKEPolicyCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IKEPolicyCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in IKEPolicyCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -42402,7 +44440,9 @@ def from_dict(cls, _dict: Dict) -> 'IKEPolicyCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IKEPolicyCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in IKEPolicyCollectionNext JSON' + ) return cls(**args) @classmethod @@ -42436,6 +44476,261 @@ def __ne__(self, other: 'IKEPolicyCollectionNext') -> bool: return not self == other +class IKEPolicyConnectionCollection: + """ + IKEPolicyConnectionCollection. + + :param List[VPNGatewayConnection] connections: Collection of VPN gateway + connections that use a specified IKE policy specified by the identifier in the + URL. + :param IKEPolicyConnectionCollectionFirst first: A link to the first page of + resources. + :param int limit: The maximum number of resources that can be returned by the + request. + :param IKEPolicyConnectionCollectionNext next: (optional) A link to the next + page of resources. This property is present for all pages + except the last page. + :param int total_count: The total number of resources across all pages. + """ + + def __init__( + self, + connections: List['VPNGatewayConnection'], + first: 'IKEPolicyConnectionCollectionFirst', + limit: int, + total_count: int, + *, + next: Optional['IKEPolicyConnectionCollectionNext'] = None, + ) -> None: + """ + Initialize a IKEPolicyConnectionCollection object. + + :param List[VPNGatewayConnection] connections: Collection of VPN gateway + connections that use a specified IKE policy specified by the identifier in + the URL. + :param IKEPolicyConnectionCollectionFirst first: A link to the first page + of resources. + :param int limit: The maximum number of resources that can be returned by + the request. + :param int total_count: The total number of resources across all pages. + :param IKEPolicyConnectionCollectionNext next: (optional) A link to the + next page of resources. This property is present for all pages + except the last page. + """ + self.connections = connections + self.first = first + self.limit = limit + self.next = next + self.total_count = total_count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IKEPolicyConnectionCollection': + """Initialize a IKEPolicyConnectionCollection object from a json dictionary.""" + args = {} + if (connections := _dict.get('connections')) is not None: + args['connections'] = [ + VPNGatewayConnection.from_dict(v) for v in connections + ] + else: + raise ValueError( + 'Required property \'connections\' not present in IKEPolicyConnectionCollection JSON' + ) + if (first := _dict.get('first')) is not None: + args['first'] = IKEPolicyConnectionCollectionFirst.from_dict(first) + else: + raise ValueError( + 'Required property \'first\' not present in IKEPolicyConnectionCollection JSON' + ) + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IKEPolicyConnectionCollection JSON' + ) + if (next := _dict.get('next')) is not None: + args['next'] = IKEPolicyConnectionCollectionNext.from_dict(next) + if (total_count := _dict.get('total_count')) is not None: + args['total_count'] = total_count + else: + raise ValueError( + 'Required property \'total_count\' not present in IKEPolicyConnectionCollection JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IKEPolicyConnectionCollection object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'connections') and self.connections is not None: + connections_list = [] + for v in self.connections: + if isinstance(v, dict): + connections_list.append(v) + else: + connections_list.append(v.to_dict()) + _dict['connections'] = connections_list + if hasattr(self, 'first') and self.first is not None: + if isinstance(self.first, dict): + _dict['first'] = self.first + else: + _dict['first'] = self.first.to_dict() + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'next') and self.next is not None: + if isinstance(self.next, dict): + _dict['next'] = self.next + else: + _dict['next'] = self.next.to_dict() + if hasattr(self, 'total_count') and self.total_count is not None: + _dict['total_count'] = self.total_count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IKEPolicyConnectionCollection object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IKEPolicyConnectionCollection') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IKEPolicyConnectionCollection') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IKEPolicyConnectionCollectionFirst: + """ + A link to the first page of resources. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a IKEPolicyConnectionCollectionFirst object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IKEPolicyConnectionCollectionFirst': + """Initialize a IKEPolicyConnectionCollectionFirst object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in IKEPolicyConnectionCollectionFirst JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IKEPolicyConnectionCollectionFirst object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IKEPolicyConnectionCollectionFirst object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IKEPolicyConnectionCollectionFirst') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IKEPolicyConnectionCollectionFirst') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IKEPolicyConnectionCollectionNext: + """ + A link to the next page of resources. This property is present for all pages except + the last page. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a IKEPolicyConnectionCollectionNext object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IKEPolicyConnectionCollectionNext': + """Initialize a IKEPolicyConnectionCollectionNext object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in IKEPolicyConnectionCollectionNext JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IKEPolicyConnectionCollectionNext object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IKEPolicyConnectionCollectionNext object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IKEPolicyConnectionCollectionNext') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IKEPolicyConnectionCollectionNext') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class IKEPolicyPatch: """ IKEPolicyPatch. @@ -42482,11 +44777,13 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'IKEPolicyPatch': """Initialize a IKEPolicyPatch object from a json dictionary.""" args = {} - if (authentication_algorithm := _dict.get('authentication_algorithm')) is not None: + if (authentication_algorithm := + _dict.get('authentication_algorithm')) is not None: args['authentication_algorithm'] = authentication_algorithm if (dh_group := _dict.get('dh_group')) is not None: args['dh_group'] = dh_group - if (encryption_algorithm := _dict.get('encryption_algorithm')) is not None: + if (encryption_algorithm := + _dict.get('encryption_algorithm')) is not None: args['encryption_algorithm'] = encryption_algorithm if (ike_version := _dict.get('ike_version')) is not None: args['ike_version'] = ike_version @@ -42504,11 +44801,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'authentication_algorithm') and self.authentication_algorithm is not None: + if hasattr(self, 'authentication_algorithm' + ) and self.authentication_algorithm is not None: _dict['authentication_algorithm'] = self.authentication_algorithm if hasattr(self, 'dh_group') and self.dh_group is not None: _dict['dh_group'] = self.dh_group - if hasattr(self, 'encryption_algorithm') and self.encryption_algorithm is not None: + if hasattr(self, 'encryption_algorithm' + ) and self.encryption_algorithm is not None: _dict['encryption_algorithm'] = self.encryption_algorithm if hasattr(self, 'ike_version') and self.ike_version is not None: _dict['ike_version'] = self.ike_version @@ -42545,7 +44844,6 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' - class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm. @@ -42556,7 +44854,6 @@ class EncryptionAlgorithmEnum(str, Enum): AES256 = 'aes256' - class IKEPolicyReference: """ IKEPolicyReference. @@ -42607,19 +44904,27 @@ def from_dict(cls, _dict: Dict) -> 'IKEPolicyReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IKEPolicyReference JSON') + raise ValueError( + 'Required property \'href\' not present in IKEPolicyReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in IKEPolicyReference JSON') + raise ValueError( + 'Required property \'id\' not present in IKEPolicyReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in IKEPolicyReference JSON') + raise ValueError( + 'Required property \'name\' not present in IKEPolicyReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in IKEPolicyReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in IKEPolicyReference JSON' + ) return cls(**args) @classmethod @@ -42671,7 +44976,6 @@ class ResourceTypeEnum(str, Enum): IKE_POLICY = 'ike_policy' - class IKEPolicyReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -42698,7 +45002,9 @@ def from_dict(cls, _dict: Dict) -> 'IKEPolicyReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in IKEPolicyReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in IKEPolicyReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -42763,7 +45069,8 @@ def from_dict(cls, _dict: Dict) -> 'IP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in IP JSON') + raise ValueError( + 'Required property \'address\' not present in IP JSON') return cls(**args) @classmethod @@ -42895,58 +45202,85 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'IPsecPolicy': """Initialize a IPsecPolicy object from a json dictionary.""" args = {} - if (authentication_algorithm := _dict.get('authentication_algorithm')) is not None: + if (authentication_algorithm := + _dict.get('authentication_algorithm')) is not None: args['authentication_algorithm'] = authentication_algorithm else: - raise ValueError('Required property \'authentication_algorithm\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'authentication_algorithm\' not present in IPsecPolicy JSON' + ) if (connections := _dict.get('connections')) is not None: - args['connections'] = [VPNGatewayConnectionReference.from_dict(v) for v in connections] + args['connections'] = [ + VPNGatewayConnectionReference.from_dict(v) for v in connections + ] else: - raise ValueError('Required property \'connections\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'connections\' not present in IPsecPolicy JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'created_at\' not present in IPsecPolicy JSON' + ) if (encapsulation_mode := _dict.get('encapsulation_mode')) is not None: args['encapsulation_mode'] = encapsulation_mode else: - raise ValueError('Required property \'encapsulation_mode\' not present in IPsecPolicy JSON') - if (encryption_algorithm := _dict.get('encryption_algorithm')) is not None: + raise ValueError( + 'Required property \'encapsulation_mode\' not present in IPsecPolicy JSON' + ) + if (encryption_algorithm := + _dict.get('encryption_algorithm')) is not None: args['encryption_algorithm'] = encryption_algorithm else: - raise ValueError('Required property \'encryption_algorithm\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'encryption_algorithm\' not present in IPsecPolicy JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'href\' not present in IPsecPolicy JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'id\' not present in IPsecPolicy JSON') if (key_lifetime := _dict.get('key_lifetime')) is not None: args['key_lifetime'] = key_lifetime else: - raise ValueError('Required property \'key_lifetime\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'key_lifetime\' not present in IPsecPolicy JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'name\' not present in IPsecPolicy JSON') if (pfs := _dict.get('pfs')) is not None: args['pfs'] = pfs else: - raise ValueError('Required property \'pfs\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'pfs\' not present in IPsecPolicy JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'resource_group\' not present in IPsecPolicy JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'resource_type\' not present in IPsecPolicy JSON' + ) if (transform_protocol := _dict.get('transform_protocol')) is not None: args['transform_protocol'] = transform_protocol else: - raise ValueError('Required property \'transform_protocol\' not present in IPsecPolicy JSON') + raise ValueError( + 'Required property \'transform_protocol\' not present in IPsecPolicy JSON' + ) return cls(**args) @classmethod @@ -42957,7 +45291,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'authentication_algorithm') and self.authentication_algorithm is not None: + if hasattr(self, 'authentication_algorithm' + ) and self.authentication_algorithm is not None: _dict['authentication_algorithm'] = self.authentication_algorithm if hasattr(self, 'connections') and self.connections is not None: connections_list = [] @@ -42969,9 +45304,12 @@ def to_dict(self) -> Dict: _dict['connections'] = connections_list if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'encapsulation_mode') and self.encapsulation_mode is not None: + if hasattr( + self, + 'encapsulation_mode') and self.encapsulation_mode is not None: _dict['encapsulation_mode'] = self.encapsulation_mode - if hasattr(self, 'encryption_algorithm') and self.encryption_algorithm is not None: + if hasattr(self, 'encryption_algorithm' + ) and self.encryption_algorithm is not None: _dict['encryption_algorithm'] = self.encryption_algorithm if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href @@ -42990,7 +45328,9 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'transform_protocol') and self.transform_protocol is not None: + if hasattr( + self, + 'transform_protocol') and self.transform_protocol is not None: _dict['transform_protocol'] = self.transform_protocol return _dict @@ -43027,7 +45367,6 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' - class EncapsulationModeEnum(str, Enum): """ The encapsulation mode used. Only `tunnel` is supported. @@ -43035,7 +45374,6 @@ class EncapsulationModeEnum(str, Enum): TUNNEL = 'tunnel' - class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm @@ -43053,7 +45391,6 @@ class EncryptionAlgorithmEnum(str, Enum): AES256GCM16 = 'aes256gcm16' TRIPLE_DES = 'triple_des' - class PfsEnum(str, Enum): """ Perfect Forward Secrecy @@ -43076,7 +45413,6 @@ class PfsEnum(str, Enum): GROUP_31 = 'group_31' GROUP_5 = 'group_5' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -43084,7 +45420,6 @@ class ResourceTypeEnum(str, Enum): IPSEC_POLICY = 'ipsec_policy' - class TransformProtocolEnum(str, Enum): """ The transform protocol used. Only `esp` is supported. @@ -43093,7 +45428,6 @@ class TransformProtocolEnum(str, Enum): ESP = 'esp' - class IPsecPolicyCollection: """ IPsecPolicyCollection. @@ -43143,21 +45477,31 @@ def from_dict(cls, _dict: Dict) -> 'IPsecPolicyCollection': if (first := _dict.get('first')) is not None: args['first'] = IPsecPolicyCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in IPsecPolicyCollection JSON') + raise ValueError( + 'Required property \'first\' not present in IPsecPolicyCollection JSON' + ) if (ipsec_policies := _dict.get('ipsec_policies')) is not None: - args['ipsec_policies'] = [IPsecPolicy.from_dict(v) for v in ipsec_policies] + args['ipsec_policies'] = [ + IPsecPolicy.from_dict(v) for v in ipsec_policies + ] else: - raise ValueError('Required property \'ipsec_policies\' not present in IPsecPolicyCollection JSON') + raise ValueError( + 'Required property \'ipsec_policies\' not present in IPsecPolicyCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in IPsecPolicyCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in IPsecPolicyCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = IPsecPolicyCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in IPsecPolicyCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in IPsecPolicyCollection JSON' + ) return cls(**args) @classmethod @@ -43236,7 +45580,9 @@ def from_dict(cls, _dict: Dict) -> 'IPsecPolicyCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IPsecPolicyCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in IPsecPolicyCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -43296,7 +45642,9 @@ def from_dict(cls, _dict: Dict) -> 'IPsecPolicyCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IPsecPolicyCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in IPsecPolicyCollectionNext JSON' + ) return cls(**args) @classmethod @@ -43330,6 +45678,262 @@ def __ne__(self, other: 'IPsecPolicyCollectionNext') -> bool: return not self == other +class IPsecPolicyConnectionCollection: + """ + IPsecPolicyConnectionCollection. + + :param List[VPNGatewayConnection] connections: Collection of VPN gateway + connections that use a specified IPsec policy specified by the identifier in the + URL. + :param IPsecPolicyConnectionCollectionFirst first: A link to the first page of + resources. + :param int limit: The maximum number of resources that can be returned by the + request. + :param IPsecPolicyConnectionCollectionNext next: (optional) A link to the next + page of resources. This property is present for all pages + except the last page. + :param int total_count: The total number of resources across all pages. + """ + + def __init__( + self, + connections: List['VPNGatewayConnection'], + first: 'IPsecPolicyConnectionCollectionFirst', + limit: int, + total_count: int, + *, + next: Optional['IPsecPolicyConnectionCollectionNext'] = None, + ) -> None: + """ + Initialize a IPsecPolicyConnectionCollection object. + + :param List[VPNGatewayConnection] connections: Collection of VPN gateway + connections that use a specified IPsec policy specified by the identifier + in the URL. + :param IPsecPolicyConnectionCollectionFirst first: A link to the first page + of resources. + :param int limit: The maximum number of resources that can be returned by + the request. + :param int total_count: The total number of resources across all pages. + :param IPsecPolicyConnectionCollectionNext next: (optional) A link to the + next page of resources. This property is present for all pages + except the last page. + """ + self.connections = connections + self.first = first + self.limit = limit + self.next = next + self.total_count = total_count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IPsecPolicyConnectionCollection': + """Initialize a IPsecPolicyConnectionCollection object from a json dictionary.""" + args = {} + if (connections := _dict.get('connections')) is not None: + args['connections'] = [ + VPNGatewayConnection.from_dict(v) for v in connections + ] + else: + raise ValueError( + 'Required property \'connections\' not present in IPsecPolicyConnectionCollection JSON' + ) + if (first := _dict.get('first')) is not None: + args['first'] = IPsecPolicyConnectionCollectionFirst.from_dict( + first) + else: + raise ValueError( + 'Required property \'first\' not present in IPsecPolicyConnectionCollection JSON' + ) + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in IPsecPolicyConnectionCollection JSON' + ) + if (next := _dict.get('next')) is not None: + args['next'] = IPsecPolicyConnectionCollectionNext.from_dict(next) + if (total_count := _dict.get('total_count')) is not None: + args['total_count'] = total_count + else: + raise ValueError( + 'Required property \'total_count\' not present in IPsecPolicyConnectionCollection JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IPsecPolicyConnectionCollection object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'connections') and self.connections is not None: + connections_list = [] + for v in self.connections: + if isinstance(v, dict): + connections_list.append(v) + else: + connections_list.append(v.to_dict()) + _dict['connections'] = connections_list + if hasattr(self, 'first') and self.first is not None: + if isinstance(self.first, dict): + _dict['first'] = self.first + else: + _dict['first'] = self.first.to_dict() + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'next') and self.next is not None: + if isinstance(self.next, dict): + _dict['next'] = self.next + else: + _dict['next'] = self.next.to_dict() + if hasattr(self, 'total_count') and self.total_count is not None: + _dict['total_count'] = self.total_count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IPsecPolicyConnectionCollection object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IPsecPolicyConnectionCollection') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IPsecPolicyConnectionCollection') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IPsecPolicyConnectionCollectionFirst: + """ + A link to the first page of resources. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a IPsecPolicyConnectionCollectionFirst object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IPsecPolicyConnectionCollectionFirst': + """Initialize a IPsecPolicyConnectionCollectionFirst object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in IPsecPolicyConnectionCollectionFirst JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IPsecPolicyConnectionCollectionFirst object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IPsecPolicyConnectionCollectionFirst object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IPsecPolicyConnectionCollectionFirst') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IPsecPolicyConnectionCollectionFirst') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class IPsecPolicyConnectionCollectionNext: + """ + A link to the next page of resources. This property is present for all pages except + the last page. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a IPsecPolicyConnectionCollectionNext object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'IPsecPolicyConnectionCollectionNext': + """Initialize a IPsecPolicyConnectionCollectionNext object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in IPsecPolicyConnectionCollectionNext JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a IPsecPolicyConnectionCollectionNext object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this IPsecPolicyConnectionCollectionNext object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'IPsecPolicyConnectionCollectionNext') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'IPsecPolicyConnectionCollectionNext') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class IPsecPolicyPatch: """ IPsecPolicyPatch. @@ -43382,9 +45986,11 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'IPsecPolicyPatch': """Initialize a IPsecPolicyPatch object from a json dictionary.""" args = {} - if (authentication_algorithm := _dict.get('authentication_algorithm')) is not None: + if (authentication_algorithm := + _dict.get('authentication_algorithm')) is not None: args['authentication_algorithm'] = authentication_algorithm - if (encryption_algorithm := _dict.get('encryption_algorithm')) is not None: + if (encryption_algorithm := + _dict.get('encryption_algorithm')) is not None: args['encryption_algorithm'] = encryption_algorithm if (key_lifetime := _dict.get('key_lifetime')) is not None: args['key_lifetime'] = key_lifetime @@ -43402,9 +46008,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'authentication_algorithm') and self.authentication_algorithm is not None: + if hasattr(self, 'authentication_algorithm' + ) and self.authentication_algorithm is not None: _dict['authentication_algorithm'] = self.authentication_algorithm - if hasattr(self, 'encryption_algorithm') and self.encryption_algorithm is not None: + if hasattr(self, 'encryption_algorithm' + ) and self.encryption_algorithm is not None: _dict['encryption_algorithm'] = self.encryption_algorithm if hasattr(self, 'key_lifetime') and self.key_lifetime is not None: _dict['key_lifetime'] = self.key_lifetime @@ -43444,7 +46052,6 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' - class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm @@ -43460,7 +46067,6 @@ class EncryptionAlgorithmEnum(str, Enum): AES256 = 'aes256' AES256GCM16 = 'aes256gcm16' - class PfsEnum(str, Enum): """ Perfect Forward Secrecy. @@ -43481,7 +46087,6 @@ class PfsEnum(str, Enum): GROUP_31 = 'group_31' - class IPsecPolicyReference: """ IPsecPolicyReference. @@ -43532,19 +46137,27 @@ def from_dict(cls, _dict: Dict) -> 'IPsecPolicyReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in IPsecPolicyReference JSON') + raise ValueError( + 'Required property \'href\' not present in IPsecPolicyReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in IPsecPolicyReference JSON') + raise ValueError( + 'Required property \'id\' not present in IPsecPolicyReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in IPsecPolicyReference JSON') + raise ValueError( + 'Required property \'name\' not present in IPsecPolicyReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in IPsecPolicyReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in IPsecPolicyReference JSON' + ) return cls(**args) @classmethod @@ -43596,7 +46209,6 @@ class ResourceTypeEnum(str, Enum): IPSEC_POLICY = 'ipsec_policy' - class IPsecPolicyReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -43623,7 +46235,9 @@ def from_dict(cls, _dict: Dict) -> 'IPsecPolicyReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in IPsecPolicyReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in IPsecPolicyReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -43707,6 +46321,16 @@ class Image: [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. :param List[ImageStatusReason] status_reasons: + :param str user_data_format: The user data format for this image: + - `cloud_init`: `user_data` will be interpreted according to the cloud-init + standard + - `esxi_kickstart`: `user_data` will be interpreted as a VMware ESXi + installation script + - `ipxe`: `user_data` will be interpreted as a single URL to an iPXE script or + as the + text of an iPXE script + The value for this property is inherited from + `operating_system.user_data_format`. :param str visibility: The visibility of this image. - `private`: Visible only to this account - `public`: Visible to all accounts. @@ -43726,6 +46350,7 @@ def __init__( resource_type: str, status: str, status_reasons: List['ImageStatusReason'], + user_data_format: str, visibility: str, *, deprecation_at: Optional[datetime] = None, @@ -43765,6 +46390,16 @@ def __init__( [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. :param List[ImageStatusReason] status_reasons: + :param str user_data_format: The user data format for this image: + - `cloud_init`: `user_data` will be interpreted according to the cloud-init + standard + - `esxi_kickstart`: `user_data` will be interpreted as a VMware ESXi + installation script + - `ipxe`: `user_data` will be interpreted as a single URL to an iPXE script + or as the + text of an iPXE script + The value for this property is inherited from + `operating_system.user_data_format`. :param str visibility: The visibility of this image. - `private`: Visible only to this account - `public`: Visible to all accounts. @@ -43808,6 +46443,7 @@ def __init__( self.source_volume = source_volume self.status = status self.status_reasons = status_reasons + self.user_data_format = user_data_format self.visibility = visibility @classmethod @@ -43815,69 +46451,98 @@ def from_dict(cls, _dict: Dict) -> 'Image': """Initialize a Image object from a json dictionary.""" args = {} if (catalog_offering := _dict.get('catalog_offering')) is not None: - args['catalog_offering'] = ImageCatalogOffering.from_dict(catalog_offering) + args['catalog_offering'] = ImageCatalogOffering.from_dict( + catalog_offering) else: - raise ValueError('Required property \'catalog_offering\' not present in Image JSON') + raise ValueError( + 'Required property \'catalog_offering\' not present in Image JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Image JSON') + raise ValueError( + 'Required property \'created_at\' not present in Image JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Image JSON') + raise ValueError( + 'Required property \'crn\' not present in Image JSON') if (deprecation_at := _dict.get('deprecation_at')) is not None: args['deprecation_at'] = string_to_datetime(deprecation_at) if (encryption := _dict.get('encryption')) is not None: args['encryption'] = encryption else: - raise ValueError('Required property \'encryption\' not present in Image JSON') + raise ValueError( + 'Required property \'encryption\' not present in Image JSON') if (encryption_key := _dict.get('encryption_key')) is not None: - args['encryption_key'] = EncryptionKeyReference.from_dict(encryption_key) + args['encryption_key'] = EncryptionKeyReference.from_dict( + encryption_key) if (file := _dict.get('file')) is not None: args['file'] = ImageFile.from_dict(file) else: - raise ValueError('Required property \'file\' not present in Image JSON') + raise ValueError( + 'Required property \'file\' not present in Image JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Image JSON') + raise ValueError( + 'Required property \'href\' not present in Image JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Image JSON') - if (minimum_provisioned_size := _dict.get('minimum_provisioned_size')) is not None: + raise ValueError( + 'Required property \'id\' not present in Image JSON') + if (minimum_provisioned_size := + _dict.get('minimum_provisioned_size')) is not None: args['minimum_provisioned_size'] = minimum_provisioned_size if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Image JSON') + raise ValueError( + 'Required property \'name\' not present in Image JSON') if (obsolescence_at := _dict.get('obsolescence_at')) is not None: args['obsolescence_at'] = string_to_datetime(obsolescence_at) if (operating_system := _dict.get('operating_system')) is not None: - args['operating_system'] = OperatingSystem.from_dict(operating_system) + args['operating_system'] = OperatingSystem.from_dict( + operating_system) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Image JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Image JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in Image JSON') + raise ValueError( + 'Required property \'resource_type\' not present in Image JSON') if (source_volume := _dict.get('source_volume')) is not None: args['source_volume'] = VolumeReference.from_dict(source_volume) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in Image JSON') + raise ValueError( + 'Required property \'status\' not present in Image JSON') if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [ImageStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + ImageStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in Image JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in Image JSON' + ) + if (user_data_format := _dict.get('user_data_format')) is not None: + args['user_data_format'] = user_data_format + else: + raise ValueError( + 'Required property \'user_data_format\' not present in Image JSON' + ) if (visibility := _dict.get('visibility')) is not None: args['visibility'] = visibility else: - raise ValueError('Required property \'visibility\' not present in Image JSON') + raise ValueError( + 'Required property \'visibility\' not present in Image JSON') return cls(**args) @classmethod @@ -43888,7 +46553,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -43915,13 +46581,16 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'minimum_provisioned_size') and self.minimum_provisioned_size is not None: + if hasattr(self, 'minimum_provisioned_size' + ) and self.minimum_provisioned_size is not None: _dict['minimum_provisioned_size'] = self.minimum_provisioned_size if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'obsolescence_at') and self.obsolescence_at is not None: + if hasattr(self, + 'obsolescence_at') and self.obsolescence_at is not None: _dict['obsolescence_at'] = datetime_to_string(self.obsolescence_at) - if hasattr(self, 'operating_system') and self.operating_system is not None: + if hasattr(self, + 'operating_system') and self.operating_system is not None: if isinstance(self.operating_system, dict): _dict['operating_system'] = self.operating_system else: @@ -43948,6 +46617,9 @@ def to_dict(self) -> Dict: else: status_reasons_list.append(v.to_dict()) _dict['status_reasons'] = status_reasons_list + if hasattr(self, + 'user_data_format') and self.user_data_format is not None: + _dict['user_data_format'] = self.user_data_format if hasattr(self, 'visibility') and self.visibility is not None: _dict['visibility'] = self.visibility return _dict @@ -43978,7 +46650,6 @@ class EncryptionEnum(str, Enum): NONE = 'none' USER_MANAGED = 'user_managed' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -43986,7 +46657,6 @@ class ResourceTypeEnum(str, Enum): IMAGE = 'image' - class StatusEnum(str, Enum): """ The status of this image: @@ -44011,6 +46681,22 @@ class StatusEnum(str, Enum): PENDING = 'pending' UNUSABLE = 'unusable' + class UserDataFormatEnum(str, Enum): + """ + The user data format for this image: + - `cloud_init`: `user_data` will be interpreted according to the cloud-init + standard + - `esxi_kickstart`: `user_data` will be interpreted as a VMware ESXi installation + script + - `ipxe`: `user_data` will be interpreted as a single URL to an iPXE script or as + the + text of an iPXE script + The value for this property is inherited from `operating_system.user_data_format`. + """ + + CLOUD_INIT = 'cloud_init' + ESXI_KICKSTART = 'esxi_kickstart' + IPXE = 'ipxe' class VisibilityEnum(str, Enum): """ @@ -44023,7 +46709,6 @@ class VisibilityEnum(str, Enum): PUBLIC = 'public' - class ImageCatalogOffering: """ ImageCatalogOffering. @@ -44068,7 +46753,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageCatalogOffering': if (managed := _dict.get('managed')) is not None: args['managed'] = managed else: - raise ValueError('Required property \'managed\' not present in ImageCatalogOffering JSON') + raise ValueError( + 'Required property \'managed\' not present in ImageCatalogOffering JSON' + ) if (version := _dict.get('version')) is not None: args['version'] = CatalogOfferingVersionReference.from_dict(version) return cls(**args) @@ -44157,21 +46844,29 @@ def from_dict(cls, _dict: Dict) -> 'ImageCollection': if (first := _dict.get('first')) is not None: args['first'] = ImageCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in ImageCollection JSON') + raise ValueError( + 'Required property \'first\' not present in ImageCollection JSON' + ) if (images := _dict.get('images')) is not None: args['images'] = [Image.from_dict(v) for v in images] else: - raise ValueError('Required property \'images\' not present in ImageCollection JSON') + raise ValueError( + 'Required property \'images\' not present in ImageCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ImageCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in ImageCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = ImageCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ImageCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in ImageCollection JSON' + ) return cls(**args) @classmethod @@ -44250,7 +46945,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ImageCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ImageCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -44310,7 +47007,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ImageCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in ImageCollectionNext JSON' + ) return cls(**args) @classmethod @@ -44484,51 +47183,76 @@ def from_dict(cls, _dict: Dict) -> 'ImageExportJob': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'created_at\' not present in ImageExportJob JSON' + ) if (encrypted_data_key := _dict.get('encrypted_data_key')) is not None: args['encrypted_data_key'] = base64.b64decode(encrypted_data_key) if (format := _dict.get('format')) is not None: args['format'] = format else: - raise ValueError('Required property \'format\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'format\' not present in ImageExportJob JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'href\' not present in ImageExportJob JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'id\' not present in ImageExportJob JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'name\' not present in ImageExportJob JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ImageExportJob JSON' + ) if (started_at := _dict.get('started_at')) is not None: args['started_at'] = string_to_datetime(started_at) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'status\' not present in ImageExportJob JSON' + ) if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [ImageExportJobStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + ImageExportJobStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in ImageExportJob JSON' + ) if (storage_bucket := _dict.get('storage_bucket')) is not None: - args['storage_bucket'] = CloudObjectStorageBucketReference.from_dict(storage_bucket) + args[ + 'storage_bucket'] = CloudObjectStorageBucketReference.from_dict( + storage_bucket) else: - raise ValueError('Required property \'storage_bucket\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'storage_bucket\' not present in ImageExportJob JSON' + ) if (storage_href := _dict.get('storage_href')) is not None: args['storage_href'] = storage_href else: - raise ValueError('Required property \'storage_href\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'storage_href\' not present in ImageExportJob JSON' + ) if (storage_object := _dict.get('storage_object')) is not None: - args['storage_object'] = CloudObjectStorageObjectReference.from_dict(storage_object) + args[ + 'storage_object'] = CloudObjectStorageObjectReference.from_dict( + storage_object) else: - raise ValueError('Required property \'storage_object\' not present in ImageExportJob JSON') + raise ValueError( + 'Required property \'storage_object\' not present in ImageExportJob JSON' + ) return cls(**args) @classmethod @@ -44543,8 +47267,11 @@ def to_dict(self) -> Dict: _dict['completed_at'] = datetime_to_string(self.completed_at) if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'encrypted_data_key') and self.encrypted_data_key is not None: - _dict['encrypted_data_key'] = str(base64.b64encode(self.encrypted_data_key), 'utf-8') + if hasattr( + self, + 'encrypted_data_key') and self.encrypted_data_key is not None: + _dict['encrypted_data_key'] = str( + base64.b64encode(self.encrypted_data_key), 'utf-8') if hasattr(self, 'format') and self.format is not None: _dict['format'] = self.format if hasattr(self, 'href') and self.href is not None: @@ -44607,7 +47334,6 @@ class FormatEnum(str, Enum): QCOW2 = 'qcow2' VHD = 'vhd' - class ResourceTypeEnum(str, Enum): """ The type of resource referenced. @@ -44615,7 +47341,6 @@ class ResourceTypeEnum(str, Enum): IMAGE_EXPORT_JOB = 'image_export_job' - class StatusEnum(str, Enum): """ The status of this image export job: @@ -44634,7 +47359,6 @@ class StatusEnum(str, Enum): SUCCEEDED = 'succeeded' - class ImageExportJobPatch: """ ImageExportJobPatch. @@ -44741,11 +47465,15 @@ def from_dict(cls, _dict: Dict) -> 'ImageExportJobStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in ImageExportJobStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in ImageExportJobStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in ImageExportJobStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in ImageExportJobStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -44796,7 +47524,6 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' - class ImageExportJobUnpaginatedCollection: """ ImageExportJobUnpaginatedCollection. @@ -44820,9 +47547,13 @@ def from_dict(cls, _dict: Dict) -> 'ImageExportJobUnpaginatedCollection': """Initialize a ImageExportJobUnpaginatedCollection object from a json dictionary.""" args = {} if (export_jobs := _dict.get('export_jobs')) is not None: - args['export_jobs'] = [ImageExportJob.from_dict(v) for v in export_jobs] + args['export_jobs'] = [ + ImageExportJob.from_dict(v) for v in export_jobs + ] else: - raise ValueError('Required property \'export_jobs\' not present in ImageExportJobUnpaginatedCollection JSON') + raise ValueError( + 'Required property \'export_jobs\' not present in ImageExportJobUnpaginatedCollection JSON' + ) return cls(**args) @classmethod @@ -45034,7 +47765,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageFilePrototype': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ImageFilePrototype JSON') + raise ValueError( + 'Required property \'href\' not present in ImageFilePrototype JSON' + ) return cls(**args) @classmethod @@ -45074,16 +47807,15 @@ class ImageIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ImageIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ImageIdentityById', 'ImageIdentityByCRN', 'ImageIdentityByHref']) - ) + ", ".join([ + 'ImageIdentityById', 'ImageIdentityByCRN', 'ImageIdentityByHref' + ])) raise Exception(msg) @@ -45197,7 +47929,8 @@ def to_dict(self) -> Dict: _dict['deprecation_at'] = datetime_to_string(self.deprecation_at) if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'obsolescence_at') and self.obsolescence_at is not None: + if hasattr(self, + 'obsolescence_at') and self.obsolescence_at is not None: _dict['obsolescence_at'] = datetime_to_string(self.obsolescence_at) return _dict @@ -45294,8 +48027,9 @@ def __init__( used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ImagePrototypeImageByFile', 'ImagePrototypeImageBySourceVolume']) - ) + ", ".join([ + 'ImagePrototypeImageByFile', 'ImagePrototypeImageBySourceVolume' + ])) raise Exception(msg) @@ -45359,27 +48093,33 @@ def from_dict(cls, _dict: Dict) -> 'ImageReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ImageReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ImageReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = ImageReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ImageReference JSON') + raise ValueError( + 'Required property \'href\' not present in ImageReference JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ImageReference JSON') + raise ValueError( + 'Required property \'id\' not present in ImageReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ImageReference JSON') + raise ValueError( + 'Required property \'name\' not present in ImageReference JSON') if (remote := _dict.get('remote')) is not None: args['remote'] = ImageRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ImageReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ImageReference JSON' + ) return cls(**args) @classmethod @@ -45438,7 +48178,6 @@ class ResourceTypeEnum(str, Enum): IMAGE = 'image' - class ImageReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -45465,7 +48204,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in ImageReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in ImageReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -45654,11 +48395,15 @@ def from_dict(cls, _dict: Dict) -> 'ImageStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in ImageStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in ImageStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in ImageStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in ImageStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -45728,7 +48473,6 @@ class CodeEnum(str, Enum): IMAGE_REQUEST_QUEUED = 'image_request_queued' - class Instance: """ Instance. @@ -45743,6 +48487,8 @@ class Instance: :param InstanceCatalogOffering catalog_offering: (optional) If present, this virtual server instance was provisioned from a [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user). + :param str confidential_compute_mode: The confidential compute mode for this + virtual server instance. :param datetime created_at: The date and time that the virtual server instance was created. :param str crn: The CRN for this virtual server instance. @@ -45750,6 +48496,8 @@ class Instance: dedicated host this virtual server instance has been placed on. :param List[InstanceDisk] disks: The instance disks for this virtual server instance. + :param bool enable_secure_boot: Indicates whether secure boot is enabled for + this virtual server instance. :param InstanceGPU gpu: (optional) The virtual server instance GPU configuration. :param List[InstanceHealthReason] health_reasons: The reasons for the current @@ -45837,9 +48585,11 @@ def __init__( availability_policy: 'InstanceAvailabilityPolicy', bandwidth: int, boot_volume_attachment: 'VolumeAttachmentReferenceInstanceContext', + confidential_compute_mode: str, created_at: datetime, crn: str, disks: List['InstanceDisk'], + enable_secure_boot: bool, health_reasons: List['InstanceHealthReason'], health_state: str, href: str, @@ -45872,7 +48622,8 @@ def __init__( image: Optional['ImageReference'] = None, numa_count: Optional[int] = None, placement_target: Optional['InstancePlacementTarget'] = None, - primary_network_attachment: Optional['InstanceNetworkAttachmentReference'] = None, + primary_network_attachment: Optional[ + 'InstanceNetworkAttachmentReference'] = None, reservation: Optional['ReservationReference'] = None, ) -> None: """ @@ -45885,11 +48636,15 @@ def __init__( storage volumes of the virtual server instance. :param VolumeAttachmentReferenceInstanceContext boot_volume_attachment: Boot volume attachment. + :param str confidential_compute_mode: The confidential compute mode for + this virtual server instance. :param datetime created_at: The date and time that the virtual server instance was created. :param str crn: The CRN for this virtual server instance. :param List[InstanceDisk] disks: The instance disks for this virtual server instance. + :param bool enable_secure_boot: Indicates whether secure boot is enabled + for this virtual server instance. :param List[InstanceHealthReason] health_reasons: The reasons for the current `health_state` (if any). :param str health_state: The health of this resource: @@ -45988,10 +48743,12 @@ def __init__( self.bandwidth = bandwidth self.boot_volume_attachment = boot_volume_attachment self.catalog_offering = catalog_offering + self.confidential_compute_mode = confidential_compute_mode self.created_at = created_at self.crn = crn self.dedicated_host = dedicated_host self.disks = disks + self.enable_secure_boot = enable_secure_boot self.gpu = gpu self.health_reasons = health_reasons self.health_state = health_state @@ -46028,146 +48785,243 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'Instance': """Initialize a Instance object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicy.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args['availability_policy'] = InstanceAvailabilityPolicy.from_dict( + availability_policy) else: - raise ValueError('Required property \'availability_policy\' not present in Instance JSON') + raise ValueError( + 'Required property \'availability_policy\' not present in Instance JSON' + ) if (bandwidth := _dict.get('bandwidth')) is not None: args['bandwidth'] = bandwidth else: - raise ValueError('Required property \'bandwidth\' not present in Instance JSON') - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentReferenceInstanceContext.from_dict(boot_volume_attachment) + raise ValueError( + 'Required property \'bandwidth\' not present in Instance JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentReferenceInstanceContext.from_dict( + boot_volume_attachment) else: - raise ValueError('Required property \'boot_volume_attachment\' not present in Instance JSON') + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in Instance JSON' + ) if (catalog_offering := _dict.get('catalog_offering')) is not None: - args['catalog_offering'] = InstanceCatalogOffering.from_dict(catalog_offering) + args['catalog_offering'] = InstanceCatalogOffering.from_dict( + catalog_offering) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + else: + raise ValueError( + 'Required property \'confidential_compute_mode\' not present in Instance JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Instance JSON') + raise ValueError( + 'Required property \'created_at\' not present in Instance JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Instance JSON') + raise ValueError( + 'Required property \'crn\' not present in Instance JSON') if (dedicated_host := _dict.get('dedicated_host')) is not None: - args['dedicated_host'] = DedicatedHostReference.from_dict(dedicated_host) + args['dedicated_host'] = DedicatedHostReference.from_dict( + dedicated_host) if (disks := _dict.get('disks')) is not None: args['disks'] = [InstanceDisk.from_dict(v) for v in disks] else: - raise ValueError('Required property \'disks\' not present in Instance JSON') + raise ValueError( + 'Required property \'disks\' not present in Instance JSON') + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot + else: + raise ValueError( + 'Required property \'enable_secure_boot\' not present in Instance JSON' + ) if (gpu := _dict.get('gpu')) is not None: args['gpu'] = InstanceGPU.from_dict(gpu) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [InstanceHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + InstanceHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in Instance JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in Instance JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in Instance JSON') + raise ValueError( + 'Required property \'health_state\' not present in Instance JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Instance JSON') + raise ValueError( + 'Required property \'href\' not present in Instance JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Instance JSON') + raise ValueError( + 'Required property \'id\' not present in Instance JSON') if (image := _dict.get('image')) is not None: args['image'] = ImageReference.from_dict(image) if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [InstanceLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + InstanceLifecycleReason.from_dict(v) for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in Instance JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in Instance JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in Instance JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in Instance JSON' + ) if (memory := _dict.get('memory')) is not None: args['memory'] = memory else: - raise ValueError('Required property \'memory\' not present in Instance JSON') + raise ValueError( + 'Required property \'memory\' not present in Instance JSON') if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataService.from_dict(metadata_service) + args['metadata_service'] = InstanceMetadataService.from_dict( + metadata_service) else: - raise ValueError('Required property \'metadata_service\' not present in Instance JSON') + raise ValueError( + 'Required property \'metadata_service\' not present in Instance JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Instance JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentReference.from_dict(v) for v in network_attachments] - else: - raise ValueError('Required property \'network_attachments\' not present in Instance JSON') + raise ValueError( + 'Required property \'name\' not present in Instance JSON') + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentReference.from_dict(v) + for v in network_attachments + ] + else: + raise ValueError( + 'Required property \'network_attachments\' not present in Instance JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfaceInstanceContextReference.from_dict(v) for v in network_interfaces] + args['network_interfaces'] = [ + NetworkInterfaceInstanceContextReference.from_dict(v) + for v in network_interfaces + ] else: - raise ValueError('Required property \'network_interfaces\' not present in Instance JSON') + raise ValueError( + 'Required property \'network_interfaces\' not present in Instance JSON' + ) if (numa_count := _dict.get('numa_count')) is not None: args['numa_count'] = numa_count if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentReference.from_dict(primary_network_attachment) - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfaceInstanceContextReference.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in Instance JSON') + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentReference.from_dict( + primary_network_attachment) + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfaceInstanceContextReference.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in Instance JSON' + ) if (profile := _dict.get('profile')) is not None: args['profile'] = InstanceProfileReference.from_dict(profile) else: - raise ValueError('Required property \'profile\' not present in Instance JSON') + raise ValueError( + 'Required property \'profile\' not present in Instance JSON') if (reservation := _dict.get('reservation')) is not None: args['reservation'] = ReservationReference.from_dict(reservation) - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinity.from_dict(reservation_affinity) - else: - raise ValueError('Required property \'reservation_affinity\' not present in Instance JSON') + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinity.from_dict( + reservation_affinity) + else: + raise ValueError( + 'Required property \'reservation_affinity\' not present in Instance JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Instance JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Instance JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in Instance JSON') + raise ValueError( + 'Required property \'resource_type\' not present in Instance JSON' + ) if (startable := _dict.get('startable')) is not None: args['startable'] = startable else: - raise ValueError('Required property \'startable\' not present in Instance JSON') + raise ValueError( + 'Required property \'startable\' not present in Instance JSON') if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in Instance JSON') + raise ValueError( + 'Required property \'status\' not present in Instance JSON') if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [InstanceStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + InstanceStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in Instance JSON') - if (total_network_bandwidth := _dict.get('total_network_bandwidth')) is not None: + raise ValueError( + 'Required property \'status_reasons\' not present in Instance JSON' + ) + if (total_network_bandwidth := + _dict.get('total_network_bandwidth')) is not None: args['total_network_bandwidth'] = total_network_bandwidth else: - raise ValueError('Required property \'total_network_bandwidth\' not present in Instance JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'total_network_bandwidth\' not present in Instance JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth else: - raise ValueError('Required property \'total_volume_bandwidth\' not present in Instance JSON') + raise ValueError( + 'Required property \'total_volume_bandwidth\' not present in Instance JSON' + ) if (vcpu := _dict.get('vcpu')) is not None: args['vcpu'] = InstanceVCPU.from_dict(vcpu) else: - raise ValueError('Required property \'vcpu\' not present in Instance JSON') + raise ValueError( + 'Required property \'vcpu\' not present in Instance JSON') if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentReferenceInstanceContext.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentReferenceInstanceContext.from_dict(v) + for v in volume_attachments + ] else: - raise ValueError('Required property \'volume_attachments\' not present in Instance JSON') + raise ValueError( + 'Required property \'volume_attachments\' not present in Instance JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in Instance JSON') + raise ValueError( + 'Required property \'vpc\' not present in Instance JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in Instance JSON') + raise ValueError( + 'Required property \'zone\' not present in Instance JSON') return cls(**args) @classmethod @@ -46178,23 +49032,33 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() + _dict['availability_policy'] = self.availability_policy.to_dict( + ) if hasattr(self, 'bandwidth') and self.bandwidth is not None: _dict['bandwidth'] = self.bandwidth - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: _dict['catalog_offering'] = self.catalog_offering.to_dict() + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: @@ -46212,6 +49076,10 @@ def to_dict(self) -> Dict: else: disks_list.append(v.to_dict()) _dict['disks'] = disks_list + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'gpu') and self.gpu is not None: if isinstance(self.gpu, dict): _dict['gpu'] = self.gpu @@ -46236,7 +49104,8 @@ def to_dict(self) -> Dict: _dict['image'] = self.image else: _dict['image'] = self.image.to_dict() - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -46244,18 +49113,22 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'memory') and self.memory is not None: _dict['memory'] = self.memory - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -46263,7 +49136,9 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -46273,21 +49148,30 @@ def to_dict(self) -> Dict: _dict['network_interfaces'] = network_interfaces_list if hasattr(self, 'numa_count') and self.numa_count is not None: _dict['numa_count'] = self.numa_count - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: _dict['placement_target'] = self.placement_target.to_dict() - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment - else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment + else: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) if hasattr(self, 'profile') and self.profile is not None: if isinstance(self.profile, dict): _dict['profile'] = self.profile @@ -46298,11 +49182,14 @@ def to_dict(self) -> Dict: _dict['reservation'] = self.reservation else: _dict['reservation'] = self.reservation.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group @@ -46322,16 +49209,20 @@ def to_dict(self) -> Dict: else: status_reasons_list.append(v.to_dict()) _dict['status_reasons'] = status_reasons_list - if hasattr(self, 'total_network_bandwidth') and self.total_network_bandwidth is not None: + if hasattr(self, 'total_network_bandwidth' + ) and self.total_network_bandwidth is not None: _dict['total_network_bandwidth'] = self.total_network_bandwidth - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'vcpu') and self.vcpu is not None: if isinstance(self.vcpu, dict): _dict['vcpu'] = self.vcpu else: _dict['vcpu'] = self.vcpu.to_dict() - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -46369,6 +49260,14 @@ def __ne__(self, other: 'Instance') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode for this virtual server instance. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class HealthStateEnum(str, Enum): """ The health of this resource: @@ -46386,7 +49285,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the virtual server instance. @@ -46400,7 +49298,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -46408,7 +49305,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE = 'instance' - class StatusEnum(str, Enum): """ The status of the virtual server instance. @@ -46427,7 +49323,6 @@ class StatusEnum(str, Enum): STOPPING = 'stopping' - class InstanceAction: """ InstanceAction. @@ -46490,27 +49385,34 @@ def from_dict(cls, _dict: Dict) -> 'InstanceAction': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceAction JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceAction JSON' + ) if (force := _dict.get('force')) is not None: args['force'] = force if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceAction JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceAction JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceAction JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceAction JSON') if (started_at := _dict.get('started_at')) is not None: args['started_at'] = string_to_datetime(started_at) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in InstanceAction JSON') + raise ValueError( + 'Required property \'status\' not present in InstanceAction JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceAction JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceAction JSON') return cls(**args) @classmethod @@ -46567,7 +49469,6 @@ class StatusEnum(str, Enum): PENDING = 'pending' RUNNING = 'running' - class TypeEnum(str, Enum): """ The type of action. @@ -46578,7 +49479,6 @@ class TypeEnum(str, Enum): STOP = 'stop' - class InstanceAvailabilityPolicy: """ InstanceAvailabilityPolicy. @@ -46618,7 +49518,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceAvailabilityPolicy': if (host_failure := _dict.get('host_failure')) is not None: args['host_failure'] = host_failure else: - raise ValueError('Required property \'host_failure\' not present in InstanceAvailabilityPolicy JSON') + raise ValueError( + 'Required property \'host_failure\' not present in InstanceAvailabilityPolicy JSON' + ) return cls(**args) @classmethod @@ -46665,7 +49567,6 @@ class HostFailureEnum(str, Enum): STOP = 'stop' - class InstanceAvailabilityPolicyPatch: """ InstanceAvailabilityPolicyPatch. @@ -46742,7 +49643,6 @@ class HostFailureEnum(str, Enum): STOP = 'stop' - class InstanceAvailabilityPolicyPrototype: """ InstanceAvailabilityPolicyPrototype. @@ -46819,11 +49719,13 @@ class HostFailureEnum(str, Enum): STOP = 'stop' - class InstanceCatalogOffering: """ InstanceCatalogOffering. + :param CatalogOfferingVersionPlanReference plan: (optional) The billing plan + used for the catalog offering version. + If absent, no billing plan is in use (free). :param CatalogOfferingVersionReference version: The catalog offering version this virtual server instance was provisioned from. The catalog offering version is not managed by the IBM VPC service, and may no @@ -46838,6 +49740,8 @@ class InstanceCatalogOffering: def __init__( self, version: 'CatalogOfferingVersionReference', + *, + plan: Optional['CatalogOfferingVersionPlanReference'] = None, ) -> None: """ Initialize a InstanceCatalogOffering object. @@ -46851,17 +49755,25 @@ def __init__( server instance. However, all images associated with a catalog offering version will have the same checksum, and therefore will have the same data. + :param CatalogOfferingVersionPlanReference plan: (optional) The billing + plan used for the catalog offering version. + If absent, no billing plan is in use (free). """ + self.plan = plan self.version = version @classmethod def from_dict(cls, _dict: Dict) -> 'InstanceCatalogOffering': """Initialize a InstanceCatalogOffering object from a json dictionary.""" args = {} + if (plan := _dict.get('plan')) is not None: + args['plan'] = CatalogOfferingVersionPlanReference.from_dict(plan) if (version := _dict.get('version')) is not None: args['version'] = CatalogOfferingVersionReference.from_dict(version) else: - raise ValueError('Required property \'version\' not present in InstanceCatalogOffering JSON') + raise ValueError( + 'Required property \'version\' not present in InstanceCatalogOffering JSON' + ) return cls(**args) @classmethod @@ -46872,6 +49784,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'plan') and self.plan is not None: + if isinstance(self.plan, dict): + _dict['plan'] = self.plan + else: + _dict['plan'] = self.plan.to_dict() if hasattr(self, 'version') and self.version is not None: if isinstance(self.version, dict): _dict['version'] = self.version @@ -46906,18 +49823,32 @@ class InstanceCatalogOfferingPrototype: The specified offering or offering version may be in a different account, subject to IAM policies. + :param CatalogOfferingVersionPlanIdentity plan: (optional) The billing plan to + use for the catalog offering version. If unspecified, no billing + plan will be used (free). Must be specified for catalog offering versions that + require + a billing plan to be used. """ def __init__( self, + *, + plan: Optional['CatalogOfferingVersionPlanIdentity'] = None, ) -> None: """ Initialize a InstanceCatalogOfferingPrototype object. + :param CatalogOfferingVersionPlanIdentity plan: (optional) The billing plan + to use for the catalog offering version. If unspecified, no billing + plan will be used (free). Must be specified for catalog offering versions + that require + a billing plan to be used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceCatalogOfferingPrototypeCatalogOfferingByOffering', 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion']) - ) + ", ".join([ + 'InstanceCatalogOfferingPrototypeCatalogOfferingByOffering', + 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion' + ])) raise Exception(msg) @@ -46970,21 +49901,29 @@ def from_dict(cls, _dict: Dict) -> 'InstanceCollection': if (first := _dict.get('first')) is not None: args['first'] = InstanceCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in InstanceCollection JSON') + raise ValueError( + 'Required property \'first\' not present in InstanceCollection JSON' + ) if (instances := _dict.get('instances')) is not None: args['instances'] = [Instance.from_dict(v) for v in instances] else: - raise ValueError('Required property \'instances\' not present in InstanceCollection JSON') + raise ValueError( + 'Required property \'instances\' not present in InstanceCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in InstanceCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in InstanceCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = InstanceCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in InstanceCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in InstanceCollection JSON' + ) return cls(**args) @classmethod @@ -47063,7 +50002,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -47123,7 +50064,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceCollectionNext JSON' + ) return cls(**args) @classmethod @@ -47212,27 +50155,39 @@ def from_dict(cls, _dict: Dict) -> 'InstanceConsoleAccessToken': if (access_token := _dict.get('access_token')) is not None: args['access_token'] = access_token else: - raise ValueError('Required property \'access_token\' not present in InstanceConsoleAccessToken JSON') + raise ValueError( + 'Required property \'access_token\' not present in InstanceConsoleAccessToken JSON' + ) if (console_type := _dict.get('console_type')) is not None: args['console_type'] = console_type else: - raise ValueError('Required property \'console_type\' not present in InstanceConsoleAccessToken JSON') + raise ValueError( + 'Required property \'console_type\' not present in InstanceConsoleAccessToken JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceConsoleAccessToken JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceConsoleAccessToken JSON' + ) if (expires_at := _dict.get('expires_at')) is not None: args['expires_at'] = string_to_datetime(expires_at) else: - raise ValueError('Required property \'expires_at\' not present in InstanceConsoleAccessToken JSON') + raise ValueError( + 'Required property \'expires_at\' not present in InstanceConsoleAccessToken JSON' + ) if (force := _dict.get('force')) is not None: args['force'] = force else: - raise ValueError('Required property \'force\' not present in InstanceConsoleAccessToken JSON') + raise ValueError( + 'Required property \'force\' not present in InstanceConsoleAccessToken JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceConsoleAccessToken JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceConsoleAccessToken JSON' + ) return cls(**args) @classmethod @@ -47284,7 +50239,6 @@ class ConsoleTypeEnum(str, Enum): VNC = 'vnc' - class InstanceDefaultTrustedProfilePrototype: """ InstanceDefaultTrustedProfilePrototype. @@ -47326,7 +50280,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceDefaultTrustedProfilePrototype': if (target := _dict.get('target')) is not None: args['target'] = target else: - raise ValueError('Required property \'target\' not present in InstanceDefaultTrustedProfilePrototype JSON') + raise ValueError( + 'Required property \'target\' not present in InstanceDefaultTrustedProfilePrototype JSON' + ) return cls(**args) @classmethod @@ -47422,31 +50378,41 @@ def from_dict(cls, _dict: Dict) -> 'InstanceDisk': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceDisk JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceDisk JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceDisk JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceDisk JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceDisk JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceDisk JSON') if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in InstanceDisk JSON') + raise ValueError( + 'Required property \'interface_type\' not present in InstanceDisk JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceDisk JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceDisk JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceDisk JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceDisk JSON' + ) if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in InstanceDisk JSON') + raise ValueError( + 'Required property \'size\' not present in InstanceDisk JSON') return cls(**args) @classmethod @@ -47502,7 +50468,6 @@ class InterfaceTypeEnum(str, Enum): NVME = 'nvme' VIRTIO_BLK = 'virtio_blk' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -47511,7 +50476,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_DISK = 'instance_disk' - class InstanceDiskCollection: """ InstanceDiskCollection. @@ -47537,7 +50501,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceDiskCollection': if (disks := _dict.get('disks')) is not None: args['disks'] = [InstanceDisk.from_dict(v) for v in disks] else: - raise ValueError('Required property \'disks\' not present in InstanceDiskCollection JSON') + raise ValueError( + 'Required property \'disks\' not present in InstanceDiskCollection JSON' + ) return cls(**args) @classmethod @@ -47687,19 +50653,27 @@ def from_dict(cls, _dict: Dict) -> 'InstanceDiskReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceDiskReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceDiskReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceDiskReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceDiskReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceDiskReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceDiskReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceDiskReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceDiskReference JSON' + ) return cls(**args) @classmethod @@ -47751,7 +50725,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_DISK = 'instance_disk' - class InstanceDiskReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -47778,7 +50751,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceDiskReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceDiskReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceDiskReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -47849,19 +50824,24 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGPU': if (count := _dict.get('count')) is not None: args['count'] = count else: - raise ValueError('Required property \'count\' not present in InstanceGPU JSON') + raise ValueError( + 'Required property \'count\' not present in InstanceGPU JSON') if (manufacturer := _dict.get('manufacturer')) is not None: args['manufacturer'] = manufacturer else: - raise ValueError('Required property \'manufacturer\' not present in InstanceGPU JSON') + raise ValueError( + 'Required property \'manufacturer\' not present in InstanceGPU JSON' + ) if (memory := _dict.get('memory')) is not None: args['memory'] = memory else: - raise ValueError('Required property \'memory\' not present in InstanceGPU JSON') + raise ValueError( + 'Required property \'memory\' not present in InstanceGPU JSON') if (model := _dict.get('model')) is not None: args['model'] = model else: - raise ValueError('Required property \'model\' not present in InstanceGPU JSON') + raise ValueError( + 'Required property \'model\' not present in InstanceGPU JSON') return cls(**args) @classmethod @@ -48026,65 +51006,98 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroup': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceGroup JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'crn\' not present in InstanceGroup JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroup JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroup JSON') if (instance_template := _dict.get('instance_template')) is not None: - args['instance_template'] = InstanceTemplateReference.from_dict(instance_template) + args['instance_template'] = InstanceTemplateReference.from_dict( + instance_template) else: - raise ValueError('Required property \'instance_template\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'instance_template\' not present in InstanceGroup JSON' + ) if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [InstanceGroupLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + InstanceGroupLifecycleReason.from_dict(v) + for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in InstanceGroup JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in InstanceGroup JSON' + ) if (load_balancer_pool := _dict.get('load_balancer_pool')) is not None: - args['load_balancer_pool'] = LoadBalancerPoolReference.from_dict(load_balancer_pool) + args['load_balancer_pool'] = LoadBalancerPoolReference.from_dict( + load_balancer_pool) if (managers := _dict.get('managers')) is not None: - args['managers'] = [InstanceGroupManagerReference.from_dict(v) for v in managers] + args['managers'] = [ + InstanceGroupManagerReference.from_dict(v) for v in managers + ] else: - raise ValueError('Required property \'managers\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'managers\' not present in InstanceGroup JSON' + ) if (membership_count := _dict.get('membership_count')) is not None: args['membership_count'] = membership_count else: - raise ValueError('Required property \'membership_count\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'membership_count\' not present in InstanceGroup JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroup JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'resource_group\' not present in InstanceGroup JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'status\' not present in InstanceGroup JSON' + ) if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [SubnetReference.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'subnets\' not present in InstanceGroup JSON' + ) if (updated_at := _dict.get('updated_at')) is not None: args['updated_at'] = string_to_datetime(updated_at) else: - raise ValueError('Required property \'updated_at\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'updated_at\' not present in InstanceGroup JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in InstanceGroup JSON') + raise ValueError( + 'Required property \'vpc\' not present in InstanceGroup JSON') return cls(**args) @classmethod @@ -48095,7 +51108,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'application_port') and self.application_port is not None: + if hasattr(self, + 'application_port') and self.application_port is not None: _dict['application_port'] = self.application_port if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -48105,12 +51119,14 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'instance_template') and self.instance_template is not None: + if hasattr(self, + 'instance_template') and self.instance_template is not None: if isinstance(self.instance_template, dict): _dict['instance_template'] = self.instance_template else: _dict['instance_template'] = self.instance_template.to_dict() - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -48118,9 +51134,12 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state - if hasattr(self, 'load_balancer_pool') and self.load_balancer_pool is not None: + if hasattr( + self, + 'load_balancer_pool') and self.load_balancer_pool is not None: if isinstance(self.load_balancer_pool, dict): _dict['load_balancer_pool'] = self.load_balancer_pool else: @@ -48133,7 +51152,8 @@ def to_dict(self) -> Dict: else: managers_list.append(v.to_dict()) _dict['managers'] = managers_list - if hasattr(self, 'membership_count') and self.membership_count is not None: + if hasattr(self, + 'membership_count') and self.membership_count is not None: _dict['membership_count'] = self.membership_count if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -48192,7 +51212,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class StatusEnum(str, Enum): """ The status of the instance group @@ -48209,7 +51228,6 @@ class StatusEnum(str, Enum): UNHEALTHY = 'unhealthy' - class InstanceGroupCollection: """ InstanceGroupCollection. @@ -48260,21 +51278,31 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupCollection': if (first := _dict.get('first')) is not None: args['first'] = InstanceGroupCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in InstanceGroupCollection JSON') + raise ValueError( + 'Required property \'first\' not present in InstanceGroupCollection JSON' + ) if (instance_groups := _dict.get('instance_groups')) is not None: - args['instance_groups'] = [InstanceGroup.from_dict(v) for v in instance_groups] + args['instance_groups'] = [ + InstanceGroup.from_dict(v) for v in instance_groups + ] else: - raise ValueError('Required property \'instance_groups\' not present in InstanceGroupCollection JSON') + raise ValueError( + 'Required property \'instance_groups\' not present in InstanceGroupCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in InstanceGroupCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in InstanceGroupCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = InstanceGroupCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in InstanceGroupCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in InstanceGroupCollection JSON' + ) return cls(**args) @classmethod @@ -48290,7 +51318,8 @@ def to_dict(self) -> Dict: _dict['first'] = self.first else: _dict['first'] = self.first.to_dict() - if hasattr(self, 'instance_groups') and self.instance_groups is not None: + if hasattr(self, + 'instance_groups') and self.instance_groups is not None: instance_groups_list = [] for v in self.instance_groups: if isinstance(v, dict): @@ -48353,7 +51382,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -48413,7 +51444,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupCollectionNext JSON' + ) return cls(**args) @classmethod @@ -48496,11 +51529,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in InstanceGroupLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in InstanceGroupLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in InstanceGroupLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in InstanceGroupLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -48554,7 +51591,6 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class InstanceGroupManager: """ InstanceGroupManager. @@ -48595,8 +51631,9 @@ def __init__( manager was updated. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerAutoScale', 'InstanceGroupManagerScheduled']) - ) + ", ".join([ + 'InstanceGroupManagerAutoScale', 'InstanceGroupManagerScheduled' + ])) raise Exception(msg) @@ -48672,8 +51709,7 @@ def __init__( manager action was updated. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerActionScheduledAction']) - ) + ", ".join(['InstanceGroupManagerActionScheduledAction'])) raise Exception(msg) class ResourceTypeEnum(str, Enum): @@ -48683,7 +51719,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' - class StatusEnum(str, Enum): """ The status of the instance group action @@ -48701,7 +51736,6 @@ class StatusEnum(str, Enum): OMITTED = 'omitted' - class InstanceGroupManagerActionGroupPatch: """ InstanceGroupManagerActionGroupPatch. @@ -48739,7 +51773,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'membership_count') and self.membership_count is not None: + if hasattr(self, + 'membership_count') and self.membership_count is not None: _dict['membership_count'] = self.membership_count return _dict @@ -48793,9 +51828,11 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionManagerPatch': """Initialize a InstanceGroupManagerActionManagerPatch object from a json dictionary.""" args = {} - if (max_membership_count := _dict.get('max_membership_count')) is not None: + if (max_membership_count := + _dict.get('max_membership_count')) is not None: args['max_membership_count'] = max_membership_count - if (min_membership_count := _dict.get('min_membership_count')) is not None: + if (min_membership_count := + _dict.get('min_membership_count')) is not None: args['min_membership_count'] = min_membership_count return cls(**args) @@ -48807,9 +51844,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'max_membership_count') and self.max_membership_count is not None: + if hasattr(self, 'max_membership_count' + ) and self.max_membership_count is not None: _dict['max_membership_count'] = self.max_membership_count - if hasattr(self, 'min_membership_count') and self.min_membership_count is not None: + if hasattr(self, 'min_membership_count' + ) and self.min_membership_count is not None: _dict['min_membership_count'] = self.min_membership_count return _dict @@ -48883,9 +51922,11 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPatch': if (cron_spec := _dict.get('cron_spec')) is not None: args['cron_spec'] = cron_spec if (group := _dict.get('group')) is not None: - args['group'] = InstanceGroupManagerActionGroupPatch.from_dict(group) + args['group'] = InstanceGroupManagerActionGroupPatch.from_dict( + group) if (manager := _dict.get('manager')) is not None: - args['manager'] = InstanceGroupManagerActionManagerPatch.from_dict(manager) + args['manager'] = InstanceGroupManagerActionManagerPatch.from_dict( + manager) if (name := _dict.get('name')) is not None: args['name'] = name if (run_at := _dict.get('run_at')) is not None: @@ -48960,8 +52001,9 @@ def __init__( randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototype']) - ) + ", ".join([ + 'InstanceGroupManagerActionPrototypeScheduledActionPrototype' + ])) raise Exception(msg) @@ -49014,23 +52056,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionReference': """Initialize a InstanceGroupManagerActionReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = InstanceGroupManagerActionReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = InstanceGroupManagerActionReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerActionReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerActionReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerActionReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerActionReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerActionReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerActionReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceGroupManagerActionReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceGroupManagerActionReference JSON' + ) return cls(**args) @classmethod @@ -49082,7 +52134,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' - class InstanceGroupManagerActionReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -49103,13 +52154,16 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionReferenceDeleted': + def from_dict(cls, + _dict: Dict) -> 'InstanceGroupManagerActionReferenceDeleted': """Initialize a InstanceGroupManagerActionReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceGroupManagerActionReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceGroupManagerActionReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -49132,13 +52186,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionReferenceDeleted') -> bool: + def __eq__(self, + other: 'InstanceGroupManagerActionReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionReferenceDeleted') -> bool: + def __ne__(self, + other: 'InstanceGroupManagerActionReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -49195,21 +52251,32 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionsCollection': if (actions := _dict.get('actions')) is not None: args['actions'] = actions else: - raise ValueError('Required property \'actions\' not present in InstanceGroupManagerActionsCollection JSON') + raise ValueError( + 'Required property \'actions\' not present in InstanceGroupManagerActionsCollection JSON' + ) if (first := _dict.get('first')) is not None: - args['first'] = InstanceGroupManagerActionsCollectionFirst.from_dict(first) + args[ + 'first'] = InstanceGroupManagerActionsCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in InstanceGroupManagerActionsCollection JSON') + raise ValueError( + 'Required property \'first\' not present in InstanceGroupManagerActionsCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in InstanceGroupManagerActionsCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in InstanceGroupManagerActionsCollection JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = InstanceGroupManagerActionsCollectionNext.from_dict(next) + args['next'] = InstanceGroupManagerActionsCollectionNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in InstanceGroupManagerActionsCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in InstanceGroupManagerActionsCollection JSON' + ) return cls(**args) @classmethod @@ -49282,13 +52349,16 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionsCollectionFirst': + def from_dict(cls, + _dict: Dict) -> 'InstanceGroupManagerActionsCollectionFirst': """Initialize a InstanceGroupManagerActionsCollectionFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerActionsCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerActionsCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -49311,13 +52381,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionsCollectionFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionsCollectionFirst') -> bool: + def __eq__(self, + other: 'InstanceGroupManagerActionsCollectionFirst') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionsCollectionFirst') -> bool: + def __ne__(self, + other: 'InstanceGroupManagerActionsCollectionFirst') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -49342,13 +52414,16 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionsCollectionNext': + def from_dict(cls, + _dict: Dict) -> 'InstanceGroupManagerActionsCollectionNext': """Initialize a InstanceGroupManagerActionsCollectionNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerActionsCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerActionsCollectionNext JSON' + ) return cls(**args) @classmethod @@ -49371,13 +52446,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionsCollectionNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionsCollectionNext') -> bool: + def __eq__(self, + other: 'InstanceGroupManagerActionsCollectionNext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionsCollectionNext') -> bool: + def __ne__(self, + other: 'InstanceGroupManagerActionsCollectionNext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -49434,21 +52511,29 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerCollection': if (first := _dict.get('first')) is not None: args['first'] = InstanceGroupManagerCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in InstanceGroupManagerCollection JSON') + raise ValueError( + 'Required property \'first\' not present in InstanceGroupManagerCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in InstanceGroupManagerCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in InstanceGroupManagerCollection JSON' + ) if (managers := _dict.get('managers')) is not None: args['managers'] = managers else: - raise ValueError('Required property \'managers\' not present in InstanceGroupManagerCollection JSON') + raise ValueError( + 'Required property \'managers\' not present in InstanceGroupManagerCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = InstanceGroupManagerCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in InstanceGroupManagerCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in InstanceGroupManagerCollection JSON' + ) return cls(**args) @classmethod @@ -49527,7 +52612,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -49587,7 +52674,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerCollectionNext JSON' + ) return cls(**args) @classmethod @@ -49682,9 +52771,11 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPatch': args['cooldown'] = cooldown if (management_enabled := _dict.get('management_enabled')) is not None: args['management_enabled'] = management_enabled - if (max_membership_count := _dict.get('max_membership_count')) is not None: + if (max_membership_count := + _dict.get('max_membership_count')) is not None: args['max_membership_count'] = max_membership_count - if (min_membership_count := _dict.get('min_membership_count')) is not None: + if (min_membership_count := + _dict.get('min_membership_count')) is not None: args['min_membership_count'] = min_membership_count if (name := _dict.get('name')) is not None: args['name'] = name @@ -49698,15 +52789,21 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'aggregation_window') and self.aggregation_window is not None: + if hasattr( + self, + 'aggregation_window') and self.aggregation_window is not None: _dict['aggregation_window'] = self.aggregation_window if hasattr(self, 'cooldown') and self.cooldown is not None: _dict['cooldown'] = self.cooldown - if hasattr(self, 'management_enabled') and self.management_enabled is not None: + if hasattr( + self, + 'management_enabled') and self.management_enabled is not None: _dict['management_enabled'] = self.management_enabled - if hasattr(self, 'max_membership_count') and self.max_membership_count is not None: + if hasattr(self, 'max_membership_count' + ) and self.max_membership_count is not None: _dict['max_membership_count'] = self.max_membership_count - if hasattr(self, 'min_membership_count') and self.min_membership_count is not None: + if hasattr(self, 'min_membership_count' + ) and self.min_membership_count is not None: _dict['min_membership_count'] = self.min_membership_count if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -49767,8 +52864,8 @@ def __init__( manager policy was updated. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy']) - ) + ", ".join( + ['InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy'])) raise Exception(msg) @@ -49822,23 +52919,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyCollection': """Initialize a InstanceGroupManagerPolicyCollection object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = InstanceGroupManagerPolicyCollectionFirst.from_dict(first) + args['first'] = InstanceGroupManagerPolicyCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in InstanceGroupManagerPolicyCollection JSON') + raise ValueError( + 'Required property \'first\' not present in InstanceGroupManagerPolicyCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in InstanceGroupManagerPolicyCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in InstanceGroupManagerPolicyCollection JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = InstanceGroupManagerPolicyCollectionNext.from_dict(next) + args['next'] = InstanceGroupManagerPolicyCollectionNext.from_dict( + next) if (policies := _dict.get('policies')) is not None: args['policies'] = policies else: - raise ValueError('Required property \'policies\' not present in InstanceGroupManagerPolicyCollection JSON') + raise ValueError( + 'Required property \'policies\' not present in InstanceGroupManagerPolicyCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in InstanceGroupManagerPolicyCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in InstanceGroupManagerPolicyCollection JSON' + ) return cls(**args) @classmethod @@ -49911,13 +53018,16 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyCollectionFirst': + def from_dict(cls, + _dict: Dict) -> 'InstanceGroupManagerPolicyCollectionFirst': """Initialize a InstanceGroupManagerPolicyCollectionFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerPolicyCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerPolicyCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -49940,13 +53050,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerPolicyCollectionFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerPolicyCollectionFirst') -> bool: + def __eq__(self, + other: 'InstanceGroupManagerPolicyCollectionFirst') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerPolicyCollectionFirst') -> bool: + def __ne__(self, + other: 'InstanceGroupManagerPolicyCollectionFirst') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -49971,13 +53083,16 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyCollectionNext': + def from_dict(cls, + _dict: Dict) -> 'InstanceGroupManagerPolicyCollectionNext': """Initialize a InstanceGroupManagerPolicyCollectionNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerPolicyCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerPolicyCollectionNext JSON' + ) return cls(**args) @classmethod @@ -50098,7 +53213,6 @@ class MetricTypeEnum(str, Enum): NETWORK_OUT = 'network_out' - class InstanceGroupManagerPolicyPrototype: """ InstanceGroupManagerPolicyPrototype. @@ -50122,8 +53236,9 @@ def __init__( randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype']) - ) + ", ".join([ + 'InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype' + ])) raise Exception(msg) @@ -50172,19 +53287,27 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyReference': """Initialize a InstanceGroupManagerPolicyReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = InstanceGroupManagerPolicyReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = InstanceGroupManagerPolicyReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerPolicyReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerPolicyReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerPolicyReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerPolicyReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerPolicyReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerPolicyReference JSON' + ) return cls(**args) @classmethod @@ -50247,13 +53370,16 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyReferenceDeleted': + def from_dict(cls, + _dict: Dict) -> 'InstanceGroupManagerPolicyReferenceDeleted': """Initialize a InstanceGroupManagerPolicyReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceGroupManagerPolicyReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceGroupManagerPolicyReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -50276,13 +53402,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerPolicyReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerPolicyReferenceDeleted') -> bool: + def __eq__(self, + other: 'InstanceGroupManagerPolicyReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerPolicyReferenceDeleted') -> bool: + def __ne__(self, + other: 'InstanceGroupManagerPolicyReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -50314,8 +53442,10 @@ def __init__( unspecified, the name will be a hyphenated list of randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype', 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype']) - ) + ", ".join([ + 'InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype', + 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype' + ])) raise Exception(msg) @@ -50362,19 +53492,26 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerReference': """Initialize a InstanceGroupManagerReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = InstanceGroupManagerReferenceDeleted.from_dict(deleted) + args['deleted'] = InstanceGroupManagerReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerReference JSON' + ) return cls(**args) @classmethod @@ -50443,7 +53580,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceGroupManagerReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceGroupManagerReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -50498,13 +53637,16 @@ def __init__( self.membership_count = membership_count @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionGroup': + def from_dict(cls, + _dict: Dict) -> 'InstanceGroupManagerScheduledActionGroup': """Initialize a InstanceGroupManagerScheduledActionGroup object from a json dictionary.""" args = {} if (membership_count := _dict.get('membership_count')) is not None: args['membership_count'] = membership_count else: - raise ValueError('Required property \'membership_count\' not present in InstanceGroupManagerScheduledActionGroup JSON') + raise ValueError( + 'Required property \'membership_count\' not present in InstanceGroupManagerScheduledActionGroup JSON' + ) return cls(**args) @classmethod @@ -50515,7 +53657,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'membership_count') and self.membership_count is not None: + if hasattr(self, + 'membership_count') and self.membership_count is not None: _dict['membership_count'] = self.membership_count return _dict @@ -50559,13 +53702,17 @@ def __init__( self.membership_count = membership_count @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionGroupPrototype': + def from_dict( + cls, + _dict: Dict) -> 'InstanceGroupManagerScheduledActionGroupPrototype': """Initialize a InstanceGroupManagerScheduledActionGroupPrototype object from a json dictionary.""" args = {} if (membership_count := _dict.get('membership_count')) is not None: args['membership_count'] = membership_count else: - raise ValueError('Required property \'membership_count\' not present in InstanceGroupManagerScheduledActionGroupPrototype JSON') + raise ValueError( + 'Required property \'membership_count\' not present in InstanceGroupManagerScheduledActionGroupPrototype JSON' + ) return cls(**args) @classmethod @@ -50576,7 +53723,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'membership_count') and self.membership_count is not None: + if hasattr(self, + 'membership_count') and self.membership_count is not None: _dict['membership_count'] = self.membership_count return _dict @@ -50588,13 +53736,17 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerScheduledActionGroupPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerScheduledActionGroupPrototype') -> bool: + def __eq__( + self, + other: 'InstanceGroupManagerScheduledActionGroupPrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerScheduledActionGroupPrototype') -> bool: + def __ne__( + self, + other: 'InstanceGroupManagerScheduledActionGroupPrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -50605,16 +53757,13 @@ class InstanceGroupManagerScheduledActionManager: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceGroupManagerScheduledActionManager object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerScheduledActionManagerAutoScale']) - ) + ", ".join(['InstanceGroupManagerScheduledActionManagerAutoScale'])) raise Exception(msg) @@ -50624,16 +53773,15 @@ class InstanceGroupManagerScheduledActionManagerPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceGroupManagerScheduledActionManagerPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype']) - ) + ", ".join([ + 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype' + ])) raise Exception(msg) @@ -50717,41 +53865,63 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupMembership': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceGroupMembership JSON') - if (delete_instance_on_membership_delete := _dict.get('delete_instance_on_membership_delete')) is not None: - args['delete_instance_on_membership_delete'] = delete_instance_on_membership_delete + raise ValueError( + 'Required property \'created_at\' not present in InstanceGroupMembership JSON' + ) + if (delete_instance_on_membership_delete := + _dict.get('delete_instance_on_membership_delete')) is not None: + args[ + 'delete_instance_on_membership_delete'] = delete_instance_on_membership_delete else: - raise ValueError('Required property \'delete_instance_on_membership_delete\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'delete_instance_on_membership_delete\' not present in InstanceGroupMembership JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupMembership JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupMembership JSON' + ) if (instance := _dict.get('instance')) is not None: args['instance'] = InstanceReference.from_dict(instance) else: - raise ValueError('Required property \'instance\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'instance\' not present in InstanceGroupMembership JSON' + ) if (instance_template := _dict.get('instance_template')) is not None: - args['instance_template'] = InstanceTemplateReference.from_dict(instance_template) + args['instance_template'] = InstanceTemplateReference.from_dict( + instance_template) else: - raise ValueError('Required property \'instance_template\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'instance_template\' not present in InstanceGroupMembership JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupMembership JSON' + ) if (pool_member := _dict.get('pool_member')) is not None: - args['pool_member'] = LoadBalancerPoolMemberReference.from_dict(pool_member) + args['pool_member'] = LoadBalancerPoolMemberReference.from_dict( + pool_member) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'status\' not present in InstanceGroupMembership JSON' + ) if (updated_at := _dict.get('updated_at')) is not None: args['updated_at'] = string_to_datetime(updated_at) else: - raise ValueError('Required property \'updated_at\' not present in InstanceGroupMembership JSON') + raise ValueError( + 'Required property \'updated_at\' not present in InstanceGroupMembership JSON' + ) return cls(**args) @classmethod @@ -50764,8 +53934,10 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'delete_instance_on_membership_delete') and self.delete_instance_on_membership_delete is not None: - _dict['delete_instance_on_membership_delete'] = self.delete_instance_on_membership_delete + if hasattr(self, 'delete_instance_on_membership_delete' + ) and self.delete_instance_on_membership_delete is not None: + _dict[ + 'delete_instance_on_membership_delete'] = self.delete_instance_on_membership_delete if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -50775,7 +53947,8 @@ def to_dict(self) -> Dict: _dict['instance'] = self.instance else: _dict['instance'] = self.instance.to_dict() - if hasattr(self, 'instance_template') and self.instance_template is not None: + if hasattr(self, + 'instance_template') and self.instance_template is not None: if isinstance(self.instance_template, dict): _dict['instance_template'] = self.instance_template else: @@ -50828,7 +54001,6 @@ class StatusEnum(str, Enum): UNHEALTHY = 'unhealthy' - class InstanceGroupMembershipCollection: """ InstanceGroupMembershipCollection. @@ -50879,23 +54051,34 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupMembershipCollection': """Initialize a InstanceGroupMembershipCollection object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = InstanceGroupMembershipCollectionFirst.from_dict(first) + args['first'] = InstanceGroupMembershipCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in InstanceGroupMembershipCollection JSON') + raise ValueError( + 'Required property \'first\' not present in InstanceGroupMembershipCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in InstanceGroupMembershipCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in InstanceGroupMembershipCollection JSON' + ) if (memberships := _dict.get('memberships')) is not None: - args['memberships'] = [InstanceGroupMembership.from_dict(v) for v in memberships] + args['memberships'] = [ + InstanceGroupMembership.from_dict(v) for v in memberships + ] else: - raise ValueError('Required property \'memberships\' not present in InstanceGroupMembershipCollection JSON') + raise ValueError( + 'Required property \'memberships\' not present in InstanceGroupMembershipCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = InstanceGroupMembershipCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in InstanceGroupMembershipCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in InstanceGroupMembershipCollection JSON' + ) return cls(**args) @classmethod @@ -50974,7 +54157,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupMembershipCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupMembershipCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupMembershipCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -51034,7 +54219,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupMembershipCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupMembershipCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupMembershipCollectionNext JSON' + ) return cls(**args) @classmethod @@ -51235,9 +54422,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'application_port') and self.application_port is not None: + if hasattr(self, + 'application_port') and self.application_port is not None: _dict['application_port'] = self.application_port - if hasattr(self, 'instance_template') and self.instance_template is not None: + if hasattr(self, + 'instance_template') and self.instance_template is not None: if isinstance(self.instance_template, dict): _dict['instance_template'] = self.instance_template else: @@ -51247,12 +54436,15 @@ def to_dict(self) -> Dict: _dict['load_balancer'] = self.load_balancer else: _dict['load_balancer'] = self.load_balancer.to_dict() - if hasattr(self, 'load_balancer_pool') and self.load_balancer_pool is not None: + if hasattr( + self, + 'load_balancer_pool') and self.load_balancer_pool is not None: if isinstance(self.load_balancer_pool, dict): _dict['load_balancer_pool'] = self.load_balancer_pool else: _dict['load_balancer_pool'] = self.load_balancer_pool.to_dict() - if hasattr(self, 'membership_count') and self.membership_count is not None: + if hasattr(self, + 'membership_count') and self.membership_count is not None: _dict['membership_count'] = self.membership_count if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -51333,21 +54525,29 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceGroupReference JSON') + raise ValueError( + 'Required property \'crn\' not present in InstanceGroupReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = InstanceGroupReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupReference JSON' + ) return cls(**args) @classmethod @@ -51418,7 +54618,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceGroupReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceGroupReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -51509,11 +54711,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in InstanceHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in InstanceHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in InstanceHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in InstanceHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -51571,7 +54777,6 @@ class CodeEnum(str, Enum): RESERVATION_FAILED = 'reservation_failed' - class InstanceInitialization: """ InstanceInitialization. @@ -51589,7 +54794,8 @@ def __init__( self, keys: List['KeyReference'], *, - default_trusted_profile: Optional['InstanceInitializationDefaultTrustedProfile'] = None, + default_trusted_profile: Optional[ + 'InstanceInitializationDefaultTrustedProfile'] = None, password: Optional['InstanceInitializationPassword'] = None, ) -> None: """ @@ -51611,14 +54817,20 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'InstanceInitialization': """Initialize a InstanceInitialization object from a json dictionary.""" args = {} - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceInitializationDefaultTrustedProfile.from_dict(default_trusted_profile) + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceInitializationDefaultTrustedProfile.from_dict( + default_trusted_profile) if (keys := _dict.get('keys')) is not None: args['keys'] = [KeyReference.from_dict(v) for v in keys] else: - raise ValueError('Required property \'keys\' not present in InstanceInitialization JSON') + raise ValueError( + 'Required property \'keys\' not present in InstanceInitialization JSON' + ) if (password := _dict.get('password')) is not None: - args['password'] = InstanceInitializationPassword.from_dict(password) + args['password'] = InstanceInitializationPassword.from_dict( + password) return cls(**args) @classmethod @@ -51629,11 +54841,14 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -51699,17 +54914,22 @@ def __init__( self.target = target @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceInitializationDefaultTrustedProfile': + def from_dict(cls, + _dict: Dict) -> 'InstanceInitializationDefaultTrustedProfile': """Initialize a InstanceInitializationDefaultTrustedProfile object from a json dictionary.""" args = {} if (auto_link := _dict.get('auto_link')) is not None: args['auto_link'] = auto_link else: - raise ValueError('Required property \'auto_link\' not present in InstanceInitializationDefaultTrustedProfile JSON') + raise ValueError( + 'Required property \'auto_link\' not present in InstanceInitializationDefaultTrustedProfile JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = TrustedProfileReference.from_dict(target) else: - raise ValueError('Required property \'target\' not present in InstanceInitializationDefaultTrustedProfile JSON') + raise ValueError( + 'Required property \'target\' not present in InstanceInitializationDefaultTrustedProfile JSON' + ) return cls(**args) @classmethod @@ -51737,13 +54957,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceInitializationDefaultTrustedProfile object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceInitializationDefaultTrustedProfile') -> bool: + def __eq__(self, + other: 'InstanceInitializationDefaultTrustedProfile') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceInitializationDefaultTrustedProfile') -> bool: + def __ne__(self, + other: 'InstanceInitializationDefaultTrustedProfile') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -51782,11 +55004,16 @@ def from_dict(cls, _dict: Dict) -> 'InstanceInitializationPassword': if (encrypted_password := _dict.get('encrypted_password')) is not None: args['encrypted_password'] = base64.b64decode(encrypted_password) else: - raise ValueError('Required property \'encrypted_password\' not present in InstanceInitializationPassword JSON') + raise ValueError( + 'Required property \'encrypted_password\' not present in InstanceInitializationPassword JSON' + ) if (encryption_key := _dict.get('encryption_key')) is not None: - args['encryption_key'] = KeyIdentityByFingerprint.from_dict(encryption_key) + args['encryption_key'] = KeyIdentityByFingerprint.from_dict( + encryption_key) else: - raise ValueError('Required property \'encryption_key\' not present in InstanceInitializationPassword JSON') + raise ValueError( + 'Required property \'encryption_key\' not present in InstanceInitializationPassword JSON' + ) return cls(**args) @classmethod @@ -51797,8 +55024,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'encrypted_password') and self.encrypted_password is not None: - _dict['encrypted_password'] = str(base64.b64encode(self.encrypted_password), 'utf-8') + if hasattr( + self, + 'encrypted_password') and self.encrypted_password is not None: + _dict['encrypted_password'] = str( + base64.b64encode(self.encrypted_password), 'utf-8') if hasattr(self, 'encryption_key') and self.encryption_key is not None: if isinstance(self.encryption_key, dict): _dict['encryption_key'] = self.encryption_key @@ -51830,7 +55060,12 @@ class InstanceLifecycleReason: InstanceLifecycleReason. :param str code: A reason code for this lifecycle state: + - `failed_registration`: the instance's registration to Resource Controller has + failed. Delete the instance and provision it again. If the problem persists, + contact IBM Support. - `internal_error`: internal error (contact IBM support) + - `pending_registration`: the instance's registration to Resource Controller is + being processed. - `resource_suspended_by_provider`: The resource has been suspended (contact IBM support) The enumerated values for this property may @@ -51852,7 +55087,15 @@ def __init__( Initialize a InstanceLifecycleReason object. :param str code: A reason code for this lifecycle state: + - `failed_registration`: the instance's registration to Resource Controller + has + failed. Delete the instance and provision it again. If the problem + persists, + contact IBM Support. - `internal_error`: internal error (contact IBM support) + - `pending_registration`: the instance's registration to Resource + Controller is + being processed. - `resource_suspended_by_provider`: The resource has been suspended (contact IBM support) @@ -51874,11 +55117,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in InstanceLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in InstanceLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in InstanceLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in InstanceLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -51920,7 +55167,12 @@ def __ne__(self, other: 'InstanceLifecycleReason') -> bool: class CodeEnum(str, Enum): """ A reason code for this lifecycle state: + - `failed_registration`: the instance's registration to Resource Controller has + failed. Delete the instance and provision it again. If the problem persists, + contact IBM Support. - `internal_error`: internal error (contact IBM support) + - `pending_registration`: the instance's registration to Resource Controller is + being processed. - `resource_suspended_by_provider`: The resource has been suspended (contact IBM support) The enumerated values for this property may @@ -51928,11 +55180,12 @@ class CodeEnum(str, Enum): future. """ + FAILED_REGISTRATION = 'failed_registration' INTERNAL_ERROR = 'internal_error' + PENDING_REGISTRATION = 'pending_registration' RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class InstanceMetadataService: """ The metadata service configuration. @@ -51978,15 +55231,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceMetadataService': if (enabled := _dict.get('enabled')) is not None: args['enabled'] = enabled else: - raise ValueError('Required property \'enabled\' not present in InstanceMetadataService JSON') + raise ValueError( + 'Required property \'enabled\' not present in InstanceMetadataService JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in InstanceMetadataService JSON') + raise ValueError( + 'Required property \'protocol\' not present in InstanceMetadataService JSON' + ) if (response_hop_limit := _dict.get('response_hop_limit')) is not None: args['response_hop_limit'] = response_hop_limit else: - raise ValueError('Required property \'response_hop_limit\' not present in InstanceMetadataService JSON') + raise ValueError( + 'Required property \'response_hop_limit\' not present in InstanceMetadataService JSON' + ) return cls(**args) @classmethod @@ -52001,7 +55260,9 @@ def to_dict(self) -> Dict: _dict['enabled'] = self.enabled if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'response_hop_limit') and self.response_hop_limit is not None: + if hasattr( + self, + 'response_hop_limit') and self.response_hop_limit is not None: _dict['response_hop_limit'] = self.response_hop_limit return _dict @@ -52035,7 +55296,6 @@ class ProtocolEnum(str, Enum): HTTPS = 'https' - class InstanceMetadataServicePatch: """ The metadata service configuration. @@ -52100,7 +55360,9 @@ def to_dict(self) -> Dict: _dict['enabled'] = self.enabled if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'response_hop_limit') and self.response_hop_limit is not None: + if hasattr( + self, + 'response_hop_limit') and self.response_hop_limit is not None: _dict['response_hop_limit'] = self.response_hop_limit return _dict @@ -52134,7 +55396,6 @@ class ProtocolEnum(str, Enum): HTTPS = 'https' - class InstanceMetadataServicePrototype: """ The metadata service configuration. @@ -52199,7 +55460,9 @@ def to_dict(self) -> Dict: _dict['enabled'] = self.enabled if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'response_hop_limit') and self.response_hop_limit is not None: + if hasattr( + self, + 'response_hop_limit') and self.response_hop_limit is not None: _dict['response_hop_limit'] = self.response_hop_limit return _dict @@ -52233,7 +55496,6 @@ class ProtocolEnum(str, Enum): HTTPS = 'https' - class InstanceNetworkAttachment: """ InstanceNetworkAttachment. @@ -52272,7 +55534,8 @@ def __init__( resource_type: str, subnet: 'SubnetReference', type: str, - virtual_network_interface: 'VirtualNetworkInterfaceReferenceAttachmentContext', + virtual_network_interface: + 'VirtualNetworkInterfaceReferenceAttachmentContext', ) -> None: """ Initialize a InstanceNetworkAttachment object. @@ -52317,47 +55580,72 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachment': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceNetworkAttachment JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceNetworkAttachment JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceNetworkAttachment JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in InstanceNetworkAttachment JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceNetworkAttachment JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'port_speed\' not present in InstanceNetworkAttachment JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in InstanceNetworkAttachment JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceNetworkAttachment JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'subnet\' not present in InstanceNetworkAttachment JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceNetworkAttachment JSON') - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: - args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface) - else: - raise ValueError('Required property \'virtual_network_interface\' not present in InstanceNetworkAttachment JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceNetworkAttachment JSON' + ) + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: + args[ + 'virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + virtual_network_interface) + else: + raise ValueError( + 'Required property \'virtual_network_interface\' not present in InstanceNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -52374,7 +55662,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -52394,11 +55683,15 @@ def to_dict(self) -> Dict: _dict['subnet'] = self.subnet.to_dict() if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -52432,7 +55725,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -52440,7 +55732,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' - class TypeEnum(str, Enum): """ The instance network attachment type. @@ -52450,7 +55741,6 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' - class InstanceNetworkAttachmentCollection: """ InstanceNetworkAttachmentCollection. @@ -52475,10 +55765,16 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentCollection': """Initialize a InstanceNetworkAttachmentCollection object from a json dictionary.""" args = {} - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachment.from_dict(v) for v in network_attachments] + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachment.from_dict(v) + for v in network_attachments + ] else: - raise ValueError('Required property \'network_attachments\' not present in InstanceNetworkAttachmentCollection JSON') + raise ValueError( + 'Required property \'network_attachments\' not present in InstanceNetworkAttachmentCollection JSON' + ) return cls(**args) @classmethod @@ -52489,7 +55785,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -52598,7 +55896,8 @@ class InstanceNetworkAttachmentPrototype: def __init__( self, - virtual_network_interface: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterface', + virtual_network_interface: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterface', *, name: Optional[str] = None, ) -> None: @@ -52627,10 +55926,13 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentPrototype': args = {} if (name := _dict.get('name')) is not None: args['name'] = name - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: args['virtual_network_interface'] = virtual_network_interface else: - raise ValueError('Required property \'virtual_network_interface\' not present in InstanceNetworkAttachmentPrototype JSON') + raise ValueError( + 'Required property \'virtual_network_interface\' not present in InstanceNetworkAttachmentPrototype JSON' + ) return cls(**args) @classmethod @@ -52643,11 +55945,15 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -52680,16 +55986,16 @@ class InstanceNetworkAttachmentPrototypeVirtualNetworkInterface: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceNetworkAttachmentPrototypeVirtualNetworkInterface object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext', 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity']) - ) + ", ".join([ + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext', + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity' + ])) raise Exception(msg) @@ -52754,31 +56060,45 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentReference': """Initialize a InstanceNetworkAttachmentReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = InstanceNetworkAttachmentReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = InstanceNetworkAttachmentReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceNetworkAttachmentReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceNetworkAttachmentReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceNetworkAttachmentReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in InstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in InstanceNetworkAttachmentReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceNetworkAttachmentReference JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in InstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'subnet\' not present in InstanceNetworkAttachmentReference JSON' + ) return cls(**args) @classmethod @@ -52840,7 +56160,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' - class InstanceNetworkAttachmentReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -52861,13 +56180,16 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentReferenceDeleted': + def from_dict(cls, + _dict: Dict) -> 'InstanceNetworkAttachmentReferenceDeleted': """Initialize a InstanceNetworkAttachmentReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceNetworkAttachmentReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceNetworkAttachmentReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -52890,13 +56212,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceNetworkAttachmentReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceNetworkAttachmentReferenceDeleted') -> bool: + def __eq__(self, + other: 'InstanceNetworkAttachmentReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceNetworkAttachmentReferenceDeleted') -> bool: + def __ne__(self, + other: 'InstanceNetworkAttachmentReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -52907,6 +56231,14 @@ class InstancePatch: :param InstanceAvailabilityPolicyPatch availability_policy: (optional) The availability policy for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + For this property to be changed, the virtual server instance `status` must be + `stopping` or `stopped`. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + For this property to be changed, the virtual server instance `status` must be + `stopping` or `stopped`. :param InstanceMetadataServicePatch metadata_service: (optional) The metadata service configuration. :param str name: (optional) The name for this virtual server instance. The name @@ -52943,11 +56275,14 @@ def __init__( self, *, availability_policy: Optional['InstanceAvailabilityPolicyPatch'] = None, + confidential_compute_mode: Optional[str] = None, + enable_secure_boot: Optional[bool] = None, metadata_service: Optional['InstanceMetadataServicePatch'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPatch'] = None, profile: Optional['InstancePatchProfile'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPatch'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPatch'] = None, total_volume_bandwidth: Optional[int] = None, ) -> None: """ @@ -52955,6 +56290,16 @@ def __init__( :param InstanceAvailabilityPolicyPatch availability_policy: (optional) The availability policy for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + For this property to be changed, the virtual server instance `status` must + be + `stopping` or `stopped`. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + For this property to be changed, the virtual server instance `status` must + be + `stopping` or `stopped`. :param InstanceMetadataServicePatch metadata_service: (optional) The metadata service configuration. :param str name: (optional) The name for this virtual server instance. The @@ -52992,6 +56337,8 @@ def __init__( `total_network_bandwidth`. """ self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode + self.enable_secure_boot = enable_secure_boot self.metadata_service = metadata_service self.name = name self.placement_target = placement_target @@ -53003,19 +56350,32 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'InstancePatch': """Initialize a InstancePatch object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPatch.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPatch.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePatch.from_dict(metadata_service) + args['metadata_service'] = InstanceMetadataServicePatch.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPatch.from_dict(reservation_affinity) - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPatch.from_dict( + reservation_affinity) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth return cls(**args) @@ -53027,19 +56387,31 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -53049,12 +56421,16 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth return _dict @@ -53076,6 +56452,16 @@ def __ne__(self, other: 'InstancePatch') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + For this property to be changed, the virtual server instance `status` must be + `stopping` or `stopped`. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstancePatchProfile: """ @@ -53094,16 +56480,16 @@ class InstancePatchProfile: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePatchProfile object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePatchProfileInstanceProfileIdentityByName', 'InstancePatchProfileInstanceProfileIdentityByHref']) - ) + ", ".join([ + 'InstancePatchProfileInstanceProfileIdentityByName', + 'InstancePatchProfileInstanceProfileIdentityByHref' + ])) raise Exception(msg) @@ -53113,16 +56499,17 @@ class InstancePlacementTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetDedicatedHostGroupReference', 'InstancePlacementTargetDedicatedHostReference', 'InstancePlacementTargetPlacementGroupReference']) - ) + ", ".join([ + 'InstancePlacementTargetDedicatedHostGroupReference', + 'InstancePlacementTargetDedicatedHostReference', + 'InstancePlacementTargetPlacementGroupReference' + ])) raise Exception(msg) @@ -53132,16 +56519,16 @@ class InstancePlacementTargetPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTargetPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetPatchDedicatedHostIdentity', 'InstancePlacementTargetPatchDedicatedHostGroupIdentity']) - ) + ", ".join([ + 'InstancePlacementTargetPatchDedicatedHostIdentity', + 'InstancePlacementTargetPatchDedicatedHostGroupIdentity' + ])) raise Exception(msg) @@ -53151,16 +56538,17 @@ class InstancePlacementTargetPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTargetPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetPrototypeDedicatedHostIdentity', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentity', 'InstancePlacementTargetPrototypePlacementGroupIdentity']) - ) + ", ".join([ + 'InstancePlacementTargetPrototypeDedicatedHostIdentity', + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentity', + 'InstancePlacementTargetPrototypePlacementGroupIdentity' + ])) raise Exception(msg) @@ -53169,6 +56557,8 @@ class InstanceProfile: InstanceProfile. :param InstanceProfileBandwidth bandwidth: + :param InstanceProfileSupportedConfidentialComputeModes + confidential_compute_modes: :param List[InstanceProfileDisk] disks: Collection of the instance profile's disks. :param str family: The product family this virtual server instance profile @@ -53188,6 +56578,7 @@ class InstanceProfile: :param InstanceProfilePortSpeed port_speed: :param InstanceProfileReservationTerms reservation_terms: :param str resource_type: The resource type. + :param InstanceProfileSupportedSecureBootModes secure_boot_modes: :param str status: The status of the instance profile: - `previous`: This instance profile is an older revision, but remains provisionable and @@ -53209,6 +56600,8 @@ class InstanceProfile: def __init__( self, bandwidth: 'InstanceProfileBandwidth', + confidential_compute_modes: + 'InstanceProfileSupportedConfidentialComputeModes', disks: List['InstanceProfileDisk'], family: str, href: str, @@ -53220,6 +56613,7 @@ def __init__( port_speed: 'InstanceProfilePortSpeed', reservation_terms: 'InstanceProfileReservationTerms', resource_type: str, + secure_boot_modes: 'InstanceProfileSupportedSecureBootModes', status: str, total_volume_bandwidth: 'InstanceProfileVolumeBandwidth', vcpu_architecture: 'InstanceProfileVCPUArchitecture', @@ -53236,6 +56630,8 @@ def __init__( Initialize a InstanceProfile object. :param InstanceProfileBandwidth bandwidth: + :param InstanceProfileSupportedConfidentialComputeModes + confidential_compute_modes: :param List[InstanceProfileDisk] disks: Collection of the instance profile's disks. :param str family: The product family this virtual server instance profile @@ -53250,6 +56646,7 @@ def __init__( :param InstanceProfilePortSpeed port_speed: :param InstanceProfileReservationTerms reservation_terms: :param str resource_type: The resource type. + :param InstanceProfileSupportedSecureBootModes secure_boot_modes: :param str status: The status of the instance profile: - `previous`: This instance profile is an older revision, but remains provisionable and @@ -53273,6 +56670,7 @@ def __init__( :param InstanceProfileNUMACount numa_count: (optional) """ self.bandwidth = bandwidth + self.confidential_compute_modes = confidential_compute_modes self.disks = disks self.family = family self.gpu_count = gpu_count @@ -53289,6 +56687,7 @@ def __init__( self.port_speed = port_speed self.reservation_terms = reservation_terms self.resource_type = resource_type + self.secure_boot_modes = secure_boot_modes self.status = status self.total_volume_bandwidth = total_volume_bandwidth self.vcpu_architecture = vcpu_architecture @@ -53302,19 +56701,35 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfile': if (bandwidth := _dict.get('bandwidth')) is not None: args['bandwidth'] = bandwidth else: - raise ValueError('Required property \'bandwidth\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'bandwidth\' not present in InstanceProfile JSON' + ) + if (confidential_compute_modes := + _dict.get('confidential_compute_modes')) is not None: + args[ + 'confidential_compute_modes'] = InstanceProfileSupportedConfidentialComputeModes.from_dict( + confidential_compute_modes) + else: + raise ValueError( + 'Required property \'confidential_compute_modes\' not present in InstanceProfile JSON' + ) if (disks := _dict.get('disks')) is not None: args['disks'] = [InstanceProfileDisk.from_dict(v) for v in disks] else: - raise ValueError('Required property \'disks\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'disks\' not present in InstanceProfile JSON' + ) if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'family\' not present in InstanceProfile JSON' + ) if (gpu_count := _dict.get('gpu_count')) is not None: args['gpu_count'] = gpu_count if (gpu_manufacturer := _dict.get('gpu_manufacturer')) is not None: - args['gpu_manufacturer'] = InstanceProfileGPUManufacturer.from_dict(gpu_manufacturer) + args['gpu_manufacturer'] = InstanceProfileGPUManufacturer.from_dict( + gpu_manufacturer) if (gpu_memory := _dict.get('gpu_memory')) is not None: args['gpu_memory'] = gpu_memory if (gpu_model := _dict.get('gpu_model')) is not None: @@ -53322,61 +56737,107 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfile': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceProfile JSON' + ) if (memory := _dict.get('memory')) is not None: args['memory'] = memory else: - raise ValueError('Required property \'memory\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'memory\' not present in InstanceProfile JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceProfile JSON') - if (network_attachment_count := _dict.get('network_attachment_count')) is not None: + raise ValueError( + 'Required property \'name\' not present in InstanceProfile JSON' + ) + if (network_attachment_count := + _dict.get('network_attachment_count')) is not None: args['network_attachment_count'] = network_attachment_count else: - raise ValueError('Required property \'network_attachment_count\' not present in InstanceProfile JSON') - if (network_interface_count := _dict.get('network_interface_count')) is not None: + raise ValueError( + 'Required property \'network_attachment_count\' not present in InstanceProfile JSON' + ) + if (network_interface_count := + _dict.get('network_interface_count')) is not None: args['network_interface_count'] = network_interface_count else: - raise ValueError('Required property \'network_interface_count\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'network_interface_count\' not present in InstanceProfile JSON' + ) if (numa_count := _dict.get('numa_count')) is not None: args['numa_count'] = numa_count if (os_architecture := _dict.get('os_architecture')) is not None: - args['os_architecture'] = InstanceProfileOSArchitecture.from_dict(os_architecture) + args['os_architecture'] = InstanceProfileOSArchitecture.from_dict( + os_architecture) else: - raise ValueError('Required property \'os_architecture\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'os_architecture\' not present in InstanceProfile JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'port_speed\' not present in InstanceProfile JSON' + ) if (reservation_terms := _dict.get('reservation_terms')) is not None: - args['reservation_terms'] = InstanceProfileReservationTerms.from_dict(reservation_terms) + args[ + 'reservation_terms'] = InstanceProfileReservationTerms.from_dict( + reservation_terms) else: - raise ValueError('Required property \'reservation_terms\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'reservation_terms\' not present in InstanceProfile JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceProfile JSON' + ) + if (secure_boot_modes := _dict.get('secure_boot_modes')) is not None: + args[ + 'secure_boot_modes'] = InstanceProfileSupportedSecureBootModes.from_dict( + secure_boot_modes) + else: + raise ValueError( + 'Required property \'secure_boot_modes\' not present in InstanceProfile JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in InstanceProfile JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'status\' not present in InstanceProfile JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth else: - raise ValueError('Required property \'total_volume_bandwidth\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'total_volume_bandwidth\' not present in InstanceProfile JSON' + ) if (vcpu_architecture := _dict.get('vcpu_architecture')) is not None: - args['vcpu_architecture'] = InstanceProfileVCPUArchitecture.from_dict(vcpu_architecture) + args[ + 'vcpu_architecture'] = InstanceProfileVCPUArchitecture.from_dict( + vcpu_architecture) else: - raise ValueError('Required property \'vcpu_architecture\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'vcpu_architecture\' not present in InstanceProfile JSON' + ) if (vcpu_count := _dict.get('vcpu_count')) is not None: args['vcpu_count'] = vcpu_count else: - raise ValueError('Required property \'vcpu_count\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'vcpu_count\' not present in InstanceProfile JSON' + ) if (vcpu_manufacturer := _dict.get('vcpu_manufacturer')) is not None: - args['vcpu_manufacturer'] = InstanceProfileVCPUManufacturer.from_dict(vcpu_manufacturer) + args[ + 'vcpu_manufacturer'] = InstanceProfileVCPUManufacturer.from_dict( + vcpu_manufacturer) else: - raise ValueError('Required property \'vcpu_manufacturer\' not present in InstanceProfile JSON') + raise ValueError( + 'Required property \'vcpu_manufacturer\' not present in InstanceProfile JSON' + ) return cls(**args) @classmethod @@ -53392,6 +56853,15 @@ def to_dict(self) -> Dict: _dict['bandwidth'] = self.bandwidth else: _dict['bandwidth'] = self.bandwidth.to_dict() + if hasattr(self, 'confidential_compute_modes' + ) and self.confidential_compute_modes is not None: + if isinstance(self.confidential_compute_modes, dict): + _dict[ + 'confidential_compute_modes'] = self.confidential_compute_modes + else: + _dict[ + 'confidential_compute_modes'] = self.confidential_compute_modes.to_dict( + ) if hasattr(self, 'disks') and self.disks is not None: disks_list = [] for v in self.disks: @@ -53407,7 +56877,8 @@ def to_dict(self) -> Dict: _dict['gpu_count'] = self.gpu_count else: _dict['gpu_count'] = self.gpu_count.to_dict() - if hasattr(self, 'gpu_manufacturer') and self.gpu_manufacturer is not None: + if hasattr(self, + 'gpu_manufacturer') and self.gpu_manufacturer is not None: if isinstance(self.gpu_manufacturer, dict): _dict['gpu_manufacturer'] = self.gpu_manufacturer else: @@ -53431,22 +56902,30 @@ def to_dict(self) -> Dict: _dict['memory'] = self.memory.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'network_attachment_count') and self.network_attachment_count is not None: + if hasattr(self, 'network_attachment_count' + ) and self.network_attachment_count is not None: if isinstance(self.network_attachment_count, dict): - _dict['network_attachment_count'] = self.network_attachment_count - else: - _dict['network_attachment_count'] = self.network_attachment_count.to_dict() - if hasattr(self, 'network_interface_count') and self.network_interface_count is not None: + _dict[ + 'network_attachment_count'] = self.network_attachment_count + else: + _dict[ + 'network_attachment_count'] = self.network_attachment_count.to_dict( + ) + if hasattr(self, 'network_interface_count' + ) and self.network_interface_count is not None: if isinstance(self.network_interface_count, dict): _dict['network_interface_count'] = self.network_interface_count else: - _dict['network_interface_count'] = self.network_interface_count.to_dict() + _dict[ + 'network_interface_count'] = self.network_interface_count.to_dict( + ) if hasattr(self, 'numa_count') and self.numa_count is not None: if isinstance(self.numa_count, dict): _dict['numa_count'] = self.numa_count else: _dict['numa_count'] = self.numa_count.to_dict() - if hasattr(self, 'os_architecture') and self.os_architecture is not None: + if hasattr(self, + 'os_architecture') and self.os_architecture is not None: if isinstance(self.os_architecture, dict): _dict['os_architecture'] = self.os_architecture else: @@ -53456,21 +56935,32 @@ def to_dict(self) -> Dict: _dict['port_speed'] = self.port_speed else: _dict['port_speed'] = self.port_speed.to_dict() - if hasattr(self, 'reservation_terms') and self.reservation_terms is not None: + if hasattr(self, + 'reservation_terms') and self.reservation_terms is not None: if isinstance(self.reservation_terms, dict): _dict['reservation_terms'] = self.reservation_terms else: _dict['reservation_terms'] = self.reservation_terms.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type + if hasattr(self, + 'secure_boot_modes') and self.secure_boot_modes is not None: + if isinstance(self.secure_boot_modes, dict): + _dict['secure_boot_modes'] = self.secure_boot_modes + else: + _dict['secure_boot_modes'] = self.secure_boot_modes.to_dict() if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: if isinstance(self.total_volume_bandwidth, dict): _dict['total_volume_bandwidth'] = self.total_volume_bandwidth else: - _dict['total_volume_bandwidth'] = self.total_volume_bandwidth.to_dict() - if hasattr(self, 'vcpu_architecture') and self.vcpu_architecture is not None: + _dict[ + 'total_volume_bandwidth'] = self.total_volume_bandwidth.to_dict( + ) + if hasattr(self, + 'vcpu_architecture') and self.vcpu_architecture is not None: if isinstance(self.vcpu_architecture, dict): _dict['vcpu_architecture'] = self.vcpu_architecture else: @@ -53480,7 +56970,8 @@ def to_dict(self) -> Dict: _dict['vcpu_count'] = self.vcpu_count else: _dict['vcpu_count'] = self.vcpu_count.to_dict() - if hasattr(self, 'vcpu_manufacturer') and self.vcpu_manufacturer is not None: + if hasattr(self, + 'vcpu_manufacturer') and self.vcpu_manufacturer is not None: if isinstance(self.vcpu_manufacturer, dict): _dict['vcpu_manufacturer'] = self.vcpu_manufacturer else: @@ -53512,7 +57003,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_PROFILE = 'instance_profile' - class StatusEnum(str, Enum): """ The status of the instance profile: @@ -53533,23 +57023,23 @@ class StatusEnum(str, Enum): PREVIOUS = 'previous' - class InstanceProfileBandwidth: """ InstanceProfileBandwidth. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileBandwidth object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileBandwidthFixed', 'InstanceProfileBandwidthRange', 'InstanceProfileBandwidthEnum', 'InstanceProfileBandwidthDependent']) - ) + ", ".join([ + 'InstanceProfileBandwidthFixed', + 'InstanceProfileBandwidthRange', 'InstanceProfileBandwidthEnum', + 'InstanceProfileBandwidthDependent' + ])) raise Exception(msg) @@ -53580,7 +57070,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileCollection': if (profiles := _dict.get('profiles')) is not None: args['profiles'] = [InstanceProfile.from_dict(v) for v in profiles] else: - raise ValueError('Required property \'profiles\' not present in InstanceProfileCollection JSON') + raise ValueError( + 'Required property \'profiles\' not present in InstanceProfileCollection JSON' + ) return cls(**args) @classmethod @@ -53653,15 +57145,24 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDisk': if (quantity := _dict.get('quantity')) is not None: args['quantity'] = quantity else: - raise ValueError('Required property \'quantity\' not present in InstanceProfileDisk JSON') + raise ValueError( + 'Required property \'quantity\' not present in InstanceProfileDisk JSON' + ) if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in InstanceProfileDisk JSON') - if (supported_interface_types := _dict.get('supported_interface_types')) is not None: - args['supported_interface_types'] = InstanceProfileDiskSupportedInterfaces.from_dict(supported_interface_types) - else: - raise ValueError('Required property \'supported_interface_types\' not present in InstanceProfileDisk JSON') + raise ValueError( + 'Required property \'size\' not present in InstanceProfileDisk JSON' + ) + if (supported_interface_types := + _dict.get('supported_interface_types')) is not None: + args[ + 'supported_interface_types'] = InstanceProfileDiskSupportedInterfaces.from_dict( + supported_interface_types) + else: + raise ValueError( + 'Required property \'supported_interface_types\' not present in InstanceProfileDisk JSON' + ) return cls(**args) @classmethod @@ -53682,11 +57183,15 @@ def to_dict(self) -> Dict: _dict['size'] = self.size else: _dict['size'] = self.size.to_dict() - if hasattr(self, 'supported_interface_types') and self.supported_interface_types is not None: + if hasattr(self, 'supported_interface_types' + ) and self.supported_interface_types is not None: if isinstance(self.supported_interface_types, dict): - _dict['supported_interface_types'] = self.supported_interface_types + _dict[ + 'supported_interface_types'] = self.supported_interface_types else: - _dict['supported_interface_types'] = self.supported_interface_types.to_dict() + _dict[ + 'supported_interface_types'] = self.supported_interface_types.to_dict( + ) return _dict def _to_dict(self): @@ -53714,16 +57219,18 @@ class InstanceProfileDiskQuantity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileDiskQuantity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileDiskQuantityFixed', 'InstanceProfileDiskQuantityRange', 'InstanceProfileDiskQuantityEnum', 'InstanceProfileDiskQuantityDependent']) - ) + ", ".join([ + 'InstanceProfileDiskQuantityFixed', + 'InstanceProfileDiskQuantityRange', + 'InstanceProfileDiskQuantityEnum', + 'InstanceProfileDiskQuantityDependent' + ])) raise Exception(msg) @@ -53733,16 +57240,17 @@ class InstanceProfileDiskSize: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileDiskSize object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileDiskSizeFixed', 'InstanceProfileDiskSizeRange', 'InstanceProfileDiskSizeEnum', 'InstanceProfileDiskSizeDependent']) - ) + ", ".join([ + 'InstanceProfileDiskSizeFixed', 'InstanceProfileDiskSizeRange', + 'InstanceProfileDiskSizeEnum', + 'InstanceProfileDiskSizeDependent' + ])) raise Exception(msg) @@ -53787,15 +57295,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskSupportedInterfaces': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileDiskSupportedInterfaces JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskSupportedInterfaces JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileDiskSupportedInterfaces JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileDiskSupportedInterfaces JSON' + ) return cls(**args) @classmethod @@ -53843,7 +57357,6 @@ class DefaultEnum(str, Enum): NVME = 'nvme' VIRTIO_BLK = 'virtio_blk' - class TypeEnum(str, Enum): """ The type for this profile field. @@ -53851,7 +57364,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class ValuesEnum(str, Enum): """ The disk interface used for attaching the disk. @@ -53864,23 +57376,22 @@ class ValuesEnum(str, Enum): VIRTIO_BLK = 'virtio_blk' - class InstanceProfileGPU: """ InstanceProfileGPU. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileGPU object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileGPUFixed', 'InstanceProfileGPURange', 'InstanceProfileGPUEnum', 'InstanceProfileGPUDependent']) - ) + ", ".join([ + 'InstanceProfileGPUFixed', 'InstanceProfileGPURange', + 'InstanceProfileGPUEnum', 'InstanceProfileGPUDependent' + ])) raise Exception(msg) @@ -53915,11 +57426,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUManufacturer': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUManufacturer JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUManufacturer JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileGPUManufacturer JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileGPUManufacturer JSON' + ) return cls(**args) @classmethod @@ -53962,23 +57477,23 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileGPUMemory: """ InstanceProfileGPUMemory. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileGPUMemory object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileGPUMemoryFixed', 'InstanceProfileGPUMemoryRange', 'InstanceProfileGPUMemoryEnum', 'InstanceProfileGPUMemoryDependent']) - ) + ", ".join([ + 'InstanceProfileGPUMemoryFixed', + 'InstanceProfileGPUMemoryRange', 'InstanceProfileGPUMemoryEnum', + 'InstanceProfileGPUMemoryDependent' + ])) raise Exception(msg) @@ -54013,11 +57528,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUModel': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUModel JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUModel JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileGPUModel JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileGPUModel JSON' + ) return cls(**args) @classmethod @@ -54060,23 +57579,21 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileIdentity: """ Identifies an instance profile by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileIdentityByName', 'InstanceProfileIdentityByHref']) - ) + ", ".join([ + 'InstanceProfileIdentityByName', 'InstanceProfileIdentityByHref' + ])) raise Exception(msg) @@ -54086,16 +57603,16 @@ class InstanceProfileMemory: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileMemory object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileMemoryFixed', 'InstanceProfileMemoryRange', 'InstanceProfileMemoryEnum', 'InstanceProfileMemoryDependent']) - ) + ", ".join([ + 'InstanceProfileMemoryFixed', 'InstanceProfileMemoryRange', + 'InstanceProfileMemoryEnum', 'InstanceProfileMemoryDependent' + ])) raise Exception(msg) @@ -54105,16 +57622,16 @@ class InstanceProfileNUMACount: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileNUMACount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileNUMACountFixed', 'InstanceProfileNUMACountDependent']) - ) + ", ".join([ + 'InstanceProfileNUMACountFixed', + 'InstanceProfileNUMACountDependent' + ])) raise Exception(msg) @@ -54124,16 +57641,16 @@ class InstanceProfileNetworkAttachmentCount: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileNetworkAttachmentCount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileNetworkAttachmentCountRange', 'InstanceProfileNetworkAttachmentCountDependent']) - ) + ", ".join([ + 'InstanceProfileNetworkAttachmentCountRange', + 'InstanceProfileNetworkAttachmentCountDependent' + ])) raise Exception(msg) @@ -54143,16 +57660,16 @@ class InstanceProfileNetworkInterfaceCount: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileNetworkInterfaceCount object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileNetworkInterfaceCountRange', 'InstanceProfileNetworkInterfaceCountDependent']) - ) + ", ".join([ + 'InstanceProfileNetworkInterfaceCountRange', + 'InstanceProfileNetworkInterfaceCountDependent' + ])) raise Exception(msg) @@ -54193,15 +57710,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileOSArchitecture': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileOSArchitecture JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileOSArchitecture JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileOSArchitecture JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileOSArchitecture JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileOSArchitecture JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileOSArchitecture JSON' + ) return cls(**args) @classmethod @@ -54246,23 +57769,22 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfilePortSpeed: """ InstanceProfilePortSpeed. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfilePortSpeed object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfilePortSpeedFixed', 'InstanceProfilePortSpeedDependent']) - ) + ", ".join([ + 'InstanceProfilePortSpeedFixed', + 'InstanceProfilePortSpeedDependent' + ])) raise Exception(msg) @@ -54301,15 +57823,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceProfileReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceProfileReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceProfileReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceProfileReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceProfileReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceProfileReference JSON' + ) return cls(**args) @classmethod @@ -54354,7 +57882,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_PROFILE = 'instance_profile' - class InstanceProfileReservationTerms: """ InstanceProfileReservationTerms. @@ -54386,11 +57913,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileReservationTerms': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileReservationTerms JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileReservationTerms JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileReservationTerms JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileReservationTerms JSON' + ) return cls(**args) @classmethod @@ -54432,7 +57963,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class ValuesEnum(str, Enum): """ values. @@ -54442,23 +57972,236 @@ class ValuesEnum(str, Enum): THREE_YEAR = 'three_year' +class InstanceProfileSupportedConfidentialComputeModes: + """ + InstanceProfileSupportedConfidentialComputeModes. -class InstanceProfileVCPU: + :param str default: The default confidential compute mode for this profile. + :param str type: The type for this profile field. + :param List[str] values: The supported confidential compute modes. """ - InstanceProfileVCPU. + def __init__( + self, + default: str, + type: str, + values: List[str], + ) -> None: + """ + Initialize a InstanceProfileSupportedConfidentialComputeModes object. + + :param str default: The default confidential compute mode for this profile. + :param str type: The type for this profile field. + :param List[str] values: The supported confidential compute modes. + """ + self.default = default + self.type = type + self.values = values + + @classmethod + def from_dict( + cls, + _dict: Dict) -> 'InstanceProfileSupportedConfidentialComputeModes': + """Initialize a InstanceProfileSupportedConfidentialComputeModes object from a json dictionary.""" + args = {} + if (default := _dict.get('default')) is not None: + args['default'] = default + else: + raise ValueError( + 'Required property \'default\' not present in InstanceProfileSupportedConfidentialComputeModes JSON' + ) + if (type := _dict.get('type')) is not None: + args['type'] = type + else: + raise ValueError( + 'Required property \'type\' not present in InstanceProfileSupportedConfidentialComputeModes JSON' + ) + if (values := _dict.get('values')) is not None: + args['values'] = values + else: + raise ValueError( + 'Required property \'values\' not present in InstanceProfileSupportedConfidentialComputeModes JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a InstanceProfileSupportedConfidentialComputeModes object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'default') and self.default is not None: + _dict['default'] = self.default + if hasattr(self, 'type') and self.type is not None: + _dict['type'] = self.type + if hasattr(self, 'values') and self.values is not None: + _dict['values'] = self.values + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this InstanceProfileSupportedConfidentialComputeModes object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__( + self, + other: 'InstanceProfileSupportedConfidentialComputeModes') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__( + self, + other: 'InstanceProfileSupportedConfidentialComputeModes') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class DefaultEnum(str, Enum): + """ + The default confidential compute mode for this profile. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + + class TypeEnum(str, Enum): + """ + The type for this profile field. + """ + + ENUM = 'enum' + + class ValuesEnum(str, Enum): + """ + The confidential compute modes: + - `sgx`: Intel Software Guard Extensions + - `disabled`: No confidential compute functionality + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + + +class InstanceProfileSupportedSecureBootModes: + """ + InstanceProfileSupportedSecureBootModes. + + :param bool default: The default secure boot mode for this profile. + :param str type: The type for this profile field. + :param List[bool] values: The supported `enable_secure_boot` values for an + instance using this profile. """ def __init__( self, + default: bool, + type: str, + values: List[bool], ) -> None: + """ + Initialize a InstanceProfileSupportedSecureBootModes object. + + :param bool default: The default secure boot mode for this profile. + :param str type: The type for this profile field. + :param List[bool] values: The supported `enable_secure_boot` values for an + instance using this profile. + """ + self.default = default + self.type = type + self.values = values + + @classmethod + def from_dict(cls, + _dict: Dict) -> 'InstanceProfileSupportedSecureBootModes': + """Initialize a InstanceProfileSupportedSecureBootModes object from a json dictionary.""" + args = {} + if (default := _dict.get('default')) is not None: + args['default'] = default + else: + raise ValueError( + 'Required property \'default\' not present in InstanceProfileSupportedSecureBootModes JSON' + ) + if (type := _dict.get('type')) is not None: + args['type'] = type + else: + raise ValueError( + 'Required property \'type\' not present in InstanceProfileSupportedSecureBootModes JSON' + ) + if (values := _dict.get('values')) is not None: + args['values'] = values + else: + raise ValueError( + 'Required property \'values\' not present in InstanceProfileSupportedSecureBootModes JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a InstanceProfileSupportedSecureBootModes object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'default') and self.default is not None: + _dict['default'] = self.default + if hasattr(self, 'type') and self.type is not None: + _dict['type'] = self.type + if hasattr(self, 'values') and self.values is not None: + _dict['values'] = self.values + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this InstanceProfileSupportedSecureBootModes object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'InstanceProfileSupportedSecureBootModes') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'InstanceProfileSupportedSecureBootModes') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class TypeEnum(str, Enum): + """ + The type for this profile field. + """ + + ENUM = 'enum' + + +class InstanceProfileVCPU: + """ + InstanceProfileVCPU. + + """ + + def __init__(self,) -> None: """ Initialize a InstanceProfileVCPU object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileVCPUFixed', 'InstanceProfileVCPURange', 'InstanceProfileVCPUEnum', 'InstanceProfileVCPUDependent']) - ) + ", ".join([ + 'InstanceProfileVCPUFixed', 'InstanceProfileVCPURange', + 'InstanceProfileVCPUEnum', 'InstanceProfileVCPUDependent' + ])) raise Exception(msg) @@ -54500,11 +58243,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVCPUArchitecture': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVCPUArchitecture JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVCPUArchitecture JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileVCPUArchitecture JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileVCPUArchitecture JSON' + ) return cls(**args) @classmethod @@ -54549,7 +58296,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileVCPUManufacturer: """ InstanceProfileVCPUManufacturer. @@ -54588,11 +58334,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVCPUManufacturer': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVCPUManufacturer JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVCPUManufacturer JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileVCPUManufacturer JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileVCPUManufacturer JSON' + ) return cls(**args) @classmethod @@ -54637,23 +58387,24 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileVolumeBandwidth: """ InstanceProfileVolumeBandwidth. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceProfileVolumeBandwidth object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceProfileVolumeBandwidthFixed', 'InstanceProfileVolumeBandwidthRange', 'InstanceProfileVolumeBandwidthEnum', 'InstanceProfileVolumeBandwidthDependent']) - ) + ", ".join([ + 'InstanceProfileVolumeBandwidthFixed', + 'InstanceProfileVolumeBandwidthRange', + 'InstanceProfileVolumeBandwidthEnum', + 'InstanceProfileVolumeBandwidthDependent' + ])) raise Exception(msg) @@ -54663,6 +58414,10 @@ class InstancePrototype: :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -54671,6 +58426,9 @@ class InstancePrototype: subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -54723,14 +58481,19 @@ class InstancePrototype: def __init__( self, *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -54742,6 +58505,10 @@ def __init__( :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -54750,6 +58517,9 @@ def __init__( subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -54803,10 +58573,25 @@ def __init__( attachments or instance network interfaces. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePrototypeInstanceByImage', 'InstancePrototypeInstanceByCatalogOffering', 'InstancePrototypeInstanceByVolume', 'InstancePrototypeInstanceBySourceSnapshot', 'InstancePrototypeInstanceBySourceTemplate']) - ) + ", ".join([ + 'InstancePrototypeInstanceByImage', + 'InstancePrototypeInstanceByCatalogOffering', + 'InstancePrototypeInstanceByVolume', + 'InstancePrototypeInstanceBySourceSnapshot', + 'InstancePrototypeInstanceBySourceTemplate' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstanceReference: """ @@ -54856,21 +58641,29 @@ def from_dict(cls, _dict: Dict) -> 'InstanceReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in InstanceReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = InstanceReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceReference JSON' + ) return cls(**args) @classmethod @@ -54941,7 +58734,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -55012,11 +58807,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceReservationAffinity': if (policy := _dict.get('policy')) is not None: args['policy'] = policy else: - raise ValueError('Required property \'policy\' not present in InstanceReservationAffinity JSON') + raise ValueError( + 'Required property \'policy\' not present in InstanceReservationAffinity JSON' + ) if (pool := _dict.get('pool')) is not None: args['pool'] = [ReservationReference.from_dict(v) for v in pool] else: - raise ValueError('Required property \'pool\' not present in InstanceReservationAffinity JSON') + raise ValueError( + 'Required property \'pool\' not present in InstanceReservationAffinity JSON' + ) return cls(**args) @classmethod @@ -55068,7 +58867,6 @@ class PolicyEnum(str, Enum): MANUAL = 'manual' - class InstanceReservationAffinityPatch: """ InstanceReservationAffinityPatch. @@ -55076,16 +58874,15 @@ class InstanceReservationAffinityPatch: :param str policy: (optional) The reservation affinity policy to use for this virtual server instance: - `disabled`: Reservations will not be used - - `manual`: Reservations in `pool` are available for use. + - `manual`: Reservations in `pool` will be available for use + The policy must be `disabled` if `placement_target` is set. :param List[ReservationIdentity] pool: (optional) The pool of reservations available for use by this virtual server instance, replacing the existing pool of reservations. Specified reservations must have a `status` of `active`, and have the same - `profile` and - `zone` as this virtual server instance. - If `policy` is `manual`, a pool must be specified with at least one reservation. - If - `policy` is `disabled` and a pool is specified, it must be empty. + `profile` and `zone` as this virtual server instance. + If `policy` is `manual`, `pool` must have one reservation. If `policy` is + `disabled`, `pool` must be empty. """ def __init__( @@ -55100,16 +58897,15 @@ def __init__( :param str policy: (optional) The reservation affinity policy to use for this virtual server instance: - `disabled`: Reservations will not be used - - `manual`: Reservations in `pool` are available for use. + - `manual`: Reservations in `pool` will be available for use + The policy must be `disabled` if `placement_target` is set. :param List[ReservationIdentity] pool: (optional) The pool of reservations available for use by this virtual server instance, replacing the existing pool of reservations. Specified reservations must have a `status` of `active`, and have the same - `profile` and - `zone` as this virtual server instance. - If `policy` is `manual`, a pool must be specified with at least one - reservation. If - `policy` is `disabled` and a pool is specified, it must be empty. + `profile` and `zone` as this virtual server instance. + If `policy` is `manual`, `pool` must have one reservation. If `policy` is + `disabled`, `pool` must be empty. """ self.policy = policy self.pool = pool @@ -55166,14 +58962,14 @@ class PolicyEnum(str, Enum): """ The reservation affinity policy to use for this virtual server instance: - `disabled`: Reservations will not be used - - `manual`: Reservations in `pool` are available for use. + - `manual`: Reservations in `pool` will be available for use + The policy must be `disabled` if `placement_target` is set. """ DISABLED = 'disabled' MANUAL = 'manual' - class InstanceReservationAffinityPrototype: """ InstanceReservationAffinityPrototype. @@ -55187,8 +58983,7 @@ class InstanceReservationAffinityPrototype: :param List[ReservationIdentity] pool: (optional) The pool of reservations available for use by this virtual server instance. Specified reservations must have a `status` of `active`, and have the same - `profile` and - `zone` as this virtual server instance. + `profile` and `zone` as this virtual server instance. If `policy` is `manual`, a pool must be specified with at least one reservation. If `policy` is `disabled` and a pool is specified, it must be empty. @@ -55212,8 +59007,7 @@ def __init__( :param List[ReservationIdentity] pool: (optional) The pool of reservations available for use by this virtual server instance. Specified reservations must have a `status` of `active`, and have the same - `profile` and - `zone` as this virtual server instance. + `profile` and `zone` as this virtual server instance. If `policy` is `manual`, a pool must be specified with at least one reservation. If `policy` is `disabled` and a pool is specified, it must be empty. @@ -55282,7 +59076,6 @@ class PolicyEnum(str, Enum): MANUAL = 'manual' - class InstanceStatusReason: """ InstanceStatusReason. @@ -55325,11 +59118,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in InstanceStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in InstanceStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in InstanceStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in InstanceStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -55390,13 +59187,16 @@ class CodeEnum(str, Enum): STOPPED_FOR_IMAGE_CREATION = 'stopped_for_image_creation' - class InstanceTemplate: """ InstanceTemplate. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -55408,6 +59208,9 @@ class InstanceTemplate: subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -55464,13 +59267,18 @@ def __init__( name: str, resource_group: 'ResourceGroupReference', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, @@ -55490,6 +59298,10 @@ def __init__( instance template. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -55498,6 +59310,9 @@ def __init__( subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -55543,10 +59358,23 @@ def __init__( attachments or instance network interfaces. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplateInstanceByImageInstanceTemplateContext', 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext', 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext']) - ) + ", ".join([ + 'InstanceTemplateInstanceByImageInstanceTemplateContext', + 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext', + 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstanceTemplateCollection: """ @@ -55598,21 +59426,29 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateCollection': if (first := _dict.get('first')) is not None: args['first'] = InstanceTemplateCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in InstanceTemplateCollection JSON') + raise ValueError( + 'Required property \'first\' not present in InstanceTemplateCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in InstanceTemplateCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in InstanceTemplateCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = InstanceTemplateCollectionNext.from_dict(next) if (templates := _dict.get('templates')) is not None: args['templates'] = templates else: - raise ValueError('Required property \'templates\' not present in InstanceTemplateCollection JSON') + raise ValueError( + 'Required property \'templates\' not present in InstanceTemplateCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in InstanceTemplateCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in InstanceTemplateCollection JSON' + ) return cls(**args) @classmethod @@ -55691,7 +59527,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -55751,7 +59589,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateCollectionNext JSON' + ) return cls(**args) @classmethod @@ -55791,16 +59631,17 @@ class InstanceTemplateIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceTemplateIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplateIdentityById', 'InstanceTemplateIdentityByHref', 'InstanceTemplateIdentityByCRN']) - ) + ", ".join([ + 'InstanceTemplateIdentityById', + 'InstanceTemplateIdentityByHref', + 'InstanceTemplateIdentityByCRN' + ])) raise Exception(msg) @@ -55870,6 +59711,10 @@ class InstanceTemplatePrototype: :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -55878,6 +59723,9 @@ class InstanceTemplatePrototype: subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -55929,14 +59777,19 @@ class InstanceTemplatePrototype: def __init__( self, *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -55948,6 +59801,10 @@ def __init__( :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -55956,6 +59813,9 @@ def __init__( subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -56008,10 +59868,24 @@ def __init__( attachments or instance network interfaces. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplatePrototypeInstanceTemplateByImage', 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate', 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot', 'InstanceTemplatePrototypeInstanceTemplateByCatalogOffering']) - ) + ", ".join([ + 'InstanceTemplatePrototypeInstanceTemplateByImage', + 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate', + 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot', + 'InstanceTemplatePrototypeInstanceTemplateByCatalogOffering' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstanceTemplateReference: """ @@ -56062,21 +59936,30 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateReference JSON') + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = InstanceTemplateReferenceDeleted.from_dict(deleted) + args['deleted'] = InstanceTemplateReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceTemplateReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceTemplateReference JSON' + ) return cls(**args) @classmethod @@ -56147,7 +60030,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in InstanceTemplateReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in InstanceTemplateReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -56214,15 +60099,20 @@ def from_dict(cls, _dict: Dict) -> 'InstanceVCPU': if (architecture := _dict.get('architecture')) is not None: args['architecture'] = architecture else: - raise ValueError('Required property \'architecture\' not present in InstanceVCPU JSON') + raise ValueError( + 'Required property \'architecture\' not present in InstanceVCPU JSON' + ) if (count := _dict.get('count')) is not None: args['count'] = count else: - raise ValueError('Required property \'count\' not present in InstanceVCPU JSON') + raise ValueError( + 'Required property \'count\' not present in InstanceVCPU JSON') if (manufacturer := _dict.get('manufacturer')) is not None: args['manufacturer'] = manufacturer else: - raise ValueError('Required property \'manufacturer\' not present in InstanceVCPU JSON') + raise ValueError( + 'Required property \'manufacturer\' not present in InstanceVCPU JSON' + ) return cls(**args) @classmethod @@ -56331,19 +60221,23 @@ def from_dict(cls, _dict: Dict) -> 'Key': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Key JSON') + raise ValueError( + 'Required property \'created_at\' not present in Key JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Key JSON') + raise ValueError( + 'Required property \'crn\' not present in Key JSON') if (fingerprint := _dict.get('fingerprint')) is not None: args['fingerprint'] = fingerprint else: - raise ValueError('Required property \'fingerprint\' not present in Key JSON') + raise ValueError( + 'Required property \'fingerprint\' not present in Key JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Key JSON') + raise ValueError( + 'Required property \'href\' not present in Key JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: @@ -56351,23 +60245,29 @@ def from_dict(cls, _dict: Dict) -> 'Key': if (length := _dict.get('length')) is not None: args['length'] = length else: - raise ValueError('Required property \'length\' not present in Key JSON') + raise ValueError( + 'Required property \'length\' not present in Key JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Key JSON') + raise ValueError( + 'Required property \'name\' not present in Key JSON') if (public_key := _dict.get('public_key')) is not None: args['public_key'] = public_key else: - raise ValueError('Required property \'public_key\' not present in Key JSON') + raise ValueError( + 'Required property \'public_key\' not present in Key JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Key JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Key JSON') if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in Key JSON') + raise ValueError( + 'Required property \'type\' not present in Key JSON') return cls(**args) @classmethod @@ -56430,7 +60330,6 @@ class TypeEnum(str, Enum): RSA = 'rsa' - class KeyCollection: """ KeyCollection. @@ -56479,21 +60378,26 @@ def from_dict(cls, _dict: Dict) -> 'KeyCollection': if (first := _dict.get('first')) is not None: args['first'] = KeyCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in KeyCollection JSON') + raise ValueError( + 'Required property \'first\' not present in KeyCollection JSON') if (keys := _dict.get('keys')) is not None: args['keys'] = [Key.from_dict(v) for v in keys] else: - raise ValueError('Required property \'keys\' not present in KeyCollection JSON') + raise ValueError( + 'Required property \'keys\' not present in KeyCollection JSON') if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in KeyCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in KeyCollection JSON') if (next := _dict.get('next')) is not None: args['next'] = KeyCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in KeyCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in KeyCollection JSON' + ) return cls(**args) @classmethod @@ -56572,7 +60476,9 @@ def from_dict(cls, _dict: Dict) -> 'KeyCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in KeyCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in KeyCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -56632,7 +60538,9 @@ def from_dict(cls, _dict: Dict) -> 'KeyCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in KeyCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in KeyCollectionNext JSON' + ) return cls(**args) @classmethod @@ -56672,16 +60580,16 @@ class KeyIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a KeyIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['KeyIdentityById', 'KeyIdentityByCRN', 'KeyIdentityByHref', 'KeyIdentityByFingerprint']) - ) + ", ".join([ + 'KeyIdentityById', 'KeyIdentityByCRN', 'KeyIdentityByHref', + 'KeyIdentityByFingerprint' + ])) raise Exception(msg) @@ -56800,25 +60708,31 @@ def from_dict(cls, _dict: Dict) -> 'KeyReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in KeyReference JSON') + raise ValueError( + 'Required property \'crn\' not present in KeyReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = KeyReferenceDeleted.from_dict(deleted) if (fingerprint := _dict.get('fingerprint')) is not None: args['fingerprint'] = fingerprint else: - raise ValueError('Required property \'fingerprint\' not present in KeyReference JSON') + raise ValueError( + 'Required property \'fingerprint\' not present in KeyReference JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in KeyReference JSON') + raise ValueError( + 'Required property \'href\' not present in KeyReference JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in KeyReference JSON') + raise ValueError( + 'Required property \'id\' not present in KeyReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in KeyReference JSON') + raise ValueError( + 'Required property \'name\' not present in KeyReference JSON') return cls(**args) @classmethod @@ -56891,7 +60805,9 @@ def from_dict(cls, _dict: Dict) -> 'KeyReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in KeyReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in KeyReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -56931,16 +60847,15 @@ class LegacyCloudObjectStorageBucketIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LegacyCloudObjectStorageBucketIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName']) - ) + ", ".join([ + 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName' + ])) raise Exception(msg) @@ -56964,13 +60879,16 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'LegacyCloudObjectStorageBucketReference': + def from_dict(cls, + _dict: Dict) -> 'LegacyCloudObjectStorageBucketReference': """Initialize a LegacyCloudObjectStorageBucketReference object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LegacyCloudObjectStorageBucketReference JSON') + raise ValueError( + 'Required property \'name\' not present in LegacyCloudObjectStorageBucketReference JSON' + ) return cls(**args) @classmethod @@ -57199,97 +61117,150 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancer': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'created_at\' not present in LoadBalancer JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'crn\' not present in LoadBalancer JSON') if (dns := _dict.get('dns')) is not None: args['dns'] = LoadBalancerDNS.from_dict(dns) if (hostname := _dict.get('hostname')) is not None: args['hostname'] = hostname else: - raise ValueError('Required property \'hostname\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'hostname\' not present in LoadBalancer JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancer JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancer JSON') - if (instance_groups_supported := _dict.get('instance_groups_supported')) is not None: + raise ValueError( + 'Required property \'id\' not present in LoadBalancer JSON') + if (instance_groups_supported := + _dict.get('instance_groups_supported')) is not None: args['instance_groups_supported'] = instance_groups_supported else: - raise ValueError('Required property \'instance_groups_supported\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'instance_groups_supported\' not present in LoadBalancer JSON' + ) if (is_public := _dict.get('is_public')) is not None: args['is_public'] = is_public else: - raise ValueError('Required property \'is_public\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'is_public\' not present in LoadBalancer JSON' + ) if (listeners := _dict.get('listeners')) is not None: - args['listeners'] = [LoadBalancerListenerReference.from_dict(v) for v in listeners] + args['listeners'] = [ + LoadBalancerListenerReference.from_dict(v) for v in listeners + ] else: - raise ValueError('Required property \'listeners\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'listeners\' not present in LoadBalancer JSON' + ) if (logging := _dict.get('logging')) is not None: args['logging'] = LoadBalancerLogging.from_dict(logging) else: - raise ValueError('Required property \'logging\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'logging\' not present in LoadBalancer JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancer JSON') if (operating_status := _dict.get('operating_status')) is not None: args['operating_status'] = operating_status else: - raise ValueError('Required property \'operating_status\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'operating_status\' not present in LoadBalancer JSON' + ) if (pools := _dict.get('pools')) is not None: - args['pools'] = [LoadBalancerPoolReference.from_dict(v) for v in pools] + args['pools'] = [ + LoadBalancerPoolReference.from_dict(v) for v in pools + ] else: - raise ValueError('Required property \'pools\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'pools\' not present in LoadBalancer JSON') if (private_ips := _dict.get('private_ips')) is not None: - args['private_ips'] = [LoadBalancerPrivateIpsItem.from_dict(v) for v in private_ips] + args['private_ips'] = [ + LoadBalancerPrivateIpsItem.from_dict(v) for v in private_ips + ] else: - raise ValueError('Required property \'private_ips\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'private_ips\' not present in LoadBalancer JSON' + ) if (profile := _dict.get('profile')) is not None: args['profile'] = LoadBalancerProfileReference.from_dict(profile) else: - raise ValueError('Required property \'profile\' not present in LoadBalancer JSON') - if (provisioning_status := _dict.get('provisioning_status')) is not None: + raise ValueError( + 'Required property \'profile\' not present in LoadBalancer JSON' + ) + if (provisioning_status := + _dict.get('provisioning_status')) is not None: args['provisioning_status'] = provisioning_status else: - raise ValueError('Required property \'provisioning_status\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'provisioning_status\' not present in LoadBalancer JSON' + ) if (public_ips := _dict.get('public_ips')) is not None: args['public_ips'] = [IP.from_dict(v) for v in public_ips] else: - raise ValueError('Required property \'public_ips\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'public_ips\' not present in LoadBalancer JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'resource_group\' not present in LoadBalancer JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'resource_type\' not present in LoadBalancer JSON' + ) if (route_mode := _dict.get('route_mode')) is not None: args['route_mode'] = route_mode else: - raise ValueError('Required property \'route_mode\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'route_mode\' not present in LoadBalancer JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in LoadBalancer JSON') - if (security_groups_supported := _dict.get('security_groups_supported')) is not None: + raise ValueError( + 'Required property \'security_groups\' not present in LoadBalancer JSON' + ) + if (security_groups_supported := + _dict.get('security_groups_supported')) is not None: args['security_groups_supported'] = security_groups_supported else: - raise ValueError('Required property \'security_groups_supported\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'security_groups_supported\' not present in LoadBalancer JSON' + ) if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [SubnetReference.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'subnets\' not present in LoadBalancer JSON' + ) if (udp_supported := _dict.get('udp_supported')) is not None: args['udp_supported'] = udp_supported else: - raise ValueError('Required property \'udp_supported\' not present in LoadBalancer JSON') + raise ValueError( + 'Required property \'udp_supported\' not present in LoadBalancer JSON' + ) return cls(**args) @classmethod @@ -57315,7 +61286,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'instance_groups_supported') and self.instance_groups_supported is not None: + if hasattr(self, 'instance_groups_supported' + ) and self.instance_groups_supported is not None: _dict['instance_groups_supported'] = self.instance_groups_supported if hasattr(self, 'is_public') and self.is_public is not None: _dict['is_public'] = self.is_public @@ -57334,7 +61306,8 @@ def to_dict(self) -> Dict: _dict['logging'] = self.logging.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'operating_status') and self.operating_status is not None: + if hasattr(self, + 'operating_status') and self.operating_status is not None: _dict['operating_status'] = self.operating_status if hasattr(self, 'pools') and self.pools is not None: pools_list = [] @@ -57357,7 +61330,9 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'provisioning_status') and self.provisioning_status is not None: + if hasattr( + self, + 'provisioning_status') and self.provisioning_status is not None: _dict['provisioning_status'] = self.provisioning_status if hasattr(self, 'public_ips') and self.public_ips is not None: public_ips_list = [] @@ -57376,7 +61351,8 @@ def to_dict(self) -> Dict: _dict['resource_type'] = self.resource_type if hasattr(self, 'route_mode') and self.route_mode is not None: _dict['route_mode'] = self.route_mode - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -57384,7 +61360,8 @@ def to_dict(self) -> Dict: else: security_groups_list.append(v.to_dict()) _dict['security_groups'] = security_groups_list - if hasattr(self, 'security_groups_supported') and self.security_groups_supported is not None: + if hasattr(self, 'security_groups_supported' + ) and self.security_groups_supported is not None: _dict['security_groups_supported'] = self.security_groups_supported if hasattr(self, 'subnets') and self.subnets is not None: subnets_list = [] @@ -57424,7 +61401,6 @@ class OperatingStatusEnum(str, Enum): OFFLINE = 'offline' ONLINE = 'online' - class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this load balancer: @@ -57451,7 +61427,6 @@ class ProvisioningStatusEnum(str, Enum): MIGRATE_PENDING = 'migrate_pending' UPDATE_PENDING = 'update_pending' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -57460,7 +61435,6 @@ class ResourceTypeEnum(str, Enum): LOAD_BALANCER = 'load_balancer' - class LoadBalancerCollection: """ LoadBalancerCollection. @@ -57510,21 +61484,31 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerCollection': if (first := _dict.get('first')) is not None: args['first'] = LoadBalancerCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in LoadBalancerCollection JSON') + raise ValueError( + 'Required property \'first\' not present in LoadBalancerCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in LoadBalancerCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in LoadBalancerCollection JSON' + ) if (load_balancers := _dict.get('load_balancers')) is not None: - args['load_balancers'] = [LoadBalancer.from_dict(v) for v in load_balancers] + args['load_balancers'] = [ + LoadBalancer.from_dict(v) for v in load_balancers + ] else: - raise ValueError('Required property \'load_balancers\' not present in LoadBalancerCollection JSON') + raise ValueError( + 'Required property \'load_balancers\' not present in LoadBalancerCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = LoadBalancerCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in LoadBalancerCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in LoadBalancerCollection JSON' + ) return cls(**args) @classmethod @@ -57603,7 +61587,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -57663,7 +61649,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerCollectionNext JSON' + ) return cls(**args) @classmethod @@ -57703,21 +61691,21 @@ class LoadBalancerDNS: If absent, DNS `A` records for this load balancer's `hostname` property will be added to the public DNS zone `lb.appdomain.cloud`. - :param DNSInstanceReference instance: The DNS instance associated with this load - balancer. + :param DNSInstanceReferenceLoadBalancerDNSContext instance: The DNS instance + associated with this load balancer. :param DNSZoneReference zone: The DNS zone associated with this load balancer. """ def __init__( self, - instance: 'DNSInstanceReference', + instance: 'DNSInstanceReferenceLoadBalancerDNSContext', zone: 'DNSZoneReference', ) -> None: """ Initialize a LoadBalancerDNS object. - :param DNSInstanceReference instance: The DNS instance associated with this - load balancer. + :param DNSInstanceReferenceLoadBalancerDNSContext instance: The DNS + instance associated with this load balancer. :param DNSZoneReference zone: The DNS zone associated with this load balancer. """ @@ -57729,13 +61717,19 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerDNS': """Initialize a LoadBalancerDNS object from a json dictionary.""" args = {} if (instance := _dict.get('instance')) is not None: - args['instance'] = DNSInstanceReference.from_dict(instance) + args[ + 'instance'] = DNSInstanceReferenceLoadBalancerDNSContext.from_dict( + instance) else: - raise ValueError('Required property \'instance\' not present in LoadBalancerDNS JSON') + raise ValueError( + 'Required property \'instance\' not present in LoadBalancerDNS JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = DNSZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in LoadBalancerDNS JSON') + raise ValueError( + 'Required property \'zone\' not present in LoadBalancerDNS JSON' + ) return cls(**args) @classmethod @@ -57909,11 +61903,15 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerDNSPrototype': if (instance := _dict.get('instance')) is not None: args['instance'] = instance else: - raise ValueError('Required property \'instance\' not present in LoadBalancerDNSPrototype JSON') + raise ValueError( + 'Required property \'instance\' not present in LoadBalancerDNSPrototype JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in LoadBalancerDNSPrototype JSON') + raise ValueError( + 'Required property \'zone\' not present in LoadBalancerDNSPrototype JSON' + ) return cls(**args) @classmethod @@ -57961,16 +61959,16 @@ class LoadBalancerIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerIdentityById', 'LoadBalancerIdentityByCRN', 'LoadBalancerIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerIdentityById', 'LoadBalancerIdentityByCRN', + 'LoadBalancerIdentityByHref' + ])) raise Exception(msg) @@ -58116,56 +62114,88 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'LoadBalancerListener': """Initialize a LoadBalancerListener object from a json dictionary.""" args = {} - if (accept_proxy_protocol := _dict.get('accept_proxy_protocol')) is not None: + if (accept_proxy_protocol := + _dict.get('accept_proxy_protocol')) is not None: args['accept_proxy_protocol'] = accept_proxy_protocol else: - raise ValueError('Required property \'accept_proxy_protocol\' not present in LoadBalancerListener JSON') - if (certificate_instance := _dict.get('certificate_instance')) is not None: - args['certificate_instance'] = CertificateInstanceReference.from_dict(certificate_instance) + raise ValueError( + 'Required property \'accept_proxy_protocol\' not present in LoadBalancerListener JSON' + ) + if (certificate_instance := + _dict.get('certificate_instance')) is not None: + args[ + 'certificate_instance'] = CertificateInstanceReference.from_dict( + certificate_instance) if (connection_limit := _dict.get('connection_limit')) is not None: args['connection_limit'] = connection_limit else: - raise ValueError('Required property \'connection_limit\' not present in LoadBalancerListener JSON') + raise ValueError( + 'Required property \'connection_limit\' not present in LoadBalancerListener JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in LoadBalancerListener JSON') + raise ValueError( + 'Required property \'created_at\' not present in LoadBalancerListener JSON' + ) if (default_pool := _dict.get('default_pool')) is not None: - args['default_pool'] = LoadBalancerPoolReference.from_dict(default_pool) + args['default_pool'] = LoadBalancerPoolReference.from_dict( + default_pool) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListener JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListener JSON' + ) if (https_redirect := _dict.get('https_redirect')) is not None: - args['https_redirect'] = LoadBalancerListenerHTTPSRedirect.from_dict(https_redirect) + args[ + 'https_redirect'] = LoadBalancerListenerHTTPSRedirect.from_dict( + https_redirect) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListener JSON') - if (idle_connection_timeout := _dict.get('idle_connection_timeout')) is not None: + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListener JSON' + ) + if (idle_connection_timeout := + _dict.get('idle_connection_timeout')) is not None: args['idle_connection_timeout'] = idle_connection_timeout if (policies := _dict.get('policies')) is not None: - args['policies'] = [LoadBalancerListenerPolicyReference.from_dict(v) for v in policies] + args['policies'] = [ + LoadBalancerListenerPolicyReference.from_dict(v) + for v in policies + ] if (port := _dict.get('port')) is not None: args['port'] = port else: - raise ValueError('Required property \'port\' not present in LoadBalancerListener JSON') + raise ValueError( + 'Required property \'port\' not present in LoadBalancerListener JSON' + ) if (port_max := _dict.get('port_max')) is not None: args['port_max'] = port_max else: - raise ValueError('Required property \'port_max\' not present in LoadBalancerListener JSON') + raise ValueError( + 'Required property \'port_max\' not present in LoadBalancerListener JSON' + ) if (port_min := _dict.get('port_min')) is not None: args['port_min'] = port_min else: - raise ValueError('Required property \'port_min\' not present in LoadBalancerListener JSON') + raise ValueError( + 'Required property \'port_min\' not present in LoadBalancerListener JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in LoadBalancerListener JSON') - if (provisioning_status := _dict.get('provisioning_status')) is not None: + raise ValueError( + 'Required property \'protocol\' not present in LoadBalancerListener JSON' + ) + if (provisioning_status := + _dict.get('provisioning_status')) is not None: args['provisioning_status'] = provisioning_status else: - raise ValueError('Required property \'provisioning_status\' not present in LoadBalancerListener JSON') + raise ValueError( + 'Required property \'provisioning_status\' not present in LoadBalancerListener JSON' + ) return cls(**args) @classmethod @@ -58176,14 +62206,19 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'accept_proxy_protocol') and self.accept_proxy_protocol is not None: + if hasattr(self, 'accept_proxy_protocol' + ) and self.accept_proxy_protocol is not None: _dict['accept_proxy_protocol'] = self.accept_proxy_protocol - if hasattr(self, 'certificate_instance') and self.certificate_instance is not None: + if hasattr(self, 'certificate_instance' + ) and self.certificate_instance is not None: if isinstance(self.certificate_instance, dict): _dict['certificate_instance'] = self.certificate_instance else: - _dict['certificate_instance'] = self.certificate_instance.to_dict() - if hasattr(self, 'connection_limit') and self.connection_limit is not None: + _dict[ + 'certificate_instance'] = self.certificate_instance.to_dict( + ) + if hasattr(self, + 'connection_limit') and self.connection_limit is not None: _dict['connection_limit'] = self.connection_limit if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -58201,7 +62236,8 @@ def to_dict(self) -> Dict: _dict['https_redirect'] = self.https_redirect.to_dict() if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'idle_connection_timeout') and self.idle_connection_timeout is not None: + if hasattr(self, 'idle_connection_timeout' + ) and self.idle_connection_timeout is not None: _dict['idle_connection_timeout'] = self.idle_connection_timeout if hasattr(self, 'policies') and self.policies is not None: policies_list = [] @@ -58219,7 +62255,9 @@ def to_dict(self) -> Dict: _dict['port_min'] = self.port_min if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'provisioning_status') and self.provisioning_status is not None: + if hasattr( + self, + 'provisioning_status') and self.provisioning_status is not None: _dict['provisioning_status'] = self.provisioning_status return _dict @@ -58254,7 +62292,6 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' - class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this listener @@ -58270,7 +62307,6 @@ class ProvisioningStatusEnum(str, Enum): UPDATE_PENDING = 'update_pending' - class LoadBalancerListenerCollection: """ LoadBalancerListenerCollection. @@ -58294,9 +62330,13 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerCollection': """Initialize a LoadBalancerListenerCollection object from a json dictionary.""" args = {} if (listeners := _dict.get('listeners')) is not None: - args['listeners'] = [LoadBalancerListener.from_dict(v) for v in listeners] + args['listeners'] = [ + LoadBalancerListener.from_dict(v) for v in listeners + ] else: - raise ValueError('Required property \'listeners\' not present in LoadBalancerListenerCollection JSON') + raise ValueError( + 'Required property \'listeners\' not present in LoadBalancerListenerCollection JSON' + ) return cls(**args) @classmethod @@ -58348,16 +62388,16 @@ class LoadBalancerListenerDefaultPoolPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerListenerDefaultPoolPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById', 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById', + 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref' + ])) raise Exception(msg) @@ -58395,11 +62435,15 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerHTTPSRedirect': if (http_status_code := _dict.get('http_status_code')) is not None: args['http_status_code'] = http_status_code else: - raise ValueError('Required property \'http_status_code\' not present in LoadBalancerListenerHTTPSRedirect JSON') + raise ValueError( + 'Required property \'http_status_code\' not present in LoadBalancerListenerHTTPSRedirect JSON' + ) if (listener := _dict.get('listener')) is not None: args['listener'] = LoadBalancerListenerReference.from_dict(listener) else: - raise ValueError('Required property \'listener\' not present in LoadBalancerListenerHTTPSRedirect JSON') + raise ValueError( + 'Required property \'listener\' not present in LoadBalancerListenerHTTPSRedirect JSON' + ) if (uri := _dict.get('uri')) is not None: args['uri'] = uri return cls(**args) @@ -58412,7 +62456,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'listener') and self.listener is not None: if isinstance(self.listener, dict): @@ -58492,7 +62537,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'listener') and self.listener is not None: if isinstance(self.listener, dict): @@ -58552,17 +62598,22 @@ def __init__( self.uri = uri @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerHTTPSRedirectPrototype': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerListenerHTTPSRedirectPrototype': """Initialize a LoadBalancerListenerHTTPSRedirectPrototype object from a json dictionary.""" args = {} if (http_status_code := _dict.get('http_status_code')) is not None: args['http_status_code'] = http_status_code else: - raise ValueError('Required property \'http_status_code\' not present in LoadBalancerListenerHTTPSRedirectPrototype JSON') + raise ValueError( + 'Required property \'http_status_code\' not present in LoadBalancerListenerHTTPSRedirectPrototype JSON' + ) if (listener := _dict.get('listener')) is not None: args['listener'] = listener else: - raise ValueError('Required property \'listener\' not present in LoadBalancerListenerHTTPSRedirectPrototype JSON') + raise ValueError( + 'Required property \'listener\' not present in LoadBalancerListenerHTTPSRedirectPrototype JSON' + ) if (uri := _dict.get('uri')) is not None: args['uri'] = uri return cls(**args) @@ -58575,7 +62626,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'listener') and self.listener is not None: if isinstance(self.listener, dict): @@ -58594,13 +62646,15 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerHTTPSRedirectPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerHTTPSRedirectPrototype') -> bool: + def __eq__(self, + other: 'LoadBalancerListenerHTTPSRedirectPrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerHTTPSRedirectPrototype') -> bool: + def __ne__(self, + other: 'LoadBalancerListenerHTTPSRedirectPrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -58611,16 +62665,16 @@ class LoadBalancerListenerIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerListenerIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerListenerIdentityById', 'LoadBalancerListenerIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerListenerIdentityById', + 'LoadBalancerListenerIdentityByHref' + ])) raise Exception(msg) @@ -58700,7 +62754,8 @@ def __init__( certificate_instance: Optional['CertificateInstanceIdentity'] = None, connection_limit: Optional[int] = None, default_pool: Optional['LoadBalancerListenerDefaultPoolPatch'] = None, - https_redirect: Optional['LoadBalancerListenerHTTPSRedirectPatch'] = None, + https_redirect: Optional[ + 'LoadBalancerListenerHTTPSRedirectPatch'] = None, idle_connection_timeout: Optional[int] = None, port: Optional[int] = None, port_max: Optional[int] = None, @@ -58795,17 +62850,22 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPatch': """Initialize a LoadBalancerListenerPatch object from a json dictionary.""" args = {} - if (accept_proxy_protocol := _dict.get('accept_proxy_protocol')) is not None: + if (accept_proxy_protocol := + _dict.get('accept_proxy_protocol')) is not None: args['accept_proxy_protocol'] = accept_proxy_protocol - if (certificate_instance := _dict.get('certificate_instance')) is not None: + if (certificate_instance := + _dict.get('certificate_instance')) is not None: args['certificate_instance'] = certificate_instance if (connection_limit := _dict.get('connection_limit')) is not None: args['connection_limit'] = connection_limit if (default_pool := _dict.get('default_pool')) is not None: args['default_pool'] = default_pool if (https_redirect := _dict.get('https_redirect')) is not None: - args['https_redirect'] = LoadBalancerListenerHTTPSRedirectPatch.from_dict(https_redirect) - if (idle_connection_timeout := _dict.get('idle_connection_timeout')) is not None: + args[ + 'https_redirect'] = LoadBalancerListenerHTTPSRedirectPatch.from_dict( + https_redirect) + if (idle_connection_timeout := + _dict.get('idle_connection_timeout')) is not None: args['idle_connection_timeout'] = idle_connection_timeout if (port := _dict.get('port')) is not None: args['port'] = port @@ -58825,14 +62885,19 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'accept_proxy_protocol') and self.accept_proxy_protocol is not None: + if hasattr(self, 'accept_proxy_protocol' + ) and self.accept_proxy_protocol is not None: _dict['accept_proxy_protocol'] = self.accept_proxy_protocol - if hasattr(self, 'certificate_instance') and self.certificate_instance is not None: + if hasattr(self, 'certificate_instance' + ) and self.certificate_instance is not None: if isinstance(self.certificate_instance, dict): _dict['certificate_instance'] = self.certificate_instance else: - _dict['certificate_instance'] = self.certificate_instance.to_dict() - if hasattr(self, 'connection_limit') and self.connection_limit is not None: + _dict[ + 'certificate_instance'] = self.certificate_instance.to_dict( + ) + if hasattr(self, + 'connection_limit') and self.connection_limit is not None: _dict['connection_limit'] = self.connection_limit if hasattr(self, 'default_pool') and self.default_pool is not None: if isinstance(self.default_pool, dict): @@ -58844,7 +62909,8 @@ def to_dict(self) -> Dict: _dict['https_redirect'] = self.https_redirect else: _dict['https_redirect'] = self.https_redirect.to_dict() - if hasattr(self, 'idle_connection_timeout') and self.idle_connection_timeout is not None: + if hasattr(self, 'idle_connection_timeout' + ) and self.idle_connection_timeout is not None: _dict['idle_connection_timeout'] = self.idle_connection_timeout if hasattr(self, 'port') and self.port is not None: _dict['port'] = self.port @@ -58895,7 +62961,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class LoadBalancerListenerPolicy: """ LoadBalancerListenerPolicy. @@ -58998,35 +63063,55 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicy': if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in LoadBalancerListenerPolicy JSON') + raise ValueError( + 'Required property \'action\' not present in LoadBalancerListenerPolicy JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in LoadBalancerListenerPolicy JSON') + raise ValueError( + 'Required property \'created_at\' not present in LoadBalancerListenerPolicy JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerPolicy JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerPolicy JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerPolicy JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerPolicy JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerListenerPolicy JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerListenerPolicy JSON' + ) if (priority := _dict.get('priority')) is not None: args['priority'] = priority else: - raise ValueError('Required property \'priority\' not present in LoadBalancerListenerPolicy JSON') - if (provisioning_status := _dict.get('provisioning_status')) is not None: + raise ValueError( + 'Required property \'priority\' not present in LoadBalancerListenerPolicy JSON' + ) + if (provisioning_status := + _dict.get('provisioning_status')) is not None: args['provisioning_status'] = provisioning_status else: - raise ValueError('Required property \'provisioning_status\' not present in LoadBalancerListenerPolicy JSON') + raise ValueError( + 'Required property \'provisioning_status\' not present in LoadBalancerListenerPolicy JSON' + ) if (rules := _dict.get('rules')) is not None: - args['rules'] = [LoadBalancerListenerPolicyRuleReference.from_dict(v) for v in rules] + args['rules'] = [ + LoadBalancerListenerPolicyRuleReference.from_dict(v) + for v in rules + ] else: - raise ValueError('Required property \'rules\' not present in LoadBalancerListenerPolicy JSON') + raise ValueError( + 'Required property \'rules\' not present in LoadBalancerListenerPolicy JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = target return cls(**args) @@ -59051,7 +63136,9 @@ def to_dict(self) -> Dict: _dict['name'] = self.name if hasattr(self, 'priority') and self.priority is not None: _dict['priority'] = self.priority - if hasattr(self, 'provisioning_status') and self.provisioning_status is not None: + if hasattr( + self, + 'provisioning_status') and self.provisioning_status is not None: _dict['provisioning_status'] = self.provisioning_status if hasattr(self, 'rules') and self.rules is not None: rules_list = [] @@ -59106,7 +63193,6 @@ class ActionEnum(str, Enum): REDIRECT = 'redirect' REJECT = 'reject' - class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this policy @@ -59122,7 +63208,6 @@ class ProvisioningStatusEnum(str, Enum): UPDATE_PENDING = 'update_pending' - class LoadBalancerListenerPolicyCollection: """ LoadBalancerListenerPolicyCollection. @@ -59146,9 +63231,13 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyCollection': """Initialize a LoadBalancerListenerPolicyCollection object from a json dictionary.""" args = {} if (policies := _dict.get('policies')) is not None: - args['policies'] = [LoadBalancerListenerPolicy.from_dict(v) for v in policies] + args['policies'] = [ + LoadBalancerListenerPolicy.from_dict(v) for v in policies + ] else: - raise ValueError('Required property \'policies\' not present in LoadBalancerListenerPolicyCollection JSON') + raise ValueError( + 'Required property \'policies\' not present in LoadBalancerListenerPolicyCollection JSON' + ) return cls(**args) @classmethod @@ -59363,15 +63452,22 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyPrototype': if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in LoadBalancerListenerPolicyPrototype JSON') + raise ValueError( + 'Required property \'action\' not present in LoadBalancerListenerPolicyPrototype JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name if (priority := _dict.get('priority')) is not None: args['priority'] = priority else: - raise ValueError('Required property \'priority\' not present in LoadBalancerListenerPolicyPrototype JSON') + raise ValueError( + 'Required property \'priority\' not present in LoadBalancerListenerPolicyPrototype JSON' + ) if (rules := _dict.get('rules')) is not None: - args['rules'] = [LoadBalancerListenerPolicyRulePrototype.from_dict(v) for v in rules] + args['rules'] = [ + LoadBalancerListenerPolicyRulePrototype.from_dict(v) + for v in rules + ] if (target := _dict.get('target')) is not None: args['target'] = target return cls(**args) @@ -59444,7 +63540,6 @@ class ActionEnum(str, Enum): REJECT = 'reject' - class LoadBalancerListenerPolicyReference: """ LoadBalancerListenerPolicyReference. @@ -59489,19 +63584,27 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyReference': """Initialize a LoadBalancerListenerPolicyReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = LoadBalancerListenerPolicyReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = LoadBalancerListenerPolicyReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerPolicyReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerPolicyReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerPolicyReference JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerPolicyReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerListenerPolicyReference JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerListenerPolicyReference JSON' + ) return cls(**args) @classmethod @@ -59564,13 +63667,16 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyReferenceDeleted': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerListenerPolicyReferenceDeleted': """Initialize a LoadBalancerListenerPolicyReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in LoadBalancerListenerPolicyReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in LoadBalancerListenerPolicyReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -59593,13 +63699,15 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyReferenceDeleted') -> bool: + def __eq__(self, + other: 'LoadBalancerListenerPolicyReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyReferenceDeleted') -> bool: + def __ne__(self, + other: 'LoadBalancerListenerPolicyReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -59684,33 +63792,48 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyRule': if (condition := _dict.get('condition')) is not None: args['condition'] = condition else: - raise ValueError('Required property \'condition\' not present in LoadBalancerListenerPolicyRule JSON') + raise ValueError( + 'Required property \'condition\' not present in LoadBalancerListenerPolicyRule JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in LoadBalancerListenerPolicyRule JSON') + raise ValueError( + 'Required property \'created_at\' not present in LoadBalancerListenerPolicyRule JSON' + ) if (field := _dict.get('field')) is not None: args['field'] = field if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerPolicyRule JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerPolicyRule JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerPolicyRule JSON') - if (provisioning_status := _dict.get('provisioning_status')) is not None: + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerPolicyRule JSON' + ) + if (provisioning_status := + _dict.get('provisioning_status')) is not None: args['provisioning_status'] = provisioning_status else: - raise ValueError('Required property \'provisioning_status\' not present in LoadBalancerListenerPolicyRule JSON') + raise ValueError( + 'Required property \'provisioning_status\' not present in LoadBalancerListenerPolicyRule JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerListenerPolicyRule JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerListenerPolicyRule JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in LoadBalancerListenerPolicyRule JSON') + raise ValueError( + 'Required property \'value\' not present in LoadBalancerListenerPolicyRule JSON' + ) return cls(**args) @classmethod @@ -59731,7 +63854,9 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'provisioning_status') and self.provisioning_status is not None: + if hasattr( + self, + 'provisioning_status') and self.provisioning_status is not None: _dict['provisioning_status'] = self.provisioning_status if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type @@ -59766,7 +63891,6 @@ class ConditionEnum(str, Enum): EQUALS = 'equals' MATCHES_REGEX = 'matches_regex' - class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this rule @@ -59781,7 +63905,6 @@ class ProvisioningStatusEnum(str, Enum): FAILED = 'failed' UPDATE_PENDING = 'update_pending' - class TypeEnum(str, Enum): """ The type of the rule. @@ -59796,7 +63919,6 @@ class TypeEnum(str, Enum): QUERY = 'query' - class LoadBalancerListenerPolicyRuleCollection: """ LoadBalancerListenerPolicyRuleCollection. @@ -59816,13 +63938,18 @@ def __init__( self.rules = rules @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyRuleCollection': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerListenerPolicyRuleCollection': """Initialize a LoadBalancerListenerPolicyRuleCollection object from a json dictionary.""" args = {} if (rules := _dict.get('rules')) is not None: - args['rules'] = [LoadBalancerListenerPolicyRule.from_dict(v) for v in rules] + args['rules'] = [ + LoadBalancerListenerPolicyRule.from_dict(v) for v in rules + ] else: - raise ValueError('Required property \'rules\' not present in LoadBalancerListenerPolicyRuleCollection JSON') + raise ValueError( + 'Required property \'rules\' not present in LoadBalancerListenerPolicyRuleCollection JSON' + ) return cls(**args) @classmethod @@ -59972,7 +64099,6 @@ class ConditionEnum(str, Enum): EQUALS = 'equals' MATCHES_REGEX = 'matches_regex' - class TypeEnum(str, Enum): """ The type of the rule. @@ -59987,7 +64113,6 @@ class TypeEnum(str, Enum): QUERY = 'query' - class LoadBalancerListenerPolicyRulePrototype: """ LoadBalancerListenerPolicyRulePrototype. @@ -60040,23 +64165,30 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyRulePrototype': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerListenerPolicyRulePrototype': """Initialize a LoadBalancerListenerPolicyRulePrototype object from a json dictionary.""" args = {} if (condition := _dict.get('condition')) is not None: args['condition'] = condition else: - raise ValueError('Required property \'condition\' not present in LoadBalancerListenerPolicyRulePrototype JSON') + raise ValueError( + 'Required property \'condition\' not present in LoadBalancerListenerPolicyRulePrototype JSON' + ) if (field := _dict.get('field')) is not None: args['field'] = field if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerListenerPolicyRulePrototype JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerListenerPolicyRulePrototype JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in LoadBalancerListenerPolicyRulePrototype JSON') + raise ValueError( + 'Required property \'value\' not present in LoadBalancerListenerPolicyRulePrototype JSON' + ) return cls(**args) @classmethod @@ -60104,7 +64236,6 @@ class ConditionEnum(str, Enum): EQUALS = 'equals' MATCHES_REGEX = 'matches_regex' - class TypeEnum(str, Enum): """ The type of the rule. @@ -60119,7 +64250,6 @@ class TypeEnum(str, Enum): QUERY = 'query' - class LoadBalancerListenerPolicyRuleReference: """ LoadBalancerListenerPolicyRuleReference. @@ -60137,7 +64267,8 @@ def __init__( href: str, id: str, *, - deleted: Optional['LoadBalancerListenerPolicyRuleReferenceDeleted'] = None, + deleted: Optional[ + 'LoadBalancerListenerPolicyRuleReferenceDeleted'] = None, ) -> None: """ Initialize a LoadBalancerListenerPolicyRuleReference object. @@ -60154,19 +64285,26 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyRuleReference': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerListenerPolicyRuleReference': """Initialize a LoadBalancerListenerPolicyRuleReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = LoadBalancerListenerPolicyRuleReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = LoadBalancerListenerPolicyRuleReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerPolicyRuleReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerPolicyRuleReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerPolicyRuleReference JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerPolicyRuleReference JSON' + ) return cls(**args) @classmethod @@ -60227,13 +64365,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyRuleReferenceDeleted': + def from_dict( + cls, + _dict: Dict) -> 'LoadBalancerListenerPolicyRuleReferenceDeleted': """Initialize a LoadBalancerListenerPolicyRuleReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in LoadBalancerListenerPolicyRuleReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in LoadBalancerListenerPolicyRuleReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -60256,13 +64398,15 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyRuleReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyRuleReferenceDeleted') -> bool: + def __eq__(self, + other: 'LoadBalancerListenerPolicyRuleReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyRuleReferenceDeleted') -> bool: + def __ne__(self, + other: 'LoadBalancerListenerPolicyRuleReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -60277,16 +64421,17 @@ class LoadBalancerListenerPolicyTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerListenerPolicyTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerListenerPolicyTargetLoadBalancerPoolReference', 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect', 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL']) - ) + ", ".join([ + 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReference', + 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect', + 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL' + ])) raise Exception(msg) @@ -60299,16 +64444,17 @@ class LoadBalancerListenerPolicyTargetPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerListenerPolicyTargetPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch']) - ) + ", ".join([ + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity', + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch', + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch' + ])) raise Exception(msg) @@ -60322,16 +64468,17 @@ class LoadBalancerListenerPolicyTargetPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerListenerPolicyTargetPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype']) - ) + ", ".join([ + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity', + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype', + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype' + ])) raise Exception(msg) @@ -60412,7 +64559,8 @@ def __init__( certificate_instance: Optional['CertificateInstanceIdentity'] = None, connection_limit: Optional[int] = None, default_pool: Optional['LoadBalancerPoolIdentityByName'] = None, - https_redirect: Optional['LoadBalancerListenerHTTPSRedirectPrototype'] = None, + https_redirect: Optional[ + 'LoadBalancerListenerHTTPSRedirectPrototype'] = None, idle_connection_timeout: Optional[int] = None, port: Optional[int] = None, port_max: Optional[int] = None, @@ -60504,20 +64652,28 @@ def __init__( self.protocol = protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPrototypeLoadBalancerContext': + def from_dict( + cls, + _dict: Dict) -> 'LoadBalancerListenerPrototypeLoadBalancerContext': """Initialize a LoadBalancerListenerPrototypeLoadBalancerContext object from a json dictionary.""" args = {} - if (accept_proxy_protocol := _dict.get('accept_proxy_protocol')) is not None: + if (accept_proxy_protocol := + _dict.get('accept_proxy_protocol')) is not None: args['accept_proxy_protocol'] = accept_proxy_protocol - if (certificate_instance := _dict.get('certificate_instance')) is not None: + if (certificate_instance := + _dict.get('certificate_instance')) is not None: args['certificate_instance'] = certificate_instance if (connection_limit := _dict.get('connection_limit')) is not None: args['connection_limit'] = connection_limit if (default_pool := _dict.get('default_pool')) is not None: - args['default_pool'] = LoadBalancerPoolIdentityByName.from_dict(default_pool) + args['default_pool'] = LoadBalancerPoolIdentityByName.from_dict( + default_pool) if (https_redirect := _dict.get('https_redirect')) is not None: - args['https_redirect'] = LoadBalancerListenerHTTPSRedirectPrototype.from_dict(https_redirect) - if (idle_connection_timeout := _dict.get('idle_connection_timeout')) is not None: + args[ + 'https_redirect'] = LoadBalancerListenerHTTPSRedirectPrototype.from_dict( + https_redirect) + if (idle_connection_timeout := + _dict.get('idle_connection_timeout')) is not None: args['idle_connection_timeout'] = idle_connection_timeout if (port := _dict.get('port')) is not None: args['port'] = port @@ -60528,7 +64684,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPrototypeLoadBalancerCon if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in LoadBalancerListenerPrototypeLoadBalancerContext JSON') + raise ValueError( + 'Required property \'protocol\' not present in LoadBalancerListenerPrototypeLoadBalancerContext JSON' + ) return cls(**args) @classmethod @@ -60539,14 +64697,19 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'accept_proxy_protocol') and self.accept_proxy_protocol is not None: + if hasattr(self, 'accept_proxy_protocol' + ) and self.accept_proxy_protocol is not None: _dict['accept_proxy_protocol'] = self.accept_proxy_protocol - if hasattr(self, 'certificate_instance') and self.certificate_instance is not None: + if hasattr(self, 'certificate_instance' + ) and self.certificate_instance is not None: if isinstance(self.certificate_instance, dict): _dict['certificate_instance'] = self.certificate_instance else: - _dict['certificate_instance'] = self.certificate_instance.to_dict() - if hasattr(self, 'connection_limit') and self.connection_limit is not None: + _dict[ + 'certificate_instance'] = self.certificate_instance.to_dict( + ) + if hasattr(self, + 'connection_limit') and self.connection_limit is not None: _dict['connection_limit'] = self.connection_limit if hasattr(self, 'default_pool') and self.default_pool is not None: if isinstance(self.default_pool, dict): @@ -60558,7 +64721,8 @@ def to_dict(self) -> Dict: _dict['https_redirect'] = self.https_redirect else: _dict['https_redirect'] = self.https_redirect.to_dict() - if hasattr(self, 'idle_connection_timeout') and self.idle_connection_timeout is not None: + if hasattr(self, 'idle_connection_timeout' + ) and self.idle_connection_timeout is not None: _dict['idle_connection_timeout'] = self.idle_connection_timeout if hasattr(self, 'port') and self.port is not None: _dict['port'] = self.port @@ -60578,13 +64742,17 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPrototypeLoadBalancerContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPrototypeLoadBalancerContext') -> bool: + def __eq__( + self, + other: 'LoadBalancerListenerPrototypeLoadBalancerContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPrototypeLoadBalancerContext') -> bool: + def __ne__( + self, + other: 'LoadBalancerListenerPrototypeLoadBalancerContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -60608,7 +64776,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class LoadBalancerListenerReference: """ LoadBalancerListenerReference. @@ -60646,15 +64813,20 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerReference': """Initialize a LoadBalancerListenerReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = LoadBalancerListenerReferenceDeleted.from_dict(deleted) + args['deleted'] = LoadBalancerListenerReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerReference JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerReference JSON' + ) return cls(**args) @classmethod @@ -60721,7 +64893,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in LoadBalancerListenerReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in LoadBalancerListenerReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -60782,7 +64956,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerLogging': if (datapath := _dict.get('datapath')) is not None: args['datapath'] = LoadBalancerLoggingDatapath.from_dict(datapath) else: - raise ValueError('Required property \'datapath\' not present in LoadBalancerLogging JSON') + raise ValueError( + 'Required property \'datapath\' not present in LoadBalancerLogging JSON' + ) return cls(**args) @classmethod @@ -60846,7 +65022,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerLoggingDatapath': if (active := _dict.get('active')) is not None: args['active'] = active else: - raise ValueError('Required property \'active\' not present in LoadBalancerLoggingDatapath JSON') + raise ValueError( + 'Required property \'active\' not present in LoadBalancerLoggingDatapath JSON' + ) return cls(**args) @classmethod @@ -61026,7 +65204,8 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerLoggingPatch': """Initialize a LoadBalancerLoggingPatch object from a json dictionary.""" args = {} if (datapath := _dict.get('datapath')) is not None: - args['datapath'] = LoadBalancerLoggingDatapathPatch.from_dict(datapath) + args['datapath'] = LoadBalancerLoggingDatapathPatch.from_dict( + datapath) return cls(**args) @classmethod @@ -61089,7 +65268,8 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerLoggingPrototype': """Initialize a LoadBalancerLoggingPrototype object from a json dictionary.""" args = {} if (datapath := _dict.get('datapath')) is not None: - args['datapath'] = LoadBalancerLoggingDatapathPrototype.from_dict(datapath) + args['datapath'] = LoadBalancerLoggingDatapathPrototype.from_dict( + datapath) return cls(**args) @classmethod @@ -61282,6 +65462,8 @@ class LoadBalancerPool: `disabled`). :param LoadBalancerPoolSessionPersistence session_persistence: (optional) The session persistence of this pool. + If absent, session persistence will be disabled, and traffic will be distributed + across backend server members of the pool. """ def __init__( @@ -61298,7 +65480,8 @@ def __init__( *, instance_group: Optional['InstanceGroupReference'] = None, members: Optional[List['LoadBalancerPoolMemberReference']] = None, - session_persistence: Optional['LoadBalancerPoolSessionPersistence'] = None, + session_persistence: Optional[ + 'LoadBalancerPoolSessionPersistence'] = None, ) -> None: """ Initialize a LoadBalancerPool object. @@ -61331,6 +65514,9 @@ def __init__( backend server members of the pool. :param LoadBalancerPoolSessionPersistence session_persistence: (optional) The session persistence of this pool. + If absent, session persistence will be disabled, and traffic will be + distributed + across backend server members of the pool. """ self.algorithm = algorithm self.created_at = created_at @@ -61352,45 +65538,70 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPool': if (algorithm := _dict.get('algorithm')) is not None: args['algorithm'] = algorithm else: - raise ValueError('Required property \'algorithm\' not present in LoadBalancerPool JSON') + raise ValueError( + 'Required property \'algorithm\' not present in LoadBalancerPool JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in LoadBalancerPool JSON') + raise ValueError( + 'Required property \'created_at\' not present in LoadBalancerPool JSON' + ) if (health_monitor := _dict.get('health_monitor')) is not None: - args['health_monitor'] = LoadBalancerPoolHealthMonitor.from_dict(health_monitor) + args['health_monitor'] = LoadBalancerPoolHealthMonitor.from_dict( + health_monitor) else: - raise ValueError('Required property \'health_monitor\' not present in LoadBalancerPool JSON') + raise ValueError( + 'Required property \'health_monitor\' not present in LoadBalancerPool JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPool JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPool JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPool JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPool JSON') if (instance_group := _dict.get('instance_group')) is not None: - args['instance_group'] = InstanceGroupReference.from_dict(instance_group) + args['instance_group'] = InstanceGroupReference.from_dict( + instance_group) if (members := _dict.get('members')) is not None: - args['members'] = [LoadBalancerPoolMemberReference.from_dict(v) for v in members] + args['members'] = [ + LoadBalancerPoolMemberReference.from_dict(v) for v in members + ] if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerPool JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerPool JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in LoadBalancerPool JSON') - if (provisioning_status := _dict.get('provisioning_status')) is not None: + raise ValueError( + 'Required property \'protocol\' not present in LoadBalancerPool JSON' + ) + if (provisioning_status := + _dict.get('provisioning_status')) is not None: args['provisioning_status'] = provisioning_status else: - raise ValueError('Required property \'provisioning_status\' not present in LoadBalancerPool JSON') + raise ValueError( + 'Required property \'provisioning_status\' not present in LoadBalancerPool JSON' + ) if (proxy_protocol := _dict.get('proxy_protocol')) is not None: args['proxy_protocol'] = proxy_protocol else: - raise ValueError('Required property \'proxy_protocol\' not present in LoadBalancerPool JSON') - if (session_persistence := _dict.get('session_persistence')) is not None: - args['session_persistence'] = LoadBalancerPoolSessionPersistence.from_dict(session_persistence) + raise ValueError( + 'Required property \'proxy_protocol\' not present in LoadBalancerPool JSON' + ) + if (session_persistence := + _dict.get('session_persistence')) is not None: + args[ + 'session_persistence'] = LoadBalancerPoolSessionPersistence.from_dict( + session_persistence) return cls(**args) @classmethod @@ -61431,15 +65642,20 @@ def to_dict(self) -> Dict: _dict['name'] = self.name if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'provisioning_status') and self.provisioning_status is not None: + if hasattr( + self, + 'provisioning_status') and self.provisioning_status is not None: _dict['provisioning_status'] = self.provisioning_status if hasattr(self, 'proxy_protocol') and self.proxy_protocol is not None: _dict['proxy_protocol'] = self.proxy_protocol - if hasattr(self, 'session_persistence') and self.session_persistence is not None: + if hasattr( + self, + 'session_persistence') and self.session_persistence is not None: if isinstance(self.session_persistence, dict): _dict['session_persistence'] = self.session_persistence else: - _dict['session_persistence'] = self.session_persistence.to_dict() + _dict['session_persistence'] = self.session_persistence.to_dict( + ) return _dict def _to_dict(self): @@ -61469,7 +65685,6 @@ class AlgorithmEnum(str, Enum): ROUND_ROBIN = 'round_robin' WEIGHTED_ROUND_ROBIN = 'weighted_round_robin' - class ProtocolEnum(str, Enum): """ The protocol for this load balancer pool. @@ -61483,7 +65698,6 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' - class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this pool @@ -61498,7 +65712,6 @@ class ProvisioningStatusEnum(str, Enum): FAILED = 'failed' UPDATE_PENDING = 'update_pending' - class ProxyProtocolEnum(str, Enum): """ The PROXY protocol setting for this pool: @@ -61514,7 +65727,6 @@ class ProxyProtocolEnum(str, Enum): V2 = 'v2' - class LoadBalancerPoolCollection: """ LoadBalancerPoolCollection. @@ -61540,7 +65752,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolCollection': if (pools := _dict.get('pools')) is not None: args['pools'] = [LoadBalancerPool.from_dict(v) for v in pools] else: - raise ValueError('Required property \'pools\' not present in LoadBalancerPoolCollection JSON') + raise ValueError( + 'Required property \'pools\' not present in LoadBalancerPoolCollection JSON' + ) return cls(**args) @classmethod @@ -61640,21 +65854,29 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolHealthMonitor': if (delay := _dict.get('delay')) is not None: args['delay'] = delay else: - raise ValueError('Required property \'delay\' not present in LoadBalancerPoolHealthMonitor JSON') + raise ValueError( + 'Required property \'delay\' not present in LoadBalancerPoolHealthMonitor JSON' + ) if (max_retries := _dict.get('max_retries')) is not None: args['max_retries'] = max_retries else: - raise ValueError('Required property \'max_retries\' not present in LoadBalancerPoolHealthMonitor JSON') + raise ValueError( + 'Required property \'max_retries\' not present in LoadBalancerPoolHealthMonitor JSON' + ) if (port := _dict.get('port')) is not None: args['port'] = port if (timeout := _dict.get('timeout')) is not None: args['timeout'] = timeout else: - raise ValueError('Required property \'timeout\' not present in LoadBalancerPoolHealthMonitor JSON') + raise ValueError( + 'Required property \'timeout\' not present in LoadBalancerPoolHealthMonitor JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerPoolHealthMonitor JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerPoolHealthMonitor JSON' + ) if (url_path := _dict.get('url_path')) is not None: args['url_path'] = url_path return cls(**args) @@ -61712,7 +65934,6 @@ class TypeEnum(str, Enum): TCP = 'tcp' - class LoadBalancerPoolHealthMonitorPatch: """ LoadBalancerPoolHealthMonitorPatch. @@ -61773,21 +65994,29 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolHealthMonitorPatch': if (delay := _dict.get('delay')) is not None: args['delay'] = delay else: - raise ValueError('Required property \'delay\' not present in LoadBalancerPoolHealthMonitorPatch JSON') + raise ValueError( + 'Required property \'delay\' not present in LoadBalancerPoolHealthMonitorPatch JSON' + ) if (max_retries := _dict.get('max_retries')) is not None: args['max_retries'] = max_retries else: - raise ValueError('Required property \'max_retries\' not present in LoadBalancerPoolHealthMonitorPatch JSON') + raise ValueError( + 'Required property \'max_retries\' not present in LoadBalancerPoolHealthMonitorPatch JSON' + ) if (port := _dict.get('port')) is not None: args['port'] = port if (timeout := _dict.get('timeout')) is not None: args['timeout'] = timeout else: - raise ValueError('Required property \'timeout\' not present in LoadBalancerPoolHealthMonitorPatch JSON') + raise ValueError( + 'Required property \'timeout\' not present in LoadBalancerPoolHealthMonitorPatch JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerPoolHealthMonitorPatch JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerPoolHealthMonitorPatch JSON' + ) if (url_path := _dict.get('url_path')) is not None: args['url_path'] = url_path return cls(**args) @@ -61842,7 +66071,6 @@ class TypeEnum(str, Enum): TCP = 'tcp' - class LoadBalancerPoolHealthMonitorPrototype: """ LoadBalancerPoolHealthMonitorPrototype. @@ -61901,21 +66129,29 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolHealthMonitorPrototype': if (delay := _dict.get('delay')) is not None: args['delay'] = delay else: - raise ValueError('Required property \'delay\' not present in LoadBalancerPoolHealthMonitorPrototype JSON') + raise ValueError( + 'Required property \'delay\' not present in LoadBalancerPoolHealthMonitorPrototype JSON' + ) if (max_retries := _dict.get('max_retries')) is not None: args['max_retries'] = max_retries else: - raise ValueError('Required property \'max_retries\' not present in LoadBalancerPoolHealthMonitorPrototype JSON') + raise ValueError( + 'Required property \'max_retries\' not present in LoadBalancerPoolHealthMonitorPrototype JSON' + ) if (port := _dict.get('port')) is not None: args['port'] = port if (timeout := _dict.get('timeout')) is not None: args['timeout'] = timeout else: - raise ValueError('Required property \'timeout\' not present in LoadBalancerPoolHealthMonitorPrototype JSON') + raise ValueError( + 'Required property \'timeout\' not present in LoadBalancerPoolHealthMonitorPrototype JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerPoolHealthMonitorPrototype JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerPoolHealthMonitorPrototype JSON' + ) if (url_path := _dict.get('url_path')) is not None: args['url_path'] = url_path return cls(**args) @@ -61970,23 +66206,22 @@ class TypeEnum(str, Enum): TCP = 'tcp' - class LoadBalancerPoolIdentity: """ Identifies a load balancer pool by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerPoolIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById', + 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ])) raise Exception(msg) @@ -62017,7 +66252,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerPoolIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerPoolIdentityByName JSON' + ) return cls(**args) @classmethod @@ -62138,31 +66375,46 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMember': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in LoadBalancerPoolMember JSON') + raise ValueError( + 'Required property \'created_at\' not present in LoadBalancerPoolMember JSON' + ) if (health := _dict.get('health')) is not None: args['health'] = health else: - raise ValueError('Required property \'health\' not present in LoadBalancerPoolMember JSON') + raise ValueError( + 'Required property \'health\' not present in LoadBalancerPoolMember JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPoolMember JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPoolMember JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPoolMember JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPoolMember JSON' + ) if (port := _dict.get('port')) is not None: args['port'] = port else: - raise ValueError('Required property \'port\' not present in LoadBalancerPoolMember JSON') - if (provisioning_status := _dict.get('provisioning_status')) is not None: + raise ValueError( + 'Required property \'port\' not present in LoadBalancerPoolMember JSON' + ) + if (provisioning_status := + _dict.get('provisioning_status')) is not None: args['provisioning_status'] = provisioning_status else: - raise ValueError('Required property \'provisioning_status\' not present in LoadBalancerPoolMember JSON') + raise ValueError( + 'Required property \'provisioning_status\' not present in LoadBalancerPoolMember JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = target else: - raise ValueError('Required property \'target\' not present in LoadBalancerPoolMember JSON') + raise ValueError( + 'Required property \'target\' not present in LoadBalancerPoolMember JSON' + ) if (weight := _dict.get('weight')) is not None: args['weight'] = weight return cls(**args) @@ -62185,7 +66437,9 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'port') and self.port is not None: _dict['port'] = self.port - if hasattr(self, 'provisioning_status') and self.provisioning_status is not None: + if hasattr( + self, + 'provisioning_status') and self.provisioning_status is not None: _dict['provisioning_status'] = self.provisioning_status if hasattr(self, 'target') and self.target is not None: if isinstance(self.target, dict): @@ -62223,7 +66477,6 @@ class HealthEnum(str, Enum): OK = 'ok' UNKNOWN = 'unknown' - class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this member @@ -62239,7 +66492,6 @@ class ProvisioningStatusEnum(str, Enum): UPDATE_PENDING = 'update_pending' - class LoadBalancerPoolMemberCollection: """ LoadBalancerPoolMemberCollection. @@ -62263,9 +66515,13 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberCollection': """Initialize a LoadBalancerPoolMemberCollection object from a json dictionary.""" args = {} if (members := _dict.get('members')) is not None: - args['members'] = [LoadBalancerPoolMember.from_dict(v) for v in members] + args['members'] = [ + LoadBalancerPoolMember.from_dict(v) for v in members + ] else: - raise ValueError('Required property \'members\' not present in LoadBalancerPoolMemberCollection JSON') + raise ValueError( + 'Required property \'members\' not present in LoadBalancerPoolMemberCollection JSON' + ) return cls(**args) @classmethod @@ -62479,11 +66735,15 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberPrototype': if (port := _dict.get('port')) is not None: args['port'] = port else: - raise ValueError('Required property \'port\' not present in LoadBalancerPoolMemberPrototype JSON') + raise ValueError( + 'Required property \'port\' not present in LoadBalancerPoolMemberPrototype JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = target else: - raise ValueError('Required property \'target\' not present in LoadBalancerPoolMemberPrototype JSON') + raise ValueError( + 'Required property \'target\' not present in LoadBalancerPoolMemberPrototype JSON' + ) if (weight := _dict.get('weight')) is not None: args['weight'] = weight return cls(**args) @@ -62563,15 +66823,20 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberReference': """Initialize a LoadBalancerPoolMemberReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = LoadBalancerPoolMemberReferenceDeleted.from_dict(deleted) + args['deleted'] = LoadBalancerPoolMemberReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPoolMemberReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPoolMemberReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPoolMemberReference JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPoolMemberReference JSON' + ) return cls(**args) @classmethod @@ -62638,7 +66903,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in LoadBalancerPoolMemberReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in LoadBalancerPoolMemberReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -62681,16 +66948,16 @@ class LoadBalancerPoolMemberTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerPoolMemberTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerPoolMemberTargetInstanceReference', 'LoadBalancerPoolMemberTargetIP']) - ) + ", ".join([ + 'LoadBalancerPoolMemberTargetInstanceReference', + 'LoadBalancerPoolMemberTargetIP' + ])) raise Exception(msg) @@ -62703,16 +66970,16 @@ class LoadBalancerPoolMemberTargetPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerPoolMemberTargetPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerPoolMemberTargetPrototypeInstanceIdentity', 'LoadBalancerPoolMemberTargetPrototypeIP']) - ) + ", ".join([ + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentity', + 'LoadBalancerPoolMemberTargetPrototypeIP' + ])) raise Exception(msg) @@ -62751,7 +67018,8 @@ def __init__( name: Optional[str] = None, protocol: Optional[str] = None, proxy_protocol: Optional[str] = None, - session_persistence: Optional['LoadBalancerPoolSessionPersistencePatch'] = None, + session_persistence: Optional[ + 'LoadBalancerPoolSessionPersistencePatch'] = None, ) -> None: """ Initialize a LoadBalancerPoolPatch object. @@ -62793,15 +67061,20 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolPatch': if (algorithm := _dict.get('algorithm')) is not None: args['algorithm'] = algorithm if (health_monitor := _dict.get('health_monitor')) is not None: - args['health_monitor'] = LoadBalancerPoolHealthMonitorPatch.from_dict(health_monitor) + args[ + 'health_monitor'] = LoadBalancerPoolHealthMonitorPatch.from_dict( + health_monitor) if (name := _dict.get('name')) is not None: args['name'] = name if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol if (proxy_protocol := _dict.get('proxy_protocol')) is not None: args['proxy_protocol'] = proxy_protocol - if (session_persistence := _dict.get('session_persistence')) is not None: - args['session_persistence'] = LoadBalancerPoolSessionPersistencePatch.from_dict(session_persistence) + if (session_persistence := + _dict.get('session_persistence')) is not None: + args[ + 'session_persistence'] = LoadBalancerPoolSessionPersistencePatch.from_dict( + session_persistence) return cls(**args) @classmethod @@ -62825,11 +67098,14 @@ def to_dict(self) -> Dict: _dict['protocol'] = self.protocol if hasattr(self, 'proxy_protocol') and self.proxy_protocol is not None: _dict['proxy_protocol'] = self.proxy_protocol - if hasattr(self, 'session_persistence') and self.session_persistence is not None: + if hasattr( + self, + 'session_persistence') and self.session_persistence is not None: if isinstance(self.session_persistence, dict): _dict['session_persistence'] = self.session_persistence else: - _dict['session_persistence'] = self.session_persistence.to_dict() + _dict['session_persistence'] = self.session_persistence.to_dict( + ) return _dict def _to_dict(self): @@ -62859,7 +67135,6 @@ class AlgorithmEnum(str, Enum): ROUND_ROBIN = 'round_robin' WEIGHTED_ROUND_ROBIN = 'weighted_round_robin' - class ProtocolEnum(str, Enum): """ The protocol for this load balancer pool. @@ -62876,7 +67151,6 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' - class ProxyProtocolEnum(str, Enum): """ The PROXY protocol setting for this pool: @@ -62892,7 +67166,6 @@ class ProxyProtocolEnum(str, Enum): V2 = 'v2' - class LoadBalancerPoolPrototype: """ LoadBalancerPoolPrototype. @@ -62933,7 +67206,8 @@ def __init__( members: Optional[List['LoadBalancerPoolMemberPrototype']] = None, name: Optional[str] = None, proxy_protocol: Optional[str] = None, - session_persistence: Optional['LoadBalancerPoolSessionPersistencePrototype'] = None, + session_persistence: Optional[ + 'LoadBalancerPoolSessionPersistencePrototype'] = None, ) -> None: """ Initialize a LoadBalancerPoolPrototype object. @@ -62981,23 +67255,36 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolPrototype': if (algorithm := _dict.get('algorithm')) is not None: args['algorithm'] = algorithm else: - raise ValueError('Required property \'algorithm\' not present in LoadBalancerPoolPrototype JSON') + raise ValueError( + 'Required property \'algorithm\' not present in LoadBalancerPoolPrototype JSON' + ) if (health_monitor := _dict.get('health_monitor')) is not None: - args['health_monitor'] = LoadBalancerPoolHealthMonitorPrototype.from_dict(health_monitor) + args[ + 'health_monitor'] = LoadBalancerPoolHealthMonitorPrototype.from_dict( + health_monitor) else: - raise ValueError('Required property \'health_monitor\' not present in LoadBalancerPoolPrototype JSON') + raise ValueError( + 'Required property \'health_monitor\' not present in LoadBalancerPoolPrototype JSON' + ) if (members := _dict.get('members')) is not None: - args['members'] = [LoadBalancerPoolMemberPrototype.from_dict(v) for v in members] + args['members'] = [ + LoadBalancerPoolMemberPrototype.from_dict(v) for v in members + ] if (name := _dict.get('name')) is not None: args['name'] = name if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in LoadBalancerPoolPrototype JSON') + raise ValueError( + 'Required property \'protocol\' not present in LoadBalancerPoolPrototype JSON' + ) if (proxy_protocol := _dict.get('proxy_protocol')) is not None: args['proxy_protocol'] = proxy_protocol - if (session_persistence := _dict.get('session_persistence')) is not None: - args['session_persistence'] = LoadBalancerPoolSessionPersistencePrototype.from_dict(session_persistence) + if (session_persistence := + _dict.get('session_persistence')) is not None: + args[ + 'session_persistence'] = LoadBalancerPoolSessionPersistencePrototype.from_dict( + session_persistence) return cls(**args) @classmethod @@ -63029,11 +67316,14 @@ def to_dict(self) -> Dict: _dict['protocol'] = self.protocol if hasattr(self, 'proxy_protocol') and self.proxy_protocol is not None: _dict['proxy_protocol'] = self.proxy_protocol - if hasattr(self, 'session_persistence') and self.session_persistence is not None: + if hasattr( + self, + 'session_persistence') and self.session_persistence is not None: if isinstance(self.session_persistence, dict): _dict['session_persistence'] = self.session_persistence else: - _dict['session_persistence'] = self.session_persistence.to_dict() + _dict['session_persistence'] = self.session_persistence.to_dict( + ) return _dict def _to_dict(self): @@ -63063,7 +67353,6 @@ class AlgorithmEnum(str, Enum): ROUND_ROBIN = 'round_robin' WEIGHTED_ROUND_ROBIN = 'weighted_round_robin' - class ProtocolEnum(str, Enum): """ The protocol used for this load balancer pool. Load balancers in the `network` @@ -63077,7 +67366,6 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' - class ProxyProtocolEnum(str, Enum): """ The PROXY protocol setting for this pool: @@ -63093,7 +67381,6 @@ class ProxyProtocolEnum(str, Enum): V2 = 'v2' - class LoadBalancerPoolReference: """ LoadBalancerPoolReference. @@ -63137,19 +67424,26 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolReference': """Initialize a LoadBalancerPoolReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = LoadBalancerPoolReferenceDeleted.from_dict(deleted) + args['deleted'] = LoadBalancerPoolReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPoolReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPoolReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPoolReference JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPoolReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerPoolReference JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerPoolReference JSON' + ) return cls(**args) @classmethod @@ -63218,7 +67512,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in LoadBalancerPoolReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in LoadBalancerPoolReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -63296,7 +67592,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolSessionPersistence': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerPoolSessionPersistence JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerPoolSessionPersistence JSON' + ) return cls(**args) @classmethod @@ -63345,7 +67643,6 @@ class TypeEnum(str, Enum): SOURCE_IP = 'source_ip' - class LoadBalancerPoolSessionPersistencePatch: """ The session persistence configuration. Specify `null` to remove any existing session @@ -63378,7 +67675,8 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolSessionPersistencePatch': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerPoolSessionPersistencePatch': """Initialize a LoadBalancerPoolSessionPersistencePatch object from a json dictionary.""" args = {} if (cookie_name := _dict.get('cookie_name')) is not None: @@ -63430,7 +67728,6 @@ class TypeEnum(str, Enum): SOURCE_IP = 'source_ip' - class LoadBalancerPoolSessionPersistencePrototype: """ LoadBalancerPoolSessionPersistencePrototype. @@ -63461,7 +67758,8 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolSessionPersistencePrototype': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerPoolSessionPersistencePrototype': """Initialize a LoadBalancerPoolSessionPersistencePrototype object from a json dictionary.""" args = {} if (cookie_name := _dict.get('cookie_name')) is not None: @@ -63469,7 +67767,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolSessionPersistencePrototype' if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerPoolSessionPersistencePrototype JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerPoolSessionPersistencePrototype JSON' + ) return cls(**args) @classmethod @@ -63494,13 +67794,15 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerPoolSessionPersistencePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerPoolSessionPersistencePrototype') -> bool: + def __eq__(self, + other: 'LoadBalancerPoolSessionPersistencePrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerPoolSessionPersistencePrototype') -> bool: + def __ne__(self, + other: 'LoadBalancerPoolSessionPersistencePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -63515,7 +67817,6 @@ class TypeEnum(str, Enum): SOURCE_IP = 'source_ip' - class LoadBalancerPrivateIpsItem: """ LoadBalancerPrivateIpsItem. @@ -63576,25 +67877,35 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPrivateIpsItem': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in LoadBalancerPrivateIpsItem JSON') + raise ValueError( + 'Required property \'address\' not present in LoadBalancerPrivateIpsItem JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = ReservedIPReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPrivateIpsItem JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPrivateIpsItem JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPrivateIpsItem JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPrivateIpsItem JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerPrivateIpsItem JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerPrivateIpsItem JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in LoadBalancerPrivateIpsItem JSON') + raise ValueError( + 'Required property \'resource_type\' not present in LoadBalancerPrivateIpsItem JSON' + ) return cls(**args) @classmethod @@ -63648,7 +67959,6 @@ class ResourceTypeEnum(str, Enum): SUBNET_RESERVED_IP = 'subnet_reserved_ip' - class LoadBalancerProfile: """ LoadBalancerProfile. @@ -63713,35 +68023,56 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfile': if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in LoadBalancerProfile JSON') + raise ValueError( + 'Required property \'family\' not present in LoadBalancerProfile JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerProfile JSON') - if (instance_groups_supported := _dict.get('instance_groups_supported')) is not None: + raise ValueError( + 'Required property \'href\' not present in LoadBalancerProfile JSON' + ) + if (instance_groups_supported := + _dict.get('instance_groups_supported')) is not None: args['instance_groups_supported'] = instance_groups_supported else: - raise ValueError('Required property \'instance_groups_supported\' not present in LoadBalancerProfile JSON') + raise ValueError( + 'Required property \'instance_groups_supported\' not present in LoadBalancerProfile JSON' + ) if (logging_supported := _dict.get('logging_supported')) is not None: - args['logging_supported'] = LoadBalancerProfileLoggingSupported.from_dict(logging_supported) + args[ + 'logging_supported'] = LoadBalancerProfileLoggingSupported.from_dict( + logging_supported) else: - raise ValueError('Required property \'logging_supported\' not present in LoadBalancerProfile JSON') + raise ValueError( + 'Required property \'logging_supported\' not present in LoadBalancerProfile JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerProfile JSON') - if (route_mode_supported := _dict.get('route_mode_supported')) is not None: + raise ValueError( + 'Required property \'name\' not present in LoadBalancerProfile JSON' + ) + if (route_mode_supported := + _dict.get('route_mode_supported')) is not None: args['route_mode_supported'] = route_mode_supported else: - raise ValueError('Required property \'route_mode_supported\' not present in LoadBalancerProfile JSON') - if (security_groups_supported := _dict.get('security_groups_supported')) is not None: + raise ValueError( + 'Required property \'route_mode_supported\' not present in LoadBalancerProfile JSON' + ) + if (security_groups_supported := + _dict.get('security_groups_supported')) is not None: args['security_groups_supported'] = security_groups_supported else: - raise ValueError('Required property \'security_groups_supported\' not present in LoadBalancerProfile JSON') + raise ValueError( + 'Required property \'security_groups_supported\' not present in LoadBalancerProfile JSON' + ) if (udp_supported := _dict.get('udp_supported')) is not None: args['udp_supported'] = udp_supported else: - raise ValueError('Required property \'udp_supported\' not present in LoadBalancerProfile JSON') + raise ValueError( + 'Required property \'udp_supported\' not present in LoadBalancerProfile JSON' + ) return cls(**args) @classmethod @@ -63756,28 +68087,40 @@ def to_dict(self) -> Dict: _dict['family'] = self.family if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href - if hasattr(self, 'instance_groups_supported') and self.instance_groups_supported is not None: + if hasattr(self, 'instance_groups_supported' + ) and self.instance_groups_supported is not None: if isinstance(self.instance_groups_supported, dict): - _dict['instance_groups_supported'] = self.instance_groups_supported - else: - _dict['instance_groups_supported'] = self.instance_groups_supported.to_dict() - if hasattr(self, 'logging_supported') and self.logging_supported is not None: + _dict[ + 'instance_groups_supported'] = self.instance_groups_supported + else: + _dict[ + 'instance_groups_supported'] = self.instance_groups_supported.to_dict( + ) + if hasattr(self, + 'logging_supported') and self.logging_supported is not None: if isinstance(self.logging_supported, dict): _dict['logging_supported'] = self.logging_supported else: _dict['logging_supported'] = self.logging_supported.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'route_mode_supported') and self.route_mode_supported is not None: + if hasattr(self, 'route_mode_supported' + ) and self.route_mode_supported is not None: if isinstance(self.route_mode_supported, dict): _dict['route_mode_supported'] = self.route_mode_supported else: - _dict['route_mode_supported'] = self.route_mode_supported.to_dict() - if hasattr(self, 'security_groups_supported') and self.security_groups_supported is not None: + _dict[ + 'route_mode_supported'] = self.route_mode_supported.to_dict( + ) + if hasattr(self, 'security_groups_supported' + ) and self.security_groups_supported is not None: if isinstance(self.security_groups_supported, dict): - _dict['security_groups_supported'] = self.security_groups_supported + _dict[ + 'security_groups_supported'] = self.security_groups_supported else: - _dict['security_groups_supported'] = self.security_groups_supported.to_dict() + _dict[ + 'security_groups_supported'] = self.security_groups_supported.to_dict( + ) if hasattr(self, 'udp_supported') and self.udp_supported is not None: if isinstance(self.udp_supported, dict): _dict['udp_supported'] = self.udp_supported @@ -63815,7 +68158,6 @@ class FamilyEnum(str, Enum): NETWORK = 'network' - class LoadBalancerProfileCollection: """ LoadBalancerProfileCollection. @@ -63867,21 +68209,31 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileCollection': if (first := _dict.get('first')) is not None: args['first'] = LoadBalancerProfileCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in LoadBalancerProfileCollection JSON') + raise ValueError( + 'Required property \'first\' not present in LoadBalancerProfileCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in LoadBalancerProfileCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in LoadBalancerProfileCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = LoadBalancerProfileCollectionNext.from_dict(next) if (profiles := _dict.get('profiles')) is not None: - args['profiles'] = [LoadBalancerProfile.from_dict(v) for v in profiles] + args['profiles'] = [ + LoadBalancerProfile.from_dict(v) for v in profiles + ] else: - raise ValueError('Required property \'profiles\' not present in LoadBalancerProfileCollection JSON') + raise ValueError( + 'Required property \'profiles\' not present in LoadBalancerProfileCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in LoadBalancerProfileCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in LoadBalancerProfileCollection JSON' + ) return cls(**args) @classmethod @@ -63960,7 +68312,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerProfileCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerProfileCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -64020,7 +68374,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerProfileCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerProfileCollectionNext JSON' + ) return cls(**args) @classmethod @@ -64060,16 +68416,16 @@ class LoadBalancerProfileIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerProfileIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerProfileIdentityByName', 'LoadBalancerProfileIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerProfileIdentityByName', + 'LoadBalancerProfileIdentityByHref' + ])) raise Exception(msg) @@ -64079,16 +68435,16 @@ class LoadBalancerProfileInstanceGroupsSupported: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerProfileInstanceGroupsSupported object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerProfileInstanceGroupsSupportedFixed', 'LoadBalancerProfileInstanceGroupsSupportedDependent']) - ) + ", ".join([ + 'LoadBalancerProfileInstanceGroupsSupportedFixed', + 'LoadBalancerProfileInstanceGroupsSupportedDependent' + ])) raise Exception(msg) @@ -64123,11 +68479,15 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileLoggingSupported': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileLoggingSupported JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileLoggingSupported JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in LoadBalancerProfileLoggingSupported JSON') + raise ValueError( + 'Required property \'value\' not present in LoadBalancerProfileLoggingSupported JSON' + ) return cls(**args) @classmethod @@ -64170,7 +68530,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class LoadBalancerProfileReference: """ LoadBalancerProfileReference. @@ -64211,15 +68570,21 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileReference': if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in LoadBalancerProfileReference JSON') + raise ValueError( + 'Required property \'family\' not present in LoadBalancerProfileReference JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerProfileReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerProfileReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerProfileReference JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerProfileReference JSON' + ) return cls(**args) @classmethod @@ -64268,23 +68633,22 @@ class FamilyEnum(str, Enum): NETWORK = 'network' - class LoadBalancerProfileRouteModeSupported: """ LoadBalancerProfileRouteModeSupported. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerProfileRouteModeSupported object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerProfileRouteModeSupportedFixed', 'LoadBalancerProfileRouteModeSupportedDependent']) - ) + ", ".join([ + 'LoadBalancerProfileRouteModeSupportedFixed', + 'LoadBalancerProfileRouteModeSupportedDependent' + ])) raise Exception(msg) @@ -64294,16 +68658,16 @@ class LoadBalancerProfileSecurityGroupsSupported: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerProfileSecurityGroupsSupported object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerProfileSecurityGroupsSupportedFixed', 'LoadBalancerProfileSecurityGroupsSupportedDependent']) - ) + ", ".join([ + 'LoadBalancerProfileSecurityGroupsSupportedFixed', + 'LoadBalancerProfileSecurityGroupsSupportedDependent' + ])) raise Exception(msg) @@ -64313,16 +68677,16 @@ class LoadBalancerProfileUDPSupported: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerProfileUDPSupported object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerProfileUDPSupportedFixed', 'LoadBalancerProfileUDPSupportedDependent']) - ) + ", ".join([ + 'LoadBalancerProfileUDPSupportedFixed', + 'LoadBalancerProfileUDPSupportedDependent' + ])) raise Exception(msg) @@ -64352,7 +68716,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in LoadBalancerReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in LoadBalancerReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -64429,19 +68795,28 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerStatistics': if (active_connections := _dict.get('active_connections')) is not None: args['active_connections'] = active_connections else: - raise ValueError('Required property \'active_connections\' not present in LoadBalancerStatistics JSON') + raise ValueError( + 'Required property \'active_connections\' not present in LoadBalancerStatistics JSON' + ) if (connection_rate := _dict.get('connection_rate')) is not None: args['connection_rate'] = connection_rate else: - raise ValueError('Required property \'connection_rate\' not present in LoadBalancerStatistics JSON') - if (data_processed_this_month := _dict.get('data_processed_this_month')) is not None: + raise ValueError( + 'Required property \'connection_rate\' not present in LoadBalancerStatistics JSON' + ) + if (data_processed_this_month := + _dict.get('data_processed_this_month')) is not None: args['data_processed_this_month'] = data_processed_this_month else: - raise ValueError('Required property \'data_processed_this_month\' not present in LoadBalancerStatistics JSON') + raise ValueError( + 'Required property \'data_processed_this_month\' not present in LoadBalancerStatistics JSON' + ) if (throughput := _dict.get('throughput')) is not None: args['throughput'] = throughput else: - raise ValueError('Required property \'throughput\' not present in LoadBalancerStatistics JSON') + raise ValueError( + 'Required property \'throughput\' not present in LoadBalancerStatistics JSON' + ) return cls(**args) @classmethod @@ -64452,11 +68827,15 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'active_connections') and self.active_connections is not None: + if hasattr( + self, + 'active_connections') and self.active_connections is not None: _dict['active_connections'] = self.active_connections - if hasattr(self, 'connection_rate') and self.connection_rate is not None: + if hasattr(self, + 'connection_rate') and self.connection_rate is not None: _dict['connection_rate'] = self.connection_rate - if hasattr(self, 'data_processed_this_month') and self.data_processed_this_month is not None: + if hasattr(self, 'data_processed_this_month' + ) and self.data_processed_this_month is not None: _dict['data_processed_this_month'] = self.data_processed_this_month if hasattr(self, 'throughput') and self.throughput is not None: _dict['throughput'] = self.throughput @@ -64547,39 +68926,51 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACL': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkACL JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'crn\' not present in NetworkACL JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACL JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACL JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACL JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'resource_group\' not present in NetworkACL JSON' + ) if (rules := _dict.get('rules')) is not None: args['rules'] = [NetworkACLRuleItem.from_dict(v) for v in rules] else: - raise ValueError('Required property \'rules\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'rules\' not present in NetworkACL JSON') if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [SubnetReference.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'subnets\' not present in NetworkACL JSON') if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in NetworkACL JSON') + raise ValueError( + 'Required property \'vpc\' not present in NetworkACL JSON') return cls(**args) @classmethod @@ -64696,21 +69087,31 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLCollection': if (first := _dict.get('first')) is not None: args['first'] = NetworkACLCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in NetworkACLCollection JSON') + raise ValueError( + 'Required property \'first\' not present in NetworkACLCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in NetworkACLCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in NetworkACLCollection JSON' + ) if (network_acls := _dict.get('network_acls')) is not None: - args['network_acls'] = [NetworkACL.from_dict(v) for v in network_acls] + args['network_acls'] = [ + NetworkACL.from_dict(v) for v in network_acls + ] else: - raise ValueError('Required property \'network_acls\' not present in NetworkACLCollection JSON') + raise ValueError( + 'Required property \'network_acls\' not present in NetworkACLCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = NetworkACLCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in NetworkACLCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in NetworkACLCollection JSON' + ) return cls(**args) @classmethod @@ -64789,7 +69190,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -64849,7 +69252,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLCollectionNext JSON' + ) return cls(**args) @classmethod @@ -64889,16 +69294,16 @@ class NetworkACLIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a NetworkACLIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLIdentityById', 'NetworkACLIdentityByCRN', 'NetworkACLIdentityByHref']) - ) + ", ".join([ + 'NetworkACLIdentityById', 'NetworkACLIdentityByCRN', + 'NetworkACLIdentityByHref' + ])) raise Exception(msg) @@ -64996,8 +69401,10 @@ def __init__( used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLPrototypeNetworkACLByRules', 'NetworkACLPrototypeNetworkACLBySourceNetworkACL']) - ) + ", ".join([ + 'NetworkACLPrototypeNetworkACLByRules', + 'NetworkACLPrototypeNetworkACLBySourceNetworkACL' + ])) raise Exception(msg) @@ -65049,21 +69456,29 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in NetworkACLReference JSON') + raise ValueError( + 'Required property \'crn\' not present in NetworkACLReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = NetworkACLReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLReference JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLReference JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLReference JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLReference JSON' + ) return cls(**args) @classmethod @@ -65134,7 +69549,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in NetworkACLReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in NetworkACLReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -65224,8 +69641,11 @@ def __init__( is immediately before. If absent, this is the last rule. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLRuleNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleNetworkACLRuleProtocolICMP', 'NetworkACLRuleNetworkACLRuleProtocolAll']) - ) + ", ".join([ + 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP', + 'NetworkACLRuleNetworkACLRuleProtocolICMP', + 'NetworkACLRuleNetworkACLRuleProtocolAll' + ])) raise Exception(msg) @classmethod @@ -65235,8 +69655,11 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRule': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'NetworkACLRule'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['NetworkACLRuleNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleNetworkACLRuleProtocolICMP', 'NetworkACLRuleNetworkACLRuleProtocolAll']) - ) + ", ".join([ + 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP', + 'NetworkACLRuleNetworkACLRuleProtocolICMP', + 'NetworkACLRuleNetworkACLRuleProtocolAll' + ])) raise Exception(msg) @classmethod @@ -65253,7 +69676,9 @@ def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping['udp'] = 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP' disc_value = _dict.get('protocol') if disc_value is None: - raise ValueError('Discriminator property \'protocol\' not found in NetworkACLRule JSON') + raise ValueError( + 'Discriminator property \'protocol\' not found in NetworkACLRule JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -65271,7 +69696,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -65280,7 +69704,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -65288,7 +69711,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -65300,7 +69722,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class NetworkACLRuleBeforePatch: """ The rule to move this rule immediately before. @@ -65308,16 +69729,16 @@ class NetworkACLRuleBeforePatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a NetworkACLRuleBeforePatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLRuleBeforePatchNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref']) - ) + ", ".join([ + 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById', + 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref' + ])) raise Exception(msg) @@ -65328,16 +69749,16 @@ class NetworkACLRuleBeforePrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a NetworkACLRuleBeforePrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref']) - ) + ", ".join([ + 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById', + 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref' + ])) raise Exception(msg) @@ -65392,21 +69813,29 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleCollection': if (first := _dict.get('first')) is not None: args['first'] = NetworkACLRuleCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in NetworkACLRuleCollection JSON') + raise ValueError( + 'Required property \'first\' not present in NetworkACLRuleCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in NetworkACLRuleCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in NetworkACLRuleCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = NetworkACLRuleCollectionNext.from_dict(next) if (rules := _dict.get('rules')) is not None: args['rules'] = [NetworkACLRuleItem.from_dict(v) for v in rules] else: - raise ValueError('Required property \'rules\' not present in NetworkACLRuleCollection JSON') + raise ValueError( + 'Required property \'rules\' not present in NetworkACLRuleCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in NetworkACLRuleCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in NetworkACLRuleCollection JSON' + ) return cls(**args) @classmethod @@ -65485,7 +69914,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -65545,7 +69976,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleCollectionNext JSON' + ) return cls(**args) @classmethod @@ -65638,8 +70071,11 @@ def __init__( rule. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleItemNetworkACLRuleProtocolICMP', 'NetworkACLRuleItemNetworkACLRuleProtocolAll']) - ) + ", ".join([ + 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP', + 'NetworkACLRuleItemNetworkACLRuleProtocolICMP', + 'NetworkACLRuleItemNetworkACLRuleProtocolAll' + ])) raise Exception(msg) @classmethod @@ -65649,8 +70085,11 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItem': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'NetworkACLRuleItem'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleItemNetworkACLRuleProtocolICMP', 'NetworkACLRuleItemNetworkACLRuleProtocolAll']) - ) + ", ".join([ + 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP', + 'NetworkACLRuleItemNetworkACLRuleProtocolICMP', + 'NetworkACLRuleItemNetworkACLRuleProtocolAll' + ])) raise Exception(msg) @classmethod @@ -65667,7 +70106,9 @@ def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping['udp'] = 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP' disc_value = _dict.get('protocol') if disc_value is None: - raise ValueError('Discriminator property \'protocol\' not found in NetworkACLRuleItem JSON') + raise ValueError( + 'Discriminator property \'protocol\' not found in NetworkACLRuleItem JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -65685,7 +70126,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -65694,7 +70134,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -65702,7 +70141,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -65714,7 +70152,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class NetworkACLRulePatch: """ NetworkACLRulePatch. @@ -65820,9 +70257,11 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePatch': args['code'] = code if (destination := _dict.get('destination')) is not None: args['destination'] = destination - if (destination_port_max := _dict.get('destination_port_max')) is not None: + if (destination_port_max := + _dict.get('destination_port_max')) is not None: args['destination_port_max'] = destination_port_max - if (destination_port_min := _dict.get('destination_port_min')) is not None: + if (destination_port_min := + _dict.get('destination_port_min')) is not None: args['destination_port_min'] = destination_port_min if (direction := _dict.get('direction')) is not None: args['direction'] = direction @@ -65859,9 +70298,11 @@ def to_dict(self) -> Dict: _dict['code'] = self.code if hasattr(self, 'destination') and self.destination is not None: _dict['destination'] = self.destination - if hasattr(self, 'destination_port_max') and self.destination_port_max is not None: + if hasattr(self, 'destination_port_max' + ) and self.destination_port_max is not None: _dict['destination_port_max'] = self.destination_port_max - if hasattr(self, 'destination_port_min') and self.destination_port_min is not None: + if hasattr(self, 'destination_port_min' + ) and self.destination_port_min is not None: _dict['destination_port_min'] = self.destination_port_min if hasattr(self, 'direction') and self.direction is not None: _dict['direction'] = self.direction @@ -65871,9 +70312,11 @@ def to_dict(self) -> Dict: _dict['protocol'] = self.protocol if hasattr(self, 'source') and self.source is not None: _dict['source'] = self.source - if hasattr(self, 'source_port_max') and self.source_port_max is not None: + if hasattr(self, + 'source_port_max') and self.source_port_max is not None: _dict['source_port_max'] = self.source_port_max - if hasattr(self, 'source_port_min') and self.source_port_min is not None: + if hasattr(self, + 'source_port_min') and self.source_port_min is not None: _dict['source_port_min'] = self.source_port_min if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type @@ -65905,7 +70348,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -65914,7 +70356,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -65926,7 +70367,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class NetworkACLRulePrototype: """ NetworkACLRulePrototype. @@ -65978,8 +70418,11 @@ def __init__( name will be a hyphenated list of randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype']) - ) + ", ".join([ + 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype', + 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype', + 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype' + ])) raise Exception(msg) @classmethod @@ -65989,8 +70432,11 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototype': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'NetworkACLRulePrototype'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype']) - ) + ", ".join([ + 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype', + 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype', + 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype' + ])) raise Exception(msg) @classmethod @@ -66001,13 +70447,19 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['all'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype' - mapping['icmp'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype' - mapping['tcp'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype' - mapping['udp'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype' + mapping[ + 'all'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype' + mapping[ + 'icmp'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype' + mapping[ + 'tcp'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype' + mapping[ + 'udp'] = 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype' disc_value = _dict.get('protocol') if disc_value is None: - raise ValueError('Discriminator property \'protocol\' not found in NetworkACLRulePrototype JSON') + raise ValueError( + 'Discriminator property \'protocol\' not found in NetworkACLRulePrototype JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -66025,7 +70477,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -66034,7 +70485,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -66042,7 +70492,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -66054,7 +70503,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class NetworkACLRulePrototypeNetworkACLContext: """ NetworkACLRulePrototypeNetworkACLContext. @@ -66099,19 +70547,26 @@ def __init__( name will be a hyphenated list of randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype']) - ) + ", ".join([ + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype', + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype', + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype' + ])) raise Exception(msg) @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContext': + def from_dict(cls, + _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContext': """Initialize a NetworkACLRulePrototypeNetworkACLContext object from a json dictionary.""" disc_class = cls._get_class_by_discriminator(_dict) if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'NetworkACLRulePrototypeNetworkACLContext'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype']) - ) + ", ".join([ + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype', + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype', + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype' + ])) raise Exception(msg) @classmethod @@ -66122,13 +70577,19 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['all'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype' - mapping['icmp'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype' - mapping['tcp'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype' - mapping['udp'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype' + mapping[ + 'all'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype' + mapping[ + 'icmp'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype' + mapping[ + 'tcp'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype' + mapping[ + 'udp'] = 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype' disc_value = _dict.get('protocol') if disc_value is None: - raise ValueError('Discriminator property \'protocol\' not found in NetworkACLRulePrototypeNetworkACLContext JSON') + raise ValueError( + 'Discriminator property \'protocol\' not found in NetworkACLRulePrototypeNetworkACLContext JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -66146,7 +70607,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -66155,7 +70615,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -66163,7 +70622,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -66175,7 +70633,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class NetworkACLRuleReference: """ NetworkACLRuleReference. @@ -66222,15 +70679,21 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleReference JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleReference JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLRuleReference JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLRuleReference JSON' + ) return cls(**args) @classmethod @@ -66299,7 +70762,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in NetworkACLRuleReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in NetworkACLRuleReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -66516,55 +70981,84 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterface': if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing else: - raise ValueError('Required property \'allow_ip_spoofing\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'allow_ip_spoofing\' not present in NetworkInterface JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkInterface JSON' + ) if (floating_ips := _dict.get('floating_ips')) is not None: - args['floating_ips'] = [FloatingIPReference.from_dict(v) for v in floating_ips] + args['floating_ips'] = [ + FloatingIPReference.from_dict(v) for v in floating_ips + ] else: - raise ValueError('Required property \'floating_ips\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'floating_ips\' not present in NetworkInterface JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkInterface JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkInterface JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkInterface JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'port_speed\' not present in NetworkInterface JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in NetworkInterface JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'resource_type\' not present in NetworkInterface JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'security_groups\' not present in NetworkInterface JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'status\' not present in NetworkInterface JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'subnet\' not present in NetworkInterface JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in NetworkInterface JSON') + raise ValueError( + 'Required property \'type\' not present in NetworkInterface JSON' + ) return cls(**args) @classmethod @@ -66575,7 +71069,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -66602,7 +71097,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -66646,7 +71142,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class StatusEnum(str, Enum): """ The status of the instance network interface. @@ -66661,7 +71156,6 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' - class TypeEnum(str, Enum): """ The instance network interface type. @@ -66676,7 +71170,6 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' - class NetworkInterfaceBareMetalServerContextReference: """ NetworkInterfaceBareMetalServerContextReference. @@ -66712,7 +71205,8 @@ def __init__( resource_type: str, subnet: 'SubnetReference', *, - deleted: Optional['NetworkInterfaceBareMetalServerContextReferenceDeleted'] = None, + deleted: Optional[ + 'NetworkInterfaceBareMetalServerContextReferenceDeleted'] = None, ) -> None: """ Initialize a NetworkInterfaceBareMetalServerContextReference object. @@ -66750,35 +71244,51 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceBareMetalServerContextReference': + def from_dict( + cls, + _dict: Dict) -> 'NetworkInterfaceBareMetalServerContextReference': """Initialize a NetworkInterfaceBareMetalServerContextReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = NetworkInterfaceBareMetalServerContextReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = NetworkInterfaceBareMetalServerContextReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkInterfaceBareMetalServerContextReference JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkInterfaceBareMetalServerContextReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkInterfaceBareMetalServerContextReference JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkInterfaceBareMetalServerContextReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkInterfaceBareMetalServerContextReference JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkInterfaceBareMetalServerContextReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in NetworkInterfaceBareMetalServerContextReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in NetworkInterfaceBareMetalServerContextReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in NetworkInterfaceBareMetalServerContextReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in NetworkInterfaceBareMetalServerContextReference JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in NetworkInterfaceBareMetalServerContextReference JSON') + raise ValueError( + 'Required property \'subnet\' not present in NetworkInterfaceBareMetalServerContextReference JSON' + ) return cls(**args) @classmethod @@ -66822,13 +71332,17 @@ def __str__(self) -> str: """Return a `str` version of this NetworkInterfaceBareMetalServerContextReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkInterfaceBareMetalServerContextReference') -> bool: + def __eq__( + self, + other: 'NetworkInterfaceBareMetalServerContextReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkInterfaceBareMetalServerContextReference') -> bool: + def __ne__( + self, + other: 'NetworkInterfaceBareMetalServerContextReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -66840,7 +71354,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class NetworkInterfaceBareMetalServerContextReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -66861,13 +71374,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceBareMetalServerContextReferenceDeleted': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkInterfaceBareMetalServerContextReferenceDeleted': """Initialize a NetworkInterfaceBareMetalServerContextReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in NetworkInterfaceBareMetalServerContextReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in NetworkInterfaceBareMetalServerContextReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -66890,13 +71407,17 @@ def __str__(self) -> str: """Return a `str` version of this NetworkInterfaceBareMetalServerContextReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkInterfaceBareMetalServerContextReferenceDeleted') -> bool: + def __eq__( + self, other: 'NetworkInterfaceBareMetalServerContextReferenceDeleted' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkInterfaceBareMetalServerContextReferenceDeleted') -> bool: + def __ne__( + self, other: 'NetworkInterfaceBareMetalServerContextReferenceDeleted' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -66907,16 +71428,16 @@ class NetworkInterfaceIPPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a NetworkInterfaceIPPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkInterfaceIPPrototypeReservedIPIdentity', 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext']) - ) + ", ".join([ + 'NetworkInterfaceIPPrototypeReservedIPIdentity', + 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext' + ])) raise Exception(msg) @@ -66954,7 +71475,8 @@ def __init__( resource_type: str, subnet: 'SubnetReference', *, - deleted: Optional['NetworkInterfaceInstanceContextReferenceDeleted'] = None, + deleted: Optional[ + 'NetworkInterfaceInstanceContextReferenceDeleted'] = None, ) -> None: """ Initialize a NetworkInterfaceInstanceContextReference object. @@ -66989,35 +71511,50 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceInstanceContextReference': + def from_dict(cls, + _dict: Dict) -> 'NetworkInterfaceInstanceContextReference': """Initialize a NetworkInterfaceInstanceContextReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = NetworkInterfaceInstanceContextReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = NetworkInterfaceInstanceContextReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkInterfaceInstanceContextReference JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkInterfaceInstanceContextReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkInterfaceInstanceContextReference JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkInterfaceInstanceContextReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkInterfaceInstanceContextReference JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkInterfaceInstanceContextReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in NetworkInterfaceInstanceContextReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in NetworkInterfaceInstanceContextReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in NetworkInterfaceInstanceContextReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in NetworkInterfaceInstanceContextReference JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in NetworkInterfaceInstanceContextReference JSON') + raise ValueError( + 'Required property \'subnet\' not present in NetworkInterfaceInstanceContextReference JSON' + ) return cls(**args) @classmethod @@ -67079,7 +71616,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class NetworkInterfaceInstanceContextReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -67100,13 +71636,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceInstanceContextReferenceDeleted': + def from_dict( + cls, + _dict: Dict) -> 'NetworkInterfaceInstanceContextReferenceDeleted': """Initialize a NetworkInterfaceInstanceContextReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in NetworkInterfaceInstanceContextReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in NetworkInterfaceInstanceContextReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -67129,13 +71669,17 @@ def __str__(self) -> str: """Return a `str` version of this NetworkInterfaceInstanceContextReferenceDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkInterfaceInstanceContextReferenceDeleted') -> bool: + def __eq__( + self, + other: 'NetworkInterfaceInstanceContextReferenceDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkInterfaceInstanceContextReferenceDeleted') -> bool: + def __ne__( + self, + other: 'NetworkInterfaceInstanceContextReferenceDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -67199,7 +71743,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -67313,7 +71858,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfacePrototype': if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in NetworkInterfacePrototype JSON') + raise ValueError( + 'Required property \'subnet\' not present in NetworkInterfacePrototype JSON' + ) return cls(**args) @classmethod @@ -67324,7 +71871,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -67333,7 +71881,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -67393,7 +71942,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in NetworkInterfaceReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in NetworkInterfaceReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -67447,13 +71998,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceReferenceTargetContextDeleted': + def from_dict( + cls, + _dict: Dict) -> 'NetworkInterfaceReferenceTargetContextDeleted': """Initialize a NetworkInterfaceReferenceTargetContextDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in NetworkInterfaceReferenceTargetContextDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in NetworkInterfaceReferenceTargetContextDeleted JSON' + ) return cls(**args) @classmethod @@ -67476,13 +72031,15 @@ def __str__(self) -> str: """Return a `str` version of this NetworkInterfaceReferenceTargetContextDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkInterfaceReferenceTargetContextDeleted') -> bool: + def __eq__(self, + other: 'NetworkInterfaceReferenceTargetContextDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkInterfaceReferenceTargetContextDeleted') -> bool: + def __ne__(self, + other: 'NetworkInterfaceReferenceTargetContextDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -67512,9 +72069,13 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceUnpaginatedCollection': """Initialize a NetworkInterfaceUnpaginatedCollection object from a json dictionary.""" args = {} if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterface.from_dict(v) for v in network_interfaces] + args['network_interfaces'] = [ + NetworkInterface.from_dict(v) for v in network_interfaces + ] else: - raise ValueError('Required property \'network_interfaces\' not present in NetworkInterfaceUnpaginatedCollection JSON') + raise ValueError( + 'Required property \'network_interfaces\' not present in NetworkInterfaceUnpaginatedCollection JSON' + ) return cls(**args) @classmethod @@ -67525,7 +72086,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -67558,6 +72121,8 @@ class OperatingSystem: """ OperatingSystem. + :param bool allow_user_image_creation: Users may create new images with this + operating system. :param str architecture: The operating system architecture. :param bool dedicated_host_only: Images with this operating system can only be used on dedicated hosts or dedicated host groups. @@ -67566,24 +72131,36 @@ class OperatingSystem: :param str family: The software family for this operating system. :param str href: The URL for this operating system. :param str name: The globally unique name for this operating system. + :param str user_data_format: The user data format for this operating system: + - `cloud_init`: `user_data` will be interpreted according to the cloud-init + standard + - `esxi_kickstart`: `user_data` will be interpreted as a VMware ESXi + installation script + - `ipxe`: `user_data` will be interpreted as a single URL to an iPXE script or + as the + text of an iPXE script. :param str vendor: The vendor of the operating system. :param str version: The major release version of this operating system. """ def __init__( self, + allow_user_image_creation: bool, architecture: str, dedicated_host_only: bool, display_name: str, family: str, href: str, name: str, + user_data_format: str, vendor: str, version: str, ) -> None: """ Initialize a OperatingSystem object. + :param bool allow_user_image_creation: Users may create new images with + this operating system. :param str architecture: The operating system architecture. :param bool dedicated_host_only: Images with this operating system can only be used on dedicated hosts or dedicated host groups. @@ -67592,15 +72169,26 @@ def __init__( :param str family: The software family for this operating system. :param str href: The URL for this operating system. :param str name: The globally unique name for this operating system. + :param str user_data_format: The user data format for this operating + system: + - `cloud_init`: `user_data` will be interpreted according to the cloud-init + standard + - `esxi_kickstart`: `user_data` will be interpreted as a VMware ESXi + installation script + - `ipxe`: `user_data` will be interpreted as a single URL to an iPXE script + or as the + text of an iPXE script. :param str vendor: The vendor of the operating system. :param str version: The major release version of this operating system. """ + self.allow_user_image_creation = allow_user_image_creation self.architecture = architecture self.dedicated_host_only = dedicated_host_only self.display_name = display_name self.family = family self.href = href self.name = name + self.user_data_format = user_data_format self.vendor = vendor self.version = version @@ -67608,38 +72196,68 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'OperatingSystem': """Initialize a OperatingSystem object from a json dictionary.""" args = {} + if (allow_user_image_creation := + _dict.get('allow_user_image_creation')) is not None: + args['allow_user_image_creation'] = allow_user_image_creation + else: + raise ValueError( + 'Required property \'allow_user_image_creation\' not present in OperatingSystem JSON' + ) if (architecture := _dict.get('architecture')) is not None: args['architecture'] = architecture else: - raise ValueError('Required property \'architecture\' not present in OperatingSystem JSON') - if (dedicated_host_only := _dict.get('dedicated_host_only')) is not None: + raise ValueError( + 'Required property \'architecture\' not present in OperatingSystem JSON' + ) + if (dedicated_host_only := + _dict.get('dedicated_host_only')) is not None: args['dedicated_host_only'] = dedicated_host_only else: - raise ValueError('Required property \'dedicated_host_only\' not present in OperatingSystem JSON') + raise ValueError( + 'Required property \'dedicated_host_only\' not present in OperatingSystem JSON' + ) if (display_name := _dict.get('display_name')) is not None: args['display_name'] = display_name else: - raise ValueError('Required property \'display_name\' not present in OperatingSystem JSON') + raise ValueError( + 'Required property \'display_name\' not present in OperatingSystem JSON' + ) if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in OperatingSystem JSON') + raise ValueError( + 'Required property \'family\' not present in OperatingSystem JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in OperatingSystem JSON') + raise ValueError( + 'Required property \'href\' not present in OperatingSystem JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in OperatingSystem JSON') + raise ValueError( + 'Required property \'name\' not present in OperatingSystem JSON' + ) + if (user_data_format := _dict.get('user_data_format')) is not None: + args['user_data_format'] = user_data_format + else: + raise ValueError( + 'Required property \'user_data_format\' not present in OperatingSystem JSON' + ) if (vendor := _dict.get('vendor')) is not None: args['vendor'] = vendor else: - raise ValueError('Required property \'vendor\' not present in OperatingSystem JSON') + raise ValueError( + 'Required property \'vendor\' not present in OperatingSystem JSON' + ) if (version := _dict.get('version')) is not None: args['version'] = version else: - raise ValueError('Required property \'version\' not present in OperatingSystem JSON') + raise ValueError( + 'Required property \'version\' not present in OperatingSystem JSON' + ) return cls(**args) @classmethod @@ -67650,9 +72268,14 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'allow_user_image_creation' + ) and self.allow_user_image_creation is not None: + _dict['allow_user_image_creation'] = self.allow_user_image_creation if hasattr(self, 'architecture') and self.architecture is not None: _dict['architecture'] = self.architecture - if hasattr(self, 'dedicated_host_only') and self.dedicated_host_only is not None: + if hasattr( + self, + 'dedicated_host_only') and self.dedicated_host_only is not None: _dict['dedicated_host_only'] = self.dedicated_host_only if hasattr(self, 'display_name') and self.display_name is not None: _dict['display_name'] = self.display_name @@ -67662,6 +72285,9 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name + if hasattr(self, + 'user_data_format') and self.user_data_format is not None: + _dict['user_data_format'] = self.user_data_format if hasattr(self, 'vendor') and self.vendor is not None: _dict['vendor'] = self.vendor if hasattr(self, 'version') and self.version is not None: @@ -67686,6 +72312,22 @@ def __ne__(self, other: 'OperatingSystem') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class UserDataFormatEnum(str, Enum): + """ + The user data format for this operating system: + - `cloud_init`: `user_data` will be interpreted according to the cloud-init + standard + - `esxi_kickstart`: `user_data` will be interpreted as a VMware ESXi installation + script + - `ipxe`: `user_data` will be interpreted as a single URL to an iPXE script or as + the + text of an iPXE script. + """ + + CLOUD_INIT = 'cloud_init' + ESXI_KICKSTART = 'esxi_kickstart' + IPXE = 'ipxe' + class OperatingSystemCollection: """ @@ -67738,21 +72380,31 @@ def from_dict(cls, _dict: Dict) -> 'OperatingSystemCollection': if (first := _dict.get('first')) is not None: args['first'] = OperatingSystemCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in OperatingSystemCollection JSON') + raise ValueError( + 'Required property \'first\' not present in OperatingSystemCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in OperatingSystemCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in OperatingSystemCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = OperatingSystemCollectionNext.from_dict(next) if (operating_systems := _dict.get('operating_systems')) is not None: - args['operating_systems'] = [OperatingSystem.from_dict(v) for v in operating_systems] + args['operating_systems'] = [ + OperatingSystem.from_dict(v) for v in operating_systems + ] else: - raise ValueError('Required property \'operating_systems\' not present in OperatingSystemCollection JSON') + raise ValueError( + 'Required property \'operating_systems\' not present in OperatingSystemCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in OperatingSystemCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in OperatingSystemCollection JSON' + ) return cls(**args) @classmethod @@ -67775,7 +72427,8 @@ def to_dict(self) -> Dict: _dict['next'] = self.next else: _dict['next'] = self.next.to_dict() - if hasattr(self, 'operating_systems') and self.operating_systems is not None: + if hasattr(self, + 'operating_systems') and self.operating_systems is not None: operating_systems_list = [] for v in self.operating_systems: if isinstance(v, dict): @@ -67831,7 +72484,9 @@ def from_dict(cls, _dict: Dict) -> 'OperatingSystemCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in OperatingSystemCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in OperatingSystemCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -67891,7 +72546,9 @@ def from_dict(cls, _dict: Dict) -> 'OperatingSystemCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in OperatingSystemCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in OperatingSystemCollectionNext JSON' + ) return cls(**args) @classmethod @@ -67931,16 +72588,15 @@ class OperatingSystemIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a OperatingSystemIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['OperatingSystemIdentityByName', 'OperatingSystemIdentityByHref']) - ) + ", ".join([ + 'OperatingSystemIdentityByName', 'OperatingSystemIdentityByHref' + ])) raise Exception(msg) @@ -68017,39 +72673,54 @@ def from_dict(cls, _dict: Dict) -> 'PlacementGroup': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'created_at\' not present in PlacementGroup JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'crn\' not present in PlacementGroup JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'href\' not present in PlacementGroup JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'id\' not present in PlacementGroup JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in PlacementGroup JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'name\' not present in PlacementGroup JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'resource_group\' not present in PlacementGroup JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'resource_type\' not present in PlacementGroup JSON' + ) if (strategy := _dict.get('strategy')) is not None: args['strategy'] = strategy else: - raise ValueError('Required property \'strategy\' not present in PlacementGroup JSON') + raise ValueError( + 'Required property \'strategy\' not present in PlacementGroup JSON' + ) return cls(**args) @classmethod @@ -68068,7 +72739,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -68114,7 +72786,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -68122,7 +72793,6 @@ class ResourceTypeEnum(str, Enum): PLACEMENT_GROUP = 'placement_group' - class StrategyEnum(str, Enum): """ The strategy for this placement group: @@ -68137,7 +72807,6 @@ class StrategyEnum(str, Enum): POWER_SPREAD = 'power_spread' - class PlacementGroupCollection: """ PlacementGroupCollection. @@ -68189,21 +72858,31 @@ def from_dict(cls, _dict: Dict) -> 'PlacementGroupCollection': if (first := _dict.get('first')) is not None: args['first'] = PlacementGroupCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in PlacementGroupCollection JSON') + raise ValueError( + 'Required property \'first\' not present in PlacementGroupCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in PlacementGroupCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in PlacementGroupCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = PlacementGroupCollectionNext.from_dict(next) if (placement_groups := _dict.get('placement_groups')) is not None: - args['placement_groups'] = [PlacementGroup.from_dict(v) for v in placement_groups] + args['placement_groups'] = [ + PlacementGroup.from_dict(v) for v in placement_groups + ] else: - raise ValueError('Required property \'placement_groups\' not present in PlacementGroupCollection JSON') + raise ValueError( + 'Required property \'placement_groups\' not present in PlacementGroupCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in PlacementGroupCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in PlacementGroupCollection JSON' + ) return cls(**args) @classmethod @@ -68226,7 +72905,8 @@ def to_dict(self) -> Dict: _dict['next'] = self.next else: _dict['next'] = self.next.to_dict() - if hasattr(self, 'placement_groups') and self.placement_groups is not None: + if hasattr(self, + 'placement_groups') and self.placement_groups is not None: placement_groups_list = [] for v in self.placement_groups: if isinstance(v, dict): @@ -68282,7 +72962,9 @@ def from_dict(cls, _dict: Dict) -> 'PlacementGroupCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PlacementGroupCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in PlacementGroupCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -68342,7 +73024,9 @@ def from_dict(cls, _dict: Dict) -> 'PlacementGroupCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PlacementGroupCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in PlacementGroupCollectionNext JSON' + ) return cls(**args) @classmethod @@ -68462,7 +73146,9 @@ def from_dict(cls, _dict: Dict) -> 'PlacementGroupReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in PlacementGroupReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in PlacementGroupReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -68569,47 +73255,64 @@ def from_dict(cls, _dict: Dict) -> 'PublicGateway': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'created_at\' not present in PublicGateway JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'crn\' not present in PublicGateway JSON') if (floating_ip := _dict.get('floating_ip')) is not None: args['floating_ip'] = PublicGatewayFloatingIp.from_dict(floating_ip) else: - raise ValueError('Required property \'floating_ip\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'floating_ip\' not present in PublicGateway JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'href\' not present in PublicGateway JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'id\' not present in PublicGateway JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'name\' not present in PublicGateway JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'resource_group\' not present in PublicGateway JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'resource_type\' not present in PublicGateway JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'status\' not present in PublicGateway JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'vpc\' not present in PublicGateway JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in PublicGateway JSON') + raise ValueError( + 'Required property \'zone\' not present in PublicGateway JSON') return cls(**args) @classmethod @@ -68681,7 +73384,6 @@ class ResourceTypeEnum(str, Enum): PUBLIC_GATEWAY = 'public_gateway' - class StatusEnum(str, Enum): """ The status of this public gateway. @@ -68693,7 +73395,6 @@ class StatusEnum(str, Enum): PENDING = 'pending' - class PublicGatewayCollection: """ PublicGatewayCollection. @@ -68744,21 +73445,31 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayCollection': if (first := _dict.get('first')) is not None: args['first'] = PublicGatewayCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in PublicGatewayCollection JSON') + raise ValueError( + 'Required property \'first\' not present in PublicGatewayCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in PublicGatewayCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in PublicGatewayCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = PublicGatewayCollectionNext.from_dict(next) if (public_gateways := _dict.get('public_gateways')) is not None: - args['public_gateways'] = [PublicGateway.from_dict(v) for v in public_gateways] + args['public_gateways'] = [ + PublicGateway.from_dict(v) for v in public_gateways + ] else: - raise ValueError('Required property \'public_gateways\' not present in PublicGatewayCollection JSON') + raise ValueError( + 'Required property \'public_gateways\' not present in PublicGatewayCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in PublicGatewayCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in PublicGatewayCollection JSON' + ) return cls(**args) @classmethod @@ -68781,7 +73492,8 @@ def to_dict(self) -> Dict: _dict['next'] = self.next else: _dict['next'] = self.next.to_dict() - if hasattr(self, 'public_gateways') and self.public_gateways is not None: + if hasattr(self, + 'public_gateways') and self.public_gateways is not None: public_gateways_list = [] for v in self.public_gateways: if isinstance(v, dict): @@ -68837,7 +73549,9 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PublicGatewayCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in PublicGatewayCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -68897,7 +73611,9 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PublicGatewayCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in PublicGatewayCollectionNext JSON' + ) return cls(**args) @classmethod @@ -68937,16 +73653,16 @@ class PublicGatewayFloatingIPPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a PublicGatewayFloatingIPPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['PublicGatewayFloatingIPPrototypeFloatingIPIdentity', 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext']) - ) + ", ".join([ + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentity', + 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext' + ])) raise Exception(msg) @@ -69002,25 +73718,35 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIp': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in PublicGatewayFloatingIp JSON') + raise ValueError( + 'Required property \'address\' not present in PublicGatewayFloatingIp JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in PublicGatewayFloatingIp JSON') + raise ValueError( + 'Required property \'crn\' not present in PublicGatewayFloatingIp JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = FloatingIPReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PublicGatewayFloatingIp JSON') + raise ValueError( + 'Required property \'href\' not present in PublicGatewayFloatingIp JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in PublicGatewayFloatingIp JSON') + raise ValueError( + 'Required property \'id\' not present in PublicGatewayFloatingIp JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in PublicGatewayFloatingIp JSON') + raise ValueError( + 'Required property \'name\' not present in PublicGatewayFloatingIp JSON' + ) return cls(**args) @classmethod @@ -69073,16 +73799,17 @@ class PublicGatewayIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a PublicGatewayIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['PublicGatewayIdentityPublicGatewayIdentityById', 'PublicGatewayIdentityPublicGatewayIdentityByCRN', 'PublicGatewayIdentityPublicGatewayIdentityByHref']) - ) + ", ".join([ + 'PublicGatewayIdentityPublicGatewayIdentityById', + 'PublicGatewayIdentityPublicGatewayIdentityByCRN', + 'PublicGatewayIdentityPublicGatewayIdentityByHref' + ])) raise Exception(msg) @@ -69198,25 +73925,35 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in PublicGatewayReference JSON') + raise ValueError( + 'Required property \'crn\' not present in PublicGatewayReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = PublicGatewayReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PublicGatewayReference JSON') + raise ValueError( + 'Required property \'href\' not present in PublicGatewayReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in PublicGatewayReference JSON') + raise ValueError( + 'Required property \'id\' not present in PublicGatewayReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in PublicGatewayReference JSON') + raise ValueError( + 'Required property \'name\' not present in PublicGatewayReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in PublicGatewayReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in PublicGatewayReference JSON' + ) return cls(**args) @classmethod @@ -69270,7 +74007,6 @@ class ResourceTypeEnum(str, Enum): PUBLIC_GATEWAY = 'public_gateway' - class PublicGatewayReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -69297,7 +74033,9 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in PublicGatewayReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in PublicGatewayReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -69368,19 +74106,23 @@ def from_dict(cls, _dict: Dict) -> 'Region': if (endpoint := _dict.get('endpoint')) is not None: args['endpoint'] = endpoint else: - raise ValueError('Required property \'endpoint\' not present in Region JSON') + raise ValueError( + 'Required property \'endpoint\' not present in Region JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Region JSON') + raise ValueError( + 'Required property \'href\' not present in Region JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Region JSON') + raise ValueError( + 'Required property \'name\' not present in Region JSON') if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in Region JSON') + raise ValueError( + 'Required property \'status\' not present in Region JSON') return cls(**args) @classmethod @@ -69428,7 +74170,6 @@ class StatusEnum(str, Enum): UNAVAILABLE = 'unavailable' - class RegionCollection: """ RegionCollection. @@ -69454,7 +74195,9 @@ def from_dict(cls, _dict: Dict) -> 'RegionCollection': if (regions := _dict.get('regions')) is not None: args['regions'] = [Region.from_dict(v) for v in regions] else: - raise ValueError('Required property \'regions\' not present in RegionCollection JSON') + raise ValueError( + 'Required property \'regions\' not present in RegionCollection JSON' + ) return cls(**args) @classmethod @@ -69500,16 +74243,13 @@ class RegionIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RegionIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RegionIdentityByName', 'RegionIdentityByHref']) - ) + ", ".join(['RegionIdentityByName', 'RegionIdentityByHref'])) raise Exception(msg) @@ -69542,11 +74282,15 @@ def from_dict(cls, _dict: Dict) -> 'RegionReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RegionReference JSON') + raise ValueError( + 'Required property \'href\' not present in RegionReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RegionReference JSON') + raise ValueError( + 'Required property \'name\' not present in RegionReference JSON' + ) return cls(**args) @classmethod @@ -69698,59 +74442,82 @@ def from_dict(cls, _dict: Dict) -> 'Reservation': if (affinity_policy := _dict.get('affinity_policy')) is not None: args['affinity_policy'] = affinity_policy else: - raise ValueError('Required property \'affinity_policy\' not present in Reservation JSON') + raise ValueError( + 'Required property \'affinity_policy\' not present in Reservation JSON' + ) if (capacity := _dict.get('capacity')) is not None: args['capacity'] = ReservationCapacity.from_dict(capacity) if (committed_use := _dict.get('committed_use')) is not None: - args['committed_use'] = ReservationCommittedUse.from_dict(committed_use) + args['committed_use'] = ReservationCommittedUse.from_dict( + committed_use) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Reservation JSON') + raise ValueError( + 'Required property \'created_at\' not present in Reservation JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Reservation JSON') + raise ValueError( + 'Required property \'crn\' not present in Reservation JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Reservation JSON') + raise ValueError( + 'Required property \'href\' not present in Reservation JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Reservation JSON') + raise ValueError( + 'Required property \'id\' not present in Reservation JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in Reservation JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in Reservation JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Reservation JSON') + raise ValueError( + 'Required property \'name\' not present in Reservation JSON') if (profile := _dict.get('profile')) is not None: args['profile'] = ReservationProfile.from_dict(profile) else: - raise ValueError('Required property \'profile\' not present in Reservation JSON') + raise ValueError( + 'Required property \'profile\' not present in Reservation JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Reservation JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Reservation JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in Reservation JSON') + raise ValueError( + 'Required property \'resource_type\' not present in Reservation JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in Reservation JSON') + raise ValueError( + 'Required property \'status\' not present in Reservation JSON') if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [ReservationStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + ReservationStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in Reservation JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in Reservation JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in Reservation JSON') + raise ValueError( + 'Required property \'zone\' not present in Reservation JSON') return cls(**args) @classmethod @@ -69761,7 +74528,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'affinity_policy') and self.affinity_policy is not None: + if hasattr(self, + 'affinity_policy') and self.affinity_policy is not None: _dict['affinity_policy'] = self.affinity_policy if hasattr(self, 'capacity') and self.capacity is not None: if isinstance(self.capacity, dict): @@ -69781,7 +74549,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -69843,7 +74612,6 @@ class AffinityPolicyEnum(str, Enum): RESTRICTED = 'restricted' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of this reservation. @@ -69857,7 +74625,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -69865,7 +74632,6 @@ class ResourceTypeEnum(str, Enum): RESERVATION = 'reservation' - class StatusEnum(str, Enum): """ The status of the reservation. @@ -69882,7 +74648,6 @@ class StatusEnum(str, Enum): INACTIVE = 'inactive' - class ReservationCapacity: """ The capacity configuration for this reservation @@ -69952,23 +74717,33 @@ def from_dict(cls, _dict: Dict) -> 'ReservationCapacity': if (allocated := _dict.get('allocated')) is not None: args['allocated'] = allocated else: - raise ValueError('Required property \'allocated\' not present in ReservationCapacity JSON') + raise ValueError( + 'Required property \'allocated\' not present in ReservationCapacity JSON' + ) if (available := _dict.get('available')) is not None: args['available'] = available else: - raise ValueError('Required property \'available\' not present in ReservationCapacity JSON') + raise ValueError( + 'Required property \'available\' not present in ReservationCapacity JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in ReservationCapacity JSON') + raise ValueError( + 'Required property \'status\' not present in ReservationCapacity JSON' + ) if (total := _dict.get('total')) is not None: args['total'] = total else: - raise ValueError('Required property \'total\' not present in ReservationCapacity JSON') + raise ValueError( + 'Required property \'total\' not present in ReservationCapacity JSON' + ) if (used := _dict.get('used')) is not None: args['used'] = used else: - raise ValueError('Required property \'used\' not present in ReservationCapacity JSON') + raise ValueError( + 'Required property \'used\' not present in ReservationCapacity JSON' + ) return cls(**args) @classmethod @@ -70030,7 +74805,6 @@ class StatusEnum(str, Enum): UNALLOCATED = 'unallocated' - class ReservationCapacityPatch: """ The capacity reservation configuration to use. @@ -70117,7 +74891,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationCapacityPrototype': if (total := _dict.get('total')) is not None: args['total'] = total else: - raise ValueError('Required property \'total\' not present in ReservationCapacityPrototype JSON') + raise ValueError( + 'Required property \'total\' not present in ReservationCapacityPrototype JSON' + ) return cls(**args) @classmethod @@ -70200,21 +74976,31 @@ def from_dict(cls, _dict: Dict) -> 'ReservationCollection': if (first := _dict.get('first')) is not None: args['first'] = ReservationCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in ReservationCollection JSON') + raise ValueError( + 'Required property \'first\' not present in ReservationCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ReservationCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in ReservationCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = ReservationCollectionNext.from_dict(next) if (reservations := _dict.get('reservations')) is not None: - args['reservations'] = [Reservation.from_dict(v) for v in reservations] + args['reservations'] = [ + Reservation.from_dict(v) for v in reservations + ] else: - raise ValueError('Required property \'reservations\' not present in ReservationCollection JSON') + raise ValueError( + 'Required property \'reservations\' not present in ReservationCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ReservationCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in ReservationCollection JSON' + ) return cls(**args) @classmethod @@ -70293,7 +75079,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservationCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ReservationCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -70353,7 +75141,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservationCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservationCollectionNext JSON' + ) return cls(**args) @classmethod @@ -70447,15 +75237,21 @@ def from_dict(cls, _dict: Dict) -> 'ReservationCommittedUse': if (expiration_at := _dict.get('expiration_at')) is not None: args['expiration_at'] = string_to_datetime(expiration_at) else: - raise ValueError('Required property \'expiration_at\' not present in ReservationCommittedUse JSON') + raise ValueError( + 'Required property \'expiration_at\' not present in ReservationCommittedUse JSON' + ) if (expiration_policy := _dict.get('expiration_policy')) is not None: args['expiration_policy'] = expiration_policy else: - raise ValueError('Required property \'expiration_policy\' not present in ReservationCommittedUse JSON') + raise ValueError( + 'Required property \'expiration_policy\' not present in ReservationCommittedUse JSON' + ) if (term := _dict.get('term')) is not None: args['term'] = term else: - raise ValueError('Required property \'term\' not present in ReservationCommittedUse JSON') + raise ValueError( + 'Required property \'term\' not present in ReservationCommittedUse JSON' + ) return cls(**args) @classmethod @@ -70468,7 +75264,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'expiration_at') and self.expiration_at is not None: _dict['expiration_at'] = datetime_to_string(self.expiration_at) - if hasattr(self, 'expiration_policy') and self.expiration_policy is not None: + if hasattr(self, + 'expiration_policy') and self.expiration_policy is not None: _dict['expiration_policy'] = self.expiration_policy if hasattr(self, 'term') and self.term is not None: _dict['term'] = self.term @@ -70507,7 +75304,6 @@ class ExpirationPolicyEnum(str, Enum): RENEW = 'renew' - class ReservationCommittedUsePatch: """ ReservationCommittedUsePatch. @@ -70576,7 +75372,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'expiration_policy') and self.expiration_policy is not None: + if hasattr(self, + 'expiration_policy') and self.expiration_policy is not None: _dict['expiration_policy'] = self.expiration_policy if hasattr(self, 'term') and self.term is not None: _dict['term'] = self.term @@ -70615,7 +75412,6 @@ class ExpirationPolicyEnum(str, Enum): RENEW = 'renew' - class ReservationCommittedUsePrototype: """ ReservationCommittedUsePrototype. @@ -70671,7 +75467,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationCommittedUsePrototype': if (term := _dict.get('term')) is not None: args['term'] = term else: - raise ValueError('Required property \'term\' not present in ReservationCommittedUsePrototype JSON') + raise ValueError( + 'Required property \'term\' not present in ReservationCommittedUsePrototype JSON' + ) return cls(**args) @classmethod @@ -70682,7 +75480,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'expiration_policy') and self.expiration_policy is not None: + if hasattr(self, + 'expiration_policy') and self.expiration_policy is not None: _dict['expiration_policy'] = self.expiration_policy if hasattr(self, 'term') and self.term is not None: _dict['term'] = self.term @@ -70721,23 +75520,22 @@ class ExpirationPolicyEnum(str, Enum): RENEW = 'renew' - class ReservationIdentity: """ Identifies a reservation by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ReservationIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ReservationIdentityById', 'ReservationIdentityByCRN', 'ReservationIdentityByHref']) - ) + ", ".join([ + 'ReservationIdentityById', 'ReservationIdentityByCRN', + 'ReservationIdentityByHref' + ])) raise Exception(msg) @@ -70756,7 +75554,6 @@ class ReservationPatch: :param ReservationProfilePatch profile: (optional) The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this reservation. - The profile can only be changed for a reservation with a `status` of `inactive`. """ def __init__( @@ -70782,8 +75579,6 @@ def __init__( [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this reservation. - The profile can only be changed for a reservation with a `status` of - `inactive`. """ self.capacity = capacity self.committed_use = committed_use @@ -70797,7 +75592,8 @@ def from_dict(cls, _dict: Dict) -> 'ReservationPatch': if (capacity := _dict.get('capacity')) is not None: args['capacity'] = ReservationCapacityPatch.from_dict(capacity) if (committed_use := _dict.get('committed_use')) is not None: - args['committed_use'] = ReservationCommittedUsePatch.from_dict(committed_use) + args['committed_use'] = ReservationCommittedUsePatch.from_dict( + committed_use) if (name := _dict.get('name')) is not None: args['name'] = name if (profile := _dict.get('profile')) is not None: @@ -70885,15 +75681,21 @@ def from_dict(cls, _dict: Dict) -> 'ReservationProfile': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservationProfile JSON') + raise ValueError( + 'Required property \'href\' not present in ReservationProfile JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservationProfile JSON') + raise ValueError( + 'Required property \'name\' not present in ReservationProfile JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservationProfile JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservationProfile JSON' + ) return cls(**args) @classmethod @@ -70938,12 +75740,10 @@ class ResourceTypeEnum(str, Enum): INSTANCE_PROFILE = 'instance_profile' - class ReservationProfilePatch: """ The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this reservation. - The profile can only be changed for a reservation with a `status` of `inactive`. :param str name: (optional) The globally unique name of the profile. :param str resource_type: (optional) The resource type of the profile. @@ -71014,7 +75814,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_PROFILE = 'instance_profile' - class ReservationProfilePrototype: """ The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this @@ -71045,11 +75844,15 @@ def from_dict(cls, _dict: Dict) -> 'ReservationProfilePrototype': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservationProfilePrototype JSON') + raise ValueError( + 'Required property \'name\' not present in ReservationProfilePrototype JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservationProfilePrototype JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservationProfilePrototype JSON' + ) return cls(**args) @classmethod @@ -71092,7 +75895,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_PROFILE = 'instance_profile' - class ReservationReference: """ ReservationReference. @@ -71145,25 +75947,35 @@ def from_dict(cls, _dict: Dict) -> 'ReservationReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservationReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservationReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = ReservationReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservationReference JSON') + raise ValueError( + 'Required property \'href\' not present in ReservationReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservationReference JSON') + raise ValueError( + 'Required property \'id\' not present in ReservationReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservationReference JSON') + raise ValueError( + 'Required property \'name\' not present in ReservationReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservationReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservationReference JSON' + ) return cls(**args) @classmethod @@ -71217,7 +76029,6 @@ class ResourceTypeEnum(str, Enum): RESERVATION = 'reservation' - class ReservationReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -71244,7 +76055,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in ReservationReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in ReservationReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -71320,11 +76133,15 @@ def from_dict(cls, _dict: Dict) -> 'ReservationStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in ReservationStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in ReservationStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in ReservationStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in ReservationStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -71375,7 +76192,6 @@ class CodeEnum(str, Enum): CANNOT_RENEW_UNSUPPORTED_PROFILE_TERM = 'cannot_renew_unsupported_profile_term' - class ReservedIP: """ ReservedIP. @@ -71457,39 +76273,52 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'address\' not present in ReservedIP JSON') if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete else: - raise ValueError('Required property \'auto_delete\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'auto_delete\' not present in ReservedIP JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'created_at\' not present in ReservedIP JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIP JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIP JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in ReservedIP JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIP JSON') if (owner := _dict.get('owner')) is not None: args['owner'] = owner else: - raise ValueError('Required property \'owner\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'owner\' not present in ReservedIP JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIP JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIP JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = target return cls(**args) @@ -71512,7 +76341,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -71558,7 +76388,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class OwnerEnum(str, Enum): """ The owner of the reserved IP. @@ -71567,7 +76396,6 @@ class OwnerEnum(str, Enum): PROVIDER = 'provider' USER = 'user' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -71576,7 +76404,6 @@ class ResourceTypeEnum(str, Enum): SUBNET_RESERVED_IP = 'subnet_reserved_ip' - class ReservedIPCollection: """ ReservedIPCollection. @@ -71627,21 +76454,31 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollection': if (first := _dict.get('first')) is not None: args['first'] = ReservedIPCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in ReservedIPCollection JSON') + raise ValueError( + 'Required property \'first\' not present in ReservedIPCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ReservedIPCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in ReservedIPCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = ReservedIPCollectionNext.from_dict(next) if (reserved_ips := _dict.get('reserved_ips')) is not None: - args['reserved_ips'] = [ReservedIP.from_dict(v) for v in reserved_ips] + args['reserved_ips'] = [ + ReservedIP.from_dict(v) for v in reserved_ips + ] else: - raise ValueError('Required property \'reserved_ips\' not present in ReservedIPCollection JSON') + raise ValueError( + 'Required property \'reserved_ips\' not present in ReservedIPCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ReservedIPCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in ReservedIPCollection JSON' + ) return cls(**args) @classmethod @@ -71719,7 +76556,8 @@ def __init__( limit: int, total_count: int, *, - next: Optional['ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext'] = None, + next: Optional[ + 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext'] = None, ) -> None: """ Initialize a ReservedIPCollectionBareMetalServerNetworkInterfaceContext object. @@ -71743,27 +76581,41 @@ def __init__( self.total_count = total_count @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionBareMetalServerNetworkInterfaceContext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionBareMetalServerNetworkInterfaceContext': """Initialize a ReservedIPCollectionBareMetalServerNetworkInterfaceContext object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst.from_dict(first) + args[ + 'first'] = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'first\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON' + ) if (ips := _dict.get('ips')) is not None: args['ips'] = [ReservedIP.from_dict(v) for v in ips] else: - raise ValueError('Required property \'ips\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'ips\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'limit\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext.from_dict(next) + args[ + 'next'] = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'total_count\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContext JSON' + ) return cls(**args) @classmethod @@ -71806,13 +76658,19 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionBareMetalServerNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContext') -> bool: + def __eq__( + self, + other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContext') -> bool: + def __ne__( + self, + other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -71836,13 +76694,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst': """Initialize a ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst JSON' + ) return cls(**args) @classmethod @@ -71865,13 +76727,19 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst') -> bool: + def __eq__( + self, + other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst') -> bool: + def __ne__( + self, + other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -71896,13 +76764,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext': """Initialize a ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext JSON' + ) return cls(**args) @classmethod @@ -71925,13 +76797,19 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext') -> bool: + def __eq__( + self, + other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext') -> bool: + def __ne__( + self, + other: 'ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -71982,27 +76860,40 @@ def __init__( self.total_count = total_count @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContext': + def from_dict(cls, + _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContext': """Initialize a ReservedIPCollectionEndpointGatewayContext object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = ReservedIPCollectionEndpointGatewayContextFirst.from_dict(first) + args[ + 'first'] = ReservedIPCollectionEndpointGatewayContextFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in ReservedIPCollectionEndpointGatewayContext JSON') + raise ValueError( + 'Required property \'first\' not present in ReservedIPCollectionEndpointGatewayContext JSON' + ) if (ips := _dict.get('ips')) is not None: args['ips'] = [ReservedIP.from_dict(v) for v in ips] else: - raise ValueError('Required property \'ips\' not present in ReservedIPCollectionEndpointGatewayContext JSON') + raise ValueError( + 'Required property \'ips\' not present in ReservedIPCollectionEndpointGatewayContext JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ReservedIPCollectionEndpointGatewayContext JSON') + raise ValueError( + 'Required property \'limit\' not present in ReservedIPCollectionEndpointGatewayContext JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = ReservedIPCollectionEndpointGatewayContextNext.from_dict(next) + args[ + 'next'] = ReservedIPCollectionEndpointGatewayContextNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ReservedIPCollectionEndpointGatewayContext JSON') + raise ValueError( + 'Required property \'total_count\' not present in ReservedIPCollectionEndpointGatewayContext JSON' + ) return cls(**args) @classmethod @@ -72045,13 +76936,15 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionEndpointGatewayContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionEndpointGatewayContext') -> bool: + def __eq__(self, + other: 'ReservedIPCollectionEndpointGatewayContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionEndpointGatewayContext') -> bool: + def __ne__(self, + other: 'ReservedIPCollectionEndpointGatewayContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72075,13 +76968,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContextFirst': + def from_dict( + cls, + _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContextFirst': """Initialize a ReservedIPCollectionEndpointGatewayContextFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionEndpointGatewayContextFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionEndpointGatewayContextFirst JSON' + ) return cls(**args) @classmethod @@ -72104,13 +77001,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionEndpointGatewayContextFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionEndpointGatewayContextFirst') -> bool: + def __eq__( + self, + other: 'ReservedIPCollectionEndpointGatewayContextFirst') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionEndpointGatewayContextFirst') -> bool: + def __ne__( + self, + other: 'ReservedIPCollectionEndpointGatewayContextFirst') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72135,13 +77036,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContextNext': + def from_dict( + cls, + _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContextNext': """Initialize a ReservedIPCollectionEndpointGatewayContextNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionEndpointGatewayContextNext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionEndpointGatewayContextNext JSON' + ) return cls(**args) @classmethod @@ -72164,13 +77069,15 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionEndpointGatewayContextNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionEndpointGatewayContextNext') -> bool: + def __eq__(self, + other: 'ReservedIPCollectionEndpointGatewayContextNext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionEndpointGatewayContextNext') -> bool: + def __ne__(self, + other: 'ReservedIPCollectionEndpointGatewayContextNext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72200,7 +77107,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -72257,7 +77166,8 @@ def __init__( limit: int, total_count: int, *, - next: Optional['ReservedIPCollectionInstanceNetworkInterfaceContextNext'] = None, + next: Optional[ + 'ReservedIPCollectionInstanceNetworkInterfaceContextNext'] = None, ) -> None: """ Initialize a ReservedIPCollectionInstanceNetworkInterfaceContext object. @@ -72281,27 +77191,41 @@ def __init__( self.total_count = total_count @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionInstanceNetworkInterfaceContext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionInstanceNetworkInterfaceContext': """Initialize a ReservedIPCollectionInstanceNetworkInterfaceContext object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = ReservedIPCollectionInstanceNetworkInterfaceContextFirst.from_dict(first) + args[ + 'first'] = ReservedIPCollectionInstanceNetworkInterfaceContextFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'first\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON' + ) if (ips := _dict.get('ips')) is not None: args['ips'] = [ReservedIP.from_dict(v) for v in ips] else: - raise ValueError('Required property \'ips\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'ips\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'limit\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = ReservedIPCollectionInstanceNetworkInterfaceContextNext.from_dict(next) + args[ + 'next'] = ReservedIPCollectionInstanceNetworkInterfaceContextNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'total_count\' not present in ReservedIPCollectionInstanceNetworkInterfaceContext JSON' + ) return cls(**args) @classmethod @@ -72344,13 +77268,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionInstanceNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContext') -> bool: + def __eq__( + self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContext') -> bool: + def __ne__( + self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72374,13 +77302,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionInstanceNetworkInterfaceContextFirst': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionInstanceNetworkInterfaceContextFirst': """Initialize a ReservedIPCollectionInstanceNetworkInterfaceContextFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionInstanceNetworkInterfaceContextFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionInstanceNetworkInterfaceContextFirst JSON' + ) return cls(**args) @classmethod @@ -72403,13 +77335,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionInstanceNetworkInterfaceContextFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextFirst') -> bool: + def __eq__( + self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextFirst') -> bool: + def __ne__( + self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72434,13 +77370,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionInstanceNetworkInterfaceContextNext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionInstanceNetworkInterfaceContextNext': """Initialize a ReservedIPCollectionInstanceNetworkInterfaceContextNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionInstanceNetworkInterfaceContextNext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionInstanceNetworkInterfaceContextNext JSON' + ) return cls(**args) @classmethod @@ -72463,13 +77403,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionInstanceNetworkInterfaceContextNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextNext') -> bool: + def __eq__( + self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextNext') -> bool: + def __ne__( + self, other: 'ReservedIPCollectionInstanceNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72500,7 +77444,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionNext JSON' + ) return cls(**args) @classmethod @@ -72557,7 +77503,8 @@ def __init__( limit: int, total_count: int, *, - next: Optional['ReservedIPCollectionVirtualNetworkInterfaceContextNext'] = None, + next: Optional[ + 'ReservedIPCollectionVirtualNetworkInterfaceContextNext'] = None, ) -> None: """ Initialize a ReservedIPCollectionVirtualNetworkInterfaceContext object. @@ -72581,27 +77528,41 @@ def __init__( self.total_count = total_count @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionVirtualNetworkInterfaceContext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionVirtualNetworkInterfaceContext': """Initialize a ReservedIPCollectionVirtualNetworkInterfaceContext object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = ReservedIPCollectionVirtualNetworkInterfaceContextFirst.from_dict(first) + args[ + 'first'] = ReservedIPCollectionVirtualNetworkInterfaceContextFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'first\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON' + ) if (ips := _dict.get('ips')) is not None: args['ips'] = [ReservedIPReference.from_dict(v) for v in ips] else: - raise ValueError('Required property \'ips\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'ips\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'limit\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = ReservedIPCollectionVirtualNetworkInterfaceContextNext.from_dict(next) + args[ + 'next'] = ReservedIPCollectionVirtualNetworkInterfaceContextNext.from_dict( + next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'total_count\' not present in ReservedIPCollectionVirtualNetworkInterfaceContext JSON' + ) return cls(**args) @classmethod @@ -72644,13 +77605,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionVirtualNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContext') -> bool: + def __eq__( + self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContext') -> bool: + def __ne__( + self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72674,13 +77639,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionVirtualNetworkInterfaceContextFirst': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionVirtualNetworkInterfaceContextFirst': """Initialize a ReservedIPCollectionVirtualNetworkInterfaceContextFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionVirtualNetworkInterfaceContextFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionVirtualNetworkInterfaceContextFirst JSON' + ) return cls(**args) @classmethod @@ -72703,13 +77672,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionVirtualNetworkInterfaceContextFirst object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextFirst') -> bool: + def __eq__( + self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextFirst') -> bool: + def __ne__( + self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextFirst' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72734,13 +77707,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionVirtualNetworkInterfaceContextNext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPCollectionVirtualNetworkInterfaceContextNext': """Initialize a ReservedIPCollectionVirtualNetworkInterfaceContextNext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPCollectionVirtualNetworkInterfaceContextNext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPCollectionVirtualNetworkInterfaceContextNext JSON' + ) return cls(**args) @classmethod @@ -72763,13 +77740,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPCollectionVirtualNetworkInterfaceContextNext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextNext') -> bool: + def __eq__( + self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextNext') -> bool: + def __ne__( + self, other: 'ReservedIPCollectionVirtualNetworkInterfaceContextNext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -72910,25 +77891,35 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPReference': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in ReservedIPReference JSON') + raise ValueError( + 'Required property \'address\' not present in ReservedIPReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = ReservedIPReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPReference JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPReference JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPReference JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPReference JSON' + ) return cls(**args) @classmethod @@ -72982,7 +77973,6 @@ class ResourceTypeEnum(str, Enum): SUBNET_RESERVED_IP = 'subnet_reserved_ip' - class ReservedIPReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -73009,7 +77999,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in ReservedIPReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in ReservedIPReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -73050,16 +78042,22 @@ class ReservedIPTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ReservedIPTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ReservedIPTargetEndpointGatewayReference', 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext', 'ReservedIPTargetNetworkInterfaceReferenceTargetContext', 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext', 'ReservedIPTargetLoadBalancerReference', 'ReservedIPTargetVPNGatewayReference', 'ReservedIPTargetVPNServerReference', 'ReservedIPTargetGenericResourceReference']) - ) + ", ".join([ + 'ReservedIPTargetEndpointGatewayReference', + 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext', + 'ReservedIPTargetNetworkInterfaceReferenceTargetContext', + 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext', + 'ReservedIPTargetLoadBalancerReference', + 'ReservedIPTargetVPNGatewayReference', + 'ReservedIPTargetVPNServerReference', + 'ReservedIPTargetGenericResourceReference' + ])) raise Exception(msg) @@ -73073,16 +78071,16 @@ class ReservedIPTargetPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ReservedIPTargetPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ReservedIPTargetPrototypeEndpointGatewayIdentity', 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity']) - ) + ", ".join([ + 'ReservedIPTargetPrototypeEndpointGatewayIdentity', + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity' + ])) raise Exception(msg) @@ -73151,16 +78149,13 @@ class ResourceGroupIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ResourceGroupIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ResourceGroupIdentityById']) - ) + ", ".join(['ResourceGroupIdentityById'])) raise Exception(msg) @@ -73197,15 +78192,21 @@ def from_dict(cls, _dict: Dict) -> 'ResourceGroupReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ResourceGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in ResourceGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ResourceGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in ResourceGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ResourceGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in ResourceGroupReference JSON' + ) return cls(**args) @classmethod @@ -73369,51 +78370,63 @@ def from_dict(cls, _dict: Dict) -> 'Route': if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in Route JSON') + raise ValueError( + 'Required property \'action\' not present in Route JSON') if (advertise := _dict.get('advertise')) is not None: args['advertise'] = advertise else: - raise ValueError('Required property \'advertise\' not present in Route JSON') + raise ValueError( + 'Required property \'advertise\' not present in Route JSON') if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Route JSON') + raise ValueError( + 'Required property \'created_at\' not present in Route JSON') if (creator := _dict.get('creator')) is not None: args['creator'] = creator if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in Route JSON') + raise ValueError( + 'Required property \'destination\' not present in Route JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Route JSON') + raise ValueError( + 'Required property \'href\' not present in Route JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Route JSON') + raise ValueError( + 'Required property \'id\' not present in Route JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in Route JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in Route JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Route JSON') + raise ValueError( + 'Required property \'name\' not present in Route JSON') if (next_hop := _dict.get('next_hop')) is not None: args['next_hop'] = next_hop else: - raise ValueError('Required property \'next_hop\' not present in Route JSON') + raise ValueError( + 'Required property \'next_hop\' not present in Route JSON') if (origin := _dict.get('origin')) is not None: args['origin'] = origin if (priority := _dict.get('priority')) is not None: args['priority'] = priority else: - raise ValueError('Required property \'priority\' not present in Route JSON') + raise ValueError( + 'Required property \'priority\' not present in Route JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in Route JSON') + raise ValueError( + 'Required property \'zone\' not present in Route JSON') return cls(**args) @classmethod @@ -73441,7 +78454,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -73494,7 +78508,6 @@ class ActionEnum(str, Enum): DELIVER = 'deliver' DROP = 'drop' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the route. @@ -73508,7 +78521,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class OriginEnum(str, Enum): """ The origin of this route: @@ -73523,7 +78535,6 @@ class OriginEnum(str, Enum): USER = 'user' - class RouteCollection: """ RouteCollection. @@ -73572,21 +78583,29 @@ def from_dict(cls, _dict: Dict) -> 'RouteCollection': if (first := _dict.get('first')) is not None: args['first'] = RouteCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in RouteCollection JSON') + raise ValueError( + 'Required property \'first\' not present in RouteCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in RouteCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in RouteCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = RouteCollectionNext.from_dict(next) if (routes := _dict.get('routes')) is not None: args['routes'] = [Route.from_dict(v) for v in routes] else: - raise ValueError('Required property \'routes\' not present in RouteCollection JSON') + raise ValueError( + 'Required property \'routes\' not present in RouteCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in RouteCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in RouteCollection JSON' + ) return cls(**args) @classmethod @@ -73665,7 +78684,9 @@ def from_dict(cls, _dict: Dict) -> 'RouteCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in RouteCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -73725,7 +78746,9 @@ def from_dict(cls, _dict: Dict) -> 'RouteCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in RouteCollectionNext JSON' + ) return cls(**args) @classmethod @@ -73810,21 +78833,31 @@ def from_dict(cls, _dict: Dict) -> 'RouteCollectionVPCContext': if (first := _dict.get('first')) is not None: args['first'] = RouteCollectionVPCContextFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in RouteCollectionVPCContext JSON') + raise ValueError( + 'Required property \'first\' not present in RouteCollectionVPCContext JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in RouteCollectionVPCContext JSON') + raise ValueError( + 'Required property \'limit\' not present in RouteCollectionVPCContext JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = RouteCollectionVPCContextNext.from_dict(next) if (routes := _dict.get('routes')) is not None: - args['routes'] = [RouteCollectionVPCContextRoutesItem.from_dict(v) for v in routes] + args['routes'] = [ + RouteCollectionVPCContextRoutesItem.from_dict(v) for v in routes + ] else: - raise ValueError('Required property \'routes\' not present in RouteCollectionVPCContext JSON') + raise ValueError( + 'Required property \'routes\' not present in RouteCollectionVPCContext JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in RouteCollectionVPCContext JSON') + raise ValueError( + 'Required property \'total_count\' not present in RouteCollectionVPCContext JSON' + ) return cls(**args) @classmethod @@ -73903,7 +78936,9 @@ def from_dict(cls, _dict: Dict) -> 'RouteCollectionVPCContextFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteCollectionVPCContextFirst JSON') + raise ValueError( + 'Required property \'href\' not present in RouteCollectionVPCContextFirst JSON' + ) return cls(**args) @classmethod @@ -73963,7 +78998,9 @@ def from_dict(cls, _dict: Dict) -> 'RouteCollectionVPCContextNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteCollectionVPCContextNext JSON') + raise ValueError( + 'Required property \'href\' not present in RouteCollectionVPCContextNext JSON' + ) return cls(**args) @classmethod @@ -74123,51 +79160,73 @@ def from_dict(cls, _dict: Dict) -> 'RouteCollectionVPCContextRoutesItem': if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'action\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (advertise := _dict.get('advertise')) is not None: args['advertise'] = advertise else: - raise ValueError('Required property \'advertise\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'advertise\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'created_at\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (creator := _dict.get('creator')) is not None: args['creator'] = creator if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'destination\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'href\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'id\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'name\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (next_hop := _dict.get('next_hop')) is not None: args['next_hop'] = next_hop else: - raise ValueError('Required property \'next_hop\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'next_hop\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (origin := _dict.get('origin')) is not None: args['origin'] = origin if (priority := _dict.get('priority')) is not None: args['priority'] = priority else: - raise ValueError('Required property \'priority\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'priority\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in RouteCollectionVPCContextRoutesItem JSON') + raise ValueError( + 'Required property \'zone\' not present in RouteCollectionVPCContextRoutesItem JSON' + ) return cls(**args) @classmethod @@ -74195,7 +79254,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -74248,7 +79308,6 @@ class ActionEnum(str, Enum): DELIVER = 'deliver' DROP = 'drop' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the route. @@ -74262,7 +79321,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class OriginEnum(str, Enum): """ The origin of this route: @@ -74277,7 +79335,6 @@ class OriginEnum(str, Enum): USER = 'user' - class RouteCreator: """ If present, the resource that created the route. Routes with this property present @@ -74286,16 +79343,16 @@ class RouteCreator: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RouteCreator object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RouteCreatorVPNGatewayReference', 'RouteCreatorVPNServerReference']) - ) + ", ".join([ + 'RouteCreatorVPNGatewayReference', + 'RouteCreatorVPNServerReference' + ])) raise Exception(msg) @@ -74305,16 +79362,15 @@ class RouteNextHop: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RouteNextHop object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RouteNextHopIP', 'RouteNextHopVPNGatewayConnectionReference']) - ) + ", ".join( + ['RouteNextHopIP', + 'RouteNextHopVPNGatewayConnectionReference'])) raise Exception(msg) @@ -74328,16 +79384,16 @@ class RouteNextHopPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RouteNextHopPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RouteNextHopPatchRouteNextHopIP', 'RouteNextHopPatchVPNGatewayConnectionIdentity']) - ) + ", ".join([ + 'RouteNextHopPatchRouteNextHopIP', + 'RouteNextHopPatchVPNGatewayConnectionIdentity' + ])) raise Exception(msg) @@ -74597,7 +79653,9 @@ def from_dict(cls, _dict: Dict) -> 'RoutePrototype': if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in RoutePrototype JSON') + raise ValueError( + 'Required property \'destination\' not present in RoutePrototype JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name if (next_hop := _dict.get('next_hop')) is not None: @@ -74607,7 +79665,8 @@ def from_dict(cls, _dict: Dict) -> 'RoutePrototype': if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in RoutePrototype JSON') + raise ValueError( + 'Required property \'zone\' not present in RoutePrototype JSON') return cls(**args) @classmethod @@ -74674,7 +79733,6 @@ class ActionEnum(str, Enum): DROP = 'drop' - class RoutePrototypeNextHop: """ If `action` is `deliver`, the next hop that packets will be delivered to. For other @@ -74685,16 +79743,16 @@ class RoutePrototypeNextHop: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RoutePrototypeNextHop object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP', 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity']) - ) + ", ".join([ + 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP', + 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity' + ])) raise Exception(msg) @@ -74744,15 +79802,18 @@ def from_dict(cls, _dict: Dict) -> 'RouteReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteReference JSON') + raise ValueError( + 'Required property \'href\' not present in RouteReference JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RouteReference JSON') + raise ValueError( + 'Required property \'id\' not present in RouteReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RouteReference JSON') + raise ValueError( + 'Required property \'name\' not present in RouteReference JSON') return cls(**args) @classmethod @@ -74821,7 +79882,9 @@ def from_dict(cls, _dict: Dict) -> 'RouteReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in RouteReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in RouteReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -75030,65 +80093,99 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTable': """Initialize a RoutingTable object from a json dictionary.""" args = {} if (accept_routes_from := _dict.get('accept_routes_from')) is not None: - args['accept_routes_from'] = [ResourceFilter.from_dict(v) for v in accept_routes_from] + args['accept_routes_from'] = [ + ResourceFilter.from_dict(v) for v in accept_routes_from + ] else: - raise ValueError('Required property \'accept_routes_from\' not present in RoutingTable JSON') - if (advertise_routes_to := _dict.get('advertise_routes_to')) is not None: + raise ValueError( + 'Required property \'accept_routes_from\' not present in RoutingTable JSON' + ) + if (advertise_routes_to := + _dict.get('advertise_routes_to')) is not None: args['advertise_routes_to'] = advertise_routes_to else: - raise ValueError('Required property \'advertise_routes_to\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'advertise_routes_to\' not present in RoutingTable JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'created_at\' not present in RoutingTable JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'href\' not present in RoutingTable JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'id\' not present in RoutingTable JSON') if (is_default := _dict.get('is_default')) is not None: args['is_default'] = is_default else: - raise ValueError('Required property \'is_default\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'is_default\' not present in RoutingTable JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in RoutingTable JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'name\' not present in RoutingTable JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in RoutingTable JSON') - if (route_direct_link_ingress := _dict.get('route_direct_link_ingress')) is not None: + raise ValueError( + 'Required property \'resource_type\' not present in RoutingTable JSON' + ) + if (route_direct_link_ingress := + _dict.get('route_direct_link_ingress')) is not None: args['route_direct_link_ingress'] = route_direct_link_ingress else: - raise ValueError('Required property \'route_direct_link_ingress\' not present in RoutingTable JSON') - if (route_internet_ingress := _dict.get('route_internet_ingress')) is not None: + raise ValueError( + 'Required property \'route_direct_link_ingress\' not present in RoutingTable JSON' + ) + if (route_internet_ingress := + _dict.get('route_internet_ingress')) is not None: args['route_internet_ingress'] = route_internet_ingress else: - raise ValueError('Required property \'route_internet_ingress\' not present in RoutingTable JSON') - if (route_transit_gateway_ingress := _dict.get('route_transit_gateway_ingress')) is not None: - args['route_transit_gateway_ingress'] = route_transit_gateway_ingress + raise ValueError( + 'Required property \'route_internet_ingress\' not present in RoutingTable JSON' + ) + if (route_transit_gateway_ingress := + _dict.get('route_transit_gateway_ingress')) is not None: + args[ + 'route_transit_gateway_ingress'] = route_transit_gateway_ingress else: - raise ValueError('Required property \'route_transit_gateway_ingress\' not present in RoutingTable JSON') - if (route_vpc_zone_ingress := _dict.get('route_vpc_zone_ingress')) is not None: + raise ValueError( + 'Required property \'route_transit_gateway_ingress\' not present in RoutingTable JSON' + ) + if (route_vpc_zone_ingress := + _dict.get('route_vpc_zone_ingress')) is not None: args['route_vpc_zone_ingress'] = route_vpc_zone_ingress else: - raise ValueError('Required property \'route_vpc_zone_ingress\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'route_vpc_zone_ingress\' not present in RoutingTable JSON' + ) if (routes := _dict.get('routes')) is not None: args['routes'] = [RouteReference.from_dict(v) for v in routes] else: - raise ValueError('Required property \'routes\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'routes\' not present in RoutingTable JSON') if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [SubnetReference.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in RoutingTable JSON') + raise ValueError( + 'Required property \'subnets\' not present in RoutingTable JSON' + ) return cls(**args) @classmethod @@ -75099,7 +80196,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'accept_routes_from') and self.accept_routes_from is not None: + if hasattr( + self, + 'accept_routes_from') and self.accept_routes_from is not None: accept_routes_from_list = [] for v in self.accept_routes_from: if isinstance(v, dict): @@ -75107,7 +80206,9 @@ def to_dict(self) -> Dict: else: accept_routes_from_list.append(v.to_dict()) _dict['accept_routes_from'] = accept_routes_from_list - if hasattr(self, 'advertise_routes_to') and self.advertise_routes_to is not None: + if hasattr( + self, + 'advertise_routes_to') and self.advertise_routes_to is not None: _dict['advertise_routes_to'] = self.advertise_routes_to if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -75117,19 +80218,25 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'is_default') and self.is_default is not None: _dict['is_default'] = self.is_default - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'route_direct_link_ingress') and self.route_direct_link_ingress is not None: + if hasattr(self, 'route_direct_link_ingress' + ) and self.route_direct_link_ingress is not None: _dict['route_direct_link_ingress'] = self.route_direct_link_ingress - if hasattr(self, 'route_internet_ingress') and self.route_internet_ingress is not None: + if hasattr(self, 'route_internet_ingress' + ) and self.route_internet_ingress is not None: _dict['route_internet_ingress'] = self.route_internet_ingress - if hasattr(self, 'route_transit_gateway_ingress') and self.route_transit_gateway_ingress is not None: - _dict['route_transit_gateway_ingress'] = self.route_transit_gateway_ingress - if hasattr(self, 'route_vpc_zone_ingress') and self.route_vpc_zone_ingress is not None: + if hasattr(self, 'route_transit_gateway_ingress' + ) and self.route_transit_gateway_ingress is not None: + _dict[ + 'route_transit_gateway_ingress'] = self.route_transit_gateway_ingress + if hasattr(self, 'route_vpc_zone_ingress' + ) and self.route_vpc_zone_ingress is not None: _dict['route_vpc_zone_ingress'] = self.route_vpc_zone_ingress if hasattr(self, 'routes') and self.routes is not None: routes_list = [] @@ -75177,7 +80284,6 @@ class AdvertiseRoutesToEnum(str, Enum): DIRECT_LINK = 'direct_link' TRANSIT_GATEWAY = 'transit_gateway' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the routing table. @@ -75191,7 +80297,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -75200,7 +80305,6 @@ class ResourceTypeEnum(str, Enum): ROUTING_TABLE = 'routing_table' - class RoutingTableCollection: """ RoutingTableCollection. @@ -75250,21 +80354,31 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTableCollection': if (first := _dict.get('first')) is not None: args['first'] = RoutingTableCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in RoutingTableCollection JSON') + raise ValueError( + 'Required property \'first\' not present in RoutingTableCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in RoutingTableCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in RoutingTableCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = RoutingTableCollectionNext.from_dict(next) if (routing_tables := _dict.get('routing_tables')) is not None: - args['routing_tables'] = [RoutingTable.from_dict(v) for v in routing_tables] + args['routing_tables'] = [ + RoutingTable.from_dict(v) for v in routing_tables + ] else: - raise ValueError('Required property \'routing_tables\' not present in RoutingTableCollection JSON') + raise ValueError( + 'Required property \'routing_tables\' not present in RoutingTableCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in RoutingTableCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in RoutingTableCollection JSON' + ) return cls(**args) @classmethod @@ -75343,7 +80457,9 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTableCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RoutingTableCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in RoutingTableCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -75403,7 +80519,9 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTableCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RoutingTableCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in RoutingTableCollectionNext JSON' + ) return cls(**args) @classmethod @@ -75443,16 +80561,14 @@ class RoutingTableIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RoutingTableIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RoutingTableIdentityById', 'RoutingTableIdentityByHref']) - ) + ", ".join( + ['RoutingTableIdentityById', 'RoutingTableIdentityByHref'])) raise Exception(msg) @@ -75630,18 +80746,26 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTablePatch': """Initialize a RoutingTablePatch object from a json dictionary.""" args = {} if (accept_routes_from := _dict.get('accept_routes_from')) is not None: - args['accept_routes_from'] = [ResourceFilter.from_dict(v) for v in accept_routes_from] - if (advertise_routes_to := _dict.get('advertise_routes_to')) is not None: + args['accept_routes_from'] = [ + ResourceFilter.from_dict(v) for v in accept_routes_from + ] + if (advertise_routes_to := + _dict.get('advertise_routes_to')) is not None: args['advertise_routes_to'] = advertise_routes_to if (name := _dict.get('name')) is not None: args['name'] = name - if (route_direct_link_ingress := _dict.get('route_direct_link_ingress')) is not None: + if (route_direct_link_ingress := + _dict.get('route_direct_link_ingress')) is not None: args['route_direct_link_ingress'] = route_direct_link_ingress - if (route_internet_ingress := _dict.get('route_internet_ingress')) is not None: + if (route_internet_ingress := + _dict.get('route_internet_ingress')) is not None: args['route_internet_ingress'] = route_internet_ingress - if (route_transit_gateway_ingress := _dict.get('route_transit_gateway_ingress')) is not None: - args['route_transit_gateway_ingress'] = route_transit_gateway_ingress - if (route_vpc_zone_ingress := _dict.get('route_vpc_zone_ingress')) is not None: + if (route_transit_gateway_ingress := + _dict.get('route_transit_gateway_ingress')) is not None: + args[ + 'route_transit_gateway_ingress'] = route_transit_gateway_ingress + if (route_vpc_zone_ingress := + _dict.get('route_vpc_zone_ingress')) is not None: args['route_vpc_zone_ingress'] = route_vpc_zone_ingress return cls(**args) @@ -75653,7 +80777,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'accept_routes_from') and self.accept_routes_from is not None: + if hasattr( + self, + 'accept_routes_from') and self.accept_routes_from is not None: accept_routes_from_list = [] for v in self.accept_routes_from: if isinstance(v, dict): @@ -75661,17 +80787,24 @@ def to_dict(self) -> Dict: else: accept_routes_from_list.append(v.to_dict()) _dict['accept_routes_from'] = accept_routes_from_list - if hasattr(self, 'advertise_routes_to') and self.advertise_routes_to is not None: + if hasattr( + self, + 'advertise_routes_to') and self.advertise_routes_to is not None: _dict['advertise_routes_to'] = self.advertise_routes_to if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'route_direct_link_ingress') and self.route_direct_link_ingress is not None: + if hasattr(self, 'route_direct_link_ingress' + ) and self.route_direct_link_ingress is not None: _dict['route_direct_link_ingress'] = self.route_direct_link_ingress - if hasattr(self, 'route_internet_ingress') and self.route_internet_ingress is not None: + if hasattr(self, 'route_internet_ingress' + ) and self.route_internet_ingress is not None: _dict['route_internet_ingress'] = self.route_internet_ingress - if hasattr(self, 'route_transit_gateway_ingress') and self.route_transit_gateway_ingress is not None: - _dict['route_transit_gateway_ingress'] = self.route_transit_gateway_ingress - if hasattr(self, 'route_vpc_zone_ingress') and self.route_vpc_zone_ingress is not None: + if hasattr(self, 'route_transit_gateway_ingress' + ) and self.route_transit_gateway_ingress is not None: + _dict[ + 'route_transit_gateway_ingress'] = self.route_transit_gateway_ingress + if hasattr(self, 'route_vpc_zone_ingress' + ) and self.route_vpc_zone_ingress is not None: _dict['route_vpc_zone_ingress'] = self.route_vpc_zone_ingress return _dict @@ -75704,7 +80837,6 @@ class AdvertiseRoutesToEnum(str, Enum): TRANSIT_GATEWAY = 'transit_gateway' - class RoutingTableReference: """ RoutingTableReference. @@ -75755,19 +80887,27 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTableReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RoutingTableReference JSON') + raise ValueError( + 'Required property \'href\' not present in RoutingTableReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RoutingTableReference JSON') + raise ValueError( + 'Required property \'id\' not present in RoutingTableReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RoutingTableReference JSON') + raise ValueError( + 'Required property \'name\' not present in RoutingTableReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in RoutingTableReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in RoutingTableReference JSON' + ) return cls(**args) @classmethod @@ -75819,7 +80959,6 @@ class ResourceTypeEnum(str, Enum): ROUTING_TABLE = 'routing_table' - class RoutingTableReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -75846,7 +80985,9 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTableReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in RoutingTableReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in RoutingTableReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -75947,39 +81088,52 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroup': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'created_at\' not present in SecurityGroup JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroup JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroup JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroup JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroup JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'resource_group\' not present in SecurityGroup JSON' + ) if (rules := _dict.get('rules')) is not None: args['rules'] = [SecurityGroupRule.from_dict(v) for v in rules] else: - raise ValueError('Required property \'rules\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'rules\' not present in SecurityGroup JSON') if (targets := _dict.get('targets')) is not None: args['targets'] = targets else: - raise ValueError('Required property \'targets\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'targets\' not present in SecurityGroup JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in SecurityGroup JSON') + raise ValueError( + 'Required property \'vpc\' not present in SecurityGroup JSON') return cls(**args) @classmethod @@ -76097,21 +81251,31 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupCollection': if (first := _dict.get('first')) is not None: args['first'] = SecurityGroupCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in SecurityGroupCollection JSON') + raise ValueError( + 'Required property \'first\' not present in SecurityGroupCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in SecurityGroupCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in SecurityGroupCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = SecurityGroupCollectionNext.from_dict(next) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroup.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroup.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in SecurityGroupCollection JSON') + raise ValueError( + 'Required property \'security_groups\' not present in SecurityGroupCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in SecurityGroupCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in SecurityGroupCollection JSON' + ) return cls(**args) @classmethod @@ -76134,7 +81298,8 @@ def to_dict(self) -> Dict: _dict['next'] = self.next else: _dict['next'] = self.next.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -76190,7 +81355,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -76250,7 +81417,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupCollectionNext JSON' + ) return cls(**args) @classmethod @@ -76290,16 +81459,16 @@ class SecurityGroupIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupIdentityById', 'SecurityGroupIdentityByCRN', 'SecurityGroupIdentityByHref']) - ) + ", ".join([ + 'SecurityGroupIdentityById', 'SecurityGroupIdentityByCRN', + 'SecurityGroupIdentityByHref' + ])) raise Exception(msg) @@ -76411,21 +81580,29 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = SecurityGroupReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupReference JSON' + ) return cls(**args) @classmethod @@ -76496,7 +81673,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in SecurityGroupReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in SecurityGroupReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -76594,8 +81773,11 @@ def __init__( (or to any destination, for outbound rules). """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleSecurityGroupRuleProtocolAll', 'SecurityGroupRuleSecurityGroupRuleProtocolICMP', 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP']) - ) + ", ".join([ + 'SecurityGroupRuleSecurityGroupRuleProtocolAll', + 'SecurityGroupRuleSecurityGroupRuleProtocolICMP', + 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP' + ])) raise Exception(msg) @classmethod @@ -76605,8 +81787,11 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRule': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'SecurityGroupRule'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['SecurityGroupRuleSecurityGroupRuleProtocolAll', 'SecurityGroupRuleSecurityGroupRuleProtocolICMP', 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP']) - ) + ", ".join([ + 'SecurityGroupRuleSecurityGroupRuleProtocolAll', + 'SecurityGroupRuleSecurityGroupRuleProtocolICMP', + 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP' + ])) raise Exception(msg) @classmethod @@ -76623,7 +81808,9 @@ def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping['udp'] = 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP' disc_value = _dict.get('protocol') if disc_value is None: - raise ValueError('Discriminator property \'protocol\' not found in SecurityGroupRule JSON') + raise ValueError( + 'Discriminator property \'protocol\' not found in SecurityGroupRule JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -76641,7 +81828,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -76654,7 +81840,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -76666,7 +81851,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class SecurityGroupRuleCollection: """ Collection of rules in a security group. @@ -76692,7 +81876,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleCollection': if (rules := _dict.get('rules')) is not None: args['rules'] = [SecurityGroupRule.from_dict(v) for v in rules] else: - raise ValueError('Required property \'rules\' not present in SecurityGroupRuleCollection JSON') + raise ValueError( + 'Required property \'rules\' not present in SecurityGroupRuleCollection JSON' + ) return cls(**args) @classmethod @@ -76741,16 +81927,14 @@ class SecurityGroupRuleLocal: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleLocal object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleLocalIP', 'SecurityGroupRuleLocalCIDR']) - ) + ", ".join( + ['SecurityGroupRuleLocalIP', 'SecurityGroupRuleLocalCIDR'])) raise Exception(msg) @@ -76764,16 +81948,16 @@ class SecurityGroupRuleLocalPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleLocalPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleLocalPatchIP', 'SecurityGroupRuleLocalPatchCIDR']) - ) + ", ".join([ + 'SecurityGroupRuleLocalPatchIP', + 'SecurityGroupRuleLocalPatchCIDR' + ])) raise Exception(msg) @@ -76786,16 +81970,16 @@ class SecurityGroupRuleLocalPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleLocalPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleLocalPrototypeIP', 'SecurityGroupRuleLocalPrototypeCIDR']) - ) + ", ".join([ + 'SecurityGroupRuleLocalPrototypeIP', + 'SecurityGroupRuleLocalPrototypeCIDR' + ])) raise Exception(msg) @@ -76982,7 +82166,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -76996,7 +82179,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class SecurityGroupRulePrototype: """ SecurityGroupRulePrototype. @@ -77064,8 +82246,11 @@ def __init__( (or to any destination, for outbound rules). """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP']) - ) + ", ".join([ + 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', + 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', + 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' + ])) raise Exception(msg) @classmethod @@ -77075,8 +82260,11 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototype': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'SecurityGroupRulePrototype'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP']) - ) + ", ".join([ + 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', + 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', + 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' + ])) raise Exception(msg) @classmethod @@ -77087,13 +82275,19 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['all'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll' - mapping['icmp'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP' - mapping['tcp'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' - mapping['udp'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' + mapping[ + 'all'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll' + mapping[ + 'icmp'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP' + mapping[ + 'tcp'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' + mapping[ + 'udp'] = 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' disc_value = _dict.get('protocol') if disc_value is None: - raise ValueError('Discriminator property \'protocol\' not found in SecurityGroupRulePrototype JSON') + raise ValueError( + 'Discriminator property \'protocol\' not found in SecurityGroupRulePrototype JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -77111,7 +82305,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -77124,7 +82317,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -77136,7 +82328,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class SecurityGroupRuleRemote: """ The remote IP addresses or security groups from which this rule allows traffic (or to @@ -77145,16 +82336,16 @@ class SecurityGroupRuleRemote: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleRemote object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleRemoteIP', 'SecurityGroupRuleRemoteCIDR', 'SecurityGroupRuleRemoteSecurityGroupReference']) - ) + ", ".join([ + 'SecurityGroupRuleRemoteIP', 'SecurityGroupRuleRemoteCIDR', + 'SecurityGroupRuleRemoteSecurityGroupReference' + ])) raise Exception(msg) @@ -77167,16 +82358,17 @@ class SecurityGroupRuleRemotePatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleRemotePatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleRemotePatchIP', 'SecurityGroupRuleRemotePatchCIDR', 'SecurityGroupRuleRemotePatchSecurityGroupIdentity']) - ) + ", ".join([ + 'SecurityGroupRuleRemotePatchIP', + 'SecurityGroupRuleRemotePatchCIDR', + 'SecurityGroupRuleRemotePatchSecurityGroupIdentity' + ])) raise Exception(msg) @@ -77191,16 +82383,17 @@ class SecurityGroupRuleRemotePrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleRemotePrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleRemotePrototypeIP', 'SecurityGroupRuleRemotePrototypeCIDR', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentity']) - ) + ", ".join([ + 'SecurityGroupRuleRemotePrototypeIP', + 'SecurityGroupRuleRemotePrototypeCIDR', + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentity' + ])) raise Exception(msg) @@ -77256,21 +82449,29 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetCollection': if (first := _dict.get('first')) is not None: args['first'] = SecurityGroupTargetCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in SecurityGroupTargetCollection JSON') + raise ValueError( + 'Required property \'first\' not present in SecurityGroupTargetCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in SecurityGroupTargetCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in SecurityGroupTargetCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = SecurityGroupTargetCollectionNext.from_dict(next) if (targets := _dict.get('targets')) is not None: args['targets'] = targets else: - raise ValueError('Required property \'targets\' not present in SecurityGroupTargetCollection JSON') + raise ValueError( + 'Required property \'targets\' not present in SecurityGroupTargetCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in SecurityGroupTargetCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in SecurityGroupTargetCollection JSON' + ) return cls(**args) @classmethod @@ -77349,7 +82550,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -77409,7 +82612,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetCollectionNext JSON' + ) return cls(**args) @classmethod @@ -77451,16 +82656,20 @@ class SecurityGroupTargetReference: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupTargetReference object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext', 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext', 'SecurityGroupTargetReferenceLoadBalancerReference', 'SecurityGroupTargetReferenceEndpointGatewayReference', 'SecurityGroupTargetReferenceVPNServerReference', 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference']) - ) + ", ".join([ + 'SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext', + 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext', + 'SecurityGroupTargetReferenceLoadBalancerReference', + 'SecurityGroupTargetReferenceEndpointGatewayReference', + 'SecurityGroupTargetReferenceVPNServerReference', + 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference' + ])) raise Exception(msg) @@ -77477,6 +82686,17 @@ class Share: The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + :param str accessor_binding_role: The accessor binding role of this file share: + - `none`: This file share is not participating in access with another file share + - `origin`: This file share is the origin for one or more file shares + (which may be in other accounts) + - `accessor`: This file share is providing access to another file share + (which may be in another account). + :param List[ShareAccessorBindingReference] accessor_bindings: The accessor + bindings for this file share. Each accessor binding identifies a resource + (possibly in another account) with access to this file share's data. + :param List[str] allowed_transit_encryption_modes: The transit encryption modes + allowed for this share. :param datetime created_at: The date and time that the file share is created. :param str crn: The CRN for this file share. :param str encryption: The type of encryption used for this file share. @@ -77497,11 +82717,16 @@ class Share: This property will be present when the `replication_role` is `replica` and at least one replication sync has been completed. + :param List[ShareLifecycleReason] lifecycle_reasons: The reasons for the current + `lifecycle_state` (if any). :param str lifecycle_state: The lifecycle state of the file share. :param List[ShareMountTargetReference] mount_targets: The mount targets for the file share. :param str name: The name for this share. The name is unique across all shares in the region. + :param ShareReference origin_share: (optional) The origin share this accessor + share is referring to. + This property will be present when the `accessor_binding_role` is `accessor`. :param ShareProfileReference profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) for this file share. @@ -77547,12 +82772,16 @@ class Share: def __init__( self, access_control_mode: str, + accessor_binding_role: str, + accessor_bindings: List['ShareAccessorBindingReference'], + allowed_transit_encryption_modes: List[str], created_at: datetime, crn: str, encryption: str, href: str, id: str, iops: int, + lifecycle_reasons: List['ShareLifecycleReason'], lifecycle_state: str, mount_targets: List['ShareMountTargetReference'], name: str, @@ -77569,6 +82798,7 @@ def __init__( encryption_key: Optional['EncryptionKeyReference'] = None, latest_job: Optional['ShareJob'] = None, latest_sync: Optional['ShareLatestSync'] = None, + origin_share: Optional['ShareReference'] = None, replica_share: Optional['ShareReference'] = None, replication_cron_spec: Optional[str] = None, source_share: Optional['ShareReference'] = None, @@ -77585,6 +82815,19 @@ def __init__( The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + :param str accessor_binding_role: The accessor binding role of this file + share: + - `none`: This file share is not participating in access with another file + share + - `origin`: This file share is the origin for one or more file shares + (which may be in other accounts) + - `accessor`: This file share is providing access to another file share + (which may be in another account). + :param List[ShareAccessorBindingReference] accessor_bindings: The accessor + bindings for this file share. Each accessor binding identifies a resource + (possibly in another account) with access to this file share's data. + :param List[str] allowed_transit_encryption_modes: The transit encryption + modes allowed for this share. :param datetime created_at: The date and time that the file share is created. :param str crn: The CRN for this file share. @@ -77595,6 +82838,8 @@ def __init__( the file share. In addition, each client accessing the share will be restricted to 48,000 IOPS. The maximum IOPS for a share may increase in the future. + :param List[ShareLifecycleReason] lifecycle_reasons: The reasons for the + current `lifecycle_state` (if any). :param str lifecycle_state: The lifecycle state of the file share. :param List[ShareMountTargetReference] mount_targets: The mount targets for the file share. @@ -77645,6 +82890,10 @@ def __init__( This property will be present when the `replication_role` is `replica` and at least one replication sync has been completed. + :param ShareReference origin_share: (optional) The origin share this + accessor share is referring to. + This property will be present when the `accessor_binding_role` is + `accessor`. :param ShareReference replica_share: (optional) The replica file share for this source file share. This property will be present when the `replication_role` is `source`. @@ -77656,6 +82905,9 @@ def __init__( This property will be present when the `replication_role` is `replica`. """ self.access_control_mode = access_control_mode + self.accessor_binding_role = accessor_binding_role + self.accessor_bindings = accessor_bindings + self.allowed_transit_encryption_modes = allowed_transit_encryption_modes self.created_at = created_at self.crn = crn self.encryption = encryption @@ -77665,9 +82917,11 @@ def __init__( self.iops = iops self.latest_job = latest_job self.latest_sync = latest_sync + self.lifecycle_reasons = lifecycle_reasons self.lifecycle_state = lifecycle_state self.mount_targets = mount_targets self.name = name + self.origin_share = origin_share self.profile = profile self.replica_share = replica_share self.replication_cron_spec = replication_cron_spec @@ -77685,94 +82939,163 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'Share': """Initialize a Share object from a json dictionary.""" args = {} - if (access_control_mode := _dict.get('access_control_mode')) is not None: + if (access_control_mode := + _dict.get('access_control_mode')) is not None: args['access_control_mode'] = access_control_mode else: - raise ValueError('Required property \'access_control_mode\' not present in Share JSON') + raise ValueError( + 'Required property \'access_control_mode\' not present in Share JSON' + ) + if (accessor_binding_role := + _dict.get('accessor_binding_role')) is not None: + args['accessor_binding_role'] = accessor_binding_role + else: + raise ValueError( + 'Required property \'accessor_binding_role\' not present in Share JSON' + ) + if (accessor_bindings := _dict.get('accessor_bindings')) is not None: + args['accessor_bindings'] = [ + ShareAccessorBindingReference.from_dict(v) + for v in accessor_bindings + ] + else: + raise ValueError( + 'Required property \'accessor_bindings\' not present in Share JSON' + ) + if (allowed_transit_encryption_modes := + _dict.get('allowed_transit_encryption_modes')) is not None: + args[ + 'allowed_transit_encryption_modes'] = allowed_transit_encryption_modes + else: + raise ValueError( + 'Required property \'allowed_transit_encryption_modes\' not present in Share JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Share JSON') + raise ValueError( + 'Required property \'created_at\' not present in Share JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Share JSON') + raise ValueError( + 'Required property \'crn\' not present in Share JSON') if (encryption := _dict.get('encryption')) is not None: args['encryption'] = encryption else: - raise ValueError('Required property \'encryption\' not present in Share JSON') + raise ValueError( + 'Required property \'encryption\' not present in Share JSON') if (encryption_key := _dict.get('encryption_key')) is not None: - args['encryption_key'] = EncryptionKeyReference.from_dict(encryption_key) + args['encryption_key'] = EncryptionKeyReference.from_dict( + encryption_key) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Share JSON') + raise ValueError( + 'Required property \'href\' not present in Share JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Share JSON') + raise ValueError( + 'Required property \'id\' not present in Share JSON') if (iops := _dict.get('iops')) is not None: args['iops'] = iops else: - raise ValueError('Required property \'iops\' not present in Share JSON') + raise ValueError( + 'Required property \'iops\' not present in Share JSON') if (latest_job := _dict.get('latest_job')) is not None: args['latest_job'] = ShareJob.from_dict(latest_job) if (latest_sync := _dict.get('latest_sync')) is not None: args['latest_sync'] = ShareLatestSync.from_dict(latest_sync) + if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: + args['lifecycle_reasons'] = [ + ShareLifecycleReason.from_dict(v) for v in lifecycle_reasons + ] + else: + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in Share JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in Share JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in Share JSON' + ) if (mount_targets := _dict.get('mount_targets')) is not None: - args['mount_targets'] = [ShareMountTargetReference.from_dict(v) for v in mount_targets] + args['mount_targets'] = [ + ShareMountTargetReference.from_dict(v) for v in mount_targets + ] else: - raise ValueError('Required property \'mount_targets\' not present in Share JSON') + raise ValueError( + 'Required property \'mount_targets\' not present in Share JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Share JSON') + raise ValueError( + 'Required property \'name\' not present in Share JSON') + if (origin_share := _dict.get('origin_share')) is not None: + args['origin_share'] = ShareReference.from_dict(origin_share) if (profile := _dict.get('profile')) is not None: args['profile'] = ShareProfileReference.from_dict(profile) else: - raise ValueError('Required property \'profile\' not present in Share JSON') + raise ValueError( + 'Required property \'profile\' not present in Share JSON') if (replica_share := _dict.get('replica_share')) is not None: args['replica_share'] = ShareReference.from_dict(replica_share) - if (replication_cron_spec := _dict.get('replication_cron_spec')) is not None: + if (replication_cron_spec := + _dict.get('replication_cron_spec')) is not None: args['replication_cron_spec'] = replication_cron_spec if (replication_role := _dict.get('replication_role')) is not None: args['replication_role'] = replication_role else: - raise ValueError('Required property \'replication_role\' not present in Share JSON') + raise ValueError( + 'Required property \'replication_role\' not present in Share JSON' + ) if (replication_status := _dict.get('replication_status')) is not None: args['replication_status'] = replication_status else: - raise ValueError('Required property \'replication_status\' not present in Share JSON') - if (replication_status_reasons := _dict.get('replication_status_reasons')) is not None: - args['replication_status_reasons'] = [ShareReplicationStatusReason.from_dict(v) for v in replication_status_reasons] - else: - raise ValueError('Required property \'replication_status_reasons\' not present in Share JSON') + raise ValueError( + 'Required property \'replication_status\' not present in Share JSON' + ) + if (replication_status_reasons := + _dict.get('replication_status_reasons')) is not None: + args['replication_status_reasons'] = [ + ShareReplicationStatusReason.from_dict(v) + for v in replication_status_reasons + ] + else: + raise ValueError( + 'Required property \'replication_status_reasons\' not present in Share JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Share JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Share JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in Share JSON') + raise ValueError( + 'Required property \'resource_type\' not present in Share JSON') if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in Share JSON') + raise ValueError( + 'Required property \'size\' not present in Share JSON') if (source_share := _dict.get('source_share')) is not None: args['source_share'] = ShareReference.from_dict(source_share) if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags else: - raise ValueError('Required property \'user_tags\' not present in Share JSON') + raise ValueError( + 'Required property \'user_tags\' not present in Share JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in Share JSON') + raise ValueError( + 'Required property \'zone\' not present in Share JSON') return cls(**args) @classmethod @@ -77783,8 +83106,26 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'access_control_mode') and self.access_control_mode is not None: + if hasattr( + self, + 'access_control_mode') and self.access_control_mode is not None: _dict['access_control_mode'] = self.access_control_mode + if hasattr(self, 'accessor_binding_role' + ) and self.accessor_binding_role is not None: + _dict['accessor_binding_role'] = self.accessor_binding_role + if hasattr(self, + 'accessor_bindings') and self.accessor_bindings is not None: + accessor_bindings_list = [] + for v in self.accessor_bindings: + if isinstance(v, dict): + accessor_bindings_list.append(v) + else: + accessor_bindings_list.append(v.to_dict()) + _dict['accessor_bindings'] = accessor_bindings_list + if hasattr(self, 'allowed_transit_encryption_modes' + ) and self.allowed_transit_encryption_modes is not None: + _dict[ + 'allowed_transit_encryption_modes'] = self.allowed_transit_encryption_modes if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: @@ -77812,7 +83153,17 @@ def to_dict(self) -> Dict: _dict['latest_sync'] = self.latest_sync else: _dict['latest_sync'] = self.latest_sync.to_dict() - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: + lifecycle_reasons_list = [] + for v in self.lifecycle_reasons: + if isinstance(v, dict): + lifecycle_reasons_list.append(v) + else: + lifecycle_reasons_list.append(v.to_dict()) + _dict['lifecycle_reasons'] = lifecycle_reasons_list + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'mount_targets') and self.mount_targets is not None: mount_targets_list = [] @@ -77824,6 +83175,11 @@ def to_dict(self) -> Dict: _dict['mount_targets'] = mount_targets_list if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name + if hasattr(self, 'origin_share') and self.origin_share is not None: + if isinstance(self.origin_share, dict): + _dict['origin_share'] = self.origin_share + else: + _dict['origin_share'] = self.origin_share.to_dict() if hasattr(self, 'profile') and self.profile is not None: if isinstance(self.profile, dict): _dict['profile'] = self.profile @@ -77834,20 +83190,26 @@ def to_dict(self) -> Dict: _dict['replica_share'] = self.replica_share else: _dict['replica_share'] = self.replica_share.to_dict() - if hasattr(self, 'replication_cron_spec') and self.replication_cron_spec is not None: + if hasattr(self, 'replication_cron_spec' + ) and self.replication_cron_spec is not None: _dict['replication_cron_spec'] = self.replication_cron_spec - if hasattr(self, 'replication_role') and self.replication_role is not None: + if hasattr(self, + 'replication_role') and self.replication_role is not None: _dict['replication_role'] = self.replication_role - if hasattr(self, 'replication_status') and self.replication_status is not None: + if hasattr( + self, + 'replication_status') and self.replication_status is not None: _dict['replication_status'] = self.replication_status - if hasattr(self, 'replication_status_reasons') and self.replication_status_reasons is not None: + if hasattr(self, 'replication_status_reasons' + ) and self.replication_status_reasons is not None: replication_status_reasons_list = [] for v in self.replication_status_reasons: if isinstance(v, dict): replication_status_reasons_list.append(v) else: replication_status_reasons_list.append(v.to_dict()) - _dict['replication_status_reasons'] = replication_status_reasons_list + _dict[ + 'replication_status_reasons'] = replication_status_reasons_list if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group @@ -77905,6 +83267,32 @@ class AccessControlModeEnum(str, Enum): SECURITY_GROUP = 'security_group' VPC = 'vpc' + class AccessorBindingRoleEnum(str, Enum): + """ + The accessor binding role of this file share: + - `none`: This file share is not participating in access with another file share + - `origin`: This file share is the origin for one or more file shares + (which may be in other accounts) + - `accessor`: This file share is providing access to another file share + (which may be in another account). + """ + + ACCESSOR = 'accessor' + NONE = 'none' + ORIGIN = 'origin' + + class AllowedTransitEncryptionModesEnum(str, Enum): + """ + An allowed transit encryption mode for this share. + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' class EncryptionEnum(str, Enum): """ @@ -77914,7 +83302,6 @@ class EncryptionEnum(str, Enum): PROVIDER_MANAGED = 'provider_managed' USER_MANAGED = 'user_managed' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the file share. @@ -77928,7 +83315,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ReplicationRoleEnum(str, Enum): """ The replication role of the file share: @@ -77944,7 +83330,6 @@ class ReplicationRoleEnum(str, Enum): REPLICA = 'replica' SOURCE = 'source' - class ReplicationStatusEnum(str, Enum): """ The replication status of the file share: @@ -77968,7 +83353,6 @@ class ReplicationStatusEnum(str, Enum): NONE = 'none' SPLIT_PENDING = 'split_pending' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -77977,6 +83361,529 @@ class ResourceTypeEnum(str, Enum): SHARE = 'share' +class ShareAccessorBinding: + """ + ShareAccessorBinding. + + :param ShareAccessorBindingAccessor accessor: The accessor for this share + accessor binding. + The resources supported by this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param datetime created_at: The date and time that the share accessor binding + was created. + :param str href: The URL for this share accessor binding. + :param str id: The unique identifier for this share accessor binding. + :param str lifecycle_state: The lifecycle state of the file share accessor + binding. + :param str resource_type: The resource type. + """ + + def __init__( + self, + accessor: 'ShareAccessorBindingAccessor', + created_at: datetime, + href: str, + id: str, + lifecycle_state: str, + resource_type: str, + ) -> None: + """ + Initialize a ShareAccessorBinding object. + + :param ShareAccessorBindingAccessor accessor: The accessor for this share + accessor binding. + The resources supported by this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param datetime created_at: The date and time that the share accessor + binding was created. + :param str href: The URL for this share accessor binding. + :param str id: The unique identifier for this share accessor binding. + :param str lifecycle_state: The lifecycle state of the file share accessor + binding. + :param str resource_type: The resource type. + """ + self.accessor = accessor + self.created_at = created_at + self.href = href + self.id = id + self.lifecycle_state = lifecycle_state + self.resource_type = resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareAccessorBinding': + """Initialize a ShareAccessorBinding object from a json dictionary.""" + args = {} + if (accessor := _dict.get('accessor')) is not None: + args['accessor'] = accessor + else: + raise ValueError( + 'Required property \'accessor\' not present in ShareAccessorBinding JSON' + ) + if (created_at := _dict.get('created_at')) is not None: + args['created_at'] = string_to_datetime(created_at) + else: + raise ValueError( + 'Required property \'created_at\' not present in ShareAccessorBinding JSON' + ) + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in ShareAccessorBinding JSON' + ) + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError( + 'Required property \'id\' not present in ShareAccessorBinding JSON' + ) + if (lifecycle_state := _dict.get('lifecycle_state')) is not None: + args['lifecycle_state'] = lifecycle_state + else: + raise ValueError( + 'Required property \'lifecycle_state\' not present in ShareAccessorBinding JSON' + ) + if (resource_type := _dict.get('resource_type')) is not None: + args['resource_type'] = resource_type + else: + raise ValueError( + 'Required property \'resource_type\' not present in ShareAccessorBinding JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareAccessorBinding object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'accessor') and self.accessor is not None: + if isinstance(self.accessor, dict): + _dict['accessor'] = self.accessor + else: + _dict['accessor'] = self.accessor.to_dict() + if hasattr(self, 'created_at') and self.created_at is not None: + _dict['created_at'] = datetime_to_string(self.created_at) + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + if hasattr(self, 'id') and self.id is not None: + _dict['id'] = self.id + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: + _dict['lifecycle_state'] = self.lifecycle_state + if hasattr(self, 'resource_type') and self.resource_type is not None: + _dict['resource_type'] = self.resource_type + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareAccessorBinding object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareAccessorBinding') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareAccessorBinding') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class LifecycleStateEnum(str, Enum): + """ + The lifecycle state of the file share accessor binding. + """ + + DELETING = 'deleting' + FAILED = 'failed' + PENDING = 'pending' + STABLE = 'stable' + SUSPENDED = 'suspended' + UPDATING = 'updating' + WAITING = 'waiting' + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + SHARE_ACCESSOR_BINDING = 'share_accessor_binding' + + +class ShareAccessorBindingAccessor: + """ + The accessor for this share accessor binding. + The resources supported by this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + + """ + + def __init__(self,) -> None: + """ + Initialize a ShareAccessorBindingAccessor object. + + """ + msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( + ", ".join([ + 'ShareAccessorBindingAccessorShareReference', + 'ShareAccessorBindingAccessorWatsonxMachineLearningReference' + ])) + raise Exception(msg) + + +class ShareAccessorBindingCollection: + """ + ShareAccessorBindingCollection. + + :param List[ShareAccessorBinding] accessor_bindings: Collection of share + accessor bindings. + :param ShareAccessorBindingCollectionFirst first: A link to the first page of + resources. + :param int limit: The maximum number of resources that can be returned by the + request. + :param ShareAccessorBindingCollectionNext next: (optional) A link to the next + page of resources. This property is present for all pages + except the last page. + :param int total_count: The total number of resources across all pages. + """ + + def __init__( + self, + accessor_bindings: List['ShareAccessorBinding'], + first: 'ShareAccessorBindingCollectionFirst', + limit: int, + total_count: int, + *, + next: Optional['ShareAccessorBindingCollectionNext'] = None, + ) -> None: + """ + Initialize a ShareAccessorBindingCollection object. + + :param List[ShareAccessorBinding] accessor_bindings: Collection of share + accessor bindings. + :param ShareAccessorBindingCollectionFirst first: A link to the first page + of resources. + :param int limit: The maximum number of resources that can be returned by + the request. + :param int total_count: The total number of resources across all pages. + :param ShareAccessorBindingCollectionNext next: (optional) A link to the + next page of resources. This property is present for all pages + except the last page. + """ + self.accessor_bindings = accessor_bindings + self.first = first + self.limit = limit + self.next = next + self.total_count = total_count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingCollection': + """Initialize a ShareAccessorBindingCollection object from a json dictionary.""" + args = {} + if (accessor_bindings := _dict.get('accessor_bindings')) is not None: + args['accessor_bindings'] = [ + ShareAccessorBinding.from_dict(v) for v in accessor_bindings + ] + else: + raise ValueError( + 'Required property \'accessor_bindings\' not present in ShareAccessorBindingCollection JSON' + ) + if (first := _dict.get('first')) is not None: + args['first'] = ShareAccessorBindingCollectionFirst.from_dict(first) + else: + raise ValueError( + 'Required property \'first\' not present in ShareAccessorBindingCollection JSON' + ) + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in ShareAccessorBindingCollection JSON' + ) + if (next := _dict.get('next')) is not None: + args['next'] = ShareAccessorBindingCollectionNext.from_dict(next) + if (total_count := _dict.get('total_count')) is not None: + args['total_count'] = total_count + else: + raise ValueError( + 'Required property \'total_count\' not present in ShareAccessorBindingCollection JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareAccessorBindingCollection object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, + 'accessor_bindings') and self.accessor_bindings is not None: + accessor_bindings_list = [] + for v in self.accessor_bindings: + if isinstance(v, dict): + accessor_bindings_list.append(v) + else: + accessor_bindings_list.append(v.to_dict()) + _dict['accessor_bindings'] = accessor_bindings_list + if hasattr(self, 'first') and self.first is not None: + if isinstance(self.first, dict): + _dict['first'] = self.first + else: + _dict['first'] = self.first.to_dict() + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'next') and self.next is not None: + if isinstance(self.next, dict): + _dict['next'] = self.next + else: + _dict['next'] = self.next.to_dict() + if hasattr(self, 'total_count') and self.total_count is not None: + _dict['total_count'] = self.total_count + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareAccessorBindingCollection object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareAccessorBindingCollection') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareAccessorBindingCollection') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareAccessorBindingCollectionFirst: + """ + A link to the first page of resources. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a ShareAccessorBindingCollectionFirst object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingCollectionFirst': + """Initialize a ShareAccessorBindingCollectionFirst object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in ShareAccessorBindingCollectionFirst JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareAccessorBindingCollectionFirst object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareAccessorBindingCollectionFirst object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareAccessorBindingCollectionFirst') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareAccessorBindingCollectionFirst') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareAccessorBindingCollectionNext: + """ + A link to the next page of resources. This property is present for all pages except + the last page. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a ShareAccessorBindingCollectionNext object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingCollectionNext': + """Initialize a ShareAccessorBindingCollectionNext object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in ShareAccessorBindingCollectionNext JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareAccessorBindingCollectionNext object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareAccessorBindingCollectionNext object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareAccessorBindingCollectionNext') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareAccessorBindingCollectionNext') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareAccessorBindingReference: + """ + ShareAccessorBindingReference. + + :param str href: The URL for this share accessor binding. + :param str id: The unique identifier for this share accessor binding. + :param str resource_type: The resource type. + """ + + def __init__( + self, + href: str, + id: str, + resource_type: str, + ) -> None: + """ + Initialize a ShareAccessorBindingReference object. + + :param str href: The URL for this share accessor binding. + :param str id: The unique identifier for this share accessor binding. + :param str resource_type: The resource type. + """ + self.href = href + self.id = id + self.resource_type = resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingReference': + """Initialize a ShareAccessorBindingReference object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in ShareAccessorBindingReference JSON' + ) + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError( + 'Required property \'id\' not present in ShareAccessorBindingReference JSON' + ) + if (resource_type := _dict.get('resource_type')) is not None: + args['resource_type'] = resource_type + else: + raise ValueError( + 'Required property \'resource_type\' not present in ShareAccessorBindingReference JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareAccessorBindingReference object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + if hasattr(self, 'id') and self.id is not None: + _dict['id'] = self.id + if hasattr(self, 'resource_type') and self.resource_type is not None: + _dict['resource_type'] = self.resource_type + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareAccessorBindingReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareAccessorBindingReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareAccessorBindingReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + SHARE_ACCESSOR_BINDING = 'share_accessor_binding' + class ShareCollection: """ @@ -78026,21 +83933,29 @@ def from_dict(cls, _dict: Dict) -> 'ShareCollection': if (first := _dict.get('first')) is not None: args['first'] = ShareCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in ShareCollection JSON') + raise ValueError( + 'Required property \'first\' not present in ShareCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ShareCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in ShareCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = ShareCollectionNext.from_dict(next) if (shares := _dict.get('shares')) is not None: args['shares'] = [Share.from_dict(v) for v in shares] else: - raise ValueError('Required property \'shares\' not present in ShareCollection JSON') + raise ValueError( + 'Required property \'shares\' not present in ShareCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ShareCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in ShareCollection JSON' + ) return cls(**args) @classmethod @@ -78119,7 +84034,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ShareCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -78179,7 +84096,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in ShareCollectionNext JSON' + ) return cls(**args) @classmethod @@ -78219,16 +84138,15 @@ class ShareIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ShareIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ShareIdentityById', 'ShareIdentityByCRN', 'ShareIdentityByHref']) - ) + ", ".join([ + 'ShareIdentityById', 'ShareIdentityByCRN', 'ShareIdentityByHref' + ])) raise Exception(msg) @@ -78361,15 +84279,21 @@ def from_dict(cls, _dict: Dict) -> 'ShareJob': if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in ShareJob JSON') + raise ValueError( + 'Required property \'status\' not present in ShareJob JSON') if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [ShareJobStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + ShareJobStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in ShareJob JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in ShareJob JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareJob JSON') + raise ValueError( + 'Required property \'type\' not present in ShareJob JSON') return cls(**args) @classmethod @@ -78431,7 +84355,6 @@ class StatusEnum(str, Enum): RUNNING = 'running' SUCCEEDED = 'succeeded' - class TypeEnum(str, Enum): """ The type of the file share job: @@ -78448,7 +84371,6 @@ class TypeEnum(str, Enum): REPLICATION_SPLIT = 'replication_split' - class ShareJobStatusReason: """ ShareJobStatusReason. @@ -78491,11 +84413,15 @@ def from_dict(cls, _dict: Dict) -> 'ShareJobStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in ShareJobStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in ShareJobStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in ShareJobStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in ShareJobStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -78547,7 +84473,6 @@ class CodeEnum(str, Enum): CANNOT_REACH_SOURCE_SHARE = 'cannot_reach_source_share' - class ShareLatestSync: """ Information about the latest synchronization for this file share. @@ -78589,15 +84514,21 @@ def from_dict(cls, _dict: Dict) -> 'ShareLatestSync': if (completed_at := _dict.get('completed_at')) is not None: args['completed_at'] = string_to_datetime(completed_at) else: - raise ValueError('Required property \'completed_at\' not present in ShareLatestSync JSON') + raise ValueError( + 'Required property \'completed_at\' not present in ShareLatestSync JSON' + ) if (data_transferred := _dict.get('data_transferred')) is not None: args['data_transferred'] = data_transferred else: - raise ValueError('Required property \'data_transferred\' not present in ShareLatestSync JSON') + raise ValueError( + 'Required property \'data_transferred\' not present in ShareLatestSync JSON' + ) if (started_at := _dict.get('started_at')) is not None: args['started_at'] = string_to_datetime(started_at) else: - raise ValueError('Required property \'started_at\' not present in ShareLatestSync JSON') + raise ValueError( + 'Required property \'started_at\' not present in ShareLatestSync JSON' + ) return cls(**args) @classmethod @@ -78610,7 +84541,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'completed_at') and self.completed_at is not None: _dict['completed_at'] = datetime_to_string(self.completed_at) - if hasattr(self, 'data_transferred') and self.data_transferred is not None: + if hasattr(self, + 'data_transferred') and self.data_transferred is not None: _dict['data_transferred'] = self.data_transferred if hasattr(self, 'started_at') and self.started_at is not None: _dict['started_at'] = datetime_to_string(self.started_at) @@ -78635,6 +84567,123 @@ def __ne__(self, other: 'ShareLatestSync') -> bool: return not self == other +class ShareLifecycleReason: + """ + ShareLifecycleReason. + + :param str code: A reason code for this lifecycle state: + - `origin_share_access_revoked`: The resource has been revoked by the share + owner + - `internal_error`: internal error (contact IBM support) + - `resource_suspended_by_provider`: The resource has been suspended (contact IBM + support) + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param str message: An explanation of the reason for this lifecycle state. + :param str more_info: (optional) Link to documentation about the reason for this + lifecycle state. + """ + + def __init__( + self, + code: str, + message: str, + *, + more_info: Optional[str] = None, + ) -> None: + """ + Initialize a ShareLifecycleReason object. + + :param str code: A reason code for this lifecycle state: + - `origin_share_access_revoked`: The resource has been revoked by the share + owner + - `internal_error`: internal error (contact IBM support) + - `resource_suspended_by_provider`: The resource has been suspended + (contact IBM + support) + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param str message: An explanation of the reason for this lifecycle state. + :param str more_info: (optional) Link to documentation about the reason for + this lifecycle state. + """ + self.code = code + self.message = message + self.more_info = more_info + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareLifecycleReason': + """Initialize a ShareLifecycleReason object from a json dictionary.""" + args = {} + if (code := _dict.get('code')) is not None: + args['code'] = code + else: + raise ValueError( + 'Required property \'code\' not present in ShareLifecycleReason JSON' + ) + if (message := _dict.get('message')) is not None: + args['message'] = message + else: + raise ValueError( + 'Required property \'message\' not present in ShareLifecycleReason JSON' + ) + if (more_info := _dict.get('more_info')) is not None: + args['more_info'] = more_info + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareLifecycleReason object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'code') and self.code is not None: + _dict['code'] = self.code + if hasattr(self, 'message') and self.message is not None: + _dict['message'] = self.message + if hasattr(self, 'more_info') and self.more_info is not None: + _dict['more_info'] = self.more_info + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareLifecycleReason object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareLifecycleReason') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareLifecycleReason') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class CodeEnum(str, Enum): + """ + A reason code for this lifecycle state: + - `origin_share_access_revoked`: The resource has been revoked by the share owner + - `internal_error`: internal error (contact IBM support) + - `resource_suspended_by_provider`: The resource has been suspended (contact IBM + support) + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + INTERNAL_ERROR = 'internal_error' + ORIGIN_SHARE_ACCESS_REVOKED = 'origin_share_access_revoked' + RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + + class ShareMountTarget: """ ShareMountTarget. @@ -78708,7 +84757,8 @@ def __init__( mount_path: Optional[str] = None, primary_ip: Optional['ReservedIPReference'] = None, subnet: Optional['SubnetReference'] = None, - virtual_network_interface: Optional['VirtualNetworkInterfaceReferenceAttachmentContext'] = None, + virtual_network_interface: Optional[ + 'VirtualNetworkInterfaceReferenceAttachmentContext'] = None, ) -> None: """ Initialize a ShareMountTarget object. @@ -78787,50 +84837,71 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'ShareMountTarget': """Initialize a ShareMountTarget object from a json dictionary.""" args = {} - if (access_control_mode := _dict.get('access_control_mode')) is not None: + if (access_control_mode := + _dict.get('access_control_mode')) is not None: args['access_control_mode'] = access_control_mode else: - raise ValueError('Required property \'access_control_mode\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'access_control_mode\' not present in ShareMountTarget JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'created_at\' not present in ShareMountTarget JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'href\' not present in ShareMountTarget JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'id\' not present in ShareMountTarget JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in ShareMountTarget JSON' + ) if (mount_path := _dict.get('mount_path')) is not None: args['mount_path'] = mount_path if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'name\' not present in ShareMountTarget JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ShareMountTarget JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) if (transit_encryption := _dict.get('transit_encryption')) is not None: args['transit_encryption'] = transit_encryption else: - raise ValueError('Required property \'transit_encryption\' not present in ShareMountTarget JSON') - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: - args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface) + raise ValueError( + 'Required property \'transit_encryption\' not present in ShareMountTarget JSON' + ) + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: + args[ + 'virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + virtual_network_interface) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in ShareMountTarget JSON') + raise ValueError( + 'Required property \'vpc\' not present in ShareMountTarget JSON' + ) return cls(**args) @classmethod @@ -78841,7 +84912,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'access_control_mode') and self.access_control_mode is not None: + if hasattr( + self, + 'access_control_mode') and self.access_control_mode is not None: _dict['access_control_mode'] = self.access_control_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -78849,7 +84922,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'mount_path') and self.mount_path is not None: _dict['mount_path'] = self.mount_path @@ -78867,13 +84941,19 @@ def to_dict(self) -> Dict: _dict['subnet'] = self.subnet else: _dict['subnet'] = self.subnet.to_dict() - if hasattr(self, 'transit_encryption') and self.transit_encryption is not None: + if hasattr( + self, + 'transit_encryption') and self.transit_encryption is not None: _dict['transit_encryption'] = self.transit_encryption - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) if hasattr(self, 'vpc') and self.vpc is not None: if isinstance(self.vpc, dict): _dict['vpc'] = self.vpc @@ -78915,7 +84995,6 @@ class AccessControlModeEnum(str, Enum): SECURITY_GROUP = 'security_group' VPC = 'vpc' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the mount target. @@ -78929,7 +85008,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -78937,7 +85015,6 @@ class ResourceTypeEnum(str, Enum): SHARE_MOUNT_TARGET = 'share_mount_target' - class TransitEncryptionEnum(str, Enum): """ The transit encryption mode for this share mount target: @@ -78952,7 +85029,6 @@ class TransitEncryptionEnum(str, Enum): USER_MANAGED = 'user_managed' - class ShareMountTargetCollection: """ ShareMountTargetCollection. @@ -79004,21 +85080,31 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetCollection': if (first := _dict.get('first')) is not None: args['first'] = ShareMountTargetCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in ShareMountTargetCollection JSON') + raise ValueError( + 'Required property \'first\' not present in ShareMountTargetCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ShareMountTargetCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in ShareMountTargetCollection JSON' + ) if (mount_targets := _dict.get('mount_targets')) is not None: - args['mount_targets'] = [ShareMountTarget.from_dict(v) for v in mount_targets] + args['mount_targets'] = [ + ShareMountTarget.from_dict(v) for v in mount_targets + ] else: - raise ValueError('Required property \'mount_targets\' not present in ShareMountTargetCollection JSON') + raise ValueError( + 'Required property \'mount_targets\' not present in ShareMountTargetCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = ShareMountTargetCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ShareMountTargetCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in ShareMountTargetCollection JSON' + ) return cls(**args) @classmethod @@ -79097,7 +85183,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareMountTargetCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ShareMountTargetCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -79157,7 +85245,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareMountTargetCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in ShareMountTargetCollectionNext JSON' + ) return cls(**args) @classmethod @@ -79263,6 +85353,8 @@ class ShareMountTargetPrototype: - `user_managed`: Encrypted in transit using an instance identity certificate. The `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. """ def __init__( @@ -79283,10 +85375,14 @@ def __init__( certificate. The `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup', 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC']) - ) + ", ".join([ + 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup', + 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC' + ])) raise Exception(msg) class TransitEncryptionEnum(str, Enum): @@ -79296,13 +85392,14 @@ class TransitEncryptionEnum(str, Enum): - `user_managed`: Encrypted in transit using an instance identity certificate. The `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. """ NONE = 'none' USER_MANAGED = 'user_managed' - class ShareMountTargetReference: """ ShareMountTargetReference. @@ -79350,23 +85447,32 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetReference': """Initialize a ShareMountTargetReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = ShareMountTargetReferenceDeleted.from_dict(deleted) + args['deleted'] = ShareMountTargetReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareMountTargetReference JSON') + raise ValueError( + 'Required property \'href\' not present in ShareMountTargetReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ShareMountTargetReference JSON') + raise ValueError( + 'Required property \'id\' not present in ShareMountTargetReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ShareMountTargetReference JSON') + raise ValueError( + 'Required property \'name\' not present in ShareMountTargetReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ShareMountTargetReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ShareMountTargetReference JSON' + ) return cls(**args) @classmethod @@ -79418,7 +85524,6 @@ class ResourceTypeEnum(str, Enum): SHARE_MOUNT_TARGET = 'share_mount_target' - class ShareMountTargetReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -79445,7 +85550,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in ShareMountTargetReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in ShareMountTargetReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -79485,16 +85592,16 @@ class ShareMountTargetVirtualNetworkInterfacePrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ShareMountTargetVirtualNetworkInterfacePrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext', 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity']) - ) + ", ".join([ + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext', + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity' + ])) raise Exception(msg) @@ -79508,14 +85615,17 @@ class SharePatch: mount target control access to the mount target. - `vpc`: All clients in the VPC for a mount target have access to the mount target. - For this property to be changed, the share must have no mount targets and - `replication_role` must be `none`. + For this property to be changed, the share must have no mount targets, + `replication_role` must be `none` and `accessor_binding_role` must not be + `accessor`. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. + For this property to be updated, the `accessor_binding_role` must be `none`. :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The value must be in the range supported by the - share's size. - For this property to be changed, the share `lifecycle_state` must be `stable` - and - `replication_role` must not be `replica`. + (IOPS) for the file share. In addition, each client accessing the share will be + restricted to 48,000 IOPS. + The maximum IOPS for a share may increase in the future. For this property to be + changed, the share `accessor_binding_role` must not be `accessor`. :param str name: (optional) The name for this share. The name must not be used by another share in the region. :param ShareProfileIdentity profile: (optional) The profile to use for this file @@ -79528,9 +85638,10 @@ class SharePatch: :param int size: (optional) The size of the file share rounded up to the next gigabyte. The value must not be less than the share's current size, and must not exceed the maximum supported by the share's profile and IOPS. - For this property to be changed, the share `lifecycle_state` must be `stable` - and - `replication_role` must not be `replica`. + For this property to be changed: + - The share `lifecycle_state` must be `stable` + - The share `replication_role` must not be `replica` + - The share `accessor_binding_role` must not be `accessor`. :param List[str] user_tags: (optional) Tags for this resource. """ @@ -79538,6 +85649,7 @@ def __init__( self, *, access_control_mode: Optional[str] = None, + allowed_transit_encryption_modes: Optional[List[str]] = None, iops: Optional[int] = None, name: Optional[str] = None, profile: Optional['ShareProfileIdentity'] = None, @@ -79555,14 +85667,18 @@ def __init__( mount target control access to the mount target. - `vpc`: All clients in the VPC for a mount target have access to the mount target. - For this property to be changed, the share must have no mount targets and - `replication_role` must be `none`. + For this property to be changed, the share must have no mount targets, + `replication_role` must be `none` and `accessor_binding_role` must not be + `accessor`. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. + For this property to be updated, the `accessor_binding_role` must be + `none`. :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The value must be in the range supported by the - share's size. - For this property to be changed, the share `lifecycle_state` must be - `stable` and - `replication_role` must not be `replica`. + (IOPS) for the file share. In addition, each client accessing the share + will be restricted to 48,000 IOPS. + The maximum IOPS for a share may increase in the future. For this property + to be changed, the share `accessor_binding_role` must not be `accessor`. :param str name: (optional) The name for this share. The name must not be used by another share in the region. :param ShareProfileIdentity profile: (optional) The profile to use for this @@ -79576,12 +85692,14 @@ def __init__( :param int size: (optional) The size of the file share rounded up to the next gigabyte. The value must not be less than the share's current size, and must not exceed the maximum supported by the share's profile and IOPS. - For this property to be changed, the share `lifecycle_state` must be - `stable` and - `replication_role` must not be `replica`. + For this property to be changed: + - The share `lifecycle_state` must be `stable` + - The share `replication_role` must not be `replica` + - The share `accessor_binding_role` must not be `accessor`. :param List[str] user_tags: (optional) Tags for this resource. """ self.access_control_mode = access_control_mode + self.allowed_transit_encryption_modes = allowed_transit_encryption_modes self.iops = iops self.name = name self.profile = profile @@ -79593,15 +85711,21 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'SharePatch': """Initialize a SharePatch object from a json dictionary.""" args = {} - if (access_control_mode := _dict.get('access_control_mode')) is not None: + if (access_control_mode := + _dict.get('access_control_mode')) is not None: args['access_control_mode'] = access_control_mode + if (allowed_transit_encryption_modes := + _dict.get('allowed_transit_encryption_modes')) is not None: + args[ + 'allowed_transit_encryption_modes'] = allowed_transit_encryption_modes if (iops := _dict.get('iops')) is not None: args['iops'] = iops if (name := _dict.get('name')) is not None: args['name'] = name if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (replication_cron_spec := _dict.get('replication_cron_spec')) is not None: + if (replication_cron_spec := + _dict.get('replication_cron_spec')) is not None: args['replication_cron_spec'] = replication_cron_spec if (size := _dict.get('size')) is not None: args['size'] = size @@ -79617,8 +85741,14 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'access_control_mode') and self.access_control_mode is not None: + if hasattr( + self, + 'access_control_mode') and self.access_control_mode is not None: _dict['access_control_mode'] = self.access_control_mode + if hasattr(self, 'allowed_transit_encryption_modes' + ) and self.allowed_transit_encryption_modes is not None: + _dict[ + 'allowed_transit_encryption_modes'] = self.allowed_transit_encryption_modes if hasattr(self, 'iops') and self.iops is not None: _dict['iops'] = self.iops if hasattr(self, 'name') and self.name is not None: @@ -79628,7 +85758,8 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'replication_cron_spec') and self.replication_cron_spec is not None: + if hasattr(self, 'replication_cron_spec' + ) and self.replication_cron_spec is not None: _dict['replication_cron_spec'] = self.replication_cron_spec if hasattr(self, 'size') and self.size is not None: _dict['size'] = self.size @@ -79661,13 +85792,26 @@ class AccessControlModeEnum(str, Enum): mount target control access to the mount target. - `vpc`: All clients in the VPC for a mount target have access to the mount target. - For this property to be changed, the share must have no mount targets and - `replication_role` must be `none`. + For this property to be changed, the share must have no mount targets, + `replication_role` must be `none` and `accessor_binding_role` must not be + `accessor`. """ SECURITY_GROUP = 'security_group' VPC = 'vpc' + class AllowedTransitEncryptionModesEnum(str, Enum): + """ + An allowed transit encryption mode for this share. + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' class ShareProfile: @@ -79719,27 +85863,35 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfile': if (capacity := _dict.get('capacity')) is not None: args['capacity'] = capacity else: - raise ValueError('Required property \'capacity\' not present in ShareProfile JSON') + raise ValueError( + 'Required property \'capacity\' not present in ShareProfile JSON' + ) if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in ShareProfile JSON') + raise ValueError( + 'Required property \'family\' not present in ShareProfile JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareProfile JSON') + raise ValueError( + 'Required property \'href\' not present in ShareProfile JSON') if (iops := _dict.get('iops')) is not None: args['iops'] = iops else: - raise ValueError('Required property \'iops\' not present in ShareProfile JSON') + raise ValueError( + 'Required property \'iops\' not present in ShareProfile JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ShareProfile JSON') + raise ValueError( + 'Required property \'name\' not present in ShareProfile JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ShareProfile JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ShareProfile JSON' + ) return cls(**args) @classmethod @@ -79795,7 +85947,6 @@ class FamilyEnum(str, Enum): DEFINED_PERFORMANCE = 'defined_performance' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -79804,23 +85955,22 @@ class ResourceTypeEnum(str, Enum): SHARE_PROFILE = 'share_profile' - class ShareProfileCapacity: """ ShareProfileCapacity. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ShareProfileCapacity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ShareProfileCapacityFixed', 'ShareProfileCapacityRange', 'ShareProfileCapacityEnum', 'ShareProfileCapacityDependentRange']) - ) + ", ".join([ + 'ShareProfileCapacityFixed', 'ShareProfileCapacityRange', + 'ShareProfileCapacityEnum', 'ShareProfileCapacityDependentRange' + ])) raise Exception(msg) @@ -79873,21 +86023,29 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileCollection': if (first := _dict.get('first')) is not None: args['first'] = ShareProfileCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in ShareProfileCollection JSON') + raise ValueError( + 'Required property \'first\' not present in ShareProfileCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in ShareProfileCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in ShareProfileCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = ShareProfileCollectionNext.from_dict(next) if (profiles := _dict.get('profiles')) is not None: args['profiles'] = [ShareProfile.from_dict(v) for v in profiles] else: - raise ValueError('Required property \'profiles\' not present in ShareProfileCollection JSON') + raise ValueError( + 'Required property \'profiles\' not present in ShareProfileCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in ShareProfileCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in ShareProfileCollection JSON' + ) return cls(**args) @classmethod @@ -79966,7 +86124,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareProfileCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in ShareProfileCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -80026,7 +86186,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareProfileCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in ShareProfileCollectionNext JSON' + ) return cls(**args) @classmethod @@ -80066,16 +86228,16 @@ class ShareProfileIOPS: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ShareProfileIOPS object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ShareProfileIOPSFixed', 'ShareProfileIOPSRange', 'ShareProfileIOPSEnum', 'ShareProfileIOPSDependentRange']) - ) + ", ".join([ + 'ShareProfileIOPSFixed', 'ShareProfileIOPSRange', + 'ShareProfileIOPSEnum', 'ShareProfileIOPSDependentRange' + ])) raise Exception(msg) @@ -80085,16 +86247,14 @@ class ShareProfileIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ShareProfileIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ShareProfileIdentityByName', 'ShareProfileIdentityByHref']) - ) + ", ".join( + ['ShareProfileIdentityByName', 'ShareProfileIdentityByHref'])) raise Exception(msg) @@ -80131,15 +86291,21 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareProfileReference JSON') + raise ValueError( + 'Required property \'href\' not present in ShareProfileReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ShareProfileReference JSON') + raise ValueError( + 'Required property \'name\' not present in ShareProfileReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ShareProfileReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ShareProfileReference JSON' + ) return cls(**args) @classmethod @@ -80184,42 +86350,34 @@ class ResourceTypeEnum(str, Enum): SHARE_PROFILE = 'share_profile' - class SharePrototype: """ SharePrototype. - :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The share must be in the `defined_performance` - profile family, and the value must be in the range supported by the share's - specified size. - In addition, each client accessing the share will be restricted to 48,000 IOPS. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount targets for the file share. Each mount target must be in a unique VPC. :param str name: (optional) The name for this share. The name must not be used by another share in the region. If unspecified, the name will be a hyphenated list of randomly-selected words. - :param ShareProfileIdentity profile: The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use - for this file share. The profile must support the share's specified IOPS and - size. :param SharePrototypeShareContext replica_share: (optional) Configuration for a replica file share to create and associate with this file share. If unspecified, a replica may be subsequently added by creating a new file share with a `source_share` referencing this file share. :param List[str] user_tags: (optional) Tags for this resource. - :param ZoneIdentity zone: The zone this file share will reside in. For a replica - share, this must be a different - zone in the same region as the source share. """ def __init__( self, - profile: 'ShareProfileIdentity', - zone: 'ZoneIdentity', *, - iops: Optional[int] = None, + allowed_transit_encryption_modes: Optional[List[str]] = None, mount_targets: Optional[List['ShareMountTargetPrototype']] = None, name: Optional[str] = None, replica_share: Optional['SharePrototypeShareContext'] = None, @@ -80228,20 +86386,13 @@ def __init__( """ Initialize a SharePrototype object. - :param ShareProfileIdentity profile: The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) - to use - for this file share. The profile must support the share's specified IOPS - and size. - :param ZoneIdentity zone: The zone this file share will reside in. For a - replica share, this must be a different - zone in the same region as the source share. - :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The share must be in the `defined_performance` - profile family, and the value must be in the range supported by the share's - specified size. - In addition, each client accessing the share will be restricted to 48,000 - IOPS. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount targets for the file share. Each mount target must be in a unique VPC. :param str name: (optional) The name for this share. The name must not be @@ -80255,10 +86406,25 @@ def __init__( :param List[str] user_tags: (optional) Tags for this resource. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SharePrototypeShareBySize', 'SharePrototypeShareBySourceShare']) - ) + ", ".join([ + 'SharePrototypeShareBySize', 'SharePrototypeShareBySourceShare', + 'SharePrototypeShareByOriginShare' + ])) raise Exception(msg) + class AllowedTransitEncryptionModesEnum(str, Enum): + """ + An allowed transit encryption mode for this share. + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' + class SharePrototypeShareContext: """ @@ -80267,6 +86433,13 @@ class SharePrototypeShareContext: a `source_share` referencing this file share. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param int iops: (optional) The maximum input/output operations per second (IOPS) for the file share. The share must be in the `defined_performance` profile family, and the value must be in the range supported by the share's @@ -80299,6 +86472,7 @@ def __init__( replication_cron_spec: str, zone: 'ZoneIdentity', *, + allowed_transit_encryption_modes: Optional[List[str]] = None, iops: Optional[int] = None, mount_targets: Optional[List['ShareMountTargetPrototype']] = None, name: Optional[str] = None, @@ -80318,6 +86492,13 @@ def __init__( Replication of a share can be scheduled to occur at most once per hour. :param ZoneIdentity zone: The zone this replica file share will reside in. Must be a different zone in the same region as the source share. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param int iops: (optional) The maximum input/output operations per second (IOPS) for the file share. The share must be in the `defined_performance` profile family, and the value must be in the range supported by the share's @@ -80336,6 +86517,7 @@ def __init__( the source share will be used. :param List[str] user_tags: (optional) Tags for this resource. """ + self.allowed_transit_encryption_modes = allowed_transit_encryption_modes self.iops = iops self.mount_targets = mount_targets self.name = name @@ -80349,6 +86531,10 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareContext': """Initialize a SharePrototypeShareContext object from a json dictionary.""" args = {} + if (allowed_transit_encryption_modes := + _dict.get('allowed_transit_encryption_modes')) is not None: + args[ + 'allowed_transit_encryption_modes'] = allowed_transit_encryption_modes if (iops := _dict.get('iops')) is not None: args['iops'] = iops if (mount_targets := _dict.get('mount_targets')) is not None: @@ -80358,11 +86544,16 @@ def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareContext': if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in SharePrototypeShareContext JSON') - if (replication_cron_spec := _dict.get('replication_cron_spec')) is not None: + raise ValueError( + 'Required property \'profile\' not present in SharePrototypeShareContext JSON' + ) + if (replication_cron_spec := + _dict.get('replication_cron_spec')) is not None: args['replication_cron_spec'] = replication_cron_spec else: - raise ValueError('Required property \'replication_cron_spec\' not present in SharePrototypeShareContext JSON') + raise ValueError( + 'Required property \'replication_cron_spec\' not present in SharePrototypeShareContext JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (user_tags := _dict.get('user_tags')) is not None: @@ -80370,7 +86561,9 @@ def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareContext': if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in SharePrototypeShareContext JSON') + raise ValueError( + 'Required property \'zone\' not present in SharePrototypeShareContext JSON' + ) return cls(**args) @classmethod @@ -80381,6 +86574,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'allowed_transit_encryption_modes' + ) and self.allowed_transit_encryption_modes is not None: + _dict[ + 'allowed_transit_encryption_modes'] = self.allowed_transit_encryption_modes if hasattr(self, 'iops') and self.iops is not None: _dict['iops'] = self.iops if hasattr(self, 'mount_targets') and self.mount_targets is not None: @@ -80398,7 +86595,8 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'replication_cron_spec') and self.replication_cron_spec is not None: + if hasattr(self, 'replication_cron_spec' + ) and self.replication_cron_spec is not None: _dict['replication_cron_spec'] = self.replication_cron_spec if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): @@ -80432,6 +86630,19 @@ def __ne__(self, other: 'SharePrototypeShareContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class AllowedTransitEncryptionModesEnum(str, Enum): + """ + An allowed transit encryption mode for this share. + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' + class ShareReference: """ @@ -80493,27 +86704,33 @@ def from_dict(cls, _dict: Dict) -> 'ShareReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ShareReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ShareReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = ShareReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareReference JSON') + raise ValueError( + 'Required property \'href\' not present in ShareReference JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ShareReference JSON') + raise ValueError( + 'Required property \'id\' not present in ShareReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ShareReference JSON') + raise ValueError( + 'Required property \'name\' not present in ShareReference JSON') if (remote := _dict.get('remote')) is not None: args['remote'] = ShareRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ShareReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ShareReference JSON' + ) return cls(**args) @classmethod @@ -80572,7 +86789,6 @@ class ResourceTypeEnum(str, Enum): SHARE = 'share' - class ShareReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -80599,7 +86815,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in ShareReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in ShareReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -80638,6 +86856,9 @@ class ShareRemote: If present, this property indicates that the resource associated with this reference is remote and therefore may not be directly retrievable. + :param AccountReference account: (optional) If present, this property indicates + that the referenced resource is remote to this + account, and identifies the owning account. :param RegionReference region: (optional) If present, this property indicates that the referenced resource is remote to this region, and identifies the native region. @@ -80646,21 +86867,28 @@ class ShareRemote: def __init__( self, *, + account: Optional['AccountReference'] = None, region: Optional['RegionReference'] = None, ) -> None: """ Initialize a ShareRemote object. + :param AccountReference account: (optional) If present, this property + indicates that the referenced resource is remote to this + account, and identifies the owning account. :param RegionReference region: (optional) If present, this property indicates that the referenced resource is remote to this region, and identifies the native region. """ + self.account = account self.region = region @classmethod def from_dict(cls, _dict: Dict) -> 'ShareRemote': """Initialize a ShareRemote object from a json dictionary.""" args = {} + if (account := _dict.get('account')) is not None: + args['account'] = AccountReference.from_dict(account) if (region := _dict.get('region')) is not None: args['region'] = RegionReference.from_dict(region) return cls(**args) @@ -80673,6 +86901,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'account') and self.account is not None: + if isinstance(self.account, dict): + _dict['account'] = self.account + else: + _dict['account'] = self.account.to_dict() if hasattr(self, 'region') and self.region is not None: if isinstance(self.region, dict): _dict['region'] = self.region @@ -80741,11 +86974,15 @@ def from_dict(cls, _dict: Dict) -> 'ShareReplicationStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in ShareReplicationStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in ShareReplicationStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in ShareReplicationStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in ShareReplicationStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -80797,7 +87034,6 @@ class CodeEnum(str, Enum): CANNOT_REACH_SOURCE_SHARE = 'cannot_reach_source_share' - class Snapshot: """ Snapshot. @@ -80810,6 +87046,13 @@ class Snapshot: this snapshot was completed. If absent, this snapshot's data has not yet been captured. Additionally, this property may be absent for snapshots created before 1 January 2022. + :param SnapshotCatalogOffering catalog_offering: (optional) The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering inherited from the snapshot's source. If a virtual server instance is + provisioned with a `source_snapshot` specifying this snapshot, the virtual + server + instance will use this snapshot's catalog offering, including its pricing plan. + If absent, this snapshot is not associated with a catalog offering. :param List[SnapshotClone] clones: Clones for this snapshot. :param List[SnapshotCopiesItem] copies: The copies of this snapshot. :param datetime created_at: The date and time that this snapshot was created. @@ -80876,9 +87119,11 @@ def __init__( *, backup_policy_plan: Optional['BackupPolicyPlanReference'] = None, captured_at: Optional[datetime] = None, + catalog_offering: Optional['SnapshotCatalogOffering'] = None, encryption_key: Optional['EncryptionKeyReference'] = None, operating_system: Optional['OperatingSystem'] = None, - snapshot_consistency_group: Optional['SnapshotConsistencyGroupReference'] = None, + snapshot_consistency_group: Optional[ + 'SnapshotConsistencyGroupReference'] = None, source_image: Optional['ImageReference'] = None, source_snapshot: Optional['SnapshotSourceSnapshot'] = None, ) -> None: @@ -80922,6 +87167,15 @@ def __init__( for this snapshot was completed. If absent, this snapshot's data has not yet been captured. Additionally, this property may be absent for snapshots created before 1 January 2022. + :param SnapshotCatalogOffering catalog_offering: (optional) The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering inherited from the snapshot's source. If a virtual server instance + is + provisioned with a `source_snapshot` specifying this snapshot, the virtual + server + instance will use this snapshot's catalog offering, including its pricing + plan. + If absent, this snapshot is not associated with a catalog offering. :param EncryptionKeyReference encryption_key: (optional) The root key used to wrap the data encryption key for the source volume. This property will be present for volumes with an `encryption` type of @@ -80940,6 +87194,7 @@ def __init__( self.backup_policy_plan = backup_policy_plan self.bootable = bootable self.captured_at = captured_at + self.catalog_offering = catalog_offering self.clones = clones self.copies = copies self.created_at = created_at @@ -80968,91 +87223,126 @@ def from_dict(cls, _dict: Dict) -> 'Snapshot': """Initialize a Snapshot object from a json dictionary.""" args = {} if (backup_policy_plan := _dict.get('backup_policy_plan')) is not None: - args['backup_policy_plan'] = BackupPolicyPlanReference.from_dict(backup_policy_plan) + args['backup_policy_plan'] = BackupPolicyPlanReference.from_dict( + backup_policy_plan) if (bootable := _dict.get('bootable')) is not None: args['bootable'] = bootable else: - raise ValueError('Required property \'bootable\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'bootable\' not present in Snapshot JSON') if (captured_at := _dict.get('captured_at')) is not None: args['captured_at'] = string_to_datetime(captured_at) + if (catalog_offering := _dict.get('catalog_offering')) is not None: + args['catalog_offering'] = SnapshotCatalogOffering.from_dict( + catalog_offering) if (clones := _dict.get('clones')) is not None: args['clones'] = [SnapshotClone.from_dict(v) for v in clones] else: - raise ValueError('Required property \'clones\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'clones\' not present in Snapshot JSON') if (copies := _dict.get('copies')) is not None: args['copies'] = [SnapshotCopiesItem.from_dict(v) for v in copies] else: - raise ValueError('Required property \'copies\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'copies\' not present in Snapshot JSON') if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'created_at\' not present in Snapshot JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'crn\' not present in Snapshot JSON') if (deletable := _dict.get('deletable')) is not None: args['deletable'] = deletable else: - raise ValueError('Required property \'deletable\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'deletable\' not present in Snapshot JSON') if (encryption := _dict.get('encryption')) is not None: args['encryption'] = encryption else: - raise ValueError('Required property \'encryption\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'encryption\' not present in Snapshot JSON') if (encryption_key := _dict.get('encryption_key')) is not None: - args['encryption_key'] = EncryptionKeyReference.from_dict(encryption_key) + args['encryption_key'] = EncryptionKeyReference.from_dict( + encryption_key) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'href\' not present in Snapshot JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'id\' not present in Snapshot JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in Snapshot JSON' + ) if (minimum_capacity := _dict.get('minimum_capacity')) is not None: args['minimum_capacity'] = minimum_capacity else: - raise ValueError('Required property \'minimum_capacity\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'minimum_capacity\' not present in Snapshot JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'name\' not present in Snapshot JSON') if (operating_system := _dict.get('operating_system')) is not None: - args['operating_system'] = OperatingSystem.from_dict(operating_system) + args['operating_system'] = OperatingSystem.from_dict( + operating_system) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Snapshot JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'resource_type\' not present in Snapshot JSON' + ) if (service_tags := _dict.get('service_tags')) is not None: args['service_tags'] = service_tags else: - raise ValueError('Required property \'service_tags\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'service_tags\' not present in Snapshot JSON' + ) if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in Snapshot JSON') - if (snapshot_consistency_group := _dict.get('snapshot_consistency_group')) is not None: - args['snapshot_consistency_group'] = SnapshotConsistencyGroupReference.from_dict(snapshot_consistency_group) + raise ValueError( + 'Required property \'size\' not present in Snapshot JSON') + if (snapshot_consistency_group := + _dict.get('snapshot_consistency_group')) is not None: + args[ + 'snapshot_consistency_group'] = SnapshotConsistencyGroupReference.from_dict( + snapshot_consistency_group) if (source_image := _dict.get('source_image')) is not None: args['source_image'] = ImageReference.from_dict(source_image) if (source_snapshot := _dict.get('source_snapshot')) is not None: - args['source_snapshot'] = SnapshotSourceSnapshot.from_dict(source_snapshot) + args['source_snapshot'] = SnapshotSourceSnapshot.from_dict( + source_snapshot) if (source_volume := _dict.get('source_volume')) is not None: args['source_volume'] = VolumeReference.from_dict(source_volume) else: - raise ValueError('Required property \'source_volume\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'source_volume\' not present in Snapshot JSON' + ) if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags else: - raise ValueError('Required property \'user_tags\' not present in Snapshot JSON') + raise ValueError( + 'Required property \'user_tags\' not present in Snapshot JSON') return cls(**args) @classmethod @@ -81063,7 +87353,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'backup_policy_plan') and self.backup_policy_plan is not None: + if hasattr( + self, + 'backup_policy_plan') and self.backup_policy_plan is not None: if isinstance(self.backup_policy_plan, dict): _dict['backup_policy_plan'] = self.backup_policy_plan else: @@ -81072,6 +87364,12 @@ def to_dict(self) -> Dict: _dict['bootable'] = self.bootable if hasattr(self, 'captured_at') and self.captured_at is not None: _dict['captured_at'] = datetime_to_string(self.captured_at) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: + if isinstance(self.catalog_offering, dict): + _dict['catalog_offering'] = self.catalog_offering + else: + _dict['catalog_offering'] = self.catalog_offering.to_dict() if hasattr(self, 'clones') and self.clones is not None: clones_list = [] for v in self.clones: @@ -81105,13 +87403,16 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state - if hasattr(self, 'minimum_capacity') and self.minimum_capacity is not None: + if hasattr(self, + 'minimum_capacity') and self.minimum_capacity is not None: _dict['minimum_capacity'] = self.minimum_capacity if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'operating_system') and self.operating_system is not None: + if hasattr(self, + 'operating_system') and self.operating_system is not None: if isinstance(self.operating_system, dict): _dict['operating_system'] = self.operating_system else: @@ -81127,17 +87428,22 @@ def to_dict(self) -> Dict: _dict['service_tags'] = self.service_tags if hasattr(self, 'size') and self.size is not None: _dict['size'] = self.size - if hasattr(self, 'snapshot_consistency_group') and self.snapshot_consistency_group is not None: + if hasattr(self, 'snapshot_consistency_group' + ) and self.snapshot_consistency_group is not None: if isinstance(self.snapshot_consistency_group, dict): - _dict['snapshot_consistency_group'] = self.snapshot_consistency_group + _dict[ + 'snapshot_consistency_group'] = self.snapshot_consistency_group else: - _dict['snapshot_consistency_group'] = self.snapshot_consistency_group.to_dict() + _dict[ + 'snapshot_consistency_group'] = self.snapshot_consistency_group.to_dict( + ) if hasattr(self, 'source_image') and self.source_image is not None: if isinstance(self.source_image, dict): _dict['source_image'] = self.source_image else: _dict['source_image'] = self.source_image.to_dict() - if hasattr(self, 'source_snapshot') and self.source_snapshot is not None: + if hasattr(self, + 'source_snapshot') and self.source_snapshot is not None: if isinstance(self.source_snapshot, dict): _dict['source_snapshot'] = self.source_snapshot else: @@ -81177,7 +87483,6 @@ class EncryptionEnum(str, Enum): PROVIDER_MANAGED = 'provider_managed' USER_MANAGED = 'user_managed' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of this snapshot. @@ -81191,7 +87496,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -81200,6 +87504,91 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' +class SnapshotCatalogOffering: + """ + SnapshotCatalogOffering. + + :param CatalogOfferingVersionPlanReference plan: (optional) The billing plan + associated with the catalog offering version. + If absent, no billing plan is associated with the catalog offering version + (free). + :param CatalogOfferingVersionReference version: The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version contained in this snapshot. + """ + + def __init__( + self, + version: 'CatalogOfferingVersionReference', + *, + plan: Optional['CatalogOfferingVersionPlanReference'] = None, + ) -> None: + """ + Initialize a SnapshotCatalogOffering object. + + :param CatalogOfferingVersionReference version: The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version contained in this snapshot. + :param CatalogOfferingVersionPlanReference plan: (optional) The billing + plan associated with the catalog offering version. + If absent, no billing plan is associated with the catalog offering version + (free). + """ + self.plan = plan + self.version = version + + @classmethod + def from_dict(cls, _dict: Dict) -> 'SnapshotCatalogOffering': + """Initialize a SnapshotCatalogOffering object from a json dictionary.""" + args = {} + if (plan := _dict.get('plan')) is not None: + args['plan'] = CatalogOfferingVersionPlanReference.from_dict(plan) + if (version := _dict.get('version')) is not None: + args['version'] = CatalogOfferingVersionReference.from_dict(version) + else: + raise ValueError( + 'Required property \'version\' not present in SnapshotCatalogOffering JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a SnapshotCatalogOffering object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'plan') and self.plan is not None: + if isinstance(self.plan, dict): + _dict['plan'] = self.plan + else: + _dict['plan'] = self.plan.to_dict() + if hasattr(self, 'version') and self.version is not None: + if isinstance(self.version, dict): + _dict['version'] = self.version + else: + _dict['version'] = self.version.to_dict() + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this SnapshotCatalogOffering object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'SnapshotCatalogOffering') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'SnapshotCatalogOffering') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + class SnapshotClone: """ @@ -81238,15 +87627,20 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotClone': if (available := _dict.get('available')) is not None: args['available'] = available else: - raise ValueError('Required property \'available\' not present in SnapshotClone JSON') + raise ValueError( + 'Required property \'available\' not present in SnapshotClone JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in SnapshotClone JSON') + raise ValueError( + 'Required property \'created_at\' not present in SnapshotClone JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in SnapshotClone JSON') + raise ValueError( + 'Required property \'zone\' not present in SnapshotClone JSON') return cls(**args) @classmethod @@ -81312,7 +87706,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotCloneCollection': if (clones := _dict.get('clones')) is not None: args['clones'] = [SnapshotClone.from_dict(v) for v in clones] else: - raise ValueError('Required property \'clones\' not present in SnapshotCloneCollection JSON') + raise ValueError( + 'Required property \'clones\' not present in SnapshotCloneCollection JSON' + ) return cls(**args) @classmethod @@ -81381,7 +87777,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotClonePrototype': if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in SnapshotClonePrototype JSON') + raise ValueError( + 'Required property \'zone\' not present in SnapshotClonePrototype JSON' + ) return cls(**args) @classmethod @@ -81467,21 +87865,29 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotCollection': if (first := _dict.get('first')) is not None: args['first'] = SnapshotCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in SnapshotCollection JSON') + raise ValueError( + 'Required property \'first\' not present in SnapshotCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in SnapshotCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in SnapshotCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = SnapshotCollectionNext.from_dict(next) if (snapshots := _dict.get('snapshots')) is not None: args['snapshots'] = [Snapshot.from_dict(v) for v in snapshots] else: - raise ValueError('Required property \'snapshots\' not present in SnapshotCollection JSON') + raise ValueError( + 'Required property \'snapshots\' not present in SnapshotCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in SnapshotCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in SnapshotCollection JSON' + ) return cls(**args) @classmethod @@ -81560,7 +87966,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -81620,7 +88028,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotCollectionNext JSON' + ) return cls(**args) @classmethod @@ -81744,51 +88154,78 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroup': """Initialize a SnapshotConsistencyGroup object from a json dictionary.""" args = {} if (backup_policy_plan := _dict.get('backup_policy_plan')) is not None: - args['backup_policy_plan'] = BackupPolicyPlanReference.from_dict(backup_policy_plan) + args['backup_policy_plan'] = BackupPolicyPlanReference.from_dict( + backup_policy_plan) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'created_at\' not present in SnapshotConsistencyGroup JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SnapshotConsistencyGroup JSON') - if (delete_snapshots_on_delete := _dict.get('delete_snapshots_on_delete')) is not None: + raise ValueError( + 'Required property \'crn\' not present in SnapshotConsistencyGroup JSON' + ) + if (delete_snapshots_on_delete := + _dict.get('delete_snapshots_on_delete')) is not None: args['delete_snapshots_on_delete'] = delete_snapshots_on_delete else: - raise ValueError('Required property \'delete_snapshots_on_delete\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'delete_snapshots_on_delete\' not present in SnapshotConsistencyGroup JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotConsistencyGroup JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'id\' not present in SnapshotConsistencyGroup JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in SnapshotConsistencyGroup JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'name\' not present in SnapshotConsistencyGroup JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'resource_group\' not present in SnapshotConsistencyGroup JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SnapshotConsistencyGroup JSON' + ) if (service_tags := _dict.get('service_tags')) is not None: args['service_tags'] = service_tags else: - raise ValueError('Required property \'service_tags\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'service_tags\' not present in SnapshotConsistencyGroup JSON' + ) if (snapshots := _dict.get('snapshots')) is not None: - args['snapshots'] = [SnapshotReference.from_dict(v) for v in snapshots] + args['snapshots'] = [ + SnapshotReference.from_dict(v) for v in snapshots + ] else: - raise ValueError('Required property \'snapshots\' not present in SnapshotConsistencyGroup JSON') + raise ValueError( + 'Required property \'snapshots\' not present in SnapshotConsistencyGroup JSON' + ) return cls(**args) @classmethod @@ -81799,7 +88236,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'backup_policy_plan') and self.backup_policy_plan is not None: + if hasattr( + self, + 'backup_policy_plan') and self.backup_policy_plan is not None: if isinstance(self.backup_policy_plan, dict): _dict['backup_policy_plan'] = self.backup_policy_plan else: @@ -81808,13 +88247,16 @@ def to_dict(self) -> Dict: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'delete_snapshots_on_delete') and self.delete_snapshots_on_delete is not None: - _dict['delete_snapshots_on_delete'] = self.delete_snapshots_on_delete + if hasattr(self, 'delete_snapshots_on_delete' + ) and self.delete_snapshots_on_delete is not None: + _dict[ + 'delete_snapshots_on_delete'] = self.delete_snapshots_on_delete if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -81868,7 +88310,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -81877,7 +88318,6 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT_CONSISTENCY_GROUP = 'snapshot_consistency_group' - class SnapshotConsistencyGroupCollection: """ SnapshotConsistencyGroupCollection. @@ -81928,23 +88368,37 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupCollection': """Initialize a SnapshotConsistencyGroupCollection object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = SnapshotConsistencyGroupCollectionFirst.from_dict(first) + args['first'] = SnapshotConsistencyGroupCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in SnapshotConsistencyGroupCollection JSON') + raise ValueError( + 'Required property \'first\' not present in SnapshotConsistencyGroupCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in SnapshotConsistencyGroupCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in SnapshotConsistencyGroupCollection JSON' + ) if (next := _dict.get('next')) is not None: - args['next'] = SnapshotConsistencyGroupCollectionNext.from_dict(next) - if (snapshot_consistency_groups := _dict.get('snapshot_consistency_groups')) is not None: - args['snapshot_consistency_groups'] = [SnapshotConsistencyGroup.from_dict(v) for v in snapshot_consistency_groups] - else: - raise ValueError('Required property \'snapshot_consistency_groups\' not present in SnapshotConsistencyGroupCollection JSON') + args['next'] = SnapshotConsistencyGroupCollectionNext.from_dict( + next) + if (snapshot_consistency_groups := + _dict.get('snapshot_consistency_groups')) is not None: + args['snapshot_consistency_groups'] = [ + SnapshotConsistencyGroup.from_dict(v) + for v in snapshot_consistency_groups + ] + else: + raise ValueError( + 'Required property \'snapshot_consistency_groups\' not present in SnapshotConsistencyGroupCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in SnapshotConsistencyGroupCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in SnapshotConsistencyGroupCollection JSON' + ) return cls(**args) @classmethod @@ -81967,14 +88421,16 @@ def to_dict(self) -> Dict: _dict['next'] = self.next else: _dict['next'] = self.next.to_dict() - if hasattr(self, 'snapshot_consistency_groups') and self.snapshot_consistency_groups is not None: + if hasattr(self, 'snapshot_consistency_groups' + ) and self.snapshot_consistency_groups is not None: snapshot_consistency_groups_list = [] for v in self.snapshot_consistency_groups: if isinstance(v, dict): snapshot_consistency_groups_list.append(v) else: snapshot_consistency_groups_list.append(v.to_dict()) - _dict['snapshot_consistency_groups'] = snapshot_consistency_groups_list + _dict[ + 'snapshot_consistency_groups'] = snapshot_consistency_groups_list if hasattr(self, 'total_count') and self.total_count is not None: _dict['total_count'] = self.total_count return _dict @@ -82017,13 +88473,16 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupCollectionFirst': + def from_dict(cls, + _dict: Dict) -> 'SnapshotConsistencyGroupCollectionFirst': """Initialize a SnapshotConsistencyGroupCollectionFirst object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotConsistencyGroupCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotConsistencyGroupCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -82083,7 +88542,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotConsistencyGroupCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotConsistencyGroupCollectionNext JSON' + ) return cls(**args) @classmethod @@ -82150,7 +88611,8 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupPatch': """Initialize a SnapshotConsistencyGroupPatch object from a json dictionary.""" args = {} - if (delete_snapshots_on_delete := _dict.get('delete_snapshots_on_delete')) is not None: + if (delete_snapshots_on_delete := + _dict.get('delete_snapshots_on_delete')) is not None: args['delete_snapshots_on_delete'] = delete_snapshots_on_delete if (name := _dict.get('name')) is not None: args['name'] = name @@ -82164,8 +88626,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_snapshots_on_delete') and self.delete_snapshots_on_delete is not None: - _dict['delete_snapshots_on_delete'] = self.delete_snapshots_on_delete + if hasattr(self, 'delete_snapshots_on_delete' + ) and self.delete_snapshots_on_delete is not None: + _dict[ + 'delete_snapshots_on_delete'] = self.delete_snapshots_on_delete if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name return _dict @@ -82228,8 +88692,9 @@ def __init__( used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots']) - ) + ", ".join([ + 'SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots' + ])) raise Exception(msg) @@ -82286,25 +88751,37 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SnapshotConsistencyGroupReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SnapshotConsistencyGroupReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = SnapshotConsistencyGroupReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = SnapshotConsistencyGroupReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotConsistencyGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotConsistencyGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SnapshotConsistencyGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in SnapshotConsistencyGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SnapshotConsistencyGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in SnapshotConsistencyGroupReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SnapshotConsistencyGroupReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SnapshotConsistencyGroupReference JSON' + ) return cls(**args) @classmethod @@ -82358,7 +88835,6 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT_CONSISTENCY_GROUP = 'snapshot_consistency_group' - class SnapshotConsistencyGroupReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -82379,13 +88855,16 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupReferenceDeleted': + def from_dict(cls, + _dict: Dict) -> 'SnapshotConsistencyGroupReferenceDeleted': """Initialize a SnapshotConsistencyGroupReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in SnapshotConsistencyGroupReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in SnapshotConsistencyGroupReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -82477,27 +88956,37 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotCopiesItem': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SnapshotCopiesItem JSON') + raise ValueError( + 'Required property \'crn\' not present in SnapshotCopiesItem JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = SnapshotReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotCopiesItem JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotCopiesItem JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SnapshotCopiesItem JSON') + raise ValueError( + 'Required property \'id\' not present in SnapshotCopiesItem JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SnapshotCopiesItem JSON') + raise ValueError( + 'Required property \'name\' not present in SnapshotCopiesItem JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = SnapshotRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SnapshotCopiesItem JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SnapshotCopiesItem JSON' + ) return cls(**args) @classmethod @@ -82556,23 +89045,22 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' - class SnapshotIdentity: """ Identifies a snapshot by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SnapshotIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SnapshotIdentityById', 'SnapshotIdentityByCRN', 'SnapshotIdentityByHref']) - ) + ", ".join([ + 'SnapshotIdentityById', 'SnapshotIdentityByCRN', + 'SnapshotIdentityByHref' + ])) raise Exception(msg) @@ -82691,8 +89179,10 @@ def __init__( this snapshot. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SnapshotPrototypeSnapshotBySourceVolume', 'SnapshotPrototypeSnapshotBySourceSnapshot']) - ) + ", ".join([ + 'SnapshotPrototypeSnapshotBySourceVolume', + 'SnapshotPrototypeSnapshotBySourceSnapshot' + ])) raise Exception(msg) @@ -82733,7 +89223,9 @@ def __init__( self.user_tags = user_tags @classmethod - def from_dict(cls, _dict: Dict) -> 'SnapshotPrototypeSnapshotConsistencyGroupContext': + def from_dict( + cls, + _dict: Dict) -> 'SnapshotPrototypeSnapshotConsistencyGroupContext': """Initialize a SnapshotPrototypeSnapshotConsistencyGroupContext object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -82741,7 +89233,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotPrototypeSnapshotConsistencyGroupCon if (source_volume := _dict.get('source_volume')) is not None: args['source_volume'] = source_volume else: - raise ValueError('Required property \'source_volume\' not present in SnapshotPrototypeSnapshotConsistencyGroupContext JSON') + raise ValueError( + 'Required property \'source_volume\' not present in SnapshotPrototypeSnapshotConsistencyGroupContext JSON' + ) if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags return cls(**args) @@ -82773,13 +89267,17 @@ def __str__(self) -> str: """Return a `str` version of this SnapshotPrototypeSnapshotConsistencyGroupContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SnapshotPrototypeSnapshotConsistencyGroupContext') -> bool: + def __eq__( + self, + other: 'SnapshotPrototypeSnapshotConsistencyGroupContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SnapshotPrototypeSnapshotConsistencyGroupContext') -> bool: + def __ne__( + self, + other: 'SnapshotPrototypeSnapshotConsistencyGroupContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -82844,27 +89342,37 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SnapshotReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SnapshotReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = SnapshotReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotReference JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SnapshotReference JSON') + raise ValueError( + 'Required property \'id\' not present in SnapshotReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SnapshotReference JSON') + raise ValueError( + 'Required property \'name\' not present in SnapshotReference JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = SnapshotRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SnapshotReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SnapshotReference JSON' + ) return cls(**args) @classmethod @@ -82923,7 +89431,6 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' - class SnapshotReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -82950,7 +89457,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in SnapshotReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in SnapshotReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -83110,27 +89619,37 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotSourceSnapshot': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SnapshotSourceSnapshot JSON') + raise ValueError( + 'Required property \'crn\' not present in SnapshotSourceSnapshot JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = SnapshotReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotSourceSnapshot JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotSourceSnapshot JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SnapshotSourceSnapshot JSON') + raise ValueError( + 'Required property \'id\' not present in SnapshotSourceSnapshot JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SnapshotSourceSnapshot JSON') + raise ValueError( + 'Required property \'name\' not present in SnapshotSourceSnapshot JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = SnapshotRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SnapshotSourceSnapshot JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SnapshotSourceSnapshot JSON' + ) return cls(**args) @classmethod @@ -83189,7 +89708,6 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' - class Subnet: """ Subnet. @@ -83298,72 +89816,99 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'Subnet': """Initialize a Subnet object from a json dictionary.""" args = {} - if (available_ipv4_address_count := _dict.get('available_ipv4_address_count')) is not None: + if (available_ipv4_address_count := + _dict.get('available_ipv4_address_count')) is not None: args['available_ipv4_address_count'] = available_ipv4_address_count else: - raise ValueError('Required property \'available_ipv4_address_count\' not present in Subnet JSON') + raise ValueError( + 'Required property \'available_ipv4_address_count\' not present in Subnet JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Subnet JSON') + raise ValueError( + 'Required property \'created_at\' not present in Subnet JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Subnet JSON') + raise ValueError( + 'Required property \'crn\' not present in Subnet JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Subnet JSON') + raise ValueError( + 'Required property \'href\' not present in Subnet JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Subnet JSON') + raise ValueError( + 'Required property \'id\' not present in Subnet JSON') if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in Subnet JSON') + raise ValueError( + 'Required property \'ip_version\' not present in Subnet JSON') if (ipv4_cidr_block := _dict.get('ipv4_cidr_block')) is not None: args['ipv4_cidr_block'] = ipv4_cidr_block else: - raise ValueError('Required property \'ipv4_cidr_block\' not present in Subnet JSON') + raise ValueError( + 'Required property \'ipv4_cidr_block\' not present in Subnet JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Subnet JSON') + raise ValueError( + 'Required property \'name\' not present in Subnet JSON') if (network_acl := _dict.get('network_acl')) is not None: args['network_acl'] = NetworkACLReference.from_dict(network_acl) else: - raise ValueError('Required property \'network_acl\' not present in Subnet JSON') + raise ValueError( + 'Required property \'network_acl\' not present in Subnet JSON') if (public_gateway := _dict.get('public_gateway')) is not None: - args['public_gateway'] = PublicGatewayReference.from_dict(public_gateway) + args['public_gateway'] = PublicGatewayReference.from_dict( + public_gateway) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Subnet JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Subnet JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in Subnet JSON') + raise ValueError( + 'Required property \'resource_type\' not present in Subnet JSON' + ) if (routing_table := _dict.get('routing_table')) is not None: - args['routing_table'] = RoutingTableReference.from_dict(routing_table) + args['routing_table'] = RoutingTableReference.from_dict( + routing_table) else: - raise ValueError('Required property \'routing_table\' not present in Subnet JSON') + raise ValueError( + 'Required property \'routing_table\' not present in Subnet JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in Subnet JSON') - if (total_ipv4_address_count := _dict.get('total_ipv4_address_count')) is not None: + raise ValueError( + 'Required property \'status\' not present in Subnet JSON') + if (total_ipv4_address_count := + _dict.get('total_ipv4_address_count')) is not None: args['total_ipv4_address_count'] = total_ipv4_address_count else: - raise ValueError('Required property \'total_ipv4_address_count\' not present in Subnet JSON') + raise ValueError( + 'Required property \'total_ipv4_address_count\' not present in Subnet JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in Subnet JSON') + raise ValueError( + 'Required property \'vpc\' not present in Subnet JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in Subnet JSON') + raise ValueError( + 'Required property \'zone\' not present in Subnet JSON') return cls(**args) @classmethod @@ -83374,8 +89919,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'available_ipv4_address_count') and self.available_ipv4_address_count is not None: - _dict['available_ipv4_address_count'] = self.available_ipv4_address_count + if hasattr(self, 'available_ipv4_address_count' + ) and self.available_ipv4_address_count is not None: + _dict[ + 'available_ipv4_address_count'] = self.available_ipv4_address_count if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: @@ -83386,7 +89933,8 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'ip_version') and self.ip_version is not None: _dict['ip_version'] = self.ip_version - if hasattr(self, 'ipv4_cidr_block') and self.ipv4_cidr_block is not None: + if hasattr(self, + 'ipv4_cidr_block') and self.ipv4_cidr_block is not None: _dict['ipv4_cidr_block'] = self.ipv4_cidr_block if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -83414,7 +89962,8 @@ def to_dict(self) -> Dict: _dict['routing_table'] = self.routing_table.to_dict() if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status - if hasattr(self, 'total_ipv4_address_count') and self.total_ipv4_address_count is not None: + if hasattr(self, 'total_ipv4_address_count' + ) and self.total_ipv4_address_count is not None: _dict['total_ipv4_address_count'] = self.total_ipv4_address_count if hasattr(self, 'vpc') and self.vpc is not None: if isinstance(self.vpc, dict): @@ -83453,7 +90002,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -83461,7 +90009,6 @@ class ResourceTypeEnum(str, Enum): SUBNET = 'subnet' - class StatusEnum(str, Enum): """ The status of the subnet. @@ -83473,7 +90020,6 @@ class StatusEnum(str, Enum): PENDING = 'pending' - class SubnetCollection: """ SubnetCollection. @@ -83522,21 +90068,29 @@ def from_dict(cls, _dict: Dict) -> 'SubnetCollection': if (first := _dict.get('first')) is not None: args['first'] = SubnetCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in SubnetCollection JSON') + raise ValueError( + 'Required property \'first\' not present in SubnetCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in SubnetCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in SubnetCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = SubnetCollectionNext.from_dict(next) if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [Subnet.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in SubnetCollection JSON') + raise ValueError( + 'Required property \'subnets\' not present in SubnetCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in SubnetCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in SubnetCollection JSON' + ) return cls(**args) @classmethod @@ -83615,7 +90169,9 @@ def from_dict(cls, _dict: Dict) -> 'SubnetCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SubnetCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in SubnetCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -83675,7 +90231,9 @@ def from_dict(cls, _dict: Dict) -> 'SubnetCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SubnetCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in SubnetCollectionNext JSON' + ) return cls(**args) @classmethod @@ -83715,16 +90273,16 @@ class SubnetIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SubnetIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SubnetIdentityById', 'SubnetIdentityByCRN', 'SubnetIdentityByHref']) - ) + ", ".join([ + 'SubnetIdentityById', 'SubnetIdentityByCRN', + 'SubnetIdentityByHref' + ])) raise Exception(msg) @@ -83894,8 +90452,10 @@ def __init__( `route_vpc_zone_ingress` must be `false`. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SubnetPrototypeSubnetByTotalCount', 'SubnetPrototypeSubnetByCIDR']) - ) + ", ".join([ + 'SubnetPrototypeSubnetByTotalCount', + 'SubnetPrototypeSubnetByCIDR' + ])) raise Exception(msg) class IpVersionEnum(str, Enum): @@ -83906,23 +90466,23 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class SubnetPublicGatewayPatch: """ The public gateway to use for internet-bound traffic for this subnet. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SubnetPublicGatewayPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SubnetPublicGatewayPatchPublicGatewayIdentityById', 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN', 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref']) - ) + ", ".join([ + 'SubnetPublicGatewayPatchPublicGatewayIdentityById', + 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN', + 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref' + ])) raise Exception(msg) @@ -83978,25 +90538,33 @@ def from_dict(cls, _dict: Dict) -> 'SubnetReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SubnetReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SubnetReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = SubnetReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SubnetReference JSON') + raise ValueError( + 'Required property \'href\' not present in SubnetReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SubnetReference JSON') + raise ValueError( + 'Required property \'id\' not present in SubnetReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SubnetReference JSON') + raise ValueError( + 'Required property \'name\' not present in SubnetReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SubnetReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SubnetReference JSON' + ) return cls(**args) @classmethod @@ -84050,7 +90618,6 @@ class ResourceTypeEnum(str, Enum): SUBNET = 'subnet' - class SubnetReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -84077,7 +90644,9 @@ def from_dict(cls, _dict: Dict) -> 'SubnetReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in SubnetReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in SubnetReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -84117,16 +90686,16 @@ class TrustedProfileIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a TrustedProfileIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['TrustedProfileIdentityTrustedProfileById', 'TrustedProfileIdentityTrustedProfileByCRN']) - ) + ", ".join([ + 'TrustedProfileIdentityTrustedProfileById', + 'TrustedProfileIdentityTrustedProfileByCRN' + ])) raise Exception(msg) @@ -84163,15 +90732,21 @@ def from_dict(cls, _dict: Dict) -> 'TrustedProfileReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in TrustedProfileReference JSON') + raise ValueError( + 'Required property \'crn\' not present in TrustedProfileReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in TrustedProfileReference JSON') + raise ValueError( + 'Required property \'id\' not present in TrustedProfileReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in TrustedProfileReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in TrustedProfileReference JSON' + ) return cls(**args) @classmethod @@ -84216,7 +90791,6 @@ class ResourceTypeEnum(str, Enum): TRUSTED_PROFILE = 'trusted_profile' - class VCPU: """ The VCPU configuration. @@ -84250,15 +90824,18 @@ def from_dict(cls, _dict: Dict) -> 'VCPU': if (architecture := _dict.get('architecture')) is not None: args['architecture'] = architecture else: - raise ValueError('Required property \'architecture\' not present in VCPU JSON') + raise ValueError( + 'Required property \'architecture\' not present in VCPU JSON') if (count := _dict.get('count')) is not None: args['count'] = count else: - raise ValueError('Required property \'count\' not present in VCPU JSON') + raise ValueError( + 'Required property \'count\' not present in VCPU JSON') if (manufacturer := _dict.get('manufacturer')) is not None: args['manufacturer'] = manufacturer else: - raise ValueError('Required property \'manufacturer\' not present in VCPU JSON') + raise ValueError( + 'Required property \'manufacturer\' not present in VCPU JSON') return cls(**args) @classmethod @@ -84433,45 +91010,67 @@ def from_dict(cls, _dict: Dict) -> 'VPC': if (classic_access := _dict.get('classic_access')) is not None: args['classic_access'] = classic_access else: - raise ValueError('Required property \'classic_access\' not present in VPC JSON') + raise ValueError( + 'Required property \'classic_access\' not present in VPC JSON') if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPC JSON') + raise ValueError( + 'Required property \'created_at\' not present in VPC JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPC JSON') + raise ValueError( + 'Required property \'crn\' not present in VPC JSON') if (cse_source_ips := _dict.get('cse_source_ips')) is not None: - args['cse_source_ips'] = [VPCCSESourceIP.from_dict(v) for v in cse_source_ips] - if (default_network_acl := _dict.get('default_network_acl')) is not None: - args['default_network_acl'] = NetworkACLReference.from_dict(default_network_acl) - else: - raise ValueError('Required property \'default_network_acl\' not present in VPC JSON') - if (default_routing_table := _dict.get('default_routing_table')) is not None: - args['default_routing_table'] = RoutingTableReference.from_dict(default_routing_table) + args['cse_source_ips'] = [ + VPCCSESourceIP.from_dict(v) for v in cse_source_ips + ] + if (default_network_acl := + _dict.get('default_network_acl')) is not None: + args['default_network_acl'] = NetworkACLReference.from_dict( + default_network_acl) + else: + raise ValueError( + 'Required property \'default_network_acl\' not present in VPC JSON' + ) + if (default_routing_table := + _dict.get('default_routing_table')) is not None: + args['default_routing_table'] = RoutingTableReference.from_dict( + default_routing_table) else: - raise ValueError('Required property \'default_routing_table\' not present in VPC JSON') - if (default_security_group := _dict.get('default_security_group')) is not None: - args['default_security_group'] = SecurityGroupReference.from_dict(default_security_group) + raise ValueError( + 'Required property \'default_routing_table\' not present in VPC JSON' + ) + if (default_security_group := + _dict.get('default_security_group')) is not None: + args['default_security_group'] = SecurityGroupReference.from_dict( + default_security_group) else: - raise ValueError('Required property \'default_security_group\' not present in VPC JSON') + raise ValueError( + 'Required property \'default_security_group\' not present in VPC JSON' + ) if (dns := _dict.get('dns')) is not None: args['dns'] = VPCDNS.from_dict(dns) else: - raise ValueError('Required property \'dns\' not present in VPC JSON') + raise ValueError( + 'Required property \'dns\' not present in VPC JSON') if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VPCHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VPCHealthReason.from_dict(v) for v in health_reasons + ] else: args['health_reasons'] = [] if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in VPC JSON') + raise ValueError( + 'Required property \'health_state\' not present in VPC JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPC JSON') + raise ValueError( + 'Required property \'href\' not present in VPC JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: @@ -84479,19 +91078,24 @@ def from_dict(cls, _dict: Dict) -> 'VPC': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPC JSON') + raise ValueError( + 'Required property \'name\' not present in VPC JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in VPC JSON') + raise ValueError( + 'Required property \'resource_group\' not present in VPC JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPC JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPC JSON') if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in VPC JSON') + raise ValueError( + 'Required property \'status\' not present in VPC JSON') return cls(**args) @classmethod @@ -84516,21 +91120,30 @@ def to_dict(self) -> Dict: else: cse_source_ips_list.append(v.to_dict()) _dict['cse_source_ips'] = cse_source_ips_list - if hasattr(self, 'default_network_acl') and self.default_network_acl is not None: + if hasattr( + self, + 'default_network_acl') and self.default_network_acl is not None: if isinstance(self.default_network_acl, dict): _dict['default_network_acl'] = self.default_network_acl else: - _dict['default_network_acl'] = self.default_network_acl.to_dict() - if hasattr(self, 'default_routing_table') and self.default_routing_table is not None: + _dict['default_network_acl'] = self.default_network_acl.to_dict( + ) + if hasattr(self, 'default_routing_table' + ) and self.default_routing_table is not None: if isinstance(self.default_routing_table, dict): _dict['default_routing_table'] = self.default_routing_table else: - _dict['default_routing_table'] = self.default_routing_table.to_dict() - if hasattr(self, 'default_security_group') and self.default_security_group is not None: + _dict[ + 'default_routing_table'] = self.default_routing_table.to_dict( + ) + if hasattr(self, 'default_security_group' + ) and self.default_security_group is not None: if isinstance(self.default_security_group, dict): _dict['default_security_group'] = self.default_security_group else: - _dict['default_security_group'] = self.default_security_group.to_dict() + _dict[ + 'default_security_group'] = self.default_security_group.to_dict( + ) if hasattr(self, 'dns') and self.dns is not None: if isinstance(self.dns, dict): _dict['dns'] = self.dns @@ -84598,7 +91211,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -84606,7 +91218,6 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' - class StatusEnum(str, Enum): """ The status of this VPC. @@ -84618,7 +91229,6 @@ class StatusEnum(str, Enum): PENDING = 'pending' - class VPCCSESourceIP: """ VPCCSESourceIP. @@ -84650,11 +91260,13 @@ def from_dict(cls, _dict: Dict) -> 'VPCCSESourceIP': if (ip := _dict.get('ip')) is not None: args['ip'] = IP.from_dict(ip) else: - raise ValueError('Required property \'ip\' not present in VPCCSESourceIP JSON') + raise ValueError( + 'Required property \'ip\' not present in VPCCSESourceIP JSON') if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in VPCCSESourceIP JSON') + raise ValueError( + 'Required property \'zone\' not present in VPCCSESourceIP JSON') return cls(**args) @classmethod @@ -84744,21 +91356,26 @@ def from_dict(cls, _dict: Dict) -> 'VPCCollection': if (first := _dict.get('first')) is not None: args['first'] = VPCCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in VPCCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VPCCollection JSON') if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VPCCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VPCCollection JSON') if (next := _dict.get('next')) is not None: args['next'] = VPCCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VPCCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VPCCollection JSON' + ) if (vpcs := _dict.get('vpcs')) is not None: args['vpcs'] = [VPC.from_dict(v) for v in vpcs] else: - raise ValueError('Required property \'vpcs\' not present in VPCCollection JSON') + raise ValueError( + 'Required property \'vpcs\' not present in VPCCollection JSON') return cls(**args) @classmethod @@ -84837,7 +91454,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VPCCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -84897,7 +91516,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VPCCollectionNext JSON' + ) return cls(**args) @classmethod @@ -84968,15 +91589,20 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNS': if (enable_hub := _dict.get('enable_hub')) is not None: args['enable_hub'] = enable_hub else: - raise ValueError('Required property \'enable_hub\' not present in VPCDNS JSON') - if (resolution_binding_count := _dict.get('resolution_binding_count')) is not None: + raise ValueError( + 'Required property \'enable_hub\' not present in VPCDNS JSON') + if (resolution_binding_count := + _dict.get('resolution_binding_count')) is not None: args['resolution_binding_count'] = resolution_binding_count else: - raise ValueError('Required property \'resolution_binding_count\' not present in VPCDNS JSON') + raise ValueError( + 'Required property \'resolution_binding_count\' not present in VPCDNS JSON' + ) if (resolver := _dict.get('resolver')) is not None: args['resolver'] = resolver else: - raise ValueError('Required property \'resolver\' not present in VPCDNS JSON') + raise ValueError( + 'Required property \'resolver\' not present in VPCDNS JSON') return cls(**args) @classmethod @@ -84989,7 +91615,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'enable_hub') and self.enable_hub is not None: _dict['enable_hub'] = self.enable_hub - if hasattr(self, 'resolution_binding_count') and self.resolution_binding_count is not None: + if hasattr(self, 'resolution_binding_count' + ) and self.resolution_binding_count is not None: _dict['resolution_binding_count'] = self.resolution_binding_count if hasattr(self, 'resolver') and self.resolver is not None: if isinstance(self.resolver, dict): @@ -85266,43 +91893,69 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolutionBinding': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'created_at\' not present in VPCDNSResolutionBinding JSON' + ) if (endpoint_gateways := _dict.get('endpoint_gateways')) is not None: - args['endpoint_gateways'] = [EndpointGatewayReferenceRemote.from_dict(v) for v in endpoint_gateways] + args['endpoint_gateways'] = [ + EndpointGatewayReferenceRemote.from_dict(v) + for v in endpoint_gateways + ] else: - raise ValueError('Required property \'endpoint_gateways\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'endpoint_gateways\' not present in VPCDNSResolutionBinding JSON' + ) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VPCDNSResolutionBindingHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VPCDNSResolutionBindingHealthReason.from_dict(v) + for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in VPCDNSResolutionBinding JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'health_state\' not present in VPCDNSResolutionBinding JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'href\' not present in VPCDNSResolutionBinding JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'id\' not present in VPCDNSResolutionBinding JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in VPCDNSResolutionBinding JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'name\' not present in VPCDNSResolutionBinding JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPCDNSResolutionBinding JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReferenceRemote.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in VPCDNSResolutionBinding JSON') + raise ValueError( + 'Required property \'vpc\' not present in VPCDNSResolutionBinding JSON' + ) return cls(**args) @classmethod @@ -85315,7 +91968,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'endpoint_gateways') and self.endpoint_gateways is not None: + if hasattr(self, + 'endpoint_gateways') and self.endpoint_gateways is not None: endpoint_gateways_list = [] for v in self.endpoint_gateways: if isinstance(v, dict): @@ -85337,7 +91991,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -85385,7 +92040,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the DNS resolution binding. @@ -85399,7 +92053,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -85408,7 +92061,6 @@ class ResourceTypeEnum(str, Enum): VPC_DNS_RESOLUTION_BINDING = 'vpc_dns_resolution_binding' - class VPCDNSResolutionBindingCollection: """ VPCDNSResolutionBindingCollection. @@ -85458,24 +92110,37 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'VPCDNSResolutionBindingCollection': """Initialize a VPCDNSResolutionBindingCollection object from a json dictionary.""" args = {} - if (dns_resolution_bindings := _dict.get('dns_resolution_bindings')) is not None: - args['dns_resolution_bindings'] = [VPCDNSResolutionBinding.from_dict(v) for v in dns_resolution_bindings] + if (dns_resolution_bindings := + _dict.get('dns_resolution_bindings')) is not None: + args['dns_resolution_bindings'] = [ + VPCDNSResolutionBinding.from_dict(v) + for v in dns_resolution_bindings + ] else: - raise ValueError('Required property \'dns_resolution_bindings\' not present in VPCDNSResolutionBindingCollection JSON') + raise ValueError( + 'Required property \'dns_resolution_bindings\' not present in VPCDNSResolutionBindingCollection JSON' + ) if (first := _dict.get('first')) is not None: - args['first'] = VPCDNSResolutionBindingCollectionFirst.from_dict(first) + args['first'] = VPCDNSResolutionBindingCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in VPCDNSResolutionBindingCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VPCDNSResolutionBindingCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VPCDNSResolutionBindingCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VPCDNSResolutionBindingCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VPCDNSResolutionBindingCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VPCDNSResolutionBindingCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VPCDNSResolutionBindingCollection JSON' + ) return cls(**args) @classmethod @@ -85486,7 +92151,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'dns_resolution_bindings') and self.dns_resolution_bindings is not None: + if hasattr(self, 'dns_resolution_bindings' + ) and self.dns_resolution_bindings is not None: dns_resolution_bindings_list = [] for v in self.dns_resolution_bindings: if isinstance(v, dict): @@ -85554,7 +92220,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolutionBindingCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCDNSResolutionBindingCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VPCDNSResolutionBindingCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -85614,7 +92282,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolutionBindingCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCDNSResolutionBindingCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VPCDNSResolutionBindingCollectionNext JSON' + ) return cls(**args) @classmethod @@ -85684,11 +92354,15 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolutionBindingHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPCDNSResolutionBindingHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPCDNSResolutionBindingHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPCDNSResolutionBindingHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPCDNSResolutionBindingHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -85736,7 +92410,6 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' - class VPCDNSResolutionBindingPatch: """ VPCDNSResolutionBindingPatch. @@ -85806,12 +92479,18 @@ class VPCDNSResolver: - by the system when `dns.resolver.type` is `system` - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual`. + - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str type: The type of the DNS resolver used for the VPC. - `delegated`: DNS server addresses are provided by the DNS resolver of the VPC specified in `dns.resolver.vpc`. - `manual`: DNS server addresses are specified in `dns.resolver.manual_servers`. - `system`: DNS server addresses are provided by the system. + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. """ def __init__( @@ -85828,7 +92507,10 @@ def __init__( - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - using `dns.resolver.manual_servers` when the `dns.resolver.type` is - `manual`. + `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str type: The type of the DNS resolver used for the VPC. - `delegated`: DNS server addresses are provided by the DNS resolver of the VPC @@ -85836,10 +92518,15 @@ def __init__( - `manual`: DNS server addresses are specified in `dns.resolver.manual_servers`. - `system`: DNS server addresses are provided by the system. + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPCDNSResolverTypeDelegated', 'VPCDNSResolverTypeManual', 'VPCDNSResolverTypeSystem']) - ) + ", ".join([ + 'VPCDNSResolverTypeDelegated', 'VPCDNSResolverTypeManual', + 'VPCDNSResolverTypeSystem' + ])) raise Exception(msg) class TypeEnum(str, Enum): @@ -85849,6 +92536,9 @@ class TypeEnum(str, Enum): specified in `dns.resolver.vpc`. - `manual`: DNS server addresses are specified in `dns.resolver.manual_servers`. - `system`: DNS server addresses are provided by the system. + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. """ DELEGATED = 'delegated' @@ -85856,7 +92546,6 @@ class TypeEnum(str, Enum): SYSTEM = 'system' - class VPCDNSResolverPatch: """ VPCDNSResolverPatch. @@ -85959,7 +92648,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverPatch': """Initialize a VPCDNSResolverPatch object from a json dictionary.""" args = {} if (manual_servers := _dict.get('manual_servers')) is not None: - args['manual_servers'] = [DNSServerPrototype.from_dict(v) for v in manual_servers] + args['manual_servers'] = [ + DNSServerPrototype.from_dict(v) for v in manual_servers + ] if (type := _dict.get('type')) is not None: args['type'] = type if (vpc := _dict.get('vpc')) is not None: @@ -86030,7 +92721,6 @@ class TypeEnum(str, Enum): SYSTEM = 'system' - class VPCDNSResolverPrototype: """ VPCDNSResolverPrototype. @@ -86058,8 +92748,10 @@ def __init__( configuration. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype', 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype']) - ) + ", ".join([ + 'VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype', + 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype' + ])) raise Exception(msg) class TypeEnum(str, Enum): @@ -86074,7 +92766,6 @@ class TypeEnum(str, Enum): SYSTEM = 'system' - class VPCDNSResolverVPCPatch: """ The VPC to provide DNS server addresses for this VPC. The specified VPC must be @@ -86085,16 +92776,17 @@ class VPCDNSResolverVPCPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPCDNSResolverVPCPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPCDNSResolverVPCPatchVPCIdentityById', 'VPCDNSResolverVPCPatchVPCIdentityByCRN', 'VPCDNSResolverVPCPatchVPCIdentityByHref']) - ) + ", ".join([ + 'VPCDNSResolverVPCPatchVPCIdentityById', + 'VPCDNSResolverVPCPatchVPCIdentityByCRN', + 'VPCDNSResolverVPCPatchVPCIdentityByHref' + ])) raise Exception(msg) @@ -86134,11 +92826,15 @@ def from_dict(cls, _dict: Dict) -> 'VPCHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPCHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPCHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPCHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPCHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -86186,23 +92882,20 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' - class VPCIdentity: """ Identifies a VPC by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPCIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPCIdentityById', 'VPCIdentityByCRN', 'VPCIdentityByHref']) - ) + ", ".join( + ['VPCIdentityById', 'VPCIdentityByCRN', 'VPCIdentityByHref'])) raise Exception(msg) @@ -86329,25 +93022,31 @@ def from_dict(cls, _dict: Dict) -> 'VPCReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPCReference JSON') + raise ValueError( + 'Required property \'crn\' not present in VPCReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VPCReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCReference JSON') + raise ValueError( + 'Required property \'href\' not present in VPCReference JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPCReference JSON') + raise ValueError( + 'Required property \'id\' not present in VPCReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPCReference JSON') + raise ValueError( + 'Required property \'name\' not present in VPCReference JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPCReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPCReference JSON' + ) return cls(**args) @classmethod @@ -86401,7 +93100,6 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' - class VPCReferenceDNSResolverContext: """ A VPC whose DNS resolver is delegated to provide DNS servers for this VPC. @@ -86464,27 +93162,38 @@ def from_dict(cls, _dict: Dict) -> 'VPCReferenceDNSResolverContext': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPCReferenceDNSResolverContext JSON') + raise ValueError( + 'Required property \'crn\' not present in VPCReferenceDNSResolverContext JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VPCReferenceDNSResolverContextDeleted.from_dict(deleted) + args['deleted'] = VPCReferenceDNSResolverContextDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCReferenceDNSResolverContext JSON') + raise ValueError( + 'Required property \'href\' not present in VPCReferenceDNSResolverContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPCReferenceDNSResolverContext JSON') + raise ValueError( + 'Required property \'id\' not present in VPCReferenceDNSResolverContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPCReferenceDNSResolverContext JSON') + raise ValueError( + 'Required property \'name\' not present in VPCReferenceDNSResolverContext JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = VPCRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPCReferenceDNSResolverContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPCReferenceDNSResolverContext JSON' + ) return cls(**args) @classmethod @@ -86543,7 +93252,6 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' - class VPCReferenceDNSResolverContextDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -86570,7 +93278,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCReferenceDNSResolverContextDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VPCReferenceDNSResolverContextDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VPCReferenceDNSResolverContextDeleted JSON' + ) return cls(**args) @classmethod @@ -86630,7 +93340,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VPCReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VPCReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -86716,25 +93428,35 @@ def from_dict(cls, _dict: Dict) -> 'VPCReferenceRemote': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPCReferenceRemote JSON') + raise ValueError( + 'Required property \'crn\' not present in VPCReferenceRemote JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCReferenceRemote JSON') + raise ValueError( + 'Required property \'href\' not present in VPCReferenceRemote JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPCReferenceRemote JSON') + raise ValueError( + 'Required property \'id\' not present in VPCReferenceRemote JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPCReferenceRemote JSON') + raise ValueError( + 'Required property \'name\' not present in VPCReferenceRemote JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = VPCRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPCReferenceRemote JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPCReferenceRemote JSON' + ) return cls(**args) @classmethod @@ -86788,7 +93510,6 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' - class VPCRemote: """ If present, this property indicates that the resource associated with this reference @@ -86961,8 +93682,7 @@ def __init__( :param VPCReference vpc: The VPC this VPN gateway resides in. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayRouteMode', 'VPNGatewayPolicyMode']) - ) + ", ".join(['VPNGatewayRouteMode', 'VPNGatewayPolicyMode'])) raise Exception(msg) class HealthStateEnum(str, Enum): @@ -86982,7 +93702,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway. @@ -86996,7 +93715,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -87005,7 +93723,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' - class VPNGatewayCollection: """ VPNGatewayCollection. @@ -87055,21 +93772,29 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayCollection': if (first := _dict.get('first')) is not None: args['first'] = VPNGatewayCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in VPNGatewayCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VPNGatewayCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VPNGatewayCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VPNGatewayCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VPNGatewayCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VPNGatewayCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VPNGatewayCollection JSON' + ) if (vpn_gateways := _dict.get('vpn_gateways')) is not None: args['vpn_gateways'] = vpn_gateways else: - raise ValueError('Required property \'vpn_gateways\' not present in VPNGatewayCollection JSON') + raise ValueError( + 'Required property \'vpn_gateways\' not present in VPNGatewayCollection JSON' + ) return cls(**args) @classmethod @@ -87148,7 +93873,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -87208,7 +93935,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayCollectionNext JSON' + ) return cls(**args) @classmethod @@ -87341,8 +94070,10 @@ def __init__( used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2). """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionRouteMode', 'VPNGatewayConnectionPolicyMode']) - ) + ", ".join([ + 'VPNGatewayConnectionRouteMode', + 'VPNGatewayConnectionPolicyMode' + ])) raise Exception(msg) @classmethod @@ -87352,8 +94083,10 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnection': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'VPNGatewayConnection'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['VPNGatewayConnectionRouteMode', 'VPNGatewayConnectionPolicyMode']) - ) + ", ".join([ + 'VPNGatewayConnectionRouteMode', + 'VPNGatewayConnectionPolicyMode' + ])) raise Exception(msg) @classmethod @@ -87368,7 +94101,9 @@ def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping['route'] = 'VPNGatewayConnectionRouteMode' disc_value = _dict.get('mode') if disc_value is None: - raise ValueError('Discriminator property \'mode\' not found in VPNGatewayConnection JSON') + raise ValueError( + 'Discriminator property \'mode\' not found in VPNGatewayConnection JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -87385,7 +94120,6 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' - class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -87403,7 +94137,6 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' - class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -87412,7 +94145,6 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -87420,7 +94152,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' - class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -87430,7 +94161,6 @@ class StatusEnum(str, Enum): UP = 'up' - class VPNGatewayConnectionCIDRs: """ VPNGatewayConnectionCIDRs. @@ -87456,7 +94186,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionCIDRs': if (cidrs := _dict.get('cidrs')) is not None: args['cidrs'] = cidrs else: - raise ValueError('Required property \'cidrs\' not present in VPNGatewayConnectionCIDRs JSON') + raise ValueError( + 'Required property \'cidrs\' not present in VPNGatewayConnectionCIDRs JSON' + ) return cls(**args) @classmethod @@ -87492,31 +94224,81 @@ def __ne__(self, other: 'VPNGatewayConnectionCIDRs') -> bool: class VPNGatewayConnectionCollection: """ - Collection of VPN gateway connections in a VPN gateway. + VPNGatewayConnectionCollection. - :param List[VPNGatewayConnection] connections: Array of VPN gateway connections. + :param List[VPNGatewayConnection] connections: Collection of VPN gateway + connections in a VPN gateway. + :param VPNGatewayConnectionCollectionFirst first: A link to the first page of + resources. + :param int limit: The maximum number of resources that can be returned by the + request. + :param VPNGatewayConnectionCollectionNext next: (optional) A link to the next + page of resources. This property is present for all pages + except the last page. + :param int total_count: The total number of resources across all pages. """ def __init__( self, connections: List['VPNGatewayConnection'], + first: 'VPNGatewayConnectionCollectionFirst', + limit: int, + total_count: int, + *, + next: Optional['VPNGatewayConnectionCollectionNext'] = None, ) -> None: """ Initialize a VPNGatewayConnectionCollection object. - :param List[VPNGatewayConnection] connections: Array of VPN gateway - connections. + :param List[VPNGatewayConnection] connections: Collection of VPN gateway + connections in a VPN gateway. + :param VPNGatewayConnectionCollectionFirst first: A link to the first page + of resources. + :param int limit: The maximum number of resources that can be returned by + the request. + :param int total_count: The total number of resources across all pages. + :param VPNGatewayConnectionCollectionNext next: (optional) A link to the + next page of resources. This property is present for all pages + except the last page. """ self.connections = connections + self.first = first + self.limit = limit + self.next = next + self.total_count = total_count @classmethod def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionCollection': """Initialize a VPNGatewayConnectionCollection object from a json dictionary.""" args = {} if (connections := _dict.get('connections')) is not None: - args['connections'] = [VPNGatewayConnection.from_dict(v) for v in connections] + args['connections'] = [ + VPNGatewayConnection.from_dict(v) for v in connections + ] + else: + raise ValueError( + 'Required property \'connections\' not present in VPNGatewayConnectionCollection JSON' + ) + if (first := _dict.get('first')) is not None: + args['first'] = VPNGatewayConnectionCollectionFirst.from_dict(first) + else: + raise ValueError( + 'Required property \'first\' not present in VPNGatewayConnectionCollection JSON' + ) + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError( + 'Required property \'limit\' not present in VPNGatewayConnectionCollection JSON' + ) + if (next := _dict.get('next')) is not None: + args['next'] = VPNGatewayConnectionCollectionNext.from_dict(next) + if (total_count := _dict.get('total_count')) is not None: + args['total_count'] = total_count else: - raise ValueError('Required property \'connections\' not present in VPNGatewayConnectionCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VPNGatewayConnectionCollection JSON' + ) return cls(**args) @classmethod @@ -87535,6 +94317,20 @@ def to_dict(self) -> Dict: else: connections_list.append(v.to_dict()) _dict['connections'] = connections_list + if hasattr(self, 'first') and self.first is not None: + if isinstance(self.first, dict): + _dict['first'] = self.first + else: + _dict['first'] = self.first.to_dict() + if hasattr(self, 'limit') and self.limit is not None: + _dict['limit'] = self.limit + if hasattr(self, 'next') and self.next is not None: + if isinstance(self.next, dict): + _dict['next'] = self.next + else: + _dict['next'] = self.next.to_dict() + if hasattr(self, 'total_count') and self.total_count is not None: + _dict['total_count'] = self.total_count return _dict def _to_dict(self): @@ -87556,6 +94352,129 @@ def __ne__(self, other: 'VPNGatewayConnectionCollection') -> bool: return not self == other +class VPNGatewayConnectionCollectionFirst: + """ + A link to the first page of resources. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a VPNGatewayConnectionCollectionFirst object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionCollectionFirst': + """Initialize a VPNGatewayConnectionCollectionFirst object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionCollectionFirst JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a VPNGatewayConnectionCollectionFirst object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this VPNGatewayConnectionCollectionFirst object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'VPNGatewayConnectionCollectionFirst') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'VPNGatewayConnectionCollectionFirst') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class VPNGatewayConnectionCollectionNext: + """ + A link to the next page of resources. This property is present for all pages except + the last page. + + :param str href: The URL for a page of resources. + """ + + def __init__( + self, + href: str, + ) -> None: + """ + Initialize a VPNGatewayConnectionCollectionNext object. + + :param str href: The URL for a page of resources. + """ + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionCollectionNext': + """Initialize a VPNGatewayConnectionCollectionNext object from a json dictionary.""" + args = {} + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionCollectionNext JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a VPNGatewayConnectionCollectionNext object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this VPNGatewayConnectionCollectionNext object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'VPNGatewayConnectionCollectionNext') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'VPNGatewayConnectionCollectionNext') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class VPNGatewayConnectionDPD: """ The Dead Peer Detection settings. @@ -87591,15 +94510,21 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionDPD': if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in VPNGatewayConnectionDPD JSON') + raise ValueError( + 'Required property \'action\' not present in VPNGatewayConnectionDPD JSON' + ) if (interval := _dict.get('interval')) is not None: args['interval'] = interval else: - raise ValueError('Required property \'interval\' not present in VPNGatewayConnectionDPD JSON') + raise ValueError( + 'Required property \'interval\' not present in VPNGatewayConnectionDPD JSON' + ) if (timeout := _dict.get('timeout')) is not None: args['timeout'] = timeout else: - raise ValueError('Required property \'timeout\' not present in VPNGatewayConnectionDPD JSON') + raise ValueError( + 'Required property \'timeout\' not present in VPNGatewayConnectionDPD JSON' + ) return cls(**args) @classmethod @@ -87647,7 +94572,6 @@ class ActionEnum(str, Enum): RESTART = 'restart' - class VPNGatewayConnectionDPDPatch: """ The Dead Peer Detection settings. @@ -87734,7 +94658,6 @@ class ActionEnum(str, Enum): RESTART = 'restart' - class VPNGatewayConnectionDPDPrototype: """ The Dead Peer Detection settings. @@ -87821,7 +94744,6 @@ class ActionEnum(str, Enum): RESTART = 'restart' - class VPNGatewayConnectionIKEIdentity: """ VPNGatewayConnectionIKEIdentity. @@ -87845,8 +94767,12 @@ def __init__( future. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN', 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname', 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4', 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID']) - ) + ", ".join([ + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN', + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname', + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4', + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID' + ])) raise Exception(msg) class TypeEnum(str, Enum): @@ -87863,7 +94789,6 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - class VPNGatewayConnectionIKEIdentityPrototype: """ VPNGatewayConnectionIKEIdentityPrototype. @@ -87881,8 +94806,12 @@ def __init__( :param str type: The IKE identity type. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN', 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname', 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4', 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID']) - ) + ", ".join([ + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN', + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname', + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4', + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID' + ])) raise Exception(msg) class TypeEnum(str, Enum): @@ -87896,7 +94825,6 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - class VPNGatewayConnectionIKEPolicyPatch: """ The IKE policy to use. Specify `null` to remove any existing policy, [resulting in @@ -87904,16 +94832,16 @@ class VPNGatewayConnectionIKEPolicyPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNGatewayConnectionIKEPolicyPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref']) - ) + ", ".join([ + 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById', + 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref' + ])) raise Exception(msg) @@ -87924,16 +94852,16 @@ class VPNGatewayConnectionIKEPolicyPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNGatewayConnectionIKEPolicyPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref']) - ) + ", ".join([ + 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById', + 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref' + ])) raise Exception(msg) @@ -87944,16 +94872,16 @@ class VPNGatewayConnectionIPsecPolicyPatch: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNGatewayConnectionIPsecPolicyPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref']) - ) + ", ".join([ + 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById', + 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref' + ])) raise Exception(msg) @@ -87964,16 +94892,16 @@ class VPNGatewayConnectionIPsecPolicyPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNGatewayConnectionIPsecPolicyPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref']) - ) + ", ".join([ + 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById', + 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref' + ])) raise Exception(msg) @@ -88006,8 +94934,6 @@ class VPNGatewayConnectionPatch: must not be used by another connection for the VPN gateway. :param VPNGatewayConnectionPeerPatch peer: (optional) :param str psk: (optional) The pre-shared key. - :param str routing_protocol: (optional) Routing protocols are disabled for this - VPN gateway connection. """ def __init__( @@ -88021,7 +94947,6 @@ def __init__( name: Optional[str] = None, peer: Optional['VPNGatewayConnectionPeerPatch'] = None, psk: Optional[str] = None, - routing_protocol: Optional[str] = None, ) -> None: """ Initialize a VPNGatewayConnectionPatch object. @@ -88052,8 +94977,6 @@ def __init__( name must not be used by another connection for the VPN gateway. :param VPNGatewayConnectionPeerPatch peer: (optional) :param str psk: (optional) The pre-shared key. - :param str routing_protocol: (optional) Routing protocols are disabled for - this VPN gateway connection. """ self.admin_state_up = admin_state_up self.dead_peer_detection = dead_peer_detection @@ -88063,7 +94986,6 @@ def __init__( self.name = name self.peer = peer self.psk = psk - self.routing_protocol = routing_protocol @classmethod def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPatch': @@ -88071,8 +94993,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPatch': args = {} if (admin_state_up := _dict.get('admin_state_up')) is not None: args['admin_state_up'] = admin_state_up - if (dead_peer_detection := _dict.get('dead_peer_detection')) is not None: - args['dead_peer_detection'] = VPNGatewayConnectionDPDPatch.from_dict(dead_peer_detection) + if (dead_peer_detection := + _dict.get('dead_peer_detection')) is not None: + args[ + 'dead_peer_detection'] = VPNGatewayConnectionDPDPatch.from_dict( + dead_peer_detection) if (establish_mode := _dict.get('establish_mode')) is not None: args['establish_mode'] = establish_mode if (ike_policy := _dict.get('ike_policy')) is not None: @@ -88085,8 +95010,6 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPatch': args['peer'] = peer if (psk := _dict.get('psk')) is not None: args['psk'] = psk - if (routing_protocol := _dict.get('routing_protocol')) is not None: - args['routing_protocol'] = routing_protocol return cls(**args) @classmethod @@ -88099,11 +95022,14 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'admin_state_up') and self.admin_state_up is not None: _dict['admin_state_up'] = self.admin_state_up - if hasattr(self, 'dead_peer_detection') and self.dead_peer_detection is not None: + if hasattr( + self, + 'dead_peer_detection') and self.dead_peer_detection is not None: if isinstance(self.dead_peer_detection, dict): _dict['dead_peer_detection'] = self.dead_peer_detection else: - _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict() + _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict( + ) if hasattr(self, 'establish_mode') and self.establish_mode is not None: _dict['establish_mode'] = self.establish_mode if hasattr(self, 'ike_policy') and self.ike_policy is not None: @@ -88125,8 +95051,6 @@ def to_dict(self) -> Dict: _dict['peer'] = self.peer.to_dict() if hasattr(self, 'psk') and self.psk is not None: _dict['psk'] = self.psk - if hasattr(self, 'routing_protocol') and self.routing_protocol is not None: - _dict['routing_protocol'] = self.routing_protocol return _dict def _to_dict(self): @@ -88165,31 +95089,22 @@ class EstablishModeEnum(str, Enum): PEER_ONLY = 'peer_only' - class RoutingProtocolEnum(str, Enum): - """ - Routing protocols are disabled for this VPN gateway connection. - """ - - NONE = 'none' - - - class VPNGatewayConnectionPeerPatch: """ VPNGatewayConnectionPeerPatch. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNGatewayConnectionPeerPatch object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch', 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch']) - ) + ", ".join([ + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch', + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch' + ])) raise Exception(msg) @@ -88228,11 +95143,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModeLocal': if (cidrs := _dict.get('cidrs')) is not None: args['cidrs'] = cidrs else: - raise ValueError('Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModeLocal JSON') + raise ValueError( + 'Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModeLocal JSON' + ) if (ike_identities := _dict.get('ike_identities')) is not None: args['ike_identities'] = ike_identities else: - raise ValueError('Required property \'ike_identities\' not present in VPNGatewayConnectionPolicyModeLocal JSON') + raise ValueError( + 'Required property \'ike_identities\' not present in VPNGatewayConnectionPolicyModeLocal JSON' + ) return cls(**args) @classmethod @@ -88291,7 +95210,8 @@ def __init__( self, cidrs: List[str], *, - ike_identities: Optional[List['VPNGatewayConnectionIKEIdentityPrototype']] = None, + ike_identities: Optional[ + List['VPNGatewayConnectionIKEIdentityPrototype']] = None, ) -> None: """ Initialize a VPNGatewayConnectionPolicyModeLocalPrototype object. @@ -88308,13 +95228,16 @@ def __init__( self.ike_identities = ike_identities @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModeLocalPrototype': + def from_dict( + cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModeLocalPrototype': """Initialize a VPNGatewayConnectionPolicyModeLocalPrototype object from a json dictionary.""" args = {} if (cidrs := _dict.get('cidrs')) is not None: args['cidrs'] = cidrs else: - raise ValueError('Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModeLocalPrototype JSON') + raise ValueError( + 'Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModeLocalPrototype JSON' + ) if (ike_identities := _dict.get('ike_identities')) is not None: args['ike_identities'] = ike_identities return cls(**args) @@ -88347,13 +95270,15 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPolicyModeLocalPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPolicyModeLocalPrototype') -> bool: + def __eq__(self, + other: 'VPNGatewayConnectionPolicyModeLocalPrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPolicyModeLocalPrototype') -> bool: + def __ne__(self, + other: 'VPNGatewayConnectionPolicyModeLocalPrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -88381,8 +95306,10 @@ def __init__( :param str type: Indicates whether `peer.address` or `peer.fqdn` is used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress', 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN']) - ) + ", ".join([ + 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress', + 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN' + ])) raise Exception(msg) class TypeEnum(str, Enum): @@ -88394,7 +95321,6 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' - class VPNGatewayConnectionPolicyModePeerPrototype: """ VPNGatewayConnectionPolicyModePeerPrototype. @@ -88413,7 +95339,8 @@ def __init__( self, cidrs: List[str], *, - ike_identity: Optional['VPNGatewayConnectionIKEIdentityPrototype'] = None, + ike_identity: Optional[ + 'VPNGatewayConnectionIKEIdentityPrototype'] = None, ) -> None: """ Initialize a VPNGatewayConnectionPolicyModePeerPrototype object. @@ -88428,8 +95355,10 @@ def __init__( will be `peer.fqdn`. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress', 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN']) - ) + ", ".join([ + 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress', + 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN' + ])) raise Exception(msg) @@ -88469,10 +95398,12 @@ def __init__( psk: str, *, admin_state_up: Optional[bool] = None, - dead_peer_detection: Optional['VPNGatewayConnectionDPDPrototype'] = None, + dead_peer_detection: Optional[ + 'VPNGatewayConnectionDPDPrototype'] = None, establish_mode: Optional[str] = None, ike_policy: Optional['VPNGatewayConnectionIKEPolicyPrototype'] = None, - ipsec_policy: Optional['VPNGatewayConnectionIPsecPolicyPrototype'] = None, + ipsec_policy: Optional[ + 'VPNGatewayConnectionIPsecPolicyPrototype'] = None, name: Optional[str] = None, ) -> None: """ @@ -88505,8 +95436,10 @@ def __init__( unspecified, the name will be a hyphenated list of randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype', 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype']) - ) + ", ".join([ + 'VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype', + 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype' + ])) raise Exception(msg) class EstablishModeEnum(str, Enum): @@ -88527,7 +95460,6 @@ class EstablishModeEnum(str, Enum): PEER_ONLY = 'peer_only' - class VPNGatewayConnectionReference: """ VPNGatewayConnectionReference. @@ -88575,23 +95507,32 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionReference': """Initialize a VPNGatewayConnectionReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VPNGatewayConnectionReferenceDeleted.from_dict(deleted) + args['deleted'] = VPNGatewayConnectionReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayConnectionReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'name\' not present in VPNGatewayConnectionReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNGatewayConnectionReference JSON' + ) return cls(**args) @classmethod @@ -88643,7 +95584,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' - class VPNGatewayConnectionReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -88670,7 +95610,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VPNGatewayConnectionReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VPNGatewayConnectionReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -88731,13 +95673,16 @@ def __init__( self.ike_identities = ike_identities @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeLocal': + def from_dict(cls, + _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeLocal': """Initialize a VPNGatewayConnectionStaticRouteModeLocal object from a json dictionary.""" args = {} if (ike_identities := _dict.get('ike_identities')) is not None: args['ike_identities'] = ike_identities else: - raise ValueError('Required property \'ike_identities\' not present in VPNGatewayConnectionStaticRouteModeLocal JSON') + raise ValueError( + 'Required property \'ike_identities\' not present in VPNGatewayConnectionStaticRouteModeLocal JSON' + ) return cls(**args) @classmethod @@ -88793,7 +95738,8 @@ class VPNGatewayConnectionStaticRouteModeLocalPrototype: def __init__( self, *, - ike_identities: Optional[List['VPNGatewayConnectionIKEIdentityPrototype']] = None, + ike_identities: Optional[ + List['VPNGatewayConnectionIKEIdentityPrototype']] = None, ) -> None: """ Initialize a VPNGatewayConnectionStaticRouteModeLocalPrototype object. @@ -88809,7 +95755,9 @@ def __init__( self.ike_identities = ike_identities @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeLocalPrototype': + def from_dict( + cls, + _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeLocalPrototype': """Initialize a VPNGatewayConnectionStaticRouteModeLocalPrototype object from a json dictionary.""" args = {} if (ike_identities := _dict.get('ike_identities')) is not None: @@ -88842,13 +95790,17 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionStaticRouteModeLocalPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionStaticRouteModeLocalPrototype') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionStaticRouteModeLocalPrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionStaticRouteModeLocalPrototype') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionStaticRouteModeLocalPrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -88873,8 +95825,10 @@ def __init__( :param str type: Indicates whether `peer.address` or `peer.fqdn` is used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress', 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN']) - ) + ", ".join([ + 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress', + 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN' + ])) raise Exception(msg) class TypeEnum(str, Enum): @@ -88886,7 +95840,6 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' - class VPNGatewayConnectionStaticRouteModePeerPrototype: """ VPNGatewayConnectionStaticRouteModePeerPrototype. @@ -88903,7 +95856,8 @@ class VPNGatewayConnectionStaticRouteModePeerPrototype: def __init__( self, *, - ike_identity: Optional['VPNGatewayConnectionIKEIdentityPrototype'] = None, + ike_identity: Optional[ + 'VPNGatewayConnectionIKEIdentityPrototype'] = None, ) -> None: """ Initialize a VPNGatewayConnectionStaticRouteModePeerPrototype object. @@ -88917,8 +95871,10 @@ def __init__( will be `peer.fqdn`. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress', 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN']) - ) + ", ".join([ + 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress', + 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN' + ])) raise Exception(msg) @@ -88953,21 +95909,31 @@ def __init__( self.status_reasons = status_reasons @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeTunnel': + def from_dict(cls, + _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeTunnel': """Initialize a VPNGatewayConnectionStaticRouteModeTunnel object from a json dictionary.""" args = {} if (public_ip := _dict.get('public_ip')) is not None: args['public_ip'] = IP.from_dict(public_ip) else: - raise ValueError('Required property \'public_ip\' not present in VPNGatewayConnectionStaticRouteModeTunnel JSON') + raise ValueError( + 'Required property \'public_ip\' not present in VPNGatewayConnectionStaticRouteModeTunnel JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in VPNGatewayConnectionStaticRouteModeTunnel JSON') + raise ValueError( + 'Required property \'status\' not present in VPNGatewayConnectionStaticRouteModeTunnel JSON' + ) if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [VPNGatewayConnectionTunnelStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + VPNGatewayConnectionTunnelStatusReason.from_dict(v) + for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in VPNGatewayConnectionStaticRouteModeTunnel JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in VPNGatewayConnectionStaticRouteModeTunnel JSON' + ) return cls(**args) @classmethod @@ -89003,13 +95969,15 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionStaticRouteModeTunnel object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionStaticRouteModeTunnel') -> bool: + def __eq__(self, + other: 'VPNGatewayConnectionStaticRouteModeTunnel') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionStaticRouteModeTunnel') -> bool: + def __ne__(self, + other: 'VPNGatewayConnectionStaticRouteModeTunnel') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -89022,7 +95990,6 @@ class StatusEnum(str, Enum): UP = 'up' - class VPNGatewayConnectionStatusReason: """ VPNGatewayConnectionStatusReason. @@ -89067,11 +96034,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNGatewayConnectionStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNGatewayConnectionStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNGatewayConnectionStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNGatewayConnectionStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -89127,7 +96098,6 @@ class CodeEnum(str, Enum): PEER_NOT_RESPONDING = 'peer_not_responding' - class VPNGatewayConnectionTunnelStatusReason: """ VPNGatewayConnectionTunnelStatusReason. @@ -89214,11 +96184,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionTunnelStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNGatewayConnectionTunnelStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNGatewayConnectionTunnelStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNGatewayConnectionTunnelStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNGatewayConnectionTunnelStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -89293,7 +96267,6 @@ class CodeEnum(str, Enum): PEER_NOT_RESPONDING = 'peer_not_responding' - class VPNGatewayHealthReason: """ VPNGatewayHealthReason. @@ -89346,11 +96319,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNGatewayHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNGatewayHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNGatewayHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNGatewayHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -89407,7 +96384,6 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' - class VPNGatewayLifecycleReason: """ VPNGatewayLifecycleReason. @@ -89457,11 +96433,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNGatewayLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNGatewayLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNGatewayLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNGatewayLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -89515,7 +96495,6 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class VPNGatewayMember: """ VPNGatewayMember. @@ -89595,33 +96574,53 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayMember': """Initialize a VPNGatewayMember object from a json dictionary.""" args = {} if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VPNGatewayMemberHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VPNGatewayMemberHealthReason.from_dict(v) + for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in VPNGatewayMember JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in VPNGatewayMember JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in VPNGatewayMember JSON') + raise ValueError( + 'Required property \'health_state\' not present in VPNGatewayMember JSON' + ) if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [VPNGatewayMemberLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + VPNGatewayMemberLifecycleReason.from_dict(v) + for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in VPNGatewayMember JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in VPNGatewayMember JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in VPNGatewayMember JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in VPNGatewayMember JSON' + ) if (private_ip := _dict.get('private_ip')) is not None: args['private_ip'] = ReservedIPReference.from_dict(private_ip) else: - raise ValueError('Required property \'private_ip\' not present in VPNGatewayMember JSON') + raise ValueError( + 'Required property \'private_ip\' not present in VPNGatewayMember JSON' + ) if (public_ip := _dict.get('public_ip')) is not None: args['public_ip'] = IP.from_dict(public_ip) else: - raise ValueError('Required property \'public_ip\' not present in VPNGatewayMember JSON') + raise ValueError( + 'Required property \'public_ip\' not present in VPNGatewayMember JSON' + ) if (role := _dict.get('role')) is not None: args['role'] = role else: - raise ValueError('Required property \'role\' not present in VPNGatewayMember JSON') + raise ValueError( + 'Required property \'role\' not present in VPNGatewayMember JSON' + ) return cls(**args) @classmethod @@ -89642,7 +96641,8 @@ def to_dict(self) -> Dict: _dict['health_reasons'] = health_reasons_list if hasattr(self, 'health_state') and self.health_state is not None: _dict['health_state'] = self.health_state - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -89650,7 +96650,8 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'private_ip') and self.private_ip is not None: if isinstance(self.private_ip, dict): @@ -89701,7 +96702,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway member. @@ -89715,7 +96715,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class RoleEnum(str, Enum): """ The high availability role assigned to the VPN gateway member. @@ -89725,7 +96724,6 @@ class RoleEnum(str, Enum): STANDBY = 'standby' - class VPNGatewayMemberHealthReason: """ VPNGatewayMemberHealthReason. @@ -89776,11 +96774,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayMemberHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNGatewayMemberHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNGatewayMemberHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNGatewayMemberHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNGatewayMemberHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -89835,7 +96837,6 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' - class VPNGatewayMemberLifecycleReason: """ VPNGatewayMemberLifecycleReason. @@ -89885,11 +96886,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayMemberLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNGatewayMemberLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNGatewayMemberLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNGatewayMemberLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNGatewayMemberLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -89943,7 +96948,6 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class VPNGatewayPatch: """ VPNGatewayPatch. @@ -90038,8 +97042,10 @@ def __init__( used. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayPrototypeVPNGatewayRouteModePrototype', 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype']) - ) + ", ".join([ + 'VPNGatewayPrototypeVPNGatewayRouteModePrototype', + 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype' + ])) raise Exception(msg) @@ -90069,7 +97075,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VPNGatewayReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VPNGatewayReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -90291,109 +97299,169 @@ def from_dict(cls, _dict: Dict) -> 'VPNServer': """Initialize a VPNServer object from a json dictionary.""" args = {} if (certificate := _dict.get('certificate')) is not None: - args['certificate'] = CertificateInstanceReference.from_dict(certificate) + args['certificate'] = CertificateInstanceReference.from_dict( + certificate) else: - raise ValueError('Required property \'certificate\' not present in VPNServer JSON') - if (client_authentication := _dict.get('client_authentication')) is not None: + raise ValueError( + 'Required property \'certificate\' not present in VPNServer JSON' + ) + if (client_authentication := + _dict.get('client_authentication')) is not None: args['client_authentication'] = client_authentication else: - raise ValueError('Required property \'client_authentication\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'client_authentication\' not present in VPNServer JSON' + ) if (client_auto_delete := _dict.get('client_auto_delete')) is not None: args['client_auto_delete'] = client_auto_delete else: - raise ValueError('Required property \'client_auto_delete\' not present in VPNServer JSON') - if (client_auto_delete_timeout := _dict.get('client_auto_delete_timeout')) is not None: + raise ValueError( + 'Required property \'client_auto_delete\' not present in VPNServer JSON' + ) + if (client_auto_delete_timeout := + _dict.get('client_auto_delete_timeout')) is not None: args['client_auto_delete_timeout'] = client_auto_delete_timeout else: - raise ValueError('Required property \'client_auto_delete_timeout\' not present in VPNServer JSON') - if (client_dns_server_ips := _dict.get('client_dns_server_ips')) is not None: - args['client_dns_server_ips'] = [IP.from_dict(v) for v in client_dns_server_ips] - else: - raise ValueError('Required property \'client_dns_server_ips\' not present in VPNServer JSON') - if (client_idle_timeout := _dict.get('client_idle_timeout')) is not None: + raise ValueError( + 'Required property \'client_auto_delete_timeout\' not present in VPNServer JSON' + ) + if (client_dns_server_ips := + _dict.get('client_dns_server_ips')) is not None: + args['client_dns_server_ips'] = [ + IP.from_dict(v) for v in client_dns_server_ips + ] + else: + raise ValueError( + 'Required property \'client_dns_server_ips\' not present in VPNServer JSON' + ) + if (client_idle_timeout := + _dict.get('client_idle_timeout')) is not None: args['client_idle_timeout'] = client_idle_timeout else: - raise ValueError('Required property \'client_idle_timeout\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'client_idle_timeout\' not present in VPNServer JSON' + ) if (client_ip_pool := _dict.get('client_ip_pool')) is not None: args['client_ip_pool'] = client_ip_pool else: - raise ValueError('Required property \'client_ip_pool\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'client_ip_pool\' not present in VPNServer JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'created_at\' not present in VPNServer JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPNServer JSON') - if (enable_split_tunneling := _dict.get('enable_split_tunneling')) is not None: + raise ValueError( + 'Required property \'crn\' not present in VPNServer JSON') + if (enable_split_tunneling := + _dict.get('enable_split_tunneling')) is not None: args['enable_split_tunneling'] = enable_split_tunneling else: - raise ValueError('Required property \'enable_split_tunneling\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'enable_split_tunneling\' not present in VPNServer JSON' + ) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VPNServerHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VPNServerHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in VPNServer JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'health_state\' not present in VPNServer JSON' + ) if (hostname := _dict.get('hostname')) is not None: args['hostname'] = hostname else: - raise ValueError('Required property \'hostname\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'hostname\' not present in VPNServer JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServer JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'id\' not present in VPNServer JSON') if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [VPNServerLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + VPNServerLifecycleReason.from_dict(v) for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in VPNServer JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in VPNServer JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'name\' not present in VPNServer JSON') if (port := _dict.get('port')) is not None: args['port'] = port else: - raise ValueError('Required property \'port\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'port\' not present in VPNServer JSON') if (private_ips := _dict.get('private_ips')) is not None: - args['private_ips'] = [ReservedIPReference.from_dict(v) for v in private_ips] + args['private_ips'] = [ + ReservedIPReference.from_dict(v) for v in private_ips + ] else: - raise ValueError('Required property \'private_ips\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'private_ips\' not present in VPNServer JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'protocol\' not present in VPNServer JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'resource_group\' not present in VPNServer JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNServer JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'security_groups\' not present in VPNServer JSON' + ) if (subnets := _dict.get('subnets')) is not None: args['subnets'] = [SubnetReference.from_dict(v) for v in subnets] else: - raise ValueError('Required property \'subnets\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'subnets\' not present in VPNServer JSON') if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in VPNServer JSON') + raise ValueError( + 'Required property \'vpc\' not present in VPNServer JSON') return cls(**args) @classmethod @@ -90409,7 +97477,8 @@ def to_dict(self) -> Dict: _dict['certificate'] = self.certificate else: _dict['certificate'] = self.certificate.to_dict() - if hasattr(self, 'client_authentication') and self.client_authentication is not None: + if hasattr(self, 'client_authentication' + ) and self.client_authentication is not None: client_authentication_list = [] for v in self.client_authentication: if isinstance(v, dict): @@ -90417,11 +97486,16 @@ def to_dict(self) -> Dict: else: client_authentication_list.append(v.to_dict()) _dict['client_authentication'] = client_authentication_list - if hasattr(self, 'client_auto_delete') and self.client_auto_delete is not None: + if hasattr( + self, + 'client_auto_delete') and self.client_auto_delete is not None: _dict['client_auto_delete'] = self.client_auto_delete - if hasattr(self, 'client_auto_delete_timeout') and self.client_auto_delete_timeout is not None: - _dict['client_auto_delete_timeout'] = self.client_auto_delete_timeout - if hasattr(self, 'client_dns_server_ips') and self.client_dns_server_ips is not None: + if hasattr(self, 'client_auto_delete_timeout' + ) and self.client_auto_delete_timeout is not None: + _dict[ + 'client_auto_delete_timeout'] = self.client_auto_delete_timeout + if hasattr(self, 'client_dns_server_ips' + ) and self.client_dns_server_ips is not None: client_dns_server_ips_list = [] for v in self.client_dns_server_ips: if isinstance(v, dict): @@ -90429,7 +97503,9 @@ def to_dict(self) -> Dict: else: client_dns_server_ips_list.append(v.to_dict()) _dict['client_dns_server_ips'] = client_dns_server_ips_list - if hasattr(self, 'client_idle_timeout') and self.client_idle_timeout is not None: + if hasattr( + self, + 'client_idle_timeout') and self.client_idle_timeout is not None: _dict['client_idle_timeout'] = self.client_idle_timeout if hasattr(self, 'client_ip_pool') and self.client_ip_pool is not None: _dict['client_ip_pool'] = self.client_ip_pool @@ -90437,7 +97513,8 @@ def to_dict(self) -> Dict: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'enable_split_tunneling') and self.enable_split_tunneling is not None: + if hasattr(self, 'enable_split_tunneling' + ) and self.enable_split_tunneling is not None: _dict['enable_split_tunneling'] = self.enable_split_tunneling if hasattr(self, 'health_reasons') and self.health_reasons is not None: health_reasons_list = [] @@ -90455,7 +97532,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -90463,7 +97541,8 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -90486,7 +97565,8 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -90544,7 +97624,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN server. @@ -90558,7 +97637,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ProtocolEnum(str, Enum): """ The transport protocol used by this VPN server. @@ -90567,7 +97645,6 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -90576,7 +97653,6 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' - class VPNServerAuthentication: """ An authentication method for this VPN server. @@ -90594,8 +97670,10 @@ def __init__( :param str method: The type of authentication. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNServerAuthenticationByUsername', 'VPNServerAuthenticationByCertificate']) - ) + ", ".join([ + 'VPNServerAuthenticationByUsername', + 'VPNServerAuthenticationByCertificate' + ])) raise Exception(msg) class MethodEnum(str, Enum): @@ -90607,23 +97685,19 @@ class MethodEnum(str, Enum): USERNAME = 'username' - class VPNServerAuthenticationByUsernameIdProvider: """ The type of identity provider to be used by VPN client. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNServerAuthenticationByUsernameIdProvider object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNServerAuthenticationByUsernameIdProviderByIAM']) - ) + ", ".join(['VPNServerAuthenticationByUsernameIdProviderByIAM'])) raise Exception(msg) @@ -90644,8 +97718,10 @@ def __init__( :param str method: The type of authentication. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype', 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype']) - ) + ", ".join([ + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype', + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype' + ])) raise Exception(msg) @classmethod @@ -90655,8 +97731,10 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationPrototype': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'VPNServerAuthenticationPrototype'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype', 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype']) - ) + ", ".join([ + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype', + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype' + ])) raise Exception(msg) @classmethod @@ -90667,11 +97745,15 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['certificate'] = 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype' - mapping['username'] = 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype' + mapping[ + 'certificate'] = 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype' + mapping[ + 'username'] = 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype' disc_value = _dict.get('method') if disc_value is None: - raise ValueError('Discriminator property \'method\' not found in VPNServerAuthenticationPrototype JSON') + raise ValueError( + 'Discriminator property \'method\' not found in VPNServerAuthenticationPrototype JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -90690,7 +97772,6 @@ class MethodEnum(str, Enum): USERNAME = 'username' - class VPNServerClient: """ VPNServerClient. @@ -90787,39 +97868,54 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerClient': if (client_ip := _dict.get('client_ip')) is not None: args['client_ip'] = IP.from_dict(client_ip) else: - raise ValueError('Required property \'client_ip\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'client_ip\' not present in VPNServerClient JSON' + ) if (common_name := _dict.get('common_name')) is not None: args['common_name'] = common_name if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'created_at\' not present in VPNServerClient JSON' + ) if (disconnected_at := _dict.get('disconnected_at')) is not None: args['disconnected_at'] = string_to_datetime(disconnected_at) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerClient JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'id\' not present in VPNServerClient JSON') if (remote_ip := _dict.get('remote_ip')) is not None: args['remote_ip'] = IP.from_dict(remote_ip) else: - raise ValueError('Required property \'remote_ip\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'remote_ip\' not present in VPNServerClient JSON' + ) if (remote_port := _dict.get('remote_port')) is not None: args['remote_port'] = remote_port else: - raise ValueError('Required property \'remote_port\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'remote_port\' not present in VPNServerClient JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNServerClient JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in VPNServerClient JSON') + raise ValueError( + 'Required property \'status\' not present in VPNServerClient JSON' + ) if (username := _dict.get('username')) is not None: args['username'] = username return cls(**args) @@ -90841,7 +97937,8 @@ def to_dict(self) -> Dict: _dict['common_name'] = self.common_name if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'disconnected_at') and self.disconnected_at is not None: + if hasattr(self, + 'disconnected_at') and self.disconnected_at is not None: _dict['disconnected_at'] = datetime_to_string(self.disconnected_at) if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href @@ -90887,7 +97984,6 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER_CLIENT = 'vpn_server_client' - class StatusEnum(str, Enum): """ The status of the VPN client: @@ -90902,7 +97998,6 @@ class StatusEnum(str, Enum): DISCONNECTED = 'disconnected' - class VPNServerClientCollection: """ VPNServerClientCollection. @@ -90953,21 +98048,29 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerClientCollection': if (clients := _dict.get('clients')) is not None: args['clients'] = [VPNServerClient.from_dict(v) for v in clients] else: - raise ValueError('Required property \'clients\' not present in VPNServerClientCollection JSON') + raise ValueError( + 'Required property \'clients\' not present in VPNServerClientCollection JSON' + ) if (first := _dict.get('first')) is not None: args['first'] = VPNServerClientCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in VPNServerClientCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VPNServerClientCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VPNServerClientCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VPNServerClientCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VPNServerClientCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VPNServerClientCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VPNServerClientCollection JSON' + ) return cls(**args) @classmethod @@ -91046,7 +98149,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerClientCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerClientCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerClientCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -91106,7 +98211,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerClientCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerClientCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerClientCollectionNext JSON' + ) return cls(**args) @classmethod @@ -91189,21 +98296,29 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerCollection': if (first := _dict.get('first')) is not None: args['first'] = VPNServerCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in VPNServerCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VPNServerCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VPNServerCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VPNServerCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VPNServerCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VPNServerCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VPNServerCollection JSON' + ) if (vpn_servers := _dict.get('vpn_servers')) is not None: args['vpn_servers'] = [VPNServer.from_dict(v) for v in vpn_servers] else: - raise ValueError('Required property \'vpn_servers\' not present in VPNServerCollection JSON') + raise ValueError( + 'Required property \'vpn_servers\' not present in VPNServerCollection JSON' + ) return cls(**args) @classmethod @@ -91282,7 +98397,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -91342,7 +98459,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerCollectionNext JSON' + ) return cls(**args) @classmethod @@ -91448,11 +98567,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNServerHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNServerHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNServerHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNServerHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -91521,7 +98644,6 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' - class VPNServerLifecycleReason: """ VPNServerLifecycleReason. @@ -91571,11 +98693,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNServerLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNServerLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNServerLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNServerLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -91629,7 +98755,6 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class VPNServerPatch: """ VPNServerPatch. @@ -91671,7 +98796,8 @@ def __init__( self, *, certificate: Optional['CertificateInstanceIdentity'] = None, - client_authentication: Optional[List['VPNServerAuthenticationPrototype']] = None, + client_authentication: Optional[ + List['VPNServerAuthenticationPrototype']] = None, client_dns_server_ips: Optional[List['IP']] = None, client_idle_timeout: Optional[int] = None, client_ip_pool: Optional[str] = None, @@ -91736,15 +98862,24 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerPatch': args = {} if (certificate := _dict.get('certificate')) is not None: args['certificate'] = certificate - if (client_authentication := _dict.get('client_authentication')) is not None: - args['client_authentication'] = [VPNServerAuthenticationPrototype.from_dict(v) for v in client_authentication] - if (client_dns_server_ips := _dict.get('client_dns_server_ips')) is not None: - args['client_dns_server_ips'] = [IP.from_dict(v) for v in client_dns_server_ips] - if (client_idle_timeout := _dict.get('client_idle_timeout')) is not None: + if (client_authentication := + _dict.get('client_authentication')) is not None: + args['client_authentication'] = [ + VPNServerAuthenticationPrototype.from_dict(v) + for v in client_authentication + ] + if (client_dns_server_ips := + _dict.get('client_dns_server_ips')) is not None: + args['client_dns_server_ips'] = [ + IP.from_dict(v) for v in client_dns_server_ips + ] + if (client_idle_timeout := + _dict.get('client_idle_timeout')) is not None: args['client_idle_timeout'] = client_idle_timeout if (client_ip_pool := _dict.get('client_ip_pool')) is not None: args['client_ip_pool'] = client_ip_pool - if (enable_split_tunneling := _dict.get('enable_split_tunneling')) is not None: + if (enable_split_tunneling := + _dict.get('enable_split_tunneling')) is not None: args['enable_split_tunneling'] = enable_split_tunneling if (name := _dict.get('name')) is not None: args['name'] = name @@ -91769,7 +98904,8 @@ def to_dict(self) -> Dict: _dict['certificate'] = self.certificate else: _dict['certificate'] = self.certificate.to_dict() - if hasattr(self, 'client_authentication') and self.client_authentication is not None: + if hasattr(self, 'client_authentication' + ) and self.client_authentication is not None: client_authentication_list = [] for v in self.client_authentication: if isinstance(v, dict): @@ -91777,7 +98913,8 @@ def to_dict(self) -> Dict: else: client_authentication_list.append(v.to_dict()) _dict['client_authentication'] = client_authentication_list - if hasattr(self, 'client_dns_server_ips') and self.client_dns_server_ips is not None: + if hasattr(self, 'client_dns_server_ips' + ) and self.client_dns_server_ips is not None: client_dns_server_ips_list = [] for v in self.client_dns_server_ips: if isinstance(v, dict): @@ -91785,11 +98922,14 @@ def to_dict(self) -> Dict: else: client_dns_server_ips_list.append(v.to_dict()) _dict['client_dns_server_ips'] = client_dns_server_ips_list - if hasattr(self, 'client_idle_timeout') and self.client_idle_timeout is not None: + if hasattr( + self, + 'client_idle_timeout') and self.client_idle_timeout is not None: _dict['client_idle_timeout'] = self.client_idle_timeout if hasattr(self, 'client_ip_pool') and self.client_ip_pool is not None: _dict['client_ip_pool'] = self.client_ip_pool - if hasattr(self, 'enable_split_tunneling') and self.enable_split_tunneling is not None: + if hasattr(self, 'enable_split_tunneling' + ) and self.enable_split_tunneling is not None: _dict['enable_split_tunneling'] = self.enable_split_tunneling if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -91834,7 +98974,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class VPNServerReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -91861,7 +99000,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VPNServerReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VPNServerReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -92008,47 +99149,71 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerRoute': if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'action\' not present in VPNServerRoute JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'created_at\' not present in VPNServerRoute JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'destination\' not present in VPNServerRoute JSON' + ) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VPNServerRouteHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VPNServerRouteHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in VPNServerRoute JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'health_state\' not present in VPNServerRoute JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerRoute JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'id\' not present in VPNServerRoute JSON') if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [VPNServerRouteLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + VPNServerRouteLifecycleReason.from_dict(v) + for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in VPNServerRoute JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in VPNServerRoute JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'name\' not present in VPNServerRoute JSON') if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNServerRoute JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNServerRoute JSON' + ) return cls(**args) @classmethod @@ -92079,7 +99244,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -92087,7 +99253,8 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -92130,7 +99297,6 @@ class ActionEnum(str, Enum): DROP = 'drop' TRANSLATE = 'translate' - class HealthStateEnum(str, Enum): """ The health of this resource: @@ -92148,7 +99314,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN route. @@ -92162,7 +99327,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -92171,7 +99335,6 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER_ROUTE = 'vpn_server_route' - class VPNServerRouteCollection: """ VPNServerRouteCollection. @@ -92222,21 +99385,29 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerRouteCollection': if (first := _dict.get('first')) is not None: args['first'] = VPNServerRouteCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in VPNServerRouteCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VPNServerRouteCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VPNServerRouteCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VPNServerRouteCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VPNServerRouteCollectionNext.from_dict(next) if (routes := _dict.get('routes')) is not None: args['routes'] = [VPNServerRoute.from_dict(v) for v in routes] else: - raise ValueError('Required property \'routes\' not present in VPNServerRouteCollection JSON') + raise ValueError( + 'Required property \'routes\' not present in VPNServerRouteCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VPNServerRouteCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VPNServerRouteCollection JSON' + ) return cls(**args) @classmethod @@ -92315,7 +99486,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerRouteCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerRouteCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerRouteCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -92375,7 +99548,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerRouteCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNServerRouteCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VPNServerRouteCollectionNext JSON' + ) return cls(**args) @classmethod @@ -92453,11 +99628,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerRouteHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNServerRouteHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNServerRouteHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNServerRouteHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNServerRouteHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -92508,7 +99687,6 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' - class VPNServerRouteLifecycleReason: """ VPNServerRouteLifecycleReason. @@ -92558,11 +99736,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerRouteLifecycleReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VPNServerRouteLifecycleReason JSON') + raise ValueError( + 'Required property \'code\' not present in VPNServerRouteLifecycleReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VPNServerRouteLifecycleReason JSON') + raise ValueError( + 'Required property \'message\' not present in VPNServerRouteLifecycleReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -92616,7 +99798,6 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' - class VPNServerRoutePatch: """ VPNServerRoutePatch. @@ -92712,6 +99893,18 @@ class VirtualNetworkInterface: across all virtual network interfaces in the VPC. :param ReservedIPReference primary_ip: The reserved IP for this virtual network interface. + :param str protocol_state_filtering_mode: The protocol state filtering mode used + for this virtual network interface. If `auto`, protocol state packet filtering + is enabled or disabled based on the virtual network interface's `target` + resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering)) + for more information. :param ResourceGroupReference resource_group: The resource group for this virtual network interface. :param str resource_type: The resource type. @@ -92738,6 +99931,7 @@ def __init__( lifecycle_state: str, name: str, primary_ip: 'ReservedIPReference', + protocol_state_filtering_mode: str, resource_group: 'ResourceGroupReference', resource_type: str, security_groups: List['SecurityGroupReference'], @@ -92780,6 +99974,18 @@ def __init__( unique across all virtual network interfaces in the VPC. :param ReservedIPReference primary_ip: The reserved IP for this virtual network interface. + :param str protocol_state_filtering_mode: The protocol state filtering mode + used for this virtual network interface. If `auto`, protocol state packet + filtering is enabled or disabled based on the virtual network interface's + `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on + the current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering)) + for more information. :param ResourceGroupReference resource_group: The resource group for this virtual network interface. :param str resource_type: The resource type. @@ -92807,6 +100013,7 @@ def __init__( self.mac_address = mac_address self.name = name self.primary_ip = primary_ip + self.protocol_state_filtering_mode = protocol_state_filtering_mode self.resource_group = resource_group self.resource_type = resource_type self.security_groups = security_groups @@ -92822,75 +100029,121 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterface': if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing else: - raise ValueError('Required property \'allow_ip_spoofing\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'allow_ip_spoofing\' not present in VirtualNetworkInterface JSON' + ) if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete else: - raise ValueError('Required property \'auto_delete\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'auto_delete\' not present in VirtualNetworkInterface JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'created_at\' not present in VirtualNetworkInterface JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VirtualNetworkInterface JSON') - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + raise ValueError( + 'Required property \'crn\' not present in VirtualNetworkInterface JSON' + ) + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat else: - raise ValueError('Required property \'enable_infrastructure_nat\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'enable_infrastructure_nat\' not present in VirtualNetworkInterface JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterface JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'id\' not present in VirtualNetworkInterface JSON' + ) if (ips := _dict.get('ips')) is not None: args['ips'] = [ReservedIPReference.from_dict(v) for v in ips] else: - raise ValueError('Required property \'ips\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'ips\' not present in VirtualNetworkInterface JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in VirtualNetworkInterface JSON' + ) if (mac_address := _dict.get('mac_address')) is not None: args['mac_address'] = mac_address if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'name\' not present in VirtualNetworkInterface JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in VirtualNetworkInterface JSON' + ) + if (protocol_state_filtering_mode := + _dict.get('protocol_state_filtering_mode')) is not None: + args[ + 'protocol_state_filtering_mode'] = protocol_state_filtering_mode + else: + raise ValueError( + 'Required property \'protocol_state_filtering_mode\' not present in VirtualNetworkInterface JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'resource_group\' not present in VirtualNetworkInterface JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VirtualNetworkInterface JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'security_groups\' not present in VirtualNetworkInterface JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'subnet\' not present in VirtualNetworkInterface JSON' + ) if (target := _dict.get('target')) is not None: args['target'] = target if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'vpc\' not present in VirtualNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in VirtualNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in VirtualNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -92901,7 +100154,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete @@ -92909,7 +100163,8 @@ def to_dict(self) -> Dict: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href @@ -92923,7 +100178,8 @@ def to_dict(self) -> Dict: else: ips_list.append(v.to_dict()) _dict['ips'] = ips_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'mac_address') and self.mac_address is not None: _dict['mac_address'] = self.mac_address @@ -92934,6 +100190,10 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() + if hasattr(self, 'protocol_state_filtering_mode' + ) and self.protocol_state_filtering_mode is not None: + _dict[ + 'protocol_state_filtering_mode'] = self.protocol_state_filtering_mode if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group @@ -92941,7 +100201,8 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -93002,6 +100263,24 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ProtocolStateFilteringModeEnum(str, Enum): + """ + The protocol state filtering mode used for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering)) + for more information. + """ + + AUTO = 'auto' + DISABLED = 'disabled' + ENABLED = 'enabled' class ResourceTypeEnum(str, Enum): """ @@ -93011,7 +100290,6 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' - class VirtualNetworkInterfaceCollection: """ VirtualNetworkInterfaceCollection. @@ -93062,23 +100340,36 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceCollection': """Initialize a VirtualNetworkInterfaceCollection object from a json dictionary.""" args = {} if (first := _dict.get('first')) is not None: - args['first'] = VirtualNetworkInterfaceCollectionFirst.from_dict(first) + args['first'] = VirtualNetworkInterfaceCollectionFirst.from_dict( + first) else: - raise ValueError('Required property \'first\' not present in VirtualNetworkInterfaceCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VirtualNetworkInterfaceCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VirtualNetworkInterfaceCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VirtualNetworkInterfaceCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VirtualNetworkInterfaceCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VirtualNetworkInterfaceCollection JSON') - if (virtual_network_interfaces := _dict.get('virtual_network_interfaces')) is not None: - args['virtual_network_interfaces'] = [VirtualNetworkInterface.from_dict(v) for v in virtual_network_interfaces] - else: - raise ValueError('Required property \'virtual_network_interfaces\' not present in VirtualNetworkInterfaceCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VirtualNetworkInterfaceCollection JSON' + ) + if (virtual_network_interfaces := + _dict.get('virtual_network_interfaces')) is not None: + args['virtual_network_interfaces'] = [ + VirtualNetworkInterface.from_dict(v) + for v in virtual_network_interfaces + ] + else: + raise ValueError( + 'Required property \'virtual_network_interfaces\' not present in VirtualNetworkInterfaceCollection JSON' + ) return cls(**args) @classmethod @@ -93103,14 +100394,16 @@ def to_dict(self) -> Dict: _dict['next'] = self.next.to_dict() if hasattr(self, 'total_count') and self.total_count is not None: _dict['total_count'] = self.total_count - if hasattr(self, 'virtual_network_interfaces') and self.virtual_network_interfaces is not None: + if hasattr(self, 'virtual_network_interfaces' + ) and self.virtual_network_interfaces is not None: virtual_network_interfaces_list = [] for v in self.virtual_network_interfaces: if isinstance(v, dict): virtual_network_interfaces_list.append(v) else: virtual_network_interfaces_list.append(v.to_dict()) - _dict['virtual_network_interfaces'] = virtual_network_interfaces_list + _dict[ + 'virtual_network_interfaces'] = virtual_network_interfaces_list return _dict def _to_dict(self): @@ -93157,7 +100450,9 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfaceCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfaceCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -93217,7 +100512,9 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfaceCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfaceCollectionNext JSON' + ) return cls(**args) @classmethod @@ -93257,16 +100554,16 @@ class VirtualNetworkInterfaceIPPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VirtualNetworkInterfaceIPPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext', 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext']) - ) + ", ".join([ + 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext', + 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext' + ])) raise Exception(msg) @@ -93294,6 +100591,18 @@ class VirtualNetworkInterfacePatch: name must not be used by another virtual network interface in the region. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode used for this virtual network interface. If `auto`, protocol + state packet filtering is enabled or disabled based on the virtual network + interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering)) + for more information. """ def __init__( @@ -93303,6 +100612,7 @@ def __init__( auto_delete: Optional[bool] = None, enable_infrastructure_nat: Optional[bool] = None, name: Optional[str] = None, + protocol_state_filtering_mode: Optional[str] = None, ) -> None: """ Initialize a VirtualNetworkInterfacePatch object. @@ -93327,11 +100637,24 @@ def __init__( The name must not be used by another virtual network interface in the region. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode used for this virtual network interface. If `auto`, protocol + state packet filtering is enabled or disabled based on the virtual network + interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on + the current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering)) + for more information. """ self.allow_ip_spoofing = allow_ip_spoofing self.auto_delete = auto_delete self.enable_infrastructure_nat = enable_infrastructure_nat self.name = name + self.protocol_state_filtering_mode = protocol_state_filtering_mode @classmethod def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfacePatch': @@ -93341,10 +100664,15 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfacePatch': args['allow_ip_spoofing'] = allow_ip_spoofing if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (name := _dict.get('name')) is not None: args['name'] = name + if (protocol_state_filtering_mode := + _dict.get('protocol_state_filtering_mode')) is not None: + args[ + 'protocol_state_filtering_mode'] = protocol_state_filtering_mode return cls(**args) @classmethod @@ -93355,14 +100683,20 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name + if hasattr(self, 'protocol_state_filtering_mode' + ) and self.protocol_state_filtering_mode is not None: + _dict[ + 'protocol_state_filtering_mode'] = self.protocol_state_filtering_mode return _dict def _to_dict(self): @@ -93383,6 +100717,25 @@ def __ne__(self, other: 'VirtualNetworkInterfacePatch') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ProtocolStateFilteringModeEnum(str, Enum): + """ + The protocol state filtering mode used for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering)) + for more information. + """ + + AUTO = 'auto' + DISABLED = 'disabled' + ENABLED = 'enabled' + class VirtualNetworkInterfacePrimaryIPPrototype: """ @@ -93390,16 +100743,16 @@ class VirtualNetworkInterfacePrimaryIPPrototype: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VirtualNetworkInterfacePrimaryIPPrototype object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext', 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext']) - ) + ", ".join([ + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext', + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext' + ])) raise Exception(msg) @@ -93440,29 +100793,41 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceReferenceAttachmentContext': + def from_dict( + cls, + _dict: Dict) -> 'VirtualNetworkInterfaceReferenceAttachmentContext': """Initialize a VirtualNetworkInterfaceReferenceAttachmentContext object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'crn\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'id\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'name\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) return cls(**args) @classmethod @@ -93493,13 +100858,17 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfaceReferenceAttachmentContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfaceReferenceAttachmentContext') -> bool: + def __eq__( + self, + other: 'VirtualNetworkInterfaceReferenceAttachmentContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfaceReferenceAttachmentContext') -> bool: + def __ne__( + self, + other: 'VirtualNetworkInterfaceReferenceAttachmentContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -93511,7 +100880,6 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' - class VirtualNetworkInterfaceReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -93532,13 +100900,16 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceReferenceDeleted': + def from_dict(cls, + _dict: Dict) -> 'VirtualNetworkInterfaceReferenceDeleted': """Initialize a VirtualNetworkInterfaceReferenceDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VirtualNetworkInterfaceReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VirtualNetworkInterfaceReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -93580,16 +100951,17 @@ class VirtualNetworkInterfaceTarget: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VirtualNetworkInterfaceTarget object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VirtualNetworkInterfaceTargetShareMountTargetReference', 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext', 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext']) - ) + ", ".join([ + 'VirtualNetworkInterfaceTargetShareMountTargetReference', + 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext', + 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext' + ])) raise Exception(msg) @@ -93613,6 +100985,14 @@ class Volume: The minimum and maximum limits for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + :param VolumeCatalogOffering catalog_offering: (optional) The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering this volume was created from. If a virtual server instance is + provisioned + with a `boot_volume_attachment` specifying this volume, the virtual server + instance + will use this volume's catalog offering, including its pricing plan. + If absent, this volume was not created from a catalog offering. :param datetime created_at: The date and time that the volume was created. :param str crn: The CRN for this volume. :param str encryption: The type of encryption used on the volume. @@ -93692,6 +101072,7 @@ def __init__( volume_attachments: List['VolumeAttachmentReferenceVolumeContext'], zone: 'ZoneReference', *, + catalog_offering: Optional['VolumeCatalogOffering'] = None, encryption_key: Optional['EncryptionKeyReference'] = None, operating_system: Optional['OperatingSystem'] = None, source_image: Optional['ImageReference'] = None, @@ -93758,6 +101139,14 @@ def __init__( :param List[VolumeAttachmentReferenceVolumeContext] volume_attachments: The volume attachments for this volume. :param ZoneReference zone: The zone this volume resides in. + :param VolumeCatalogOffering catalog_offering: (optional) The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering this volume was created from. If a virtual server instance is + provisioned + with a `boot_volume_attachment` specifying this volume, the virtual server + instance + will use this volume's catalog offering, including its pricing plan. + If absent, this volume was not created from a catalog offering. :param EncryptionKeyReference encryption_key: (optional) The root key used to wrap the data encryption key for the volume. This property will be present for volumes with an `encryption` type of @@ -93777,6 +101166,7 @@ def __init__( self.bandwidth = bandwidth self.busy = busy self.capacity = capacity + self.catalog_offering = catalog_offering self.created_at = created_at self.crn = crn self.encryption = encryption @@ -93806,99 +101196,141 @@ def from_dict(cls, _dict: Dict) -> 'Volume': if (active := _dict.get('active')) is not None: args['active'] = active else: - raise ValueError('Required property \'active\' not present in Volume JSON') + raise ValueError( + 'Required property \'active\' not present in Volume JSON') if (attachment_state := _dict.get('attachment_state')) is not None: args['attachment_state'] = attachment_state else: - raise ValueError('Required property \'attachment_state\' not present in Volume JSON') + raise ValueError( + 'Required property \'attachment_state\' not present in Volume JSON' + ) if (bandwidth := _dict.get('bandwidth')) is not None: args['bandwidth'] = bandwidth else: - raise ValueError('Required property \'bandwidth\' not present in Volume JSON') + raise ValueError( + 'Required property \'bandwidth\' not present in Volume JSON') if (busy := _dict.get('busy')) is not None: args['busy'] = busy else: - raise ValueError('Required property \'busy\' not present in Volume JSON') + raise ValueError( + 'Required property \'busy\' not present in Volume JSON') if (capacity := _dict.get('capacity')) is not None: args['capacity'] = capacity else: - raise ValueError('Required property \'capacity\' not present in Volume JSON') + raise ValueError( + 'Required property \'capacity\' not present in Volume JSON') + if (catalog_offering := _dict.get('catalog_offering')) is not None: + args['catalog_offering'] = VolumeCatalogOffering.from_dict( + catalog_offering) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in Volume JSON') + raise ValueError( + 'Required property \'created_at\' not present in Volume JSON') if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in Volume JSON') + raise ValueError( + 'Required property \'crn\' not present in Volume JSON') if (encryption := _dict.get('encryption')) is not None: args['encryption'] = encryption else: - raise ValueError('Required property \'encryption\' not present in Volume JSON') + raise ValueError( + 'Required property \'encryption\' not present in Volume JSON') if (encryption_key := _dict.get('encryption_key')) is not None: - args['encryption_key'] = EncryptionKeyReference.from_dict(encryption_key) + args['encryption_key'] = EncryptionKeyReference.from_dict( + encryption_key) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VolumeHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VolumeHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in Volume JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in Volume JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in Volume JSON') + raise ValueError( + 'Required property \'health_state\' not present in Volume JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Volume JSON') + raise ValueError( + 'Required property \'href\' not present in Volume JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in Volume JSON') + raise ValueError( + 'Required property \'id\' not present in Volume JSON') if (iops := _dict.get('iops')) is not None: args['iops'] = iops else: - raise ValueError('Required property \'iops\' not present in Volume JSON') + raise ValueError( + 'Required property \'iops\' not present in Volume JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Volume JSON') + raise ValueError( + 'Required property \'name\' not present in Volume JSON') if (operating_system := _dict.get('operating_system')) is not None: - args['operating_system'] = OperatingSystem.from_dict(operating_system) + args['operating_system'] = OperatingSystem.from_dict( + operating_system) if (profile := _dict.get('profile')) is not None: args['profile'] = VolumeProfileReference.from_dict(profile) else: - raise ValueError('Required property \'profile\' not present in Volume JSON') + raise ValueError( + 'Required property \'profile\' not present in Volume JSON') if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in Volume JSON') + raise ValueError( + 'Required property \'resource_group\' not present in Volume JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in Volume JSON') + raise ValueError( + 'Required property \'resource_type\' not present in Volume JSON' + ) if (source_image := _dict.get('source_image')) is not None: args['source_image'] = ImageReference.from_dict(source_image) if (source_snapshot := _dict.get('source_snapshot')) is not None: - args['source_snapshot'] = SnapshotReference.from_dict(source_snapshot) + args['source_snapshot'] = SnapshotReference.from_dict( + source_snapshot) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in Volume JSON') + raise ValueError( + 'Required property \'status\' not present in Volume JSON') if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [VolumeStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + VolumeStatusReason.from_dict(v) for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in Volume JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in Volume JSON' + ) if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags else: - raise ValueError('Required property \'user_tags\' not present in Volume JSON') + raise ValueError( + 'Required property \'user_tags\' not present in Volume JSON') if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentReferenceVolumeContext.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentReferenceVolumeContext.from_dict(v) + for v in volume_attachments + ] else: - raise ValueError('Required property \'volume_attachments\' not present in Volume JSON') + raise ValueError( + 'Required property \'volume_attachments\' not present in Volume JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = ZoneReference.from_dict(zone) else: - raise ValueError('Required property \'zone\' not present in Volume JSON') + raise ValueError( + 'Required property \'zone\' not present in Volume JSON') return cls(**args) @classmethod @@ -93911,7 +101343,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'active') and self.active is not None: _dict['active'] = self.active - if hasattr(self, 'attachment_state') and self.attachment_state is not None: + if hasattr(self, + 'attachment_state') and self.attachment_state is not None: _dict['attachment_state'] = self.attachment_state if hasattr(self, 'bandwidth') and self.bandwidth is not None: _dict['bandwidth'] = self.bandwidth @@ -93919,6 +101352,12 @@ def to_dict(self) -> Dict: _dict['busy'] = self.busy if hasattr(self, 'capacity') and self.capacity is not None: _dict['capacity'] = self.capacity + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: + if isinstance(self.catalog_offering, dict): + _dict['catalog_offering'] = self.catalog_offering + else: + _dict['catalog_offering'] = self.catalog_offering.to_dict() if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: @@ -93948,7 +101387,8 @@ def to_dict(self) -> Dict: _dict['iops'] = self.iops if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'operating_system') and self.operating_system is not None: + if hasattr(self, + 'operating_system') and self.operating_system is not None: if isinstance(self.operating_system, dict): _dict['operating_system'] = self.operating_system else: @@ -93970,7 +101410,8 @@ def to_dict(self) -> Dict: _dict['source_image'] = self.source_image else: _dict['source_image'] = self.source_image.to_dict() - if hasattr(self, 'source_snapshot') and self.source_snapshot is not None: + if hasattr(self, + 'source_snapshot') and self.source_snapshot is not None: if isinstance(self.source_snapshot, dict): _dict['source_snapshot'] = self.source_snapshot else: @@ -93987,7 +101428,9 @@ def to_dict(self) -> Dict: _dict['status_reasons'] = status_reasons_list if hasattr(self, 'user_tags') and self.user_tags is not None: _dict['user_tags'] = self.user_tags - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -94033,7 +101476,6 @@ class AttachmentStateEnum(str, Enum): UNATTACHED = 'unattached' UNUSABLE = 'unusable' - class EncryptionEnum(str, Enum): """ The type of encryption used on the volume. @@ -94042,7 +101484,6 @@ class EncryptionEnum(str, Enum): PROVIDER_MANAGED = 'provider_managed' USER_MANAGED = 'user_managed' - class HealthStateEnum(str, Enum): """ The health of this resource: @@ -94060,7 +101501,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -94068,7 +101508,6 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' - class StatusEnum(str, Enum): """ The status of the volume. @@ -94085,7 +101524,6 @@ class StatusEnum(str, Enum): UPDATING = 'updating' - class VolumeAttachment: """ VolumeAttachment. @@ -94166,39 +101604,57 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachment': if (bandwidth := _dict.get('bandwidth')) is not None: args['bandwidth'] = bandwidth else: - raise ValueError('Required property \'bandwidth\' not present in VolumeAttachment JSON') + raise ValueError( + 'Required property \'bandwidth\' not present in VolumeAttachment JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VolumeAttachment JSON') - if (delete_volume_on_instance_delete := _dict.get('delete_volume_on_instance_delete')) is not None: - args['delete_volume_on_instance_delete'] = delete_volume_on_instance_delete + raise ValueError( + 'Required property \'created_at\' not present in VolumeAttachment JSON' + ) + if (delete_volume_on_instance_delete := + _dict.get('delete_volume_on_instance_delete')) is not None: + args[ + 'delete_volume_on_instance_delete'] = delete_volume_on_instance_delete else: - raise ValueError('Required property \'delete_volume_on_instance_delete\' not present in VolumeAttachment JSON') + raise ValueError( + 'Required property \'delete_volume_on_instance_delete\' not present in VolumeAttachment JSON' + ) if (device := _dict.get('device')) is not None: args['device'] = VolumeAttachmentDevice.from_dict(device) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeAttachment JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeAttachment JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VolumeAttachment JSON') + raise ValueError( + 'Required property \'id\' not present in VolumeAttachment JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeAttachment JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeAttachment JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in VolumeAttachment JSON') + raise ValueError( + 'Required property \'status\' not present in VolumeAttachment JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VolumeAttachment JSON') + raise ValueError( + 'Required property \'type\' not present in VolumeAttachment JSON' + ) if (volume := _dict.get('volume')) is not None: - args['volume'] = VolumeReferenceVolumeAttachmentContext.from_dict(volume) + args['volume'] = VolumeReferenceVolumeAttachmentContext.from_dict( + volume) return cls(**args) @classmethod @@ -94213,8 +101669,10 @@ def to_dict(self) -> Dict: _dict['bandwidth'] = self.bandwidth if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'delete_volume_on_instance_delete') and self.delete_volume_on_instance_delete is not None: - _dict['delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete + if hasattr(self, 'delete_volume_on_instance_delete' + ) and self.delete_volume_on_instance_delete is not None: + _dict[ + 'delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete if hasattr(self, 'device') and self.device is not None: if isinstance(self.device, dict): _dict['device'] = self.device @@ -94265,7 +101723,6 @@ class StatusEnum(str, Enum): DELETING = 'deleting' DETACHING = 'detaching' - class TypeEnum(str, Enum): """ The type of volume attachment. @@ -94275,7 +101732,6 @@ class TypeEnum(str, Enum): DATA = 'data' - class VolumeAttachmentCollection: """ VolumeAttachmentCollection. @@ -94301,9 +101757,13 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentCollection': """Initialize a VolumeAttachmentCollection object from a json dictionary.""" args = {} if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachment.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachment.from_dict(v) for v in volume_attachments + ] else: - raise ValueError('Required property \'volume_attachments\' not present in VolumeAttachmentCollection JSON') + raise ValueError( + 'Required property \'volume_attachments\' not present in VolumeAttachmentCollection JSON' + ) return cls(**args) @classmethod @@ -94314,7 +101774,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -94434,8 +101896,10 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPatch': """Initialize a VolumeAttachmentPatch object from a json dictionary.""" args = {} - if (delete_volume_on_instance_delete := _dict.get('delete_volume_on_instance_delete')) is not None: - args['delete_volume_on_instance_delete'] = delete_volume_on_instance_delete + if (delete_volume_on_instance_delete := + _dict.get('delete_volume_on_instance_delete')) is not None: + args[ + 'delete_volume_on_instance_delete'] = delete_volume_on_instance_delete if (name := _dict.get('name')) is not None: args['name'] = name return cls(**args) @@ -94448,8 +101912,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_volume_on_instance_delete') and self.delete_volume_on_instance_delete is not None: - _dict['delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete + if hasattr(self, 'delete_volume_on_instance_delete' + ) and self.delete_volume_on_instance_delete is not None: + _dict[ + 'delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name return _dict @@ -94512,14 +101978,18 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototype': """Initialize a VolumeAttachmentPrototype object from a json dictionary.""" args = {} - if (delete_volume_on_instance_delete := _dict.get('delete_volume_on_instance_delete')) is not None: - args['delete_volume_on_instance_delete'] = delete_volume_on_instance_delete + if (delete_volume_on_instance_delete := + _dict.get('delete_volume_on_instance_delete')) is not None: + args[ + 'delete_volume_on_instance_delete'] = delete_volume_on_instance_delete if (name := _dict.get('name')) is not None: args['name'] = name if (volume := _dict.get('volume')) is not None: args['volume'] = volume else: - raise ValueError('Required property \'volume\' not present in VolumeAttachmentPrototype JSON') + raise ValueError( + 'Required property \'volume\' not present in VolumeAttachmentPrototype JSON' + ) return cls(**args) @classmethod @@ -94530,8 +102000,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_volume_on_instance_delete') and self.delete_volume_on_instance_delete is not None: - _dict['delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete + if hasattr(self, 'delete_volume_on_instance_delete' + ) and self.delete_volume_on_instance_delete is not None: + _dict[ + 'delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'volume') and self.volume is not None: @@ -94596,17 +102068,24 @@ def __init__( self.volume = volume @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceByImageContext': + def from_dict( + cls, + _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceByImageContext': """Initialize a VolumeAttachmentPrototypeInstanceByImageContext object from a json dictionary.""" args = {} - if (delete_volume_on_instance_delete := _dict.get('delete_volume_on_instance_delete')) is not None: - args['delete_volume_on_instance_delete'] = delete_volume_on_instance_delete + if (delete_volume_on_instance_delete := + _dict.get('delete_volume_on_instance_delete')) is not None: + args[ + 'delete_volume_on_instance_delete'] = delete_volume_on_instance_delete if (name := _dict.get('name')) is not None: args['name'] = name if (volume := _dict.get('volume')) is not None: - args['volume'] = VolumePrototypeInstanceByImageContext.from_dict(volume) + args['volume'] = VolumePrototypeInstanceByImageContext.from_dict( + volume) else: - raise ValueError('Required property \'volume\' not present in VolumeAttachmentPrototypeInstanceByImageContext JSON') + raise ValueError( + 'Required property \'volume\' not present in VolumeAttachmentPrototypeInstanceByImageContext JSON' + ) return cls(**args) @classmethod @@ -94617,8 +102096,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_volume_on_instance_delete') and self.delete_volume_on_instance_delete is not None: - _dict['delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete + if hasattr(self, 'delete_volume_on_instance_delete' + ) and self.delete_volume_on_instance_delete is not None: + _dict[ + 'delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'volume') and self.volume is not None: @@ -94636,13 +102117,17 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeInstanceByImageContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeInstanceByImageContext') -> bool: + def __eq__( + self, + other: 'VolumeAttachmentPrototypeInstanceByImageContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeInstanceByImageContext') -> bool: + def __ne__( + self, + other: 'VolumeAttachmentPrototypeInstanceByImageContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -94683,17 +102168,25 @@ def __init__( self.volume = volume @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext': + def from_dict( + cls, _dict: Dict + ) -> 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext': """Initialize a VolumeAttachmentPrototypeInstanceBySourceSnapshotContext object from a json dictionary.""" args = {} - if (delete_volume_on_instance_delete := _dict.get('delete_volume_on_instance_delete')) is not None: - args['delete_volume_on_instance_delete'] = delete_volume_on_instance_delete + if (delete_volume_on_instance_delete := + _dict.get('delete_volume_on_instance_delete')) is not None: + args[ + 'delete_volume_on_instance_delete'] = delete_volume_on_instance_delete if (name := _dict.get('name')) is not None: args['name'] = name if (volume := _dict.get('volume')) is not None: - args['volume'] = VolumePrototypeInstanceBySourceSnapshotContext.from_dict(volume) + args[ + 'volume'] = VolumePrototypeInstanceBySourceSnapshotContext.from_dict( + volume) else: - raise ValueError('Required property \'volume\' not present in VolumeAttachmentPrototypeInstanceBySourceSnapshotContext JSON') + raise ValueError( + 'Required property \'volume\' not present in VolumeAttachmentPrototypeInstanceBySourceSnapshotContext JSON' + ) return cls(**args) @classmethod @@ -94704,8 +102197,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_volume_on_instance_delete') and self.delete_volume_on_instance_delete is not None: - _dict['delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete + if hasattr(self, 'delete_volume_on_instance_delete' + ) and self.delete_volume_on_instance_delete is not None: + _dict[ + 'delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'volume') and self.volume is not None: @@ -94723,13 +102218,17 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeInstanceBySourceSnapshotContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext') -> bool: + def __eq__( + self, other: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext') -> bool: + def __ne__( + self, other: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -94768,17 +102267,23 @@ def __init__( self.volume = volume @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceByVolumeContext': + def from_dict( + cls, + _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceByVolumeContext': """Initialize a VolumeAttachmentPrototypeInstanceByVolumeContext object from a json dictionary.""" args = {} - if (delete_volume_on_instance_delete := _dict.get('delete_volume_on_instance_delete')) is not None: - args['delete_volume_on_instance_delete'] = delete_volume_on_instance_delete + if (delete_volume_on_instance_delete := + _dict.get('delete_volume_on_instance_delete')) is not None: + args[ + 'delete_volume_on_instance_delete'] = delete_volume_on_instance_delete if (name := _dict.get('name')) is not None: args['name'] = name if (volume := _dict.get('volume')) is not None: args['volume'] = volume else: - raise ValueError('Required property \'volume\' not present in VolumeAttachmentPrototypeInstanceByVolumeContext JSON') + raise ValueError( + 'Required property \'volume\' not present in VolumeAttachmentPrototypeInstanceByVolumeContext JSON' + ) return cls(**args) @classmethod @@ -94789,8 +102294,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_volume_on_instance_delete') and self.delete_volume_on_instance_delete is not None: - _dict['delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete + if hasattr(self, 'delete_volume_on_instance_delete' + ) and self.delete_volume_on_instance_delete is not None: + _dict[ + 'delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'volume') and self.volume is not None: @@ -94808,13 +102315,17 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeInstanceByVolumeContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeInstanceByVolumeContext') -> bool: + def __eq__( + self, + other: 'VolumeAttachmentPrototypeInstanceByVolumeContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeInstanceByVolumeContext') -> bool: + def __ne__( + self, + other: 'VolumeAttachmentPrototypeInstanceByVolumeContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -94825,16 +102336,16 @@ class VolumeAttachmentPrototypeVolume: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VolumeAttachmentPrototypeVolume object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VolumeAttachmentPrototypeVolumeVolumeIdentity', 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext']) - ) + ", ".join([ + 'VolumeAttachmentPrototypeVolumeVolumeIdentity', + 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext' + ])) raise Exception(msg) @@ -94865,7 +102376,8 @@ def __init__( id: str, name: str, *, - deleted: Optional['VolumeAttachmentReferenceInstanceContextDeleted'] = None, + deleted: Optional[ + 'VolumeAttachmentReferenceInstanceContextDeleted'] = None, device: Optional['VolumeAttachmentDevice'] = None, volume: Optional['VolumeReferenceVolumeAttachmentContext'] = None, ) -> None: @@ -94896,27 +102408,37 @@ def __init__( self.volume = volume @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentReferenceInstanceContext': + def from_dict(cls, + _dict: Dict) -> 'VolumeAttachmentReferenceInstanceContext': """Initialize a VolumeAttachmentReferenceInstanceContext object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VolumeAttachmentReferenceInstanceContextDeleted.from_dict(deleted) + args[ + 'deleted'] = VolumeAttachmentReferenceInstanceContextDeleted.from_dict( + deleted) if (device := _dict.get('device')) is not None: args['device'] = VolumeAttachmentDevice.from_dict(device) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeAttachmentReferenceInstanceContext JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeAttachmentReferenceInstanceContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VolumeAttachmentReferenceInstanceContext JSON') + raise ValueError( + 'Required property \'id\' not present in VolumeAttachmentReferenceInstanceContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeAttachmentReferenceInstanceContext JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeAttachmentReferenceInstanceContext JSON' + ) if (volume := _dict.get('volume')) is not None: - args['volume'] = VolumeReferenceVolumeAttachmentContext.from_dict(volume) + args['volume'] = VolumeReferenceVolumeAttachmentContext.from_dict( + volume) return cls(**args) @classmethod @@ -94989,13 +102511,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentReferenceInstanceContextDeleted': + def from_dict( + cls, + _dict: Dict) -> 'VolumeAttachmentReferenceInstanceContextDeleted': """Initialize a VolumeAttachmentReferenceInstanceContextDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VolumeAttachmentReferenceInstanceContextDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VolumeAttachmentReferenceInstanceContextDeleted JSON' + ) return cls(**args) @classmethod @@ -95018,13 +102544,17 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentReferenceInstanceContextDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentReferenceInstanceContextDeleted') -> bool: + def __eq__( + self, + other: 'VolumeAttachmentReferenceInstanceContextDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentReferenceInstanceContextDeleted') -> bool: + def __ne__( + self, + other: 'VolumeAttachmentReferenceInstanceContextDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -95060,7 +102590,8 @@ def __init__( name: str, type: str, *, - deleted: Optional['VolumeAttachmentReferenceVolumeContextDeleted'] = None, + deleted: Optional[ + 'VolumeAttachmentReferenceVolumeContextDeleted'] = None, device: Optional['VolumeAttachmentDevice'] = None, ) -> None: """ @@ -95096,34 +102627,50 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentReferenceVolumeContext': """Initialize a VolumeAttachmentReferenceVolumeContext object from a json dictionary.""" args = {} - if (delete_volume_on_instance_delete := _dict.get('delete_volume_on_instance_delete')) is not None: - args['delete_volume_on_instance_delete'] = delete_volume_on_instance_delete + if (delete_volume_on_instance_delete := + _dict.get('delete_volume_on_instance_delete')) is not None: + args[ + 'delete_volume_on_instance_delete'] = delete_volume_on_instance_delete else: - raise ValueError('Required property \'delete_volume_on_instance_delete\' not present in VolumeAttachmentReferenceVolumeContext JSON') + raise ValueError( + 'Required property \'delete_volume_on_instance_delete\' not present in VolumeAttachmentReferenceVolumeContext JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VolumeAttachmentReferenceVolumeContextDeleted.from_dict(deleted) + args[ + 'deleted'] = VolumeAttachmentReferenceVolumeContextDeleted.from_dict( + deleted) if (device := _dict.get('device')) is not None: args['device'] = VolumeAttachmentDevice.from_dict(device) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeAttachmentReferenceVolumeContext JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeAttachmentReferenceVolumeContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VolumeAttachmentReferenceVolumeContext JSON') + raise ValueError( + 'Required property \'id\' not present in VolumeAttachmentReferenceVolumeContext JSON' + ) if (instance := _dict.get('instance')) is not None: args['instance'] = InstanceReference.from_dict(instance) else: - raise ValueError('Required property \'instance\' not present in VolumeAttachmentReferenceVolumeContext JSON') + raise ValueError( + 'Required property \'instance\' not present in VolumeAttachmentReferenceVolumeContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeAttachmentReferenceVolumeContext JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeAttachmentReferenceVolumeContext JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VolumeAttachmentReferenceVolumeContext JSON') + raise ValueError( + 'Required property \'type\' not present in VolumeAttachmentReferenceVolumeContext JSON' + ) return cls(**args) @classmethod @@ -95134,8 +102681,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_volume_on_instance_delete') and self.delete_volume_on_instance_delete is not None: - _dict['delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete + if hasattr(self, 'delete_volume_on_instance_delete' + ) and self.delete_volume_on_instance_delete is not None: + _dict[ + 'delete_volume_on_instance_delete'] = self.delete_volume_on_instance_delete if hasattr(self, 'deleted') and self.deleted is not None: if isinstance(self.deleted, dict): _dict['deleted'] = self.deleted @@ -95188,7 +102737,6 @@ class TypeEnum(str, Enum): DATA = 'data' - class VolumeAttachmentReferenceVolumeContextDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -95209,13 +102757,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentReferenceVolumeContextDeleted': + def from_dict( + cls, + _dict: Dict) -> 'VolumeAttachmentReferenceVolumeContextDeleted': """Initialize a VolumeAttachmentReferenceVolumeContextDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VolumeAttachmentReferenceVolumeContextDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VolumeAttachmentReferenceVolumeContextDeleted JSON' + ) return cls(**args) @classmethod @@ -95238,13 +102790,101 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentReferenceVolumeContextDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentReferenceVolumeContextDeleted') -> bool: + def __eq__(self, + other: 'VolumeAttachmentReferenceVolumeContextDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentReferenceVolumeContextDeleted') -> bool: + def __ne__(self, + other: 'VolumeAttachmentReferenceVolumeContextDeleted') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class VolumeCatalogOffering: + """ + VolumeCatalogOffering. + + :param CatalogOfferingVersionPlanReference plan: (optional) The billing plan + associated with the catalog offering version. + If absent, no billing plan is associated with the catalog offering version + (free). + :param CatalogOfferingVersionReference version: The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version this volume was created from. + """ + + def __init__( + self, + version: 'CatalogOfferingVersionReference', + *, + plan: Optional['CatalogOfferingVersionPlanReference'] = None, + ) -> None: + """ + Initialize a VolumeCatalogOffering object. + + :param CatalogOfferingVersionReference version: The + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version this volume was created from. + :param CatalogOfferingVersionPlanReference plan: (optional) The billing + plan associated with the catalog offering version. + If absent, no billing plan is associated with the catalog offering version + (free). + """ + self.plan = plan + self.version = version + + @classmethod + def from_dict(cls, _dict: Dict) -> 'VolumeCatalogOffering': + """Initialize a VolumeCatalogOffering object from a json dictionary.""" + args = {} + if (plan := _dict.get('plan')) is not None: + args['plan'] = CatalogOfferingVersionPlanReference.from_dict(plan) + if (version := _dict.get('version')) is not None: + args['version'] = CatalogOfferingVersionReference.from_dict(version) + else: + raise ValueError( + 'Required property \'version\' not present in VolumeCatalogOffering JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a VolumeCatalogOffering object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'plan') and self.plan is not None: + if isinstance(self.plan, dict): + _dict['plan'] = self.plan + else: + _dict['plan'] = self.plan.to_dict() + if hasattr(self, 'version') and self.version is not None: + if isinstance(self.version, dict): + _dict['version'] = self.version + else: + _dict['version'] = self.version.to_dict() + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this VolumeCatalogOffering object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'VolumeCatalogOffering') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'VolumeCatalogOffering') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -95297,21 +102937,29 @@ def from_dict(cls, _dict: Dict) -> 'VolumeCollection': if (first := _dict.get('first')) is not None: args['first'] = VolumeCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in VolumeCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VolumeCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VolumeCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VolumeCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VolumeCollectionNext.from_dict(next) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VolumeCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VolumeCollection JSON' + ) if (volumes := _dict.get('volumes')) is not None: args['volumes'] = [Volume.from_dict(v) for v in volumes] else: - raise ValueError('Required property \'volumes\' not present in VolumeCollection JSON') + raise ValueError( + 'Required property \'volumes\' not present in VolumeCollection JSON' + ) return cls(**args) @classmethod @@ -95390,7 +103038,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -95450,7 +103100,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeCollectionNext JSON' + ) return cls(**args) @classmethod @@ -95520,11 +103172,15 @@ def from_dict(cls, _dict: Dict) -> 'VolumeHealthReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VolumeHealthReason JSON') + raise ValueError( + 'Required property \'code\' not present in VolumeHealthReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VolumeHealthReason JSON') + raise ValueError( + 'Required property \'message\' not present in VolumeHealthReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -95571,23 +103227,22 @@ class CodeEnum(str, Enum): INITIALIZING_FROM_SNAPSHOT = 'initializing_from_snapshot' - class VolumeIdentity: """ Identifies a volume by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VolumeIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VolumeIdentityById', 'VolumeIdentityByCRN', 'VolumeIdentityByHref']) - ) + ", ".join([ + 'VolumeIdentityById', 'VolumeIdentityByCRN', + 'VolumeIdentityByHref' + ])) raise Exception(msg) @@ -95759,15 +103414,19 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfile': if (family := _dict.get('family')) is not None: args['family'] = family else: - raise ValueError('Required property \'family\' not present in VolumeProfile JSON') + raise ValueError( + 'Required property \'family\' not present in VolumeProfile JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeProfile JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeProfile JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeProfile JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeProfile JSON') return cls(**args) @classmethod @@ -95816,7 +103475,6 @@ class FamilyEnum(str, Enum): TIERED = 'tiered' - class VolumeProfileCollection: """ VolumeProfileCollection. @@ -95867,21 +103525,29 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfileCollection': if (first := _dict.get('first')) is not None: args['first'] = VolumeProfileCollectionFirst.from_dict(first) else: - raise ValueError('Required property \'first\' not present in VolumeProfileCollection JSON') + raise ValueError( + 'Required property \'first\' not present in VolumeProfileCollection JSON' + ) if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError('Required property \'limit\' not present in VolumeProfileCollection JSON') + raise ValueError( + 'Required property \'limit\' not present in VolumeProfileCollection JSON' + ) if (next := _dict.get('next')) is not None: args['next'] = VolumeProfileCollectionNext.from_dict(next) if (profiles := _dict.get('profiles')) is not None: args['profiles'] = [VolumeProfile.from_dict(v) for v in profiles] else: - raise ValueError('Required property \'profiles\' not present in VolumeProfileCollection JSON') + raise ValueError( + 'Required property \'profiles\' not present in VolumeProfileCollection JSON' + ) if (total_count := _dict.get('total_count')) is not None: args['total_count'] = total_count else: - raise ValueError('Required property \'total_count\' not present in VolumeProfileCollection JSON') + raise ValueError( + 'Required property \'total_count\' not present in VolumeProfileCollection JSON' + ) return cls(**args) @classmethod @@ -95960,7 +103626,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfileCollectionFirst': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeProfileCollectionFirst JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeProfileCollectionFirst JSON' + ) return cls(**args) @classmethod @@ -96020,7 +103688,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfileCollectionNext': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeProfileCollectionNext JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeProfileCollectionNext JSON' + ) return cls(**args) @classmethod @@ -96060,16 +103730,14 @@ class VolumeProfileIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VolumeProfileIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VolumeProfileIdentityByName', 'VolumeProfileIdentityByHref']) - ) + ", ".join( + ['VolumeProfileIdentityByName', 'VolumeProfileIdentityByHref'])) raise Exception(msg) @@ -96102,11 +103770,15 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfileReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeProfileReference JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeProfileReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeProfileReference JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeProfileReference JSON' + ) return cls(**args) @classmethod @@ -96198,8 +103870,10 @@ def __init__( this volume. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VolumePrototypeVolumeByCapacity', 'VolumePrototypeVolumeBySourceSnapshot']) - ) + ", ".join([ + 'VolumePrototypeVolumeByCapacity', + 'VolumePrototypeVolumeBySourceSnapshot' + ])) raise Exception(msg) @@ -96294,7 +103968,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumePrototypeInstanceByImageContext': if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in VolumePrototypeInstanceByImageContext JSON') + raise ValueError( + 'Required property \'profile\' not present in VolumePrototypeInstanceByImageContext JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (user_tags := _dict.get('user_tags')) is not None: @@ -96436,7 +104112,9 @@ def __init__( self.user_tags = user_tags @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumePrototypeInstanceBySourceSnapshotContext': + def from_dict( + cls, + _dict: Dict) -> 'VolumePrototypeInstanceBySourceSnapshotContext': """Initialize a VolumePrototypeInstanceBySourceSnapshotContext object from a json dictionary.""" args = {} if (capacity := _dict.get('capacity')) is not None: @@ -96450,13 +104128,17 @@ def from_dict(cls, _dict: Dict) -> 'VolumePrototypeInstanceBySourceSnapshotConte if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in VolumePrototypeInstanceBySourceSnapshotContext JSON') + raise ValueError( + 'Required property \'profile\' not present in VolumePrototypeInstanceBySourceSnapshotContext JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (source_snapshot := _dict.get('source_snapshot')) is not None: args['source_snapshot'] = source_snapshot else: - raise ValueError('Required property \'source_snapshot\' not present in VolumePrototypeInstanceBySourceSnapshotContext JSON') + raise ValueError( + 'Required property \'source_snapshot\' not present in VolumePrototypeInstanceBySourceSnapshotContext JSON' + ) if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags return cls(**args) @@ -96490,7 +104172,8 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'source_snapshot') and self.source_snapshot is not None: + if hasattr(self, + 'source_snapshot') and self.source_snapshot is not None: if isinstance(self.source_snapshot, dict): _dict['source_snapshot'] = self.source_snapshot else: @@ -96507,13 +104190,15 @@ def __str__(self) -> str: """Return a `str` version of this VolumePrototypeInstanceBySourceSnapshotContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumePrototypeInstanceBySourceSnapshotContext') -> bool: + def __eq__(self, + other: 'VolumePrototypeInstanceBySourceSnapshotContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumePrototypeInstanceBySourceSnapshotContext') -> bool: + def __ne__(self, + other: 'VolumePrototypeInstanceBySourceSnapshotContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -96578,27 +104263,35 @@ def from_dict(cls, _dict: Dict) -> 'VolumeReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VolumeReference JSON') + raise ValueError( + 'Required property \'crn\' not present in VolumeReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VolumeReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeReference JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VolumeReference JSON') + raise ValueError( + 'Required property \'id\' not present in VolumeReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeReference JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeReference JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = VolumeRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VolumeReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VolumeReference JSON' + ) return cls(**args) @classmethod @@ -96657,7 +104350,6 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' - class VolumeReferenceDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -96684,7 +104376,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeReferenceDeleted': if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VolumeReferenceDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VolumeReferenceDeleted JSON' + ) return cls(**args) @classmethod @@ -96742,7 +104436,8 @@ def __init__( name: str, resource_type: str, *, - deleted: Optional['VolumeReferenceVolumeAttachmentContextDeleted'] = None, + deleted: Optional[ + 'VolumeReferenceVolumeAttachmentContextDeleted'] = None, ) -> None: """ Initialize a VolumeReferenceVolumeAttachmentContext object. @@ -96772,25 +104467,37 @@ def from_dict(cls, _dict: Dict) -> 'VolumeReferenceVolumeAttachmentContext': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VolumeReferenceVolumeAttachmentContext JSON') + raise ValueError( + 'Required property \'crn\' not present in VolumeReferenceVolumeAttachmentContext JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VolumeReferenceVolumeAttachmentContextDeleted.from_dict(deleted) + args[ + 'deleted'] = VolumeReferenceVolumeAttachmentContextDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeReferenceVolumeAttachmentContext JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeReferenceVolumeAttachmentContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VolumeReferenceVolumeAttachmentContext JSON') + raise ValueError( + 'Required property \'id\' not present in VolumeReferenceVolumeAttachmentContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeReferenceVolumeAttachmentContext JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeReferenceVolumeAttachmentContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VolumeReferenceVolumeAttachmentContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VolumeReferenceVolumeAttachmentContext JSON' + ) return cls(**args) @classmethod @@ -96844,7 +104551,6 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' - class VolumeReferenceVolumeAttachmentContextDeleted: """ If present, this property indicates the referenced resource has been deleted, and @@ -96865,13 +104571,17 @@ def __init__( self.more_info = more_info @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeReferenceVolumeAttachmentContextDeleted': + def from_dict( + cls, + _dict: Dict) -> 'VolumeReferenceVolumeAttachmentContextDeleted': """Initialize a VolumeReferenceVolumeAttachmentContextDeleted object from a json dictionary.""" args = {} if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info else: - raise ValueError('Required property \'more_info\' not present in VolumeReferenceVolumeAttachmentContextDeleted JSON') + raise ValueError( + 'Required property \'more_info\' not present in VolumeReferenceVolumeAttachmentContextDeleted JSON' + ) return cls(**args) @classmethod @@ -96894,13 +104604,15 @@ def __str__(self) -> str: """Return a `str` version of this VolumeReferenceVolumeAttachmentContextDeleted object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeReferenceVolumeAttachmentContextDeleted') -> bool: + def __eq__(self, + other: 'VolumeReferenceVolumeAttachmentContextDeleted') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeReferenceVolumeAttachmentContextDeleted') -> bool: + def __ne__(self, + other: 'VolumeReferenceVolumeAttachmentContextDeleted') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -97013,11 +104725,15 @@ def from_dict(cls, _dict: Dict) -> 'VolumeStatusReason': if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError('Required property \'code\' not present in VolumeStatusReason JSON') + raise ValueError( + 'Required property \'code\' not present in VolumeStatusReason JSON' + ) if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError('Required property \'message\' not present in VolumeStatusReason JSON') + raise ValueError( + 'Required property \'message\' not present in VolumeStatusReason JSON' + ) if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -97067,7 +104783,6 @@ class CodeEnum(str, Enum): ENCRYPTION_KEY_DELETED = 'encryption_key_deleted' - class Zone: """ Zone. @@ -97105,19 +104820,23 @@ def from_dict(cls, _dict: Dict) -> 'Zone': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in Zone JSON') + raise ValueError( + 'Required property \'href\' not present in Zone JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in Zone JSON') + raise ValueError( + 'Required property \'name\' not present in Zone JSON') if (region := _dict.get('region')) is not None: args['region'] = RegionReference.from_dict(region) else: - raise ValueError('Required property \'region\' not present in Zone JSON') + raise ValueError( + 'Required property \'region\' not present in Zone JSON') if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in Zone JSON') + raise ValueError( + 'Required property \'status\' not present in Zone JSON') return cls(**args) @classmethod @@ -97169,7 +104888,6 @@ class StatusEnum(str, Enum): UNAVAILABLE = 'unavailable' - class ZoneCollection: """ ZoneCollection. @@ -97195,7 +104913,9 @@ def from_dict(cls, _dict: Dict) -> 'ZoneCollection': if (zones := _dict.get('zones')) is not None: args['zones'] = [Zone.from_dict(v) for v in zones] else: - raise ValueError('Required property \'zones\' not present in ZoneCollection JSON') + raise ValueError( + 'Required property \'zones\' not present in ZoneCollection JSON' + ) return cls(**args) @classmethod @@ -97241,16 +104961,13 @@ class ZoneIdentity: """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ZoneIdentity object. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ZoneIdentityByName', 'ZoneIdentityByHref']) - ) + ", ".join(['ZoneIdentityByName', 'ZoneIdentityByHref'])) raise Exception(msg) @@ -97283,11 +105000,13 @@ def from_dict(cls, _dict: Dict) -> 'ZoneReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ZoneReference JSON') + raise ValueError( + 'Required property \'href\' not present in ZoneReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ZoneReference JSON') + raise ValueError( + 'Required property \'name\' not present in ZoneReference JSON') return cls(**args) @classmethod @@ -97372,21 +105091,29 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJobSourceInstanceReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BackupPolicyJobSourceInstanceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in BackupPolicyJobSourceInstanceReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = InstanceReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyJobSourceInstanceReference JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyJobSourceInstanceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyJobSourceInstanceReference JSON') + raise ValueError( + 'Required property \'id\' not present in BackupPolicyJobSourceInstanceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BackupPolicyJobSourceInstanceReference JSON') + raise ValueError( + 'Required property \'name\' not present in BackupPolicyJobSourceInstanceReference JSON' + ) return cls(**args) @classmethod @@ -97492,27 +105219,37 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJobSourceVolumeReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BackupPolicyJobSourceVolumeReference JSON') + raise ValueError( + 'Required property \'crn\' not present in BackupPolicyJobSourceVolumeReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VolumeReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyJobSourceVolumeReference JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyJobSourceVolumeReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyJobSourceVolumeReference JSON') + raise ValueError( + 'Required property \'id\' not present in BackupPolicyJobSourceVolumeReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BackupPolicyJobSourceVolumeReference JSON') + raise ValueError( + 'Required property \'name\' not present in BackupPolicyJobSourceVolumeReference JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = VolumeRemote.from_dict(remote) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyJobSourceVolumeReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyJobSourceVolumeReference JSON' + ) return cls(**args) @classmethod @@ -97571,7 +105308,6 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' - class BackupPolicyMatchResourceTypeInstance(BackupPolicy): """ BackupPolicyMatchResourceTypeInstance. @@ -97719,65 +105455,103 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeInstance': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'created_at\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'crn\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [BackupPolicyHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + BackupPolicyHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'health_state\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyMatchResourceTypeInstance JSON') - if (last_job_completed_at := _dict.get('last_job_completed_at')) is not None: - args['last_job_completed_at'] = string_to_datetime(last_job_completed_at) + raise ValueError( + 'Required property \'id\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) + if (last_job_completed_at := + _dict.get('last_job_completed_at')) is not None: + args['last_job_completed_at'] = string_to_datetime( + last_job_completed_at) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (match_user_tags := _dict.get('match_user_tags')) is not None: args['match_user_tags'] = match_user_tags else: - raise ValueError('Required property \'match_user_tags\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'match_user_tags\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'name\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (plans := _dict.get('plans')) is not None: - args['plans'] = [BackupPolicyPlanReference.from_dict(v) for v in plans] + args['plans'] = [ + BackupPolicyPlanReference.from_dict(v) for v in plans + ] else: - raise ValueError('Required property \'plans\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'plans\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'resource_group\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (scope := _dict.get('scope')) is not None: args['scope'] = scope else: - raise ValueError('Required property \'scope\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'scope\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) if (included_content := _dict.get('included_content')) is not None: args['included_content'] = included_content else: - raise ValueError('Required property \'included_content\' not present in BackupPolicyMatchResourceTypeInstance JSON') - if (match_resource_type := _dict.get('match_resource_type')) is not None: + raise ValueError( + 'Required property \'included_content\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) + if (match_resource_type := + _dict.get('match_resource_type')) is not None: args['match_resource_type'] = match_resource_type else: - raise ValueError('Required property \'match_resource_type\' not present in BackupPolicyMatchResourceTypeInstance JSON') + raise ValueError( + 'Required property \'match_resource_type\' not present in BackupPolicyMatchResourceTypeInstance JSON' + ) return cls(**args) @classmethod @@ -97806,11 +105580,15 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'last_job_completed_at') and self.last_job_completed_at is not None: - _dict['last_job_completed_at'] = datetime_to_string(self.last_job_completed_at) - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, 'last_job_completed_at' + ) and self.last_job_completed_at is not None: + _dict['last_job_completed_at'] = datetime_to_string( + self.last_job_completed_at) + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state - if hasattr(self, 'match_user_tags') and self.match_user_tags is not None: + if hasattr(self, + 'match_user_tags') and self.match_user_tags is not None: _dict['match_user_tags'] = self.match_user_tags if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -97834,9 +105612,12 @@ def to_dict(self) -> Dict: _dict['scope'] = self.scope else: _dict['scope'] = self.scope.to_dict() - if hasattr(self, 'included_content') and self.included_content is not None: + if hasattr(self, + 'included_content') and self.included_content is not None: _dict['included_content'] = self.included_content - if hasattr(self, 'match_resource_type') and self.match_resource_type is not None: + if hasattr( + self, + 'match_resource_type') and self.match_resource_type is not None: _dict['match_resource_type'] = self.match_resource_type return _dict @@ -97875,7 +105656,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the backup policy. @@ -97889,7 +105669,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -97897,7 +105676,6 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY = 'backup_policy' - class IncludedContentEnum(str, Enum): """ An item to include. @@ -97906,7 +105684,6 @@ class IncludedContentEnum(str, Enum): BOOT_VOLUME = 'boot_volume' DATA_VOLUMES = 'data_volumes' - class MatchResourceTypeEnum(str, Enum): """ The resource type this backup policy applies to. Resources that have both a @@ -97919,7 +105696,6 @@ class MatchResourceTypeEnum(str, Enum): INSTANCE = 'instance' - class BackupPolicyMatchResourceTypeVolume(BackupPolicy): """ BackupPolicyMatchResourceTypeVolume. @@ -98051,61 +105827,97 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeVolume': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'created_at\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'crn\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [BackupPolicyHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + BackupPolicyHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'health_state\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'href\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyMatchResourceTypeVolume JSON') - if (last_job_completed_at := _dict.get('last_job_completed_at')) is not None: - args['last_job_completed_at'] = string_to_datetime(last_job_completed_at) + raise ValueError( + 'Required property \'id\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) + if (last_job_completed_at := + _dict.get('last_job_completed_at')) is not None: + args['last_job_completed_at'] = string_to_datetime( + last_job_completed_at) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (match_user_tags := _dict.get('match_user_tags')) is not None: args['match_user_tags'] = match_user_tags else: - raise ValueError('Required property \'match_user_tags\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'match_user_tags\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'name\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (plans := _dict.get('plans')) is not None: - args['plans'] = [BackupPolicyPlanReference.from_dict(v) for v in plans] + args['plans'] = [ + BackupPolicyPlanReference.from_dict(v) for v in plans + ] else: - raise ValueError('Required property \'plans\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'plans\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'resource_group\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) if (scope := _dict.get('scope')) is not None: args['scope'] = scope else: - raise ValueError('Required property \'scope\' not present in BackupPolicyMatchResourceTypeVolume JSON') - if (match_resource_type := _dict.get('match_resource_type')) is not None: + raise ValueError( + 'Required property \'scope\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) + if (match_resource_type := + _dict.get('match_resource_type')) is not None: args['match_resource_type'] = match_resource_type else: - raise ValueError('Required property \'match_resource_type\' not present in BackupPolicyMatchResourceTypeVolume JSON') + raise ValueError( + 'Required property \'match_resource_type\' not present in BackupPolicyMatchResourceTypeVolume JSON' + ) return cls(**args) @classmethod @@ -98134,11 +105946,15 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'last_job_completed_at') and self.last_job_completed_at is not None: - _dict['last_job_completed_at'] = datetime_to_string(self.last_job_completed_at) - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, 'last_job_completed_at' + ) and self.last_job_completed_at is not None: + _dict['last_job_completed_at'] = datetime_to_string( + self.last_job_completed_at) + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state - if hasattr(self, 'match_user_tags') and self.match_user_tags is not None: + if hasattr(self, + 'match_user_tags') and self.match_user_tags is not None: _dict['match_user_tags'] = self.match_user_tags if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -98162,7 +105978,9 @@ def to_dict(self) -> Dict: _dict['scope'] = self.scope else: _dict['scope'] = self.scope.to_dict() - if hasattr(self, 'match_resource_type') and self.match_resource_type is not None: + if hasattr( + self, + 'match_resource_type') and self.match_resource_type is not None: _dict['match_resource_type'] = self.match_resource_type return _dict @@ -98201,7 +106019,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the backup policy. @@ -98215,7 +106032,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -98223,7 +106039,6 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY = 'backup_policy' - class MatchResourceTypeEnum(str, Enum): """ The resource type this backup policy applies to. Resources that have both a @@ -98236,8 +106051,8 @@ class MatchResourceTypeEnum(str, Enum): VOLUME = 'volume' - -class BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype(BackupPolicyPrototype): +class BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype( + BackupPolicyPrototype): """ BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype. @@ -98302,27 +106117,36 @@ def __init__( self.match_resource_type = match_resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype': """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object from a json dictionary.""" args = {} if (match_user_tags := _dict.get('match_user_tags')) is not None: args['match_user_tags'] = match_user_tags else: - raise ValueError('Required property \'match_user_tags\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype JSON') + raise ValueError( + 'Required property \'match_user_tags\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name if (plans := _dict.get('plans')) is not None: - args['plans'] = [BackupPolicyPlanPrototype.from_dict(v) for v in plans] + args['plans'] = [ + BackupPolicyPlanPrototype.from_dict(v) for v in plans + ] if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (scope := _dict.get('scope')) is not None: args['scope'] = scope if (included_content := _dict.get('included_content')) is not None: args['included_content'] = included_content - if (match_resource_type := _dict.get('match_resource_type')) is not None: + if (match_resource_type := + _dict.get('match_resource_type')) is not None: args['match_resource_type'] = match_resource_type else: - raise ValueError('Required property \'match_resource_type\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype JSON') + raise ValueError( + 'Required property \'match_resource_type\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype JSON' + ) return cls(**args) @classmethod @@ -98333,7 +106157,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'match_user_tags') and self.match_user_tags is not None: + if hasattr(self, + 'match_user_tags') and self.match_user_tags is not None: _dict['match_user_tags'] = self.match_user_tags if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -98355,9 +106180,12 @@ def to_dict(self) -> Dict: _dict['scope'] = self.scope else: _dict['scope'] = self.scope.to_dict() - if hasattr(self, 'included_content') and self.included_content is not None: + if hasattr(self, + 'included_content') and self.included_content is not None: _dict['included_content'] = self.included_content - if hasattr(self, 'match_resource_type') and self.match_resource_type is not None: + if hasattr( + self, + 'match_resource_type') and self.match_resource_type is not None: _dict['match_resource_type'] = self.match_resource_type return _dict @@ -98369,13 +106197,19 @@ def __str__(self) -> str: """Return a `str` version of this BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype') -> bool: + def __eq__( + self, other: + 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype') -> bool: + def __ne__( + self, other: + 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -98387,7 +106221,6 @@ class IncludedContentEnum(str, Enum): BOOT_VOLUME = 'boot_volume' DATA_VOLUMES = 'data_volumes' - class MatchResourceTypeEnum(str, Enum): """ The resource type this backup policy will apply to. Resources that have both a @@ -98397,8 +106230,8 @@ class MatchResourceTypeEnum(str, Enum): INSTANCE = 'instance' - -class BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype(BackupPolicyPrototype): +class BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype( + BackupPolicyPrototype): """ BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype. @@ -98453,25 +106286,34 @@ def __init__( self.match_resource_type = match_resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype': """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype object from a json dictionary.""" args = {} if (match_user_tags := _dict.get('match_user_tags')) is not None: args['match_user_tags'] = match_user_tags else: - raise ValueError('Required property \'match_user_tags\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype JSON') + raise ValueError( + 'Required property \'match_user_tags\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name if (plans := _dict.get('plans')) is not None: - args['plans'] = [BackupPolicyPlanPrototype.from_dict(v) for v in plans] + args['plans'] = [ + BackupPolicyPlanPrototype.from_dict(v) for v in plans + ] if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (scope := _dict.get('scope')) is not None: args['scope'] = scope - if (match_resource_type := _dict.get('match_resource_type')) is not None: + if (match_resource_type := + _dict.get('match_resource_type')) is not None: args['match_resource_type'] = match_resource_type else: - raise ValueError('Required property \'match_resource_type\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype JSON') + raise ValueError( + 'Required property \'match_resource_type\' not present in BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype JSON' + ) return cls(**args) @classmethod @@ -98482,7 +106324,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'match_user_tags') and self.match_user_tags is not None: + if hasattr(self, + 'match_user_tags') and self.match_user_tags is not None: _dict['match_user_tags'] = self.match_user_tags if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -98504,7 +106347,9 @@ def to_dict(self) -> Dict: _dict['scope'] = self.scope else: _dict['scope'] = self.scope.to_dict() - if hasattr(self, 'match_resource_type') and self.match_resource_type is not None: + if hasattr( + self, + 'match_resource_type') and self.match_resource_type is not None: _dict['match_resource_type'] = self.match_resource_type return _dict @@ -98516,13 +106361,19 @@ def __str__(self) -> str: """Return a `str` version of this BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype') -> bool: + def __eq__( + self, + other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype') -> bool: + def __ne__( + self, + other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -98535,24 +106386,22 @@ class MatchResourceTypeEnum(str, Enum): VOLUME = 'volume' - class BackupPolicyScopePrototypeEnterpriseIdentity(BackupPolicyScopePrototype): """ Identifies an enterprise by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BackupPolicyScopePrototypeEnterpriseIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN']) - ) + ", ".join([ + 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN' + ])) raise Exception(msg) @@ -98586,11 +106435,15 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyScopeAccountReference': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyScopeAccountReference JSON') + raise ValueError( + 'Required property \'id\' not present in BackupPolicyScopeAccountReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyScopeAccountReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyScopeAccountReference JSON' + ) return cls(**args) @classmethod @@ -98633,7 +106486,6 @@ class ResourceTypeEnum(str, Enum): ACCOUNT = 'account' - class BackupPolicyScopeEnterpriseReference(BackupPolicyScope): """ BackupPolicyScopeEnterpriseReference. @@ -98668,15 +106520,21 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyScopeEnterpriseReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BackupPolicyScopeEnterpriseReference JSON') + raise ValueError( + 'Required property \'crn\' not present in BackupPolicyScopeEnterpriseReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BackupPolicyScopeEnterpriseReference JSON') + raise ValueError( + 'Required property \'id\' not present in BackupPolicyScopeEnterpriseReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BackupPolicyScopeEnterpriseReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BackupPolicyScopeEnterpriseReference JSON' + ) return cls(**args) @classmethod @@ -98721,8 +106579,8 @@ class ResourceTypeEnum(str, Enum): ENTERPRISE = 'enterprise' - -class BareMetalServerBootTargetBareMetalServerDiskReference(BareMetalServerBootTarget): +class BareMetalServerBootTargetBareMetalServerDiskReference( + BareMetalServerBootTarget): """ BareMetalServerBootTargetBareMetalServerDiskReference. @@ -98766,27 +106624,38 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerBootTargetBareMetalServerDiskReference': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerBootTargetBareMetalServerDiskReference': """Initialize a BareMetalServerBootTargetBareMetalServerDiskReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = BareMetalServerDiskReferenceDeleted.from_dict(deleted) + args['deleted'] = BareMetalServerDiskReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerBootTargetBareMetalServerDiskReference JSON' + ) return cls(**args) @classmethod @@ -98820,13 +106689,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerBootTargetBareMetalServerDiskReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerBootTargetBareMetalServerDiskReference') -> bool: + def __eq__( + self, other: 'BareMetalServerBootTargetBareMetalServerDiskReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerBootTargetBareMetalServerDiskReference') -> bool: + def __ne__( + self, other: 'BareMetalServerBootTargetBareMetalServerDiskReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -98838,8 +106711,8 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_DISK = 'bare_metal_server_disk' - -class BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount(BareMetalServerInitializationUserAccount): +class BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount( + BareMetalServerInitializationUserAccount): """ BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount. @@ -98876,25 +106749,35 @@ def __init__( self.username = username @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount': """Initialize a BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount object from a json dictionary.""" args = {} if (encrypted_password := _dict.get('encrypted_password')) is not None: args['encrypted_password'] = base64.b64decode(encrypted_password) else: - raise ValueError('Required property \'encrypted_password\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON') + raise ValueError( + 'Required property \'encrypted_password\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON' + ) if (encryption_key := _dict.get('encryption_key')) is not None: args['encryption_key'] = KeyReference.from_dict(encryption_key) else: - raise ValueError('Required property \'encryption_key\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON') + raise ValueError( + 'Required property \'encryption_key\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON' + ) if (username := _dict.get('username')) is not None: args['username'] = username else: - raise ValueError('Required property \'username\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON') + raise ValueError( + 'Required property \'username\' not present in BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount JSON' + ) return cls(**args) @classmethod @@ -98905,8 +106788,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'encrypted_password') and self.encrypted_password is not None: - _dict['encrypted_password'] = str(base64.b64encode(self.encrypted_password), 'utf-8') + if hasattr( + self, + 'encrypted_password') and self.encrypted_password is not None: + _dict['encrypted_password'] = str( + base64.b64encode(self.encrypted_password), 'utf-8') if hasattr(self, 'encryption_key') and self.encryption_key is not None: if isinstance(self.encryption_key, dict): _dict['encryption_key'] = self.encryption_key @@ -98926,13 +106812,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount') -> bool: + def __eq__( + self, other: + 'BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount') -> bool: + def __ne__( + self, other: + 'BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -98944,7 +106836,6 @@ class ResourceTypeEnum(str, Enum): HOST_USER_ACCOUNT = 'host_user_account' - class BareMetalServerNetworkAttachmentByPCI(BareMetalServerNetworkAttachment): """ BareMetalServerNetworkAttachmentByPCI. @@ -98992,7 +106883,8 @@ def __init__( resource_type: str, subnet: 'SubnetReference', type: str, - virtual_network_interface: 'VirtualNetworkInterfaceReferenceAttachmentContext', + virtual_network_interface: + 'VirtualNetworkInterfaceReferenceAttachmentContext', allowed_vlans: List[int], interface_type: str, ) -> None: @@ -99052,55 +106944,84 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByPCI': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'port_speed\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerNetworkAttachmentByPCI JSON') - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: - args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface) - else: - raise ValueError('Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: + args[ + 'virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + virtual_network_interface) + else: + raise ValueError( + 'Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (allowed_vlans := _dict.get('allowed_vlans')) is not None: args['allowed_vlans'] = allowed_vlans else: - raise ValueError('Required property \'allowed_vlans\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'allowed_vlans\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentByPCI JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentByPCI JSON' + ) return cls(**args) @classmethod @@ -99117,7 +107038,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -99137,11 +107059,15 @@ def to_dict(self) -> Dict: _dict['subnet'] = self.subnet.to_dict() if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) if hasattr(self, 'allowed_vlans') and self.allowed_vlans is not None: _dict['allowed_vlans'] = self.allowed_vlans if hasattr(self, 'interface_type') and self.interface_type is not None: @@ -99179,7 +107105,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -99187,7 +107112,6 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_NETWORK_ATTACHMENT = 'bare_metal_server_network_attachment' - class TypeEnum(str, Enum): """ The bare metal server network attachment type. @@ -99196,7 +107120,6 @@ class TypeEnum(str, Enum): PRIMARY = 'primary' SECONDARY = 'secondary' - class InterfaceTypeEnum(str, Enum): """ - `pci`: a physical PCI device which can only be created or deleted when the bare @@ -99211,7 +107134,6 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' - class BareMetalServerNetworkAttachmentByVLAN(BareMetalServerNetworkAttachment): """ BareMetalServerNetworkAttachmentByVLAN. @@ -99268,7 +107190,8 @@ def __init__( resource_type: str, subnet: 'SubnetReference', type: str, - virtual_network_interface: 'VirtualNetworkInterfaceReferenceAttachmentContext', + virtual_network_interface: + 'VirtualNetworkInterfaceReferenceAttachmentContext', allow_to_float: bool, interface_type: str, vlan: int, @@ -99339,59 +107262,90 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByVLAN': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'port_speed\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: - args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface) - else: - raise ValueError('Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: + args[ + 'virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + virtual_network_interface) + else: + raise ValueError( + 'Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (allow_to_float := _dict.get('allow_to_float')) is not None: args['allow_to_float'] = allow_to_float else: - raise ValueError('Required property \'allow_to_float\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'allow_to_float\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) if (vlan := _dict.get('vlan')) is not None: args['vlan'] = vlan else: - raise ValueError('Required property \'vlan\' not present in BareMetalServerNetworkAttachmentByVLAN JSON') + raise ValueError( + 'Required property \'vlan\' not present in BareMetalServerNetworkAttachmentByVLAN JSON' + ) return cls(**args) @classmethod @@ -99408,7 +107362,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -99428,11 +107383,15 @@ def to_dict(self) -> Dict: _dict['subnet'] = self.subnet.to_dict() if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) if hasattr(self, 'allow_to_float') and self.allow_to_float is not None: _dict['allow_to_float'] = self.allow_to_float if hasattr(self, 'interface_type') and self.interface_type is not None: @@ -99472,7 +107431,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -99480,7 +107438,6 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_NETWORK_ATTACHMENT = 'bare_metal_server_network_attachment' - class TypeEnum(str, Enum): """ The bare metal server network attachment type. @@ -99489,7 +107446,6 @@ class TypeEnum(str, Enum): PRIMARY = 'primary' SECONDARY = 'secondary' - class InterfaceTypeEnum(str, Enum): """ - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its @@ -99501,28 +107457,30 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' - -class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface): +class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity( + BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface): """ Identifies a virtual network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN']) - ) + ", ".join([ + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ])) raise Exception(msg) -class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface): +class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext( + BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface): """ The virtual network interface for this target. @@ -99567,6 +107525,18 @@ class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNet be available on the virtual network interface's subnet. If no address is specified, an available address on the subnet will be automatically selected and reserved. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. :param ResourceGroupIdentity resource_group: (optional) The resource group to use for this virtual network interface. If unspecified, the bare metal server's resource group will be used. @@ -99586,7 +107556,9 @@ def __init__( enable_infrastructure_nat: Optional[bool] = None, ips: Optional[List['VirtualNetworkInterfaceIPPrototype']] = None, name: Optional[str] = None, - primary_ip: Optional['VirtualNetworkInterfacePrimaryIPPrototype'] = None, + primary_ip: Optional[ + 'VirtualNetworkInterfacePrimaryIPPrototype'] = None, + protocol_state_filtering_mode: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, security_groups: Optional[List['SecurityGroupIdentity']] = None, subnet: Optional['SubnetIdentity'] = None, @@ -99640,6 +107612,18 @@ def __init__( specified, an available address on the subnet will be automatically selected and reserved. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on + the current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. :param ResourceGroupIdentity resource_group: (optional) The resource group to use for this virtual network interface. If unspecified, the bare metal server's resource group will be used. @@ -99657,19 +107641,23 @@ def __init__( self.ips = ips self.name = name self.primary_ip = primary_ip + self.protocol_state_filtering_mode = protocol_state_filtering_mode self.resource_group = resource_group self.security_groups = security_groups self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext': """Initialize a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (ips := _dict.get('ips')) is not None: args['ips'] = ips @@ -99677,6 +107665,10 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentPrototypeVir args['name'] = name if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = primary_ip + if (protocol_state_filtering_mode := + _dict.get('protocol_state_filtering_mode')) is not None: + args[ + 'protocol_state_filtering_mode'] = protocol_state_filtering_mode if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (security_groups := _dict.get('security_groups')) is not None: @@ -99693,11 +107685,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'ips') and self.ips is not None: ips_list = [] @@ -99714,12 +107708,17 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() + if hasattr(self, 'protocol_state_filtering_mode' + ) and self.protocol_state_filtering_mode is not None: + _dict[ + 'protocol_state_filtering_mode'] = self.protocol_state_filtering_mode if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -99742,18 +107741,44 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ProtocolStateFilteringModeEnum(str, Enum): + """ + The protocol state filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. + """ + + AUTO = 'auto' + DISABLED = 'disabled' + ENABLED = 'enabled' + -class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype(BareMetalServerNetworkAttachmentPrototype): +class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype( + BareMetalServerNetworkAttachmentPrototype): """ BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype. @@ -99777,7 +107802,8 @@ class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentB def __init__( self, - virtual_network_interface: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', + virtual_network_interface: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', interface_type: str, *, name: Optional[str] = None, @@ -99811,21 +107837,28 @@ def __init__( self.interface_type = interface_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype': """Initialize a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: args['virtual_network_interface'] = virtual_network_interface else: - raise ValueError('Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype JSON') + raise ValueError( + 'Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype JSON' + ) if (allowed_vlans := _dict.get('allowed_vlans')) is not None: args['allowed_vlans'] = allowed_vlans if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype JSON' + ) return cls(**args) @classmethod @@ -99838,11 +107871,15 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) if hasattr(self, 'allowed_vlans') and self.allowed_vlans is not None: _dict['allowed_vlans'] = self.allowed_vlans if hasattr(self, 'interface_type') and self.interface_type is not None: @@ -99857,13 +107894,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -99882,8 +107925,8 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' - -class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype(BareMetalServerNetworkAttachmentPrototype): +class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype( + BareMetalServerNetworkAttachmentPrototype): """ BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype. @@ -99915,7 +107958,8 @@ class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentB def __init__( self, - virtual_network_interface: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', + virtual_network_interface: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', interface_type: str, vlan: int, *, @@ -99958,25 +108002,34 @@ def __init__( self.vlan = vlan @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype': """Initialize a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: args['virtual_network_interface'] = virtual_network_interface else: - raise ValueError('Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype JSON') + raise ValueError( + 'Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype JSON' + ) if (allow_to_float := _dict.get('allow_to_float')) is not None: args['allow_to_float'] = allow_to_float if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype JSON' + ) if (vlan := _dict.get('vlan')) is not None: args['vlan'] = vlan else: - raise ValueError('Required property \'vlan\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype JSON') + raise ValueError( + 'Required property \'vlan\' not present in BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype JSON' + ) return cls(**args) @classmethod @@ -99989,11 +108042,15 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) if hasattr(self, 'allow_to_float') and self.allow_to_float is not None: _dict['allow_to_float'] = self.allow_to_float if hasattr(self, 'interface_type') and self.interface_type is not None: @@ -100010,13 +108067,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -100031,8 +108094,8 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' - -class BareMetalServerNetworkInterfaceByHiperSocket(BareMetalServerNetworkInterface): +class BareMetalServerNetworkInterfaceByHiperSocket( + BareMetalServerNetworkInterface): """ BareMetalServerNetworkInterfaceByHiperSocket. @@ -100283,73 +108346,111 @@ def __init__( self.interface_type = interface_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByHiperSocket': + def from_dict( + cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByHiperSocket': """Initialize a BareMetalServerNetworkInterfaceByHiperSocket object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing else: - raise ValueError('Required property \'allow_ip_spoofing\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'allow_ip_spoofing\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat else: - raise ValueError('Required property \'enable_infrastructure_nat\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'enable_infrastructure_nat\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (floating_ips := _dict.get('floating_ips')) is not None: - args['floating_ips'] = [FloatingIPReference.from_dict(v) for v in floating_ips] + args['floating_ips'] = [ + FloatingIPReference.from_dict(v) for v in floating_ips + ] else: - raise ValueError('Required property \'floating_ips\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'floating_ips\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (mac_address := _dict.get('mac_address')) is not None: args['mac_address'] = mac_address else: - raise ValueError('Required property \'mac_address\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'mac_address\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'port_speed\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'security_groups\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'status\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkInterfaceByHiperSocket JSON' + ) return cls(**args) @classmethod @@ -100360,11 +108461,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'floating_ips') and self.floating_ips is not None: floating_ips_list = [] @@ -100391,7 +108494,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -100420,13 +108524,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfaceByHiperSocket object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfaceByHiperSocket') -> bool: + def __eq__(self, + other: 'BareMetalServerNetworkInterfaceByHiperSocket') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfaceByHiperSocket') -> bool: + def __ne__(self, + other: 'BareMetalServerNetworkInterfaceByHiperSocket') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -100437,7 +108543,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -100452,7 +108557,6 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' - class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -100466,7 +108570,6 @@ class TypeEnum(str, Enum): PRIMARY = 'primary' SECONDARY = 'secondary' - class InterfaceTypeEnum(str, Enum): """ - `hipersocket`: a virtual network device that provides high-speed TCP/IP @@ -100477,7 +108580,6 @@ class InterfaceTypeEnum(str, Enum): HIPERSOCKET = 'hipersocket' - class BareMetalServerNetworkInterfaceByPCI(BareMetalServerNetworkInterface): """ BareMetalServerNetworkInterfaceByPCI. @@ -100762,71 +108864,110 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByPCI': if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing else: - raise ValueError('Required property \'allow_ip_spoofing\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'allow_ip_spoofing\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServerNetworkInterfaceByPCI JSON') - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat else: - raise ValueError('Required property \'enable_infrastructure_nat\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'enable_infrastructure_nat\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (floating_ips := _dict.get('floating_ips')) is not None: - args['floating_ips'] = [FloatingIPReference.from_dict(v) for v in floating_ips] + args['floating_ips'] = [ + FloatingIPReference.from_dict(v) for v in floating_ips + ] else: - raise ValueError('Required property \'floating_ips\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'floating_ips\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (mac_address := _dict.get('mac_address')) is not None: args['mac_address'] = mac_address else: - raise ValueError('Required property \'mac_address\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'mac_address\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'port_speed\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'security_groups\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'status\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (allowed_vlans := _dict.get('allowed_vlans')) is not None: args['allowed_vlans'] = allowed_vlans else: - raise ValueError('Required property \'allowed_vlans\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'allowed_vlans\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkInterfaceByPCI JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkInterfaceByPCI JSON' + ) return cls(**args) @classmethod @@ -100837,11 +108978,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'floating_ips') and self.floating_ips is not None: floating_ips_list = [] @@ -100868,7 +109011,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -100916,7 +109060,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -100931,7 +109074,6 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' - class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -100945,7 +109087,6 @@ class TypeEnum(str, Enum): PRIMARY = 'primary' SECONDARY = 'secondary' - class InterfaceTypeEnum(str, Enum): """ - `pci`: a physical PCI device which can only be created or deleted when the bare @@ -100960,7 +109101,6 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' - class BareMetalServerNetworkInterfaceByVLAN(BareMetalServerNetworkInterface): """ BareMetalServerNetworkInterfaceByVLAN. @@ -101281,75 +109421,117 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByVLAN': if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing else: - raise ValueError('Required property \'allow_ip_spoofing\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'allow_ip_spoofing\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + raise ValueError( + 'Required property \'created_at\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat else: - raise ValueError('Required property \'enable_infrastructure_nat\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'enable_infrastructure_nat\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (floating_ips := _dict.get('floating_ips')) is not None: - args['floating_ips'] = [FloatingIPReference.from_dict(v) for v in floating_ips] + args['floating_ips'] = [ + FloatingIPReference.from_dict(v) for v in floating_ips + ] else: - raise ValueError('Required property \'floating_ips\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'floating_ips\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (mac_address := _dict.get('mac_address')) is not None: args['mac_address'] = mac_address else: - raise ValueError('Required property \'mac_address\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'mac_address\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (port_speed := _dict.get('port_speed')) is not None: args['port_speed'] = port_speed else: - raise ValueError('Required property \'port_speed\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'port_speed\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'resource_type\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (security_groups := _dict.get('security_groups')) is not None: - args['security_groups'] = [SecurityGroupReference.from_dict(v) for v in security_groups] + args['security_groups'] = [ + SecurityGroupReference.from_dict(v) for v in security_groups + ] else: - raise ValueError('Required property \'security_groups\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'security_groups\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'status\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') - if (allow_interface_to_float := _dict.get('allow_interface_to_float')) is not None: + raise ValueError( + 'Required property \'type\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) + if (allow_interface_to_float := + _dict.get('allow_interface_to_float')) is not None: args['allow_interface_to_float'] = allow_interface_to_float else: - raise ValueError('Required property \'allow_interface_to_float\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'allow_interface_to_float\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) if (vlan := _dict.get('vlan')) is not None: args['vlan'] = vlan else: - raise ValueError('Required property \'vlan\' not present in BareMetalServerNetworkInterfaceByVLAN JSON') + raise ValueError( + 'Required property \'vlan\' not present in BareMetalServerNetworkInterfaceByVLAN JSON' + ) return cls(**args) @classmethod @@ -101360,11 +109542,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'floating_ips') and self.floating_ips is not None: floating_ips_list = [] @@ -101391,7 +109575,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip.to_dict() if hasattr(self, 'resource_type') and self.resource_type is not None: _dict['resource_type'] = self.resource_type - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -101408,7 +109593,8 @@ def to_dict(self) -> Dict: _dict['subnet'] = self.subnet.to_dict() if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type - if hasattr(self, 'allow_interface_to_float') and self.allow_interface_to_float is not None: + if hasattr(self, 'allow_interface_to_float' + ) and self.allow_interface_to_float is not None: _dict['allow_interface_to_float'] = self.allow_interface_to_float if hasattr(self, 'interface_type') and self.interface_type is not None: _dict['interface_type'] = self.interface_type @@ -101441,7 +109627,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -101456,7 +109641,6 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' - class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -101470,7 +109654,6 @@ class TypeEnum(str, Enum): PRIMARY = 'primary' SECONDARY = 'secondary' - class InterfaceTypeEnum(str, Enum): """ - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its @@ -101485,8 +109668,8 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' - -class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype(BareMetalServerNetworkInterfacePrototype): +class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype( + BareMetalServerNetworkInterfacePrototype): """ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype. @@ -101604,12 +109787,15 @@ def __init__( self.interface_type = interface_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype': """Initialize a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (name := _dict.get('name')) is not None: args['name'] = name @@ -101620,11 +109806,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototypeBare if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype JSON' + ) if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype JSON' + ) return cls(**args) @classmethod @@ -101635,9 +109825,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -101646,7 +109838,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -101671,13 +109864,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -101692,8 +109891,8 @@ class InterfaceTypeEnum(str, Enum): HIPERSOCKET = 'hipersocket' - -class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype(BareMetalServerNetworkInterfacePrototype): +class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype( + BareMetalServerNetworkInterfacePrototype): """ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype. @@ -101825,12 +110024,15 @@ def __init__( self.interface_type = interface_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype': """Initialize a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (name := _dict.get('name')) is not None: args['name'] = name @@ -101841,13 +110043,17 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototypeBare if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype JSON') + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype JSON' + ) if (allowed_vlans := _dict.get('allowed_vlans')) is not None: args['allowed_vlans'] = allowed_vlans if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype JSON' + ) return cls(**args) @classmethod @@ -101858,9 +110064,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -101869,7 +110077,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -101896,13 +110105,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -101921,8 +110136,8 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' - -class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype(BareMetalServerNetworkInterfacePrototype): +class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype( + BareMetalServerNetworkInterfacePrototype): """ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype. @@ -102103,12 +110318,15 @@ def __init__( self.vlan = vlan @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype': """Initialize a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (name := _dict.get('name')) is not None: args['name'] = name @@ -102119,17 +110337,24 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototypeBare if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype JSON') - if (allow_interface_to_float := _dict.get('allow_interface_to_float')) is not None: + raise ValueError( + 'Required property \'subnet\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype JSON' + ) + if (allow_interface_to_float := + _dict.get('allow_interface_to_float')) is not None: args['allow_interface_to_float'] = allow_interface_to_float if (interface_type := _dict.get('interface_type')) is not None: args['interface_type'] = interface_type else: - raise ValueError('Required property \'interface_type\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype JSON') + raise ValueError( + 'Required property \'interface_type\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype JSON' + ) if (vlan := _dict.get('vlan')) is not None: args['vlan'] = vlan else: - raise ValueError('Required property \'vlan\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype JSON') + raise ValueError( + 'Required property \'vlan\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype JSON' + ) return cls(**args) @classmethod @@ -102140,9 +110365,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -102151,7 +110378,8 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -102164,7 +110392,8 @@ def to_dict(self) -> Dict: _dict['subnet'] = self.subnet else: _dict['subnet'] = self.subnet.to_dict() - if hasattr(self, 'allow_interface_to_float') and self.allow_interface_to_float is not None: + if hasattr(self, 'allow_interface_to_float' + ) and self.allow_interface_to_float is not None: _dict['allow_interface_to_float'] = self.allow_interface_to_float if hasattr(self, 'interface_type') and self.interface_type is not None: _dict['interface_type'] = self.interface_type @@ -102180,13 +110409,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -102205,8 +110440,8 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' - -class BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype(BareMetalServerPrimaryNetworkAttachmentPrototype): +class BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype( + BareMetalServerPrimaryNetworkAttachmentPrototype): """ BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype. @@ -102230,7 +110465,8 @@ class BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetw def __init__( self, - virtual_network_interface: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', + virtual_network_interface: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface', *, name: Optional[str] = None, allowed_vlans: Optional[List[int]] = None, @@ -102264,15 +110500,20 @@ def __init__( self.interface_type = interface_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype': """Initialize a BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: args['virtual_network_interface'] = virtual_network_interface else: - raise ValueError('Required property \'virtual_network_interface\' not present in BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype JSON') + raise ValueError( + 'Required property \'virtual_network_interface\' not present in BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype JSON' + ) if (allowed_vlans := _dict.get('allowed_vlans')) is not None: args['allowed_vlans'] = allowed_vlans if (interface_type := _dict.get('interface_type')) is not None: @@ -102289,11 +110530,15 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) if hasattr(self, 'allowed_vlans') and self.allowed_vlans is not None: _dict['allowed_vlans'] = self.allowed_vlans if hasattr(self, 'interface_type') and self.interface_type is not None: @@ -102308,13 +110553,19 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype') -> bool: + def __eq__( + self, other: + 'BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype') -> bool: + def __ne__( + self, other: + 'BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -102333,7 +110584,6 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' - class BareMetalServerProfileBandwidthDependent(BareMetalServerProfileBandwidth): """ The total bandwidth shared across the bare metal server network attachments or bare @@ -102356,13 +110606,16 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileBandwidthDependent': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileBandwidthDependent': """Initialize a BareMetalServerProfileBandwidthDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileBandwidthDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileBandwidthDependent JSON' + ) return cls(**args) @classmethod @@ -102403,7 +110656,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class BareMetalServerProfileBandwidthEnum(BareMetalServerProfileBandwidth): """ The permitted total bandwidth values (in megabits per second) shared across the bare @@ -102440,15 +110692,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileBandwidthEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileBandwidthEnum JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileBandwidthEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileBandwidthEnum JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileBandwidthEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileBandwidthEnum JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileBandwidthEnum JSON' + ) return cls(**args) @classmethod @@ -102493,7 +110751,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class BareMetalServerProfileBandwidthFixed(BareMetalServerProfileBandwidth): """ The total bandwidth (in megabits per second) shared across the bare metal server @@ -102526,11 +110783,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileBandwidthFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileBandwidthFixed JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileBandwidthFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileBandwidthFixed JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileBandwidthFixed JSON' + ) return cls(**args) @classmethod @@ -102573,7 +110834,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class BareMetalServerProfileBandwidthRange(BareMetalServerProfileBandwidth): """ The permitted total bandwidth range (in megabits per second) shared across the network @@ -102617,23 +110877,33 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileBandwidthRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileBandwidthRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in BareMetalServerProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'max\' not present in BareMetalServerProfileBandwidthRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in BareMetalServerProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'min\' not present in BareMetalServerProfileBandwidthRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in BareMetalServerProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'step\' not present in BareMetalServerProfileBandwidthRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileBandwidthRange JSON' + ) return cls(**args) @classmethod @@ -102682,8 +110952,8 @@ class TypeEnum(str, Enum): RANGE = 'range' - -class BareMetalServerProfileCPUCoreCountDependent(BareMetalServerProfileCPUCoreCount): +class BareMetalServerProfileCPUCoreCountDependent( + BareMetalServerProfileCPUCoreCount): """ The CPU core count for a bare metal server with this profile depends on its configuration. @@ -102704,13 +110974,16 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountDependent': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountDependent': """Initialize a BareMetalServerProfileCPUCoreCountDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUCoreCountDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUCoreCountDependent JSON' + ) return cls(**args) @classmethod @@ -102733,13 +111006,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileCPUCoreCountDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileCPUCoreCountDependent') -> bool: + def __eq__(self, + other: 'BareMetalServerProfileCPUCoreCountDependent') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileCPUCoreCountDependent') -> bool: + def __ne__(self, + other: 'BareMetalServerProfileCPUCoreCountDependent') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -102751,8 +111026,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class BareMetalServerProfileCPUCoreCountEnum(BareMetalServerProfileCPUCoreCount): +class BareMetalServerProfileCPUCoreCountEnum(BareMetalServerProfileCPUCoreCount + ): """ The permitted values for CPU cores for a bare metal server with this profile. @@ -102786,15 +111061,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileCPUCoreCountEnum JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileCPUCoreCountEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUCoreCountEnum JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUCoreCountEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileCPUCoreCountEnum JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileCPUCoreCountEnum JSON' + ) return cls(**args) @classmethod @@ -102839,8 +111120,8 @@ class TypeEnum(str, Enum): ENUM = 'enum' - -class BareMetalServerProfileCPUCoreCountFixed(BareMetalServerProfileCPUCoreCount): +class BareMetalServerProfileCPUCoreCountFixed(BareMetalServerProfileCPUCoreCount + ): """ The CPU core count for a bare metal server with this profile. @@ -102864,17 +111145,22 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountFixed': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountFixed': """Initialize a BareMetalServerProfileCPUCoreCountFixed object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUCoreCountFixed JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUCoreCountFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileCPUCoreCountFixed JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileCPUCoreCountFixed JSON' + ) return cls(**args) @classmethod @@ -102917,8 +111203,8 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - -class BareMetalServerProfileCPUCoreCountRange(BareMetalServerProfileCPUCoreCount): +class BareMetalServerProfileCPUCoreCountRange(BareMetalServerProfileCPUCoreCount + ): """ The permitted range for the number of CPU cores for a bare metal server with this profile. @@ -102955,29 +111241,40 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountRange': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountRange': """Initialize a BareMetalServerProfileCPUCoreCountRange object from a json dictionary.""" args = {} if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileCPUCoreCountRange JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileCPUCoreCountRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in BareMetalServerProfileCPUCoreCountRange JSON') + raise ValueError( + 'Required property \'max\' not present in BareMetalServerProfileCPUCoreCountRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in BareMetalServerProfileCPUCoreCountRange JSON') + raise ValueError( + 'Required property \'min\' not present in BareMetalServerProfileCPUCoreCountRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in BareMetalServerProfileCPUCoreCountRange JSON') + raise ValueError( + 'Required property \'step\' not present in BareMetalServerProfileCPUCoreCountRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUCoreCountRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUCoreCountRange JSON' + ) return cls(**args) @classmethod @@ -103026,8 +111323,8 @@ class TypeEnum(str, Enum): RANGE = 'range' - -class BareMetalServerProfileCPUSocketCountDependent(BareMetalServerProfileCPUSocketCount): +class BareMetalServerProfileCPUSocketCountDependent( + BareMetalServerProfileCPUSocketCount): """ The CPU socket count for a bare metal server with this profile depends on its configuration. @@ -103048,13 +111345,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountDependent': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountDependent': """Initialize a BareMetalServerProfileCPUSocketCountDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUSocketCountDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUSocketCountDependent JSON' + ) return cls(**args) @classmethod @@ -103077,13 +111378,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileCPUSocketCountDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileCPUSocketCountDependent') -> bool: + def __eq__(self, + other: 'BareMetalServerProfileCPUSocketCountDependent') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileCPUSocketCountDependent') -> bool: + def __ne__(self, + other: 'BareMetalServerProfileCPUSocketCountDependent') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -103095,8 +111398,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class BareMetalServerProfileCPUSocketCountEnum(BareMetalServerProfileCPUSocketCount): +class BareMetalServerProfileCPUSocketCountEnum( + BareMetalServerProfileCPUSocketCount): """ The permitted values for CPU sockets for a bare metal server with this profile. @@ -103124,21 +111427,28 @@ def __init__( self.values = values @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountEnum': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountEnum': """Initialize a BareMetalServerProfileCPUSocketCountEnum object from a json dictionary.""" args = {} if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileCPUSocketCountEnum JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileCPUSocketCountEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUSocketCountEnum JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUSocketCountEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileCPUSocketCountEnum JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileCPUSocketCountEnum JSON' + ) return cls(**args) @classmethod @@ -103183,8 +111493,8 @@ class TypeEnum(str, Enum): ENUM = 'enum' - -class BareMetalServerProfileCPUSocketCountFixed(BareMetalServerProfileCPUSocketCount): +class BareMetalServerProfileCPUSocketCountFixed( + BareMetalServerProfileCPUSocketCount): """ The number of CPU sockets for a bare metal server with this profile. @@ -103208,17 +111518,22 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountFixed': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountFixed': """Initialize a BareMetalServerProfileCPUSocketCountFixed object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUSocketCountFixed JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUSocketCountFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileCPUSocketCountFixed JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileCPUSocketCountFixed JSON' + ) return cls(**args) @classmethod @@ -103243,13 +111558,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileCPUSocketCountFixed object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileCPUSocketCountFixed') -> bool: + def __eq__(self, + other: 'BareMetalServerProfileCPUSocketCountFixed') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileCPUSocketCountFixed') -> bool: + def __ne__(self, + other: 'BareMetalServerProfileCPUSocketCountFixed') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -103261,8 +111578,8 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - -class BareMetalServerProfileCPUSocketCountRange(BareMetalServerProfileCPUSocketCount): +class BareMetalServerProfileCPUSocketCountRange( + BareMetalServerProfileCPUSocketCount): """ The permitted range for the number of CPU sockets for a bare metal server with this profile. @@ -103299,29 +111616,40 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountRange': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountRange': """Initialize a BareMetalServerProfileCPUSocketCountRange object from a json dictionary.""" args = {} if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileCPUSocketCountRange JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileCPUSocketCountRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in BareMetalServerProfileCPUSocketCountRange JSON') + raise ValueError( + 'Required property \'max\' not present in BareMetalServerProfileCPUSocketCountRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in BareMetalServerProfileCPUSocketCountRange JSON') + raise ValueError( + 'Required property \'min\' not present in BareMetalServerProfileCPUSocketCountRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in BareMetalServerProfileCPUSocketCountRange JSON') + raise ValueError( + 'Required property \'step\' not present in BareMetalServerProfileCPUSocketCountRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileCPUSocketCountRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileCPUSocketCountRange JSON' + ) return cls(**args) @classmethod @@ -103352,13 +111680,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileCPUSocketCountRange object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileCPUSocketCountRange') -> bool: + def __eq__(self, + other: 'BareMetalServerProfileCPUSocketCountRange') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileCPUSocketCountRange') -> bool: + def __ne__(self, + other: 'BareMetalServerProfileCPUSocketCountRange') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -103370,8 +111700,8 @@ class TypeEnum(str, Enum): RANGE = 'range' - -class BareMetalServerProfileDiskQuantityDependent(BareMetalServerProfileDiskQuantity): +class BareMetalServerProfileDiskQuantityDependent( + BareMetalServerProfileDiskQuantity): """ The number of disks of this configuration for a bare metal server with this profile depends on its bare metal server configuration. @@ -103392,13 +111722,16 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskQuantityDependent': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileDiskQuantityDependent': """Initialize a BareMetalServerProfileDiskQuantityDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskQuantityDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskQuantityDependent JSON' + ) return cls(**args) @classmethod @@ -103421,13 +111754,15 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileDiskQuantityDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileDiskQuantityDependent') -> bool: + def __eq__(self, + other: 'BareMetalServerProfileDiskQuantityDependent') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileDiskQuantityDependent') -> bool: + def __ne__(self, + other: 'BareMetalServerProfileDiskQuantityDependent') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -103439,8 +111774,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class BareMetalServerProfileDiskQuantityEnum(BareMetalServerProfileDiskQuantity): +class BareMetalServerProfileDiskQuantityEnum(BareMetalServerProfileDiskQuantity + ): """ The permitted the number of disks of this configuration for a bare metal server with this profile. @@ -103475,15 +111810,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskQuantityEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileDiskQuantityEnum JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileDiskQuantityEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskQuantityEnum JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskQuantityEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileDiskQuantityEnum JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileDiskQuantityEnum JSON' + ) return cls(**args) @classmethod @@ -103528,8 +111869,8 @@ class TypeEnum(str, Enum): ENUM = 'enum' - -class BareMetalServerProfileDiskQuantityFixed(BareMetalServerProfileDiskQuantity): +class BareMetalServerProfileDiskQuantityFixed(BareMetalServerProfileDiskQuantity + ): """ The number of disks of this configuration for a bare metal server with this profile. @@ -103553,17 +111894,22 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskQuantityFixed': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileDiskQuantityFixed': """Initialize a BareMetalServerProfileDiskQuantityFixed object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskQuantityFixed JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskQuantityFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileDiskQuantityFixed JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileDiskQuantityFixed JSON' + ) return cls(**args) @classmethod @@ -103606,8 +111952,8 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - -class BareMetalServerProfileDiskQuantityRange(BareMetalServerProfileDiskQuantity): +class BareMetalServerProfileDiskQuantityRange(BareMetalServerProfileDiskQuantity + ): """ The permitted range for the number of disks of this configuration for a bare metal server with this profile. @@ -103644,29 +111990,40 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskQuantityRange': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileDiskQuantityRange': """Initialize a BareMetalServerProfileDiskQuantityRange object from a json dictionary.""" args = {} if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileDiskQuantityRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in BareMetalServerProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'max\' not present in BareMetalServerProfileDiskQuantityRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in BareMetalServerProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'min\' not present in BareMetalServerProfileDiskQuantityRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in BareMetalServerProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'step\' not present in BareMetalServerProfileDiskQuantityRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskQuantityRange JSON' + ) return cls(**args) @classmethod @@ -103715,7 +112072,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class BareMetalServerProfileDiskSizeDependent(BareMetalServerProfileDiskSize): """ The disk size in GB (gigabytes) of this configuration for a bare metal server with @@ -103737,13 +112093,16 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskSizeDependent': + def from_dict(cls, + _dict: Dict) -> 'BareMetalServerProfileDiskSizeDependent': """Initialize a BareMetalServerProfileDiskSizeDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskSizeDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskSizeDependent JSON' + ) return cls(**args) @classmethod @@ -103784,7 +112143,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class BareMetalServerProfileDiskSizeEnum(BareMetalServerProfileDiskSize): """ The permitted disk size in GB (gigabytes) of this configuration for a bare metal @@ -103820,15 +112178,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskSizeEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileDiskSizeEnum JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileDiskSizeEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskSizeEnum JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskSizeEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileDiskSizeEnum JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileDiskSizeEnum JSON' + ) return cls(**args) @classmethod @@ -103873,7 +112237,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class BareMetalServerProfileDiskSizeFixed(BareMetalServerProfileDiskSize): """ The size of the disk in GB (gigabytes). @@ -103904,11 +112267,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskSizeFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskSizeFixed JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskSizeFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileDiskSizeFixed JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileDiskSizeFixed JSON' + ) return cls(**args) @classmethod @@ -103951,7 +112318,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class BareMetalServerProfileDiskSizeRange(BareMetalServerProfileDiskSize): """ The permitted range for the disk size of this configuration in GB (gigabytes) for a @@ -103995,23 +112361,33 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskSizeRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileDiskSizeRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in BareMetalServerProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'max\' not present in BareMetalServerProfileDiskSizeRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in BareMetalServerProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'min\' not present in BareMetalServerProfileDiskSizeRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in BareMetalServerProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'step\' not present in BareMetalServerProfileDiskSizeRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileDiskSizeRange JSON' + ) return cls(**args) @classmethod @@ -104060,7 +112436,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class BareMetalServerProfileIdentityByHref(BareMetalServerProfileIdentity): """ BareMetalServerProfileIdentityByHref. @@ -104087,7 +112462,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerProfileIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerProfileIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -104147,7 +112524,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in BareMetalServerProfileIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in BareMetalServerProfileIdentityByName JSON' + ) return cls(**args) @classmethod @@ -104208,7 +112587,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileMemoryDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileMemoryDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileMemoryDependent JSON' + ) return cls(**args) @classmethod @@ -104249,7 +112630,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class BareMetalServerProfileMemoryEnum(BareMetalServerProfileMemory): """ The permitted memory values (in gibibytes) for a bare metal server with this profile. @@ -104284,15 +112664,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileMemoryEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileMemoryEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileMemoryEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in BareMetalServerProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'values\' not present in BareMetalServerProfileMemoryEnum JSON' + ) return cls(**args) @classmethod @@ -104337,7 +112723,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class BareMetalServerProfileMemoryFixed(BareMetalServerProfileMemory): """ The memory (in gibibytes) for a bare metal server with this profile. @@ -104368,11 +112753,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileMemoryFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileMemoryFixed JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileMemoryFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in BareMetalServerProfileMemoryFixed JSON') + raise ValueError( + 'Required property \'value\' not present in BareMetalServerProfileMemoryFixed JSON' + ) return cls(**args) @classmethod @@ -104415,7 +112804,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class BareMetalServerProfileMemoryRange(BareMetalServerProfileMemory): """ The permitted memory range (in gibibytes) for a bare metal server with this profile. @@ -104458,23 +112846,33 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileMemoryRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in BareMetalServerProfileMemoryRange JSON') + raise ValueError( + 'Required property \'default\' not present in BareMetalServerProfileMemoryRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in BareMetalServerProfileMemoryRange JSON') + raise ValueError( + 'Required property \'max\' not present in BareMetalServerProfileMemoryRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in BareMetalServerProfileMemoryRange JSON') + raise ValueError( + 'Required property \'min\' not present in BareMetalServerProfileMemoryRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in BareMetalServerProfileMemoryRange JSON') + raise ValueError( + 'Required property \'step\' not present in BareMetalServerProfileMemoryRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileMemoryRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileMemoryRange JSON' + ) return cls(**args) @classmethod @@ -104523,8 +112921,8 @@ class TypeEnum(str, Enum): RANGE = 'range' - -class BareMetalServerProfileNetworkAttachmentCountDependent(BareMetalServerProfileNetworkAttachmentCount): +class BareMetalServerProfileNetworkAttachmentCountDependent( + BareMetalServerProfileNetworkAttachmentCount): """ The number of network attachments supported on a bare metal server with this profile is dependent on its configuration. @@ -104545,13 +112943,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkAttachmentCountDependent': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerProfileNetworkAttachmentCountDependent': """Initialize a BareMetalServerProfileNetworkAttachmentCountDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileNetworkAttachmentCountDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileNetworkAttachmentCountDependent JSON' + ) return cls(**args) @classmethod @@ -104574,13 +112976,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileNetworkAttachmentCountDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileNetworkAttachmentCountDependent') -> bool: + def __eq__( + self, other: 'BareMetalServerProfileNetworkAttachmentCountDependent' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileNetworkAttachmentCountDependent') -> bool: + def __ne__( + self, other: 'BareMetalServerProfileNetworkAttachmentCountDependent' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -104592,8 +112998,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class BareMetalServerProfileNetworkAttachmentCountRange(BareMetalServerProfileNetworkAttachmentCount): +class BareMetalServerProfileNetworkAttachmentCountRange( + BareMetalServerProfileNetworkAttachmentCount): """ The number of network attachments supported on a bare metal server with this profile. @@ -104622,7 +113028,9 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkAttachmentCountRange': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerProfileNetworkAttachmentCountRange': """Initialize a BareMetalServerProfileNetworkAttachmentCountRange object from a json dictionary.""" args = {} if (max := _dict.get('max')) is not None: @@ -104632,7 +113040,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkAttachmentCount if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileNetworkAttachmentCountRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileNetworkAttachmentCountRange JSON' + ) return cls(**args) @classmethod @@ -104659,13 +113069,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileNetworkAttachmentCountRange object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileNetworkAttachmentCountRange') -> bool: + def __eq__( + self, + other: 'BareMetalServerProfileNetworkAttachmentCountRange') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileNetworkAttachmentCountRange') -> bool: + def __ne__( + self, + other: 'BareMetalServerProfileNetworkAttachmentCountRange') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -104677,8 +113091,8 @@ class TypeEnum(str, Enum): RANGE = 'range' - -class BareMetalServerProfileNetworkInterfaceCountDependent(BareMetalServerProfileNetworkInterfaceCount): +class BareMetalServerProfileNetworkInterfaceCountDependent( + BareMetalServerProfileNetworkInterfaceCount): """ The number of bare metal server network interfaces supported on a bare metal server with this profile is dependent on its configuration. @@ -104699,13 +113113,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkInterfaceCountDependent': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerProfileNetworkInterfaceCountDependent': """Initialize a BareMetalServerProfileNetworkInterfaceCountDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileNetworkInterfaceCountDependent JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileNetworkInterfaceCountDependent JSON' + ) return cls(**args) @classmethod @@ -104728,13 +113146,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileNetworkInterfaceCountDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileNetworkInterfaceCountDependent') -> bool: + def __eq__( + self, other: 'BareMetalServerProfileNetworkInterfaceCountDependent' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileNetworkInterfaceCountDependent') -> bool: + def __ne__( + self, other: 'BareMetalServerProfileNetworkInterfaceCountDependent' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -104746,8 +113168,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class BareMetalServerProfileNetworkInterfaceCountRange(BareMetalServerProfileNetworkInterfaceCount): +class BareMetalServerProfileNetworkInterfaceCountRange( + BareMetalServerProfileNetworkInterfaceCount): """ The number of bare metal server network interfaces supported on a bare metal server with this profile. @@ -104777,7 +113199,9 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkInterfaceCountRange': + def from_dict( + cls, + _dict: Dict) -> 'BareMetalServerProfileNetworkInterfaceCountRange': """Initialize a BareMetalServerProfileNetworkInterfaceCountRange object from a json dictionary.""" args = {} if (max := _dict.get('max')) is not None: @@ -104787,7 +113211,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkInterfaceCountR if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in BareMetalServerProfileNetworkInterfaceCountRange JSON') + raise ValueError( + 'Required property \'type\' not present in BareMetalServerProfileNetworkInterfaceCountRange JSON' + ) return cls(**args) @classmethod @@ -104814,13 +113240,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerProfileNetworkInterfaceCountRange object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerProfileNetworkInterfaceCountRange') -> bool: + def __eq__( + self, + other: 'BareMetalServerProfileNetworkInterfaceCountRange') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerProfileNetworkInterfaceCountRange') -> bool: + def __ne__( + self, + other: 'BareMetalServerProfileNetworkInterfaceCountRange') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -104832,11 +113262,15 @@ class TypeEnum(str, Enum): RANGE = 'range' - -class BareMetalServerPrototypeBareMetalServerByNetworkAttachment(BareMetalServerPrototype): +class BareMetalServerPrototypeBareMetalServerByNetworkAttachment( + BareMetalServerPrototype): """ BareMetalServerPrototypeBareMetalServerByNetworkAttachment. + :param int bandwidth: (optional) The total bandwidth (in megabits per second) + shared across the bare metal server's network interfaces. The specified value + must match one of the bandwidth values in the bare metal server's profile. If + unspecified, the default value from the profile will be used. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the server will fail to boot. @@ -104869,14 +113303,18 @@ def __init__( initialization: 'BareMetalServerInitializationPrototype', profile: 'BareMetalServerProfileIdentity', zone: 'ZoneIdentity', - primary_network_attachment: 'BareMetalServerPrimaryNetworkAttachmentPrototype', + primary_network_attachment: + 'BareMetalServerPrimaryNetworkAttachmentPrototype', *, + bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, - trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePrototype'] = None, + trusted_platform_module: Optional[ + 'BareMetalServerTrustedPlatformModulePrototype'] = None, vpc: Optional['VPCIdentity'] = None, - network_attachments: Optional[List['BareMetalServerNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['BareMetalServerNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a BareMetalServerPrototypeBareMetalServerByNetworkAttachment object. @@ -104889,6 +113327,11 @@ def __init__( :param BareMetalServerPrimaryNetworkAttachmentPrototype primary_network_attachment: The primary network attachment to create for the bare metal server. + :param int bandwidth: (optional) The total bandwidth (in megabits per + second) shared across the bare metal server's network interfaces. The + specified value must match one of the bandwidth values in the bare metal + server's profile. If unspecified, the default value from the profile will + be used. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the server will fail to boot. @@ -104908,6 +113351,7 @@ def __init__( server. """ # pylint: disable=super-init-not-called + self.bandwidth = bandwidth self.enable_secure_boot = enable_secure_boot self.initialization = initialization self.name = name @@ -104920,37 +113364,56 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerPrototypeBareMetalServerByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerPrototypeBareMetalServerByNetworkAttachment': """Initialize a BareMetalServerPrototypeBareMetalServerByNetworkAttachment object from a json dictionary.""" args = {} + if (bandwidth := _dict.get('bandwidth')) is not None: + args['bandwidth'] = bandwidth if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: args['enable_secure_boot'] = enable_secure_boot if (initialization := _dict.get('initialization')) is not None: - args['initialization'] = BareMetalServerInitializationPrototype.from_dict(initialization) + args[ + 'initialization'] = BareMetalServerInitializationPrototype.from_dict( + initialization) else: - raise ValueError('Required property \'initialization\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON') + raise ValueError( + 'Required property \'initialization\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON') + raise ValueError( + 'Required property \'profile\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (trusted_platform_module := _dict.get('trusted_platform_module')) is not None: - args['trusted_platform_module'] = BareMetalServerTrustedPlatformModulePrototype.from_dict(trusted_platform_module) + if (trusted_platform_module := + _dict.get('trusted_platform_module')) is not None: + args[ + 'trusted_platform_module'] = BareMetalServerTrustedPlatformModulePrototype.from_dict( + trusted_platform_module) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: + raise ValueError( + 'Required property \'zone\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: args['network_attachments'] = network_attachments - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: args['primary_network_attachment'] = primary_network_attachment else: - raise ValueError('Required property \'primary_network_attachment\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON') + raise ValueError( + 'Required property \'primary_network_attachment\' not present in BareMetalServerPrototypeBareMetalServerByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -104961,7 +113424,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'enable_secure_boot') and self.enable_secure_boot is not None: + if hasattr(self, 'bandwidth') and self.bandwidth is not None: + _dict['bandwidth'] = self.bandwidth + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'initialization') and self.initialization is not None: if isinstance(self.initialization, dict): @@ -104980,11 +113447,14 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'trusted_platform_module') and self.trusted_platform_module is not None: + if hasattr(self, 'trusted_platform_module' + ) and self.trusted_platform_module is not None: if isinstance(self.trusted_platform_module, dict): _dict['trusted_platform_module'] = self.trusted_platform_module else: - _dict['trusted_platform_module'] = self.trusted_platform_module.to_dict() + _dict[ + 'trusted_platform_module'] = self.trusted_platform_module.to_dict( + ) if hasattr(self, 'vpc') and self.vpc is not None: if isinstance(self.vpc, dict): _dict['vpc'] = self.vpc @@ -104995,7 +113465,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -105003,11 +113475,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -105018,21 +113494,32 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerPrototypeBareMetalServerByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerPrototypeBareMetalServerByNetworkAttachment') -> bool: + def __eq__( + self, + other: 'BareMetalServerPrototypeBareMetalServerByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerPrototypeBareMetalServerByNetworkAttachment') -> bool: + def __ne__( + self, + other: 'BareMetalServerPrototypeBareMetalServerByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class BareMetalServerPrototypeBareMetalServerByNetworkInterface(BareMetalServerPrototype): +class BareMetalServerPrototypeBareMetalServerByNetworkInterface( + BareMetalServerPrototype): """ BareMetalServerPrototypeBareMetalServerByNetworkInterface. + :param int bandwidth: (optional) The total bandwidth (in megabits per second) + shared across the bare metal server's network interfaces. The specified value + must match one of the bandwidth values in the bare metal server's profile. If + unspecified, the default value from the profile will be used. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the server will fail to boot. @@ -105064,14 +113551,18 @@ def __init__( initialization: 'BareMetalServerInitializationPrototype', profile: 'BareMetalServerProfileIdentity', zone: 'ZoneIdentity', - primary_network_interface: 'BareMetalServerPrimaryNetworkInterfacePrototype', + primary_network_interface: + 'BareMetalServerPrimaryNetworkInterfacePrototype', *, + bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, - trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePrototype'] = None, + trusted_platform_module: Optional[ + 'BareMetalServerTrustedPlatformModulePrototype'] = None, vpc: Optional['VPCIdentity'] = None, - network_interfaces: Optional[List['BareMetalServerNetworkInterfacePrototype']] = None, + network_interfaces: Optional[ + List['BareMetalServerNetworkInterfacePrototype']] = None, ) -> None: """ Initialize a BareMetalServerPrototypeBareMetalServerByNetworkInterface object. @@ -105084,6 +113575,11 @@ def __init__( :param BareMetalServerPrimaryNetworkInterfacePrototype primary_network_interface: The primary bare metal server network interface to create. + :param int bandwidth: (optional) The total bandwidth (in megabits per + second) shared across the bare metal server's network interfaces. The + specified value must match one of the bandwidth values in the bare metal + server's profile. If unspecified, the default value from the profile will + be used. :param bool enable_secure_boot: (optional) Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the server will fail to boot. @@ -105102,6 +113598,7 @@ def __init__( (optional) The additional bare metal server network interfaces to create. """ # pylint: disable=super-init-not-called + self.bandwidth = bandwidth self.enable_secure_boot = enable_secure_boot self.initialization = initialization self.name = name @@ -105114,37 +113611,60 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerPrototypeBareMetalServerByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerPrototypeBareMetalServerByNetworkInterface': """Initialize a BareMetalServerPrototypeBareMetalServerByNetworkInterface object from a json dictionary.""" args = {} + if (bandwidth := _dict.get('bandwidth')) is not None: + args['bandwidth'] = bandwidth if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: args['enable_secure_boot'] = enable_secure_boot if (initialization := _dict.get('initialization')) is not None: - args['initialization'] = BareMetalServerInitializationPrototype.from_dict(initialization) + args[ + 'initialization'] = BareMetalServerInitializationPrototype.from_dict( + initialization) else: - raise ValueError('Required property \'initialization\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON') + raise ValueError( + 'Required property \'initialization\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON') + raise ValueError( + 'Required property \'profile\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (trusted_platform_module := _dict.get('trusted_platform_module')) is not None: - args['trusted_platform_module'] = BareMetalServerTrustedPlatformModulePrototype.from_dict(trusted_platform_module) + if (trusted_platform_module := + _dict.get('trusted_platform_module')) is not None: + args[ + 'trusted_platform_module'] = BareMetalServerTrustedPlatformModulePrototype.from_dict( + trusted_platform_module) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [BareMetalServerNetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = BareMetalServerPrimaryNetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON') + args['network_interfaces'] = [ + BareMetalServerNetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = BareMetalServerPrimaryNetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -105155,7 +113675,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'enable_secure_boot') and self.enable_secure_boot is not None: + if hasattr(self, 'bandwidth') and self.bandwidth is not None: + _dict['bandwidth'] = self.bandwidth + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'initialization') and self.initialization is not None: if isinstance(self.initialization, dict): @@ -105174,11 +113698,14 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'trusted_platform_module') and self.trusted_platform_module is not None: + if hasattr(self, 'trusted_platform_module' + ) and self.trusted_platform_module is not None: if isinstance(self.trusted_platform_module, dict): _dict['trusted_platform_module'] = self.trusted_platform_module else: - _dict['trusted_platform_module'] = self.trusted_platform_module.to_dict() + _dict[ + 'trusted_platform_module'] = self.trusted_platform_module.to_dict( + ) if hasattr(self, 'vpc') and self.vpc is not None: if isinstance(self.vpc, dict): _dict['vpc'] = self.vpc @@ -105189,7 +113716,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -105197,11 +113726,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -105212,13 +113745,17 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerPrototypeBareMetalServerByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerPrototypeBareMetalServerByNetworkInterface') -> bool: + def __eq__( + self, other: 'BareMetalServerPrototypeBareMetalServerByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerPrototypeBareMetalServerByNetworkInterface') -> bool: + def __ne__( + self, other: 'BareMetalServerPrototypeBareMetalServerByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -105247,13 +113784,16 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'CatalogOfferingIdentityCatalogOfferingByCRN': + def from_dict(cls, + _dict: Dict) -> 'CatalogOfferingIdentityCatalogOfferingByCRN': """Initialize a CatalogOfferingIdentityCatalogOfferingByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in CatalogOfferingIdentityCatalogOfferingByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in CatalogOfferingIdentityCatalogOfferingByCRN JSON' + ) return cls(**args) @classmethod @@ -105276,18 +113816,21 @@ def __str__(self) -> str: """Return a `str` version of this CatalogOfferingIdentityCatalogOfferingByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'CatalogOfferingIdentityCatalogOfferingByCRN') -> bool: + def __eq__(self, + other: 'CatalogOfferingIdentityCatalogOfferingByCRN') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'CatalogOfferingIdentityCatalogOfferingByCRN') -> bool: + def __ne__(self, + other: 'CatalogOfferingIdentityCatalogOfferingByCRN') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(CatalogOfferingVersionIdentity): +class CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN( + CatalogOfferingVersionIdentity): """ CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN. @@ -105311,13 +113854,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN': """Initialize a CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN JSON' + ) return cls(**args) @classmethod @@ -105340,13 +113887,92 @@ def __str__(self) -> str: """Return a `str` version of this CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN') -> bool: + def __eq__( + self, other: 'CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN' + ) -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__( + self, other: 'CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN' + ) -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN( + CatalogOfferingVersionPlanIdentity): + """ + CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN. + + :param str crn: The CRN for this + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version's billing plan. + """ + + def __init__( + self, + crn: str, + ) -> None: + """ + Initialize a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN object. + + :param str crn: The CRN for this + [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) + offering version's billing plan. + """ + # pylint: disable=super-init-not-called + self.crn = crn + + @classmethod + def from_dict( + cls, _dict: Dict + ) -> 'CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN': + """Initialize a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN object from a json dictionary.""" + args = {} + if (crn := _dict.get('crn')) is not None: + args['crn'] = crn + else: + raise ValueError( + 'Required property \'crn\' not present in CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__( + self, + other: 'CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN') -> bool: + def __ne__( + self, + other: 'CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -105377,7 +114003,9 @@ def from_dict(cls, _dict: Dict) -> 'CertificateInstanceIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in CertificateInstanceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in CertificateInstanceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -105437,7 +114065,9 @@ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageBucketIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in CloudObjectStorageBucketIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in CloudObjectStorageBucketIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -105471,7 +114101,8 @@ def __ne__(self, other: 'CloudObjectStorageBucketIdentityByCRN') -> bool: return not self == other -class CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(CloudObjectStorageBucketIdentity): +class CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName( + CloudObjectStorageBucketIdentity): """ CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName. @@ -105492,13 +114123,17 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName': + def from_dict( + cls, _dict: Dict + ) -> 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName': """Initialize a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName JSON' + ) return cls(**args) @classmethod @@ -105521,13 +114156,19 @@ def __str__(self) -> str: """Return a `str` version of this CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName') -> bool: + def __eq__( + self, other: + 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName') -> bool: + def __ne__( + self, other: + 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -105558,7 +114199,9 @@ def from_dict(cls, _dict: Dict) -> 'DNSInstanceIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DNSInstanceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in DNSInstanceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -105618,7 +114261,9 @@ def from_dict(cls, _dict: Dict) -> 'DNSZoneIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DNSZoneIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in DNSZoneIdentityById JSON' + ) return cls(**args) @classmethod @@ -105678,7 +114323,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in DedicatedHostGroupIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in DedicatedHostGroupIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -105738,7 +114385,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostGroupIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostGroupIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -105798,7 +114447,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroupIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in DedicatedHostGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in DedicatedHostGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -105858,7 +114509,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in DedicatedHostProfileIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in DedicatedHostProfileIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -105918,7 +114571,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in DedicatedHostProfileIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in DedicatedHostProfileIdentityByName JSON' + ) return cls(**args) @classmethod @@ -105978,7 +114633,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileMemoryDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileMemoryDependent JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileMemoryDependent JSON' + ) return cls(**args) @classmethod @@ -106019,7 +114676,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class DedicatedHostProfileMemoryEnum(DedicatedHostProfileMemory): """ The permitted memory values (in gibibytes) for a dedicated host with this profile. @@ -106054,15 +114710,21 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileMemoryEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in DedicatedHostProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'default\' not present in DedicatedHostProfileMemoryEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileMemoryEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in DedicatedHostProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'values\' not present in DedicatedHostProfileMemoryEnum JSON' + ) return cls(**args) @classmethod @@ -106107,7 +114769,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class DedicatedHostProfileMemoryFixed(DedicatedHostProfileMemory): """ The memory (in gibibytes) for a dedicated host with this profile. @@ -106138,11 +114799,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileMemoryFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileMemoryFixed JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileMemoryFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileMemoryFixed JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileMemoryFixed JSON' + ) return cls(**args) @classmethod @@ -106185,7 +114850,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class DedicatedHostProfileMemoryRange(DedicatedHostProfileMemory): """ The permitted memory range (in gibibytes) for a dedicated host with this profile. @@ -106228,23 +114892,33 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileMemoryRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in DedicatedHostProfileMemoryRange JSON') + raise ValueError( + 'Required property \'default\' not present in DedicatedHostProfileMemoryRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in DedicatedHostProfileMemoryRange JSON') + raise ValueError( + 'Required property \'max\' not present in DedicatedHostProfileMemoryRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in DedicatedHostProfileMemoryRange JSON') + raise ValueError( + 'Required property \'min\' not present in DedicatedHostProfileMemoryRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in DedicatedHostProfileMemoryRange JSON') + raise ValueError( + 'Required property \'step\' not present in DedicatedHostProfileMemoryRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileMemoryRange JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileMemoryRange JSON' + ) return cls(**args) @classmethod @@ -106293,7 +114967,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class DedicatedHostProfileSocketDependent(DedicatedHostProfileSocket): """ The CPU socket count for a dedicated host with this profile depends on its @@ -106321,7 +114994,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileSocketDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileSocketDependent JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileSocketDependent JSON' + ) return cls(**args) @classmethod @@ -106362,7 +115037,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class DedicatedHostProfileSocketEnum(DedicatedHostProfileSocket): """ The permitted values for CPU socket count for a dedicated host with this profile. @@ -106397,15 +115071,21 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileSocketEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in DedicatedHostProfileSocketEnum JSON') + raise ValueError( + 'Required property \'default\' not present in DedicatedHostProfileSocketEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileSocketEnum JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileSocketEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in DedicatedHostProfileSocketEnum JSON') + raise ValueError( + 'Required property \'values\' not present in DedicatedHostProfileSocketEnum JSON' + ) return cls(**args) @classmethod @@ -106450,7 +115130,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class DedicatedHostProfileSocketFixed(DedicatedHostProfileSocket): """ The CPU socket count for a dedicated host with this profile. @@ -106481,11 +115160,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileSocketFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileSocketFixed JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileSocketFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileSocketFixed JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileSocketFixed JSON' + ) return cls(**args) @classmethod @@ -106528,7 +115211,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class DedicatedHostProfileSocketRange(DedicatedHostProfileSocket): """ The permitted range for CPU socket count for a dedicated host with this profile. @@ -106571,23 +115253,33 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileSocketRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in DedicatedHostProfileSocketRange JSON') + raise ValueError( + 'Required property \'default\' not present in DedicatedHostProfileSocketRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in DedicatedHostProfileSocketRange JSON') + raise ValueError( + 'Required property \'max\' not present in DedicatedHostProfileSocketRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in DedicatedHostProfileSocketRange JSON') + raise ValueError( + 'Required property \'min\' not present in DedicatedHostProfileSocketRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in DedicatedHostProfileSocketRange JSON') + raise ValueError( + 'Required property \'step\' not present in DedicatedHostProfileSocketRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileSocketRange JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileSocketRange JSON' + ) return cls(**args) @classmethod @@ -106636,7 +115328,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class DedicatedHostProfileVCPUDependent(DedicatedHostProfileVCPU): """ The VCPU count for a dedicated host with this profile depends on its configuration. @@ -106663,7 +115354,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileVCPUDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileVCPUDependent JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileVCPUDependent JSON' + ) return cls(**args) @classmethod @@ -106704,7 +115397,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class DedicatedHostProfileVCPUEnum(DedicatedHostProfileVCPU): """ The permitted values for VCPU count for a dedicated host with this profile. @@ -106739,15 +115431,21 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileVCPUEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in DedicatedHostProfileVCPUEnum JSON') + raise ValueError( + 'Required property \'default\' not present in DedicatedHostProfileVCPUEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileVCPUEnum JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileVCPUEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in DedicatedHostProfileVCPUEnum JSON') + raise ValueError( + 'Required property \'values\' not present in DedicatedHostProfileVCPUEnum JSON' + ) return cls(**args) @classmethod @@ -106792,7 +115490,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class DedicatedHostProfileVCPUFixed(DedicatedHostProfileVCPU): """ The VCPU count for a dedicated host with this profile. @@ -106823,11 +115520,15 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileVCPUFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileVCPUFixed JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileVCPUFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in DedicatedHostProfileVCPUFixed JSON') + raise ValueError( + 'Required property \'value\' not present in DedicatedHostProfileVCPUFixed JSON' + ) return cls(**args) @classmethod @@ -106870,7 +115571,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class DedicatedHostProfileVCPURange(DedicatedHostProfileVCPU): """ The permitted range for VCPU count for a dedicated host with this profile. @@ -106913,23 +115613,33 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileVCPURange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in DedicatedHostProfileVCPURange JSON') + raise ValueError( + 'Required property \'default\' not present in DedicatedHostProfileVCPURange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in DedicatedHostProfileVCPURange JSON') + raise ValueError( + 'Required property \'max\' not present in DedicatedHostProfileVCPURange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in DedicatedHostProfileVCPURange JSON') + raise ValueError( + 'Required property \'min\' not present in DedicatedHostProfileVCPURange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in DedicatedHostProfileVCPURange JSON') + raise ValueError( + 'Required property \'step\' not present in DedicatedHostProfileVCPURange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in DedicatedHostProfileVCPURange JSON') + raise ValueError( + 'Required property \'type\' not present in DedicatedHostProfileVCPURange JSON' + ) return cls(**args) @classmethod @@ -106978,7 +115688,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class DedicatedHostPrototypeDedicatedHostByGroup(DedicatedHostPrototype): """ DedicatedHostPrototypeDedicatedHostByGroup. @@ -107028,23 +115737,29 @@ def __init__( self.group = group @classmethod - def from_dict(cls, _dict: Dict) -> 'DedicatedHostPrototypeDedicatedHostByGroup': + def from_dict(cls, + _dict: Dict) -> 'DedicatedHostPrototypeDedicatedHostByGroup': """Initialize a DedicatedHostPrototypeDedicatedHostByGroup object from a json dictionary.""" args = {} - if (instance_placement_enabled := _dict.get('instance_placement_enabled')) is not None: + if (instance_placement_enabled := + _dict.get('instance_placement_enabled')) is not None: args['instance_placement_enabled'] = instance_placement_enabled if (name := _dict.get('name')) is not None: args['name'] = name if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in DedicatedHostPrototypeDedicatedHostByGroup JSON') + raise ValueError( + 'Required property \'profile\' not present in DedicatedHostPrototypeDedicatedHostByGroup JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (group := _dict.get('group')) is not None: args['group'] = group else: - raise ValueError('Required property \'group\' not present in DedicatedHostPrototypeDedicatedHostByGroup JSON') + raise ValueError( + 'Required property \'group\' not present in DedicatedHostPrototypeDedicatedHostByGroup JSON' + ) return cls(**args) @classmethod @@ -107055,8 +115770,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'instance_placement_enabled') and self.instance_placement_enabled is not None: - _dict['instance_placement_enabled'] = self.instance_placement_enabled + if hasattr(self, 'instance_placement_enabled' + ) and self.instance_placement_enabled is not None: + _dict[ + 'instance_placement_enabled'] = self.instance_placement_enabled if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'profile') and self.profile is not None: @@ -107084,13 +115801,15 @@ def __str__(self) -> str: """Return a `str` version of this DedicatedHostPrototypeDedicatedHostByGroup object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'DedicatedHostPrototypeDedicatedHostByGroup') -> bool: + def __eq__(self, + other: 'DedicatedHostPrototypeDedicatedHostByGroup') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'DedicatedHostPrototypeDedicatedHostByGroup') -> bool: + def __ne__(self, + other: 'DedicatedHostPrototypeDedicatedHostByGroup') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -107120,7 +115839,8 @@ def __init__( instance_placement_enabled: Optional[bool] = None, name: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, - group: Optional['DedicatedHostGroupPrototypeDedicatedHostByZoneContext'] = None, + group: Optional[ + 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext'] = None, ) -> None: """ Initialize a DedicatedHostPrototypeDedicatedHostByZone object. @@ -107147,25 +115867,33 @@ def __init__( self.zone = zone @classmethod - def from_dict(cls, _dict: Dict) -> 'DedicatedHostPrototypeDedicatedHostByZone': + def from_dict(cls, + _dict: Dict) -> 'DedicatedHostPrototypeDedicatedHostByZone': """Initialize a DedicatedHostPrototypeDedicatedHostByZone object from a json dictionary.""" args = {} - if (instance_placement_enabled := _dict.get('instance_placement_enabled')) is not None: + if (instance_placement_enabled := + _dict.get('instance_placement_enabled')) is not None: args['instance_placement_enabled'] = instance_placement_enabled if (name := _dict.get('name')) is not None: args['name'] = name if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in DedicatedHostPrototypeDedicatedHostByZone JSON') + raise ValueError( + 'Required property \'profile\' not present in DedicatedHostPrototypeDedicatedHostByZone JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (group := _dict.get('group')) is not None: - args['group'] = DedicatedHostGroupPrototypeDedicatedHostByZoneContext.from_dict(group) + args[ + 'group'] = DedicatedHostGroupPrototypeDedicatedHostByZoneContext.from_dict( + group) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in DedicatedHostPrototypeDedicatedHostByZone JSON') + raise ValueError( + 'Required property \'zone\' not present in DedicatedHostPrototypeDedicatedHostByZone JSON' + ) return cls(**args) @classmethod @@ -107176,8 +115904,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'instance_placement_enabled') and self.instance_placement_enabled is not None: - _dict['instance_placement_enabled'] = self.instance_placement_enabled + if hasattr(self, 'instance_placement_enabled' + ) and self.instance_placement_enabled is not None: + _dict[ + 'instance_placement_enabled'] = self.instance_placement_enabled if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'profile') and self.profile is not None: @@ -107210,13 +115940,15 @@ def __str__(self) -> str: """Return a `str` version of this DedicatedHostPrototypeDedicatedHostByZone object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'DedicatedHostPrototypeDedicatedHostByZone') -> bool: + def __eq__(self, + other: 'DedicatedHostPrototypeDedicatedHostByZone') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'DedicatedHostPrototypeDedicatedHostByZone') -> bool: + def __ne__(self, + other: 'DedicatedHostPrototypeDedicatedHostByZone') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -107255,7 +115987,9 @@ def from_dict(cls, _dict: Dict) -> 'EncryptionKeyIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in EncryptionKeyIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in EncryptionKeyIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -107295,21 +116029,22 @@ class EndpointGatewayReservedIPReservedIPIdentity(EndpointGatewayReservedIP): """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a EndpointGatewayReservedIPReservedIPIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['EndpointGatewayReservedIPReservedIPIdentityById', 'EndpointGatewayReservedIPReservedIPIdentityByHref']) - ) + ", ".join([ + 'EndpointGatewayReservedIPReservedIPIdentityById', + 'EndpointGatewayReservedIPReservedIPIdentityByHref' + ])) raise Exception(msg) -class EndpointGatewayReservedIPReservedIPPrototypeTargetContext(EndpointGatewayReservedIP): +class EndpointGatewayReservedIPReservedIPPrototypeTargetContext( + EndpointGatewayReservedIP): """ EndpointGatewayReservedIPReservedIPPrototypeTargetContext. @@ -107359,7 +116094,9 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext': """Initialize a EndpointGatewayReservedIPReservedIPPrototypeTargetContext object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: @@ -107371,7 +116108,9 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPPrototype if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in EndpointGatewayReservedIPReservedIPPrototypeTargetContext JSON') + raise ValueError( + 'Required property \'subnet\' not present in EndpointGatewayReservedIPReservedIPPrototypeTargetContext JSON' + ) return cls(**args) @classmethod @@ -107403,18 +116142,23 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayReservedIPReservedIPPrototypeTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext') -> bool: + def __eq__( + self, other: 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext') -> bool: + def __ne__( + self, other: 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class EndpointGatewayTargetPrototypeProviderCloudServiceIdentity(EndpointGatewayTargetPrototype): +class EndpointGatewayTargetPrototypeProviderCloudServiceIdentity( + EndpointGatewayTargetPrototype): """ EndpointGatewayTargetPrototypeProviderCloudServiceIdentity. @@ -107432,8 +116176,9 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN']) - ) + ", ".join([ + 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN' + ])) raise Exception(msg) class ResourceTypeEnum(str, Enum): @@ -107445,8 +116190,8 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' - -class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity(EndpointGatewayTargetPrototype): +class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity( + EndpointGatewayTargetPrototype): """ EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity. @@ -107464,8 +116209,9 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName']) - ) + ", ".join([ + 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName' + ])) raise Exception(msg) class ResourceTypeEnum(str, Enum): @@ -107477,7 +116223,6 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' - class EndpointGatewayTargetProviderCloudServiceReference(EndpointGatewayTarget): """ EndpointGatewayTargetProviderCloudServiceReference. @@ -107504,17 +116249,23 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetProviderCloudServiceReference': + def from_dict( + cls, _dict: Dict + ) -> 'EndpointGatewayTargetProviderCloudServiceReference': """Initialize a EndpointGatewayTargetProviderCloudServiceReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in EndpointGatewayTargetProviderCloudServiceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in EndpointGatewayTargetProviderCloudServiceReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetProviderCloudServiceReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in EndpointGatewayTargetProviderCloudServiceReference JSON' + ) return cls(**args) @classmethod @@ -107539,13 +116290,17 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayTargetProviderCloudServiceReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'EndpointGatewayTargetProviderCloudServiceReference') -> bool: + def __eq__( + self, other: 'EndpointGatewayTargetProviderCloudServiceReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'EndpointGatewayTargetProviderCloudServiceReference') -> bool: + def __ne__( + self, other: 'EndpointGatewayTargetProviderCloudServiceReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -107557,8 +116312,8 @@ class ResourceTypeEnum(str, Enum): PROVIDER_CLOUD_SERVICE = 'provider_cloud_service' - -class EndpointGatewayTargetProviderInfrastructureServiceReference(EndpointGatewayTarget): +class EndpointGatewayTargetProviderInfrastructureServiceReference( + EndpointGatewayTarget): """ The name of this provider infrastructure service. @@ -107584,17 +116339,23 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetProviderInfrastructureServiceReference': + def from_dict( + cls, _dict: Dict + ) -> 'EndpointGatewayTargetProviderInfrastructureServiceReference': """Initialize a EndpointGatewayTargetProviderInfrastructureServiceReference object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in EndpointGatewayTargetProviderInfrastructureServiceReference JSON') + raise ValueError( + 'Required property \'name\' not present in EndpointGatewayTargetProviderInfrastructureServiceReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetProviderInfrastructureServiceReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in EndpointGatewayTargetProviderInfrastructureServiceReference JSON' + ) return cls(**args) @classmethod @@ -107619,13 +116380,19 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayTargetProviderInfrastructureServiceReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'EndpointGatewayTargetProviderInfrastructureServiceReference') -> bool: + def __eq__( + self, + other: 'EndpointGatewayTargetProviderInfrastructureServiceReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'EndpointGatewayTargetProviderInfrastructureServiceReference') -> bool: + def __ne__( + self, + other: 'EndpointGatewayTargetProviderInfrastructureServiceReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -107637,7 +116404,6 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' - class FloatingIPPrototypeFloatingIPByTarget(FloatingIPPrototype): """ FloatingIPPrototypeFloatingIPByTarget. @@ -107698,7 +116464,9 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPPrototypeFloatingIPByTarget': if (target := _dict.get('target')) is not None: args['target'] = target else: - raise ValueError('Required property \'target\' not present in FloatingIPPrototypeFloatingIPByTarget JSON') + raise ValueError( + 'Required property \'target\' not present in FloatingIPPrototypeFloatingIPByTarget JSON' + ) return cls(**args) @classmethod @@ -107785,7 +116553,9 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPPrototypeFloatingIPByZone': if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in FloatingIPPrototypeFloatingIPByZone JSON') + raise ValueError( + 'Required property \'zone\' not present in FloatingIPPrototypeFloatingIPByZone JSON' + ) return cls(**args) @classmethod @@ -107829,23 +116599,24 @@ def __ne__(self, other: 'FloatingIPPrototypeFloatingIPByZone') -> bool: return not self == other -class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity(FloatingIPTargetPatch): +class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity( + FloatingIPTargetPatch): """ Identifies a bare metal server network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById', 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref']) - ) + ", ".join([ + 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById', + 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref' + ])) raise Exception(msg) @@ -107855,101 +116626,108 @@ class FloatingIPTargetPatchNetworkInterfaceIdentity(FloatingIPTargetPatch): """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPatchNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref']) - ) + ", ".join([ + 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById', + 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ])) raise Exception(msg) -class FloatingIPTargetPatchVirtualNetworkInterfaceIdentity(FloatingIPTargetPatch): +class FloatingIPTargetPatchVirtualNetworkInterfaceIdentity( + FloatingIPTargetPatch): """ Identifies a virtual network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPatchVirtualNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN']) - ) + ", ".join([ + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ])) raise Exception(msg) -class FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity(FloatingIPTargetPrototype): +class FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity( + FloatingIPTargetPrototype): """ Identifies a bare metal server network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById', 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref']) - ) + ", ".join([ + 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById', + 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref' + ])) raise Exception(msg) -class FloatingIPTargetPrototypeNetworkInterfaceIdentity(FloatingIPTargetPrototype): +class FloatingIPTargetPrototypeNetworkInterfaceIdentity( + FloatingIPTargetPrototype): """ Identifies an instance network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref']) - ) + ", ".join([ + 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById', + 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ])) raise Exception(msg) -class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity(FloatingIPTargetPrototype): +class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity( + FloatingIPTargetPrototype): """ Identifies a virtual network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN']) - ) + ", ".join([ + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ])) raise Exception(msg) -class FloatingIPTargetBareMetalServerNetworkInterfaceReference(FloatingIPTarget): +class FloatingIPTargetBareMetalServerNetworkInterfaceReference( + FloatingIPTarget): """ FloatingIPTargetBareMetalServerNetworkInterfaceReference. @@ -107982,7 +116760,8 @@ def __init__( primary_ip: 'ReservedIPReference', resource_type: str, *, - deleted: Optional['BareMetalServerNetworkInterfaceReferenceDeleted'] = None, + deleted: Optional[ + 'BareMetalServerNetworkInterfaceReferenceDeleted'] = None, ) -> None: """ Initialize a FloatingIPTargetBareMetalServerNetworkInterfaceReference object. @@ -108019,31 +116798,45 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetBareMetalServerNetworkInterfaceReference': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetBareMetalServerNetworkInterfaceReference': """Initialize a FloatingIPTargetBareMetalServerNetworkInterfaceReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = BareMetalServerNetworkInterfaceReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = BareMetalServerNetworkInterfaceReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'name\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FloatingIPTargetBareMetalServerNetworkInterfaceReference JSON' + ) return cls(**args) @classmethod @@ -108082,13 +116875,17 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetBareMetalServerNetworkInterfaceReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetBareMetalServerNetworkInterfaceReference') -> bool: + def __eq__( + self, other: 'FloatingIPTargetBareMetalServerNetworkInterfaceReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetBareMetalServerNetworkInterfaceReference') -> bool: + def __ne__( + self, other: 'FloatingIPTargetBareMetalServerNetworkInterfaceReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -108100,7 +116897,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class FloatingIPTargetNetworkInterfaceReference(FloatingIPTarget): """ FloatingIPTargetNetworkInterfaceReference. @@ -108166,31 +116962,43 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetNetworkInterfaceReference': + def from_dict(cls, + _dict: Dict) -> 'FloatingIPTargetNetworkInterfaceReference': """Initialize a FloatingIPTargetNetworkInterfaceReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = NetworkInterfaceReferenceDeleted.from_dict(deleted) + args['deleted'] = NetworkInterfaceReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetNetworkInterfaceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetNetworkInterfaceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FloatingIPTargetNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'name\' not present in FloatingIPTargetNetworkInterfaceReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in FloatingIPTargetNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in FloatingIPTargetNetworkInterfaceReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FloatingIPTargetNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FloatingIPTargetNetworkInterfaceReference JSON' + ) return cls(**args) @classmethod @@ -108229,13 +117037,15 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetNetworkInterfaceReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetNetworkInterfaceReference') -> bool: + def __eq__(self, + other: 'FloatingIPTargetNetworkInterfaceReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetNetworkInterfaceReference') -> bool: + def __ne__(self, + other: 'FloatingIPTargetNetworkInterfaceReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -108247,7 +117057,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class FloatingIPTargetPublicGatewayReference(FloatingIPTarget): """ FloatingIPTargetPublicGatewayReference. @@ -108301,25 +117110,35 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPublicGatewayReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FloatingIPTargetPublicGatewayReference JSON') + raise ValueError( + 'Required property \'crn\' not present in FloatingIPTargetPublicGatewayReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = PublicGatewayReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetPublicGatewayReference JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetPublicGatewayReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetPublicGatewayReference JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetPublicGatewayReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FloatingIPTargetPublicGatewayReference JSON') + raise ValueError( + 'Required property \'name\' not present in FloatingIPTargetPublicGatewayReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FloatingIPTargetPublicGatewayReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FloatingIPTargetPublicGatewayReference JSON' + ) return cls(**args) @classmethod @@ -108373,7 +117192,6 @@ class ResourceTypeEnum(str, Enum): PUBLIC_GATEWAY = 'public_gateway' - class FloatingIPTargetVirtualNetworkInterfaceReference(FloatingIPTarget): """ FloatingIPTargetVirtualNetworkInterfaceReference. @@ -108432,39 +117250,56 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetVirtualNetworkInterfaceReference': + def from_dict( + cls, + _dict: Dict) -> 'FloatingIPTargetVirtualNetworkInterfaceReference': """Initialize a FloatingIPTargetVirtualNetworkInterfaceReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VirtualNetworkInterfaceReferenceDeleted.from_dict(deleted) + args['deleted'] = VirtualNetworkInterfaceReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'name\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'subnet\' not present in FloatingIPTargetVirtualNetworkInterfaceReference JSON' + ) return cls(**args) @classmethod @@ -108510,13 +117345,17 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetVirtualNetworkInterfaceReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetVirtualNetworkInterfaceReference') -> bool: + def __eq__( + self, + other: 'FloatingIPTargetVirtualNetworkInterfaceReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetVirtualNetworkInterfaceReference') -> bool: + def __ne__( + self, + other: 'FloatingIPTargetVirtualNetworkInterfaceReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -108528,128 +117367,138 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' - -class FlowLogCollectorTargetPrototypeInstanceIdentity(FlowLogCollectorTargetPrototype): +class FlowLogCollectorTargetPrototypeInstanceIdentity( + FlowLogCollectorTargetPrototype): """ Identifies a virtual server instance by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTargetPrototypeInstanceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById', 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN', 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref']) - ) + ", ".join([ + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById', + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN', + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref' + ])) raise Exception(msg) -class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity(FlowLogCollectorTargetPrototype): +class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity( + FlowLogCollectorTargetPrototype): """ Identifies an instance network attachment by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById', 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref']) - ) + ", ".join([ + 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById', + 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref' + ])) raise Exception(msg) -class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity(FlowLogCollectorTargetPrototype): +class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity( + FlowLogCollectorTargetPrototype): """ Identifies an instance network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref']) - ) + ", ".join([ + 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById', + 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ])) raise Exception(msg) -class FlowLogCollectorTargetPrototypeSubnetIdentity(FlowLogCollectorTargetPrototype): +class FlowLogCollectorTargetPrototypeSubnetIdentity( + FlowLogCollectorTargetPrototype): """ Identifies a subnet by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTargetPrototypeSubnetIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById', 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN', 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref']) - ) + ", ".join([ + 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById', + 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN', + 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref' + ])) raise Exception(msg) -class FlowLogCollectorTargetPrototypeVPCIdentity(FlowLogCollectorTargetPrototype): +class FlowLogCollectorTargetPrototypeVPCIdentity(FlowLogCollectorTargetPrototype + ): """ Identifies a VPC by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTargetPrototypeVPCIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById', 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN', 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref']) - ) + ", ".join([ + 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById', + 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN', + 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref' + ])) raise Exception(msg) -class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity(FlowLogCollectorTargetPrototype): +class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity( + FlowLogCollectorTargetPrototype): """ Identifies a virtual network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN']) - ) + ", ".join([ + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ])) raise Exception(msg) -class FlowLogCollectorTargetInstanceNetworkAttachmentReference(FlowLogCollectorTarget): +class FlowLogCollectorTargetInstanceNetworkAttachmentReference( + FlowLogCollectorTarget): """ FlowLogCollectorTargetInstanceNetworkAttachmentReference. @@ -108707,35 +117556,51 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetInstanceNetworkAttachmentReference': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetInstanceNetworkAttachmentReference': """Initialize a FlowLogCollectorTargetInstanceNetworkAttachmentReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = InstanceNetworkAttachmentReferenceDeleted.from_dict(deleted) + args[ + 'deleted'] = InstanceNetworkAttachmentReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'name\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON') + raise ValueError( + 'Required property \'subnet\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON' + ) return cls(**args) @classmethod @@ -108779,13 +117644,17 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetInstanceNetworkAttachmentReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetInstanceNetworkAttachmentReference') -> bool: + def __eq__( + self, other: 'FlowLogCollectorTargetInstanceNetworkAttachmentReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetInstanceNetworkAttachmentReference') -> bool: + def __ne__( + self, other: 'FlowLogCollectorTargetInstanceNetworkAttachmentReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -108797,7 +117666,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' - class FlowLogCollectorTargetInstanceReference(FlowLogCollectorTarget): """ FlowLogCollectorTargetInstanceReference. @@ -108841,27 +117709,36 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetInstanceReference': + def from_dict(cls, + _dict: Dict) -> 'FlowLogCollectorTargetInstanceReference': """Initialize a FlowLogCollectorTargetInstanceReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetInstanceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetInstanceReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = InstanceReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetInstanceReference JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetInstanceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetInstanceReference JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetInstanceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FlowLogCollectorTargetInstanceReference JSON') + raise ValueError( + 'Required property \'name\' not present in FlowLogCollectorTargetInstanceReference JSON' + ) return cls(**args) @classmethod @@ -108906,7 +117783,8 @@ def __ne__(self, other: 'FlowLogCollectorTargetInstanceReference') -> bool: return not self == other -class FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext(FlowLogCollectorTarget): +class FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext( + FlowLogCollectorTarget): """ FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext. @@ -108936,7 +117814,8 @@ def __init__( name: str, resource_type: str, *, - deleted: Optional['NetworkInterfaceReferenceTargetContextDeleted'] = None, + deleted: Optional[ + 'NetworkInterfaceReferenceTargetContextDeleted'] = None, ) -> None: """ Initialize a FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext object. @@ -108968,27 +117847,39 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext': """Initialize a FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = NetworkInterfaceReferenceTargetContextDeleted.from_dict(deleted) + args[ + 'deleted'] = NetworkInterfaceReferenceTargetContextDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'name\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext JSON' + ) return cls(**args) @classmethod @@ -109022,13 +117913,19 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext') -> bool: + def __eq__( + self, + other: 'FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext') -> bool: + def __ne__( + self, + other: 'FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -109040,7 +117937,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class FlowLogCollectorTargetSubnetReference(FlowLogCollectorTarget): """ FlowLogCollectorTargetSubnetReference. @@ -109094,25 +117990,35 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetSubnetReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetSubnetReference JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetSubnetReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = SubnetReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetSubnetReference JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetSubnetReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetSubnetReference JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetSubnetReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FlowLogCollectorTargetSubnetReference JSON') + raise ValueError( + 'Required property \'name\' not present in FlowLogCollectorTargetSubnetReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FlowLogCollectorTargetSubnetReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FlowLogCollectorTargetSubnetReference JSON' + ) return cls(**args) @classmethod @@ -109166,7 +118072,6 @@ class ResourceTypeEnum(str, Enum): SUBNET = 'subnet' - class FlowLogCollectorTargetVPCReference(FlowLogCollectorTarget): """ FlowLogCollectorTargetVPCReference. @@ -109220,25 +118125,35 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetVPCReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetVPCReference JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetVPCReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VPCReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetVPCReference JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetVPCReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetVPCReference JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetVPCReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FlowLogCollectorTargetVPCReference JSON') + raise ValueError( + 'Required property \'name\' not present in FlowLogCollectorTargetVPCReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FlowLogCollectorTargetVPCReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FlowLogCollectorTargetVPCReference JSON' + ) return cls(**args) @classmethod @@ -109292,8 +118207,8 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' - -class FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext(FlowLogCollectorTarget): +class FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext( + FlowLogCollectorTarget): """ FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext. @@ -109331,29 +118246,41 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext': """Initialize a FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'name\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext JSON' + ) return cls(**args) @classmethod @@ -109384,13 +118311,19 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -109402,7 +118335,6 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' - class ImageIdentityByCRN(ImageIdentity): """ ImageIdentityByCRN. @@ -109429,7 +118361,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ImageIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in ImageIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -109489,7 +118423,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ImageIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ImageIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -109549,7 +118485,9 @@ def from_dict(cls, _dict: Dict) -> 'ImageIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ImageIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in ImageIdentityById JSON' + ) return cls(**args) @classmethod @@ -109727,11 +118665,15 @@ def from_dict(cls, _dict: Dict) -> 'ImagePrototypeImageByFile': if (file := _dict.get('file')) is not None: args['file'] = ImageFilePrototype.from_dict(file) else: - raise ValueError('Required property \'file\' not present in ImagePrototypeImageByFile JSON') + raise ValueError( + 'Required property \'file\' not present in ImagePrototypeImageByFile JSON' + ) if (operating_system := _dict.get('operating_system')) is not None: args['operating_system'] = operating_system else: - raise ValueError('Required property \'operating_system\' not present in ImagePrototypeImageByFile JSON') + raise ValueError( + 'Required property \'operating_system\' not present in ImagePrototypeImageByFile JSON' + ) return cls(**args) @classmethod @@ -109746,14 +118688,17 @@ def to_dict(self) -> Dict: _dict['deprecation_at'] = datetime_to_string(self.deprecation_at) if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'obsolescence_at') and self.obsolescence_at is not None: + if hasattr(self, + 'obsolescence_at') and self.obsolescence_at is not None: _dict['obsolescence_at'] = datetime_to_string(self.obsolescence_at) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'encrypted_data_key') and self.encrypted_data_key is not None: + if hasattr( + self, + 'encrypted_data_key') and self.encrypted_data_key is not None: _dict['encrypted_data_key'] = self.encrypted_data_key if hasattr(self, 'encryption_key') and self.encryption_key is not None: if isinstance(self.encryption_key, dict): @@ -109765,7 +118710,8 @@ def to_dict(self) -> Dict: _dict['file'] = self.file else: _dict['file'] = self.file.to_dict() - if hasattr(self, 'operating_system') and self.operating_system is not None: + if hasattr(self, + 'operating_system') and self.operating_system is not None: if isinstance(self.operating_system, dict): _dict['operating_system'] = self.operating_system else: @@ -109903,7 +118849,9 @@ def from_dict(cls, _dict: Dict) -> 'ImagePrototypeImageBySourceVolume': if (source_volume := _dict.get('source_volume')) is not None: args['source_volume'] = source_volume else: - raise ValueError('Required property \'source_volume\' not present in ImagePrototypeImageBySourceVolume JSON') + raise ValueError( + 'Required property \'source_volume\' not present in ImagePrototypeImageBySourceVolume JSON' + ) return cls(**args) @classmethod @@ -109918,7 +118866,8 @@ def to_dict(self) -> Dict: _dict['deprecation_at'] = datetime_to_string(self.deprecation_at) if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'obsolescence_at') and self.obsolescence_at is not None: + if hasattr(self, + 'obsolescence_at') and self.obsolescence_at is not None: _dict['obsolescence_at'] = datetime_to_string(self.obsolescence_at) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): @@ -109956,10 +118905,15 @@ def __ne__(self, other: 'ImagePrototypeImageBySourceVolume') -> bool: return not self == other -class InstanceCatalogOfferingPrototypeCatalogOfferingByOffering(InstanceCatalogOfferingPrototype): +class InstanceCatalogOfferingPrototypeCatalogOfferingByOffering( + InstanceCatalogOfferingPrototype): """ InstanceCatalogOfferingPrototypeCatalogOfferingByOffering. + :param CatalogOfferingVersionPlanIdentity plan: (optional) The billing plan to + use for the catalog offering version. If unspecified, no billing plan will be + used (free). Must be specified for catalog offering versions that require a + billing plan to be used. :param CatalogOfferingIdentity offering: Identifies a [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering by a unique property. @@ -109968,6 +118922,8 @@ class InstanceCatalogOfferingPrototypeCatalogOfferingByOffering(InstanceCatalogO def __init__( self, offering: 'CatalogOfferingIdentity', + *, + plan: Optional['CatalogOfferingVersionPlanIdentity'] = None, ) -> None: """ Initialize a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering object. @@ -109975,18 +118931,29 @@ def __init__( :param CatalogOfferingIdentity offering: Identifies a [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering by a unique property. + :param CatalogOfferingVersionPlanIdentity plan: (optional) The billing plan + to use for the catalog offering version. If unspecified, no billing plan + will be used (free). Must be specified for catalog offering versions that + require a billing plan to be used. """ # pylint: disable=super-init-not-called + self.plan = plan self.offering = offering @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceCatalogOfferingPrototypeCatalogOfferingByOffering': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceCatalogOfferingPrototypeCatalogOfferingByOffering': """Initialize a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering object from a json dictionary.""" args = {} + if (plan := _dict.get('plan')) is not None: + args['plan'] = plan if (offering := _dict.get('offering')) is not None: args['offering'] = offering else: - raise ValueError('Required property \'offering\' not present in InstanceCatalogOfferingPrototypeCatalogOfferingByOffering JSON') + raise ValueError( + 'Required property \'offering\' not present in InstanceCatalogOfferingPrototypeCatalogOfferingByOffering JSON' + ) return cls(**args) @classmethod @@ -109997,6 +118964,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'plan') and self.plan is not None: + if isinstance(self.plan, dict): + _dict['plan'] = self.plan + else: + _dict['plan'] = self.plan.to_dict() if hasattr(self, 'offering') and self.offering is not None: if isinstance(self.offering, dict): _dict['offering'] = self.offering @@ -110012,21 +118984,30 @@ def __str__(self) -> str: """Return a `str` version of this InstanceCatalogOfferingPrototypeCatalogOfferingByOffering object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByOffering') -> bool: + def __eq__( + self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByOffering' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByOffering') -> bool: + def __ne__( + self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByOffering' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceCatalogOfferingPrototypeCatalogOfferingByVersion(InstanceCatalogOfferingPrototype): +class InstanceCatalogOfferingPrototypeCatalogOfferingByVersion( + InstanceCatalogOfferingPrototype): """ InstanceCatalogOfferingPrototypeCatalogOfferingByVersion. + :param CatalogOfferingVersionPlanIdentity plan: (optional) The billing plan to + use for the catalog offering version. If unspecified, no billing plan will be + used (free). Must be specified for catalog offering versions that require a + billing plan to be used. :param CatalogOfferingVersionIdentity version: Identifies a version of a [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering by a @@ -110036,6 +119017,8 @@ class InstanceCatalogOfferingPrototypeCatalogOfferingByVersion(InstanceCatalogOf def __init__( self, version: 'CatalogOfferingVersionIdentity', + *, + plan: Optional['CatalogOfferingVersionPlanIdentity'] = None, ) -> None: """ Initialize a InstanceCatalogOfferingPrototypeCatalogOfferingByVersion object. @@ -110044,18 +119027,29 @@ def __init__( [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering by a unique property. + :param CatalogOfferingVersionPlanIdentity plan: (optional) The billing plan + to use for the catalog offering version. If unspecified, no billing plan + will be used (free). Must be specified for catalog offering versions that + require a billing plan to be used. """ # pylint: disable=super-init-not-called + self.plan = plan self.version = version @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion': """Initialize a InstanceCatalogOfferingPrototypeCatalogOfferingByVersion object from a json dictionary.""" args = {} + if (plan := _dict.get('plan')) is not None: + args['plan'] = plan if (version := _dict.get('version')) is not None: args['version'] = version else: - raise ValueError('Required property \'version\' not present in InstanceCatalogOfferingPrototypeCatalogOfferingByVersion JSON') + raise ValueError( + 'Required property \'version\' not present in InstanceCatalogOfferingPrototypeCatalogOfferingByVersion JSON' + ) return cls(**args) @classmethod @@ -110066,6 +119060,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} + if hasattr(self, 'plan') and self.plan is not None: + if isinstance(self.plan, dict): + _dict['plan'] = self.plan + else: + _dict['plan'] = self.plan.to_dict() if hasattr(self, 'version') and self.version is not None: if isinstance(self.version, dict): _dict['version'] = self.version @@ -110081,18 +119080,23 @@ def __str__(self) -> str: """Return a `str` version of this InstanceCatalogOfferingPrototypeCatalogOfferingByVersion object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion') -> bool: + def __eq__( + self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion') -> bool: + def __ne__( + self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototype(InstanceGroupManagerActionPrototype): +class InstanceGroupManagerActionPrototypeScheduledActionPrototype( + InstanceGroupManagerActionPrototype): """ InstanceGroupManagerActionPrototypeScheduledActionPrototype. @@ -110116,8 +119120,10 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt', 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec']) - ) + ", ".join([ + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt', + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec' + ])) raise Exception(msg) @@ -110216,8 +119222,10 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerActionScheduledActionGroupTarget', 'InstanceGroupManagerActionScheduledActionManagerTarget']) - ) + ", ".join([ + 'InstanceGroupManagerActionScheduledActionGroupTarget', + 'InstanceGroupManagerActionScheduledActionManagerTarget' + ])) raise Exception(msg) class ResourceTypeEnum(str, Enum): @@ -110227,7 +119235,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' - class StatusEnum(str, Enum): """ The status of the instance group action @@ -110244,7 +119251,6 @@ class StatusEnum(str, Enum): INCOMPATIBLE = 'incompatible' OMITTED = 'omitted' - class ActionTypeEnum(str, Enum): """ The type of action for the instance group. @@ -110253,7 +119259,6 @@ class ActionTypeEnum(str, Enum): SCHEDULED = 'scheduled' - class InstanceGroupManagerAutoScale(InstanceGroupManager): """ InstanceGroupManagerAutoScale. @@ -110342,51 +119347,80 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerAutoScale': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceGroupManagerAutoScale JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerAutoScale JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerAutoScale JSON' + ) if (management_enabled := _dict.get('management_enabled')) is not None: args['management_enabled'] = management_enabled else: - raise ValueError('Required property \'management_enabled\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'management_enabled\' not present in InstanceGroupManagerAutoScale JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerAutoScale JSON' + ) if (updated_at := _dict.get('updated_at')) is not None: args['updated_at'] = string_to_datetime(updated_at) else: - raise ValueError('Required property \'updated_at\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'updated_at\' not present in InstanceGroupManagerAutoScale JSON' + ) if (aggregation_window := _dict.get('aggregation_window')) is not None: args['aggregation_window'] = aggregation_window else: - raise ValueError('Required property \'aggregation_window\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'aggregation_window\' not present in InstanceGroupManagerAutoScale JSON' + ) if (cooldown := _dict.get('cooldown')) is not None: args['cooldown'] = cooldown else: - raise ValueError('Required property \'cooldown\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'cooldown\' not present in InstanceGroupManagerAutoScale JSON' + ) if (manager_type := _dict.get('manager_type')) is not None: args['manager_type'] = manager_type else: - raise ValueError('Required property \'manager_type\' not present in InstanceGroupManagerAutoScale JSON') - if (max_membership_count := _dict.get('max_membership_count')) is not None: + raise ValueError( + 'Required property \'manager_type\' not present in InstanceGroupManagerAutoScale JSON' + ) + if (max_membership_count := + _dict.get('max_membership_count')) is not None: args['max_membership_count'] = max_membership_count else: - raise ValueError('Required property \'max_membership_count\' not present in InstanceGroupManagerAutoScale JSON') - if (min_membership_count := _dict.get('min_membership_count')) is not None: + raise ValueError( + 'Required property \'max_membership_count\' not present in InstanceGroupManagerAutoScale JSON' + ) + if (min_membership_count := + _dict.get('min_membership_count')) is not None: args['min_membership_count'] = min_membership_count else: - raise ValueError('Required property \'min_membership_count\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'min_membership_count\' not present in InstanceGroupManagerAutoScale JSON' + ) if (policies := _dict.get('policies')) is not None: - args['policies'] = [InstanceGroupManagerPolicyReference.from_dict(v) for v in policies] + args['policies'] = [ + InstanceGroupManagerPolicyReference.from_dict(v) + for v in policies + ] else: - raise ValueError('Required property \'policies\' not present in InstanceGroupManagerAutoScale JSON') + raise ValueError( + 'Required property \'policies\' not present in InstanceGroupManagerAutoScale JSON' + ) return cls(**args) @classmethod @@ -110403,21 +119437,27 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'management_enabled') and self.management_enabled is not None: + if hasattr( + self, + 'management_enabled') and self.management_enabled is not None: _dict['management_enabled'] = self.management_enabled if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'updated_at') and self.updated_at is not None: _dict['updated_at'] = datetime_to_string(self.updated_at) - if hasattr(self, 'aggregation_window') and self.aggregation_window is not None: + if hasattr( + self, + 'aggregation_window') and self.aggregation_window is not None: _dict['aggregation_window'] = self.aggregation_window if hasattr(self, 'cooldown') and self.cooldown is not None: _dict['cooldown'] = self.cooldown if hasattr(self, 'manager_type') and self.manager_type is not None: _dict['manager_type'] = self.manager_type - if hasattr(self, 'max_membership_count') and self.max_membership_count is not None: + if hasattr(self, 'max_membership_count' + ) and self.max_membership_count is not None: _dict['max_membership_count'] = self.max_membership_count - if hasattr(self, 'min_membership_count') and self.min_membership_count is not None: + if hasattr(self, 'min_membership_count' + ) and self.min_membership_count is not None: _dict['min_membership_count'] = self.min_membership_count if hasattr(self, 'policies') and self.policies is not None: policies_list = [] @@ -110455,8 +119495,8 @@ class ManagerTypeEnum(str, Enum): AUTOSCALE = 'autoscale' - -class InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(InstanceGroupManagerPolicyPrototype): +class InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype( + InstanceGroupManagerPolicyPrototype): """ InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype. @@ -110494,7 +119534,9 @@ def __init__( self.policy_type = policy_type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype': """Initialize a InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -110502,15 +119544,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyPrototypeInstanceG if (metric_type := _dict.get('metric_type')) is not None: args['metric_type'] = metric_type else: - raise ValueError('Required property \'metric_type\' not present in InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype JSON') + raise ValueError( + 'Required property \'metric_type\' not present in InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype JSON' + ) if (metric_value := _dict.get('metric_value')) is not None: args['metric_value'] = metric_value else: - raise ValueError('Required property \'metric_value\' not present in InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype JSON') + raise ValueError( + 'Required property \'metric_value\' not present in InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype JSON' + ) if (policy_type := _dict.get('policy_type')) is not None: args['policy_type'] = policy_type else: - raise ValueError('Required property \'policy_type\' not present in InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype JSON') + raise ValueError( + 'Required property \'policy_type\' not present in InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype JSON' + ) return cls(**args) @classmethod @@ -110539,13 +119587,19 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -110559,7 +119613,6 @@ class MetricTypeEnum(str, Enum): NETWORK_IN = 'network_in' NETWORK_OUT = 'network_out' - class PolicyTypeEnum(str, Enum): """ The type of policy for the instance group. @@ -110568,8 +119621,8 @@ class PolicyTypeEnum(str, Enum): TARGET = 'target' - -class InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(InstanceGroupManagerPolicy): +class InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy( + InstanceGroupManagerPolicy): """ InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy. @@ -110624,41 +119677,59 @@ def __init__( self.policy_type = policy_type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy': """Initialize a InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy object from a json dictionary.""" args = {} if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) if (updated_at := _dict.get('updated_at')) is not None: args['updated_at'] = string_to_datetime(updated_at) else: - raise ValueError('Required property \'updated_at\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'updated_at\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) if (metric_type := _dict.get('metric_type')) is not None: args['metric_type'] = metric_type else: - raise ValueError('Required property \'metric_type\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'metric_type\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) if (metric_value := _dict.get('metric_value')) is not None: args['metric_value'] = metric_value else: - raise ValueError('Required property \'metric_value\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'metric_value\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) if (policy_type := _dict.get('policy_type')) is not None: args['policy_type'] = policy_type else: - raise ValueError('Required property \'policy_type\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON') + raise ValueError( + 'Required property \'policy_type\' not present in InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy JSON' + ) return cls(**args) @classmethod @@ -110695,13 +119766,19 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy') -> bool: + def __eq__( + self, + other: 'InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy') -> bool: + def __ne__( + self, + other: 'InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -110715,7 +119792,6 @@ class MetricTypeEnum(str, Enum): NETWORK_IN = 'network_in' NETWORK_OUT = 'network_out' - class PolicyTypeEnum(str, Enum): """ The type of policy for the instance group. @@ -110724,8 +119800,8 @@ class PolicyTypeEnum(str, Enum): TARGET = 'target' - -class InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(InstanceGroupManagerPrototype): +class InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype( + InstanceGroupManagerPrototype): """ InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype. @@ -110784,7 +119860,9 @@ def __init__( self.min_membership_count = min_membership_count @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype': """Initialize a InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype object from a json dictionary.""" args = {} if (management_enabled := _dict.get('management_enabled')) is not None: @@ -110798,12 +119876,18 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPrototypeInstanceGroupMa if (manager_type := _dict.get('manager_type')) is not None: args['manager_type'] = manager_type else: - raise ValueError('Required property \'manager_type\' not present in InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype JSON') - if (max_membership_count := _dict.get('max_membership_count')) is not None: + raise ValueError( + 'Required property \'manager_type\' not present in InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype JSON' + ) + if (max_membership_count := + _dict.get('max_membership_count')) is not None: args['max_membership_count'] = max_membership_count else: - raise ValueError('Required property \'max_membership_count\' not present in InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype JSON') - if (min_membership_count := _dict.get('min_membership_count')) is not None: + raise ValueError( + 'Required property \'max_membership_count\' not present in InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype JSON' + ) + if (min_membership_count := + _dict.get('min_membership_count')) is not None: args['min_membership_count'] = min_membership_count return cls(**args) @@ -110815,19 +119899,25 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'management_enabled') and self.management_enabled is not None: + if hasattr( + self, + 'management_enabled') and self.management_enabled is not None: _dict['management_enabled'] = self.management_enabled if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'aggregation_window') and self.aggregation_window is not None: + if hasattr( + self, + 'aggregation_window') and self.aggregation_window is not None: _dict['aggregation_window'] = self.aggregation_window if hasattr(self, 'cooldown') and self.cooldown is not None: _dict['cooldown'] = self.cooldown if hasattr(self, 'manager_type') and self.manager_type is not None: _dict['manager_type'] = self.manager_type - if hasattr(self, 'max_membership_count') and self.max_membership_count is not None: + if hasattr(self, 'max_membership_count' + ) and self.max_membership_count is not None: _dict['max_membership_count'] = self.max_membership_count - if hasattr(self, 'min_membership_count') and self.min_membership_count is not None: + if hasattr(self, 'min_membership_count' + ) and self.min_membership_count is not None: _dict['min_membership_count'] = self.min_membership_count return _dict @@ -110839,13 +119929,19 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -110857,8 +119953,8 @@ class ManagerTypeEnum(str, Enum): AUTOSCALE = 'autoscale' - -class InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(InstanceGroupManagerPrototype): +class InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype( + InstanceGroupManagerPrototype): """ InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype. @@ -110893,7 +119989,9 @@ def __init__( self.manager_type = manager_type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype': """Initialize a InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype object from a json dictionary.""" args = {} if (management_enabled := _dict.get('management_enabled')) is not None: @@ -110903,7 +120001,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPrototypeInstanceGroupMa if (manager_type := _dict.get('manager_type')) is not None: args['manager_type'] = manager_type else: - raise ValueError('Required property \'manager_type\' not present in InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype JSON') + raise ValueError( + 'Required property \'manager_type\' not present in InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype JSON' + ) return cls(**args) @classmethod @@ -110914,7 +120014,9 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'management_enabled') and self.management_enabled is not None: + if hasattr( + self, + 'management_enabled') and self.management_enabled is not None: _dict['management_enabled'] = self.management_enabled if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -110930,13 +120032,19 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -110948,7 +120056,6 @@ class ManagerTypeEnum(str, Enum): SCHEDULED = 'scheduled' - class InstanceGroupManagerScheduled(InstanceGroupManager): """ InstanceGroupManagerScheduled. @@ -111013,35 +120120,54 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduled': if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceGroupManagerScheduled JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerScheduled JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerScheduled JSON' + ) if (management_enabled := _dict.get('management_enabled')) is not None: args['management_enabled'] = management_enabled else: - raise ValueError('Required property \'management_enabled\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'management_enabled\' not present in InstanceGroupManagerScheduled JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerScheduled JSON' + ) if (updated_at := _dict.get('updated_at')) is not None: args['updated_at'] = string_to_datetime(updated_at) else: - raise ValueError('Required property \'updated_at\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'updated_at\' not present in InstanceGroupManagerScheduled JSON' + ) if (actions := _dict.get('actions')) is not None: - args['actions'] = [InstanceGroupManagerActionReference.from_dict(v) for v in actions] + args['actions'] = [ + InstanceGroupManagerActionReference.from_dict(v) + for v in actions + ] else: - raise ValueError('Required property \'actions\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'actions\' not present in InstanceGroupManagerScheduled JSON' + ) if (manager_type := _dict.get('manager_type')) is not None: args['manager_type'] = manager_type else: - raise ValueError('Required property \'manager_type\' not present in InstanceGroupManagerScheduled JSON') + raise ValueError( + 'Required property \'manager_type\' not present in InstanceGroupManagerScheduled JSON' + ) return cls(**args) @classmethod @@ -111058,7 +120184,9 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'management_enabled') and self.management_enabled is not None: + if hasattr( + self, + 'management_enabled') and self.management_enabled is not None: _dict['management_enabled'] = self.management_enabled if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name @@ -111102,8 +120230,8 @@ class ManagerTypeEnum(str, Enum): SCHEDULED = 'scheduled' - -class InstanceGroupManagerScheduledActionManagerAutoScale(InstanceGroupManagerScheduledActionManager): +class InstanceGroupManagerScheduledActionManagerAutoScale( + InstanceGroupManagerScheduledActionManager): """ InstanceGroupManagerScheduledActionManagerAutoScale. @@ -111155,26 +120283,37 @@ def __init__( self.min_membership_count = min_membership_count @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionManagerAutoScale': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerScheduledActionManagerAutoScale': """Initialize a InstanceGroupManagerScheduledActionManagerAutoScale object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = InstanceGroupManagerReferenceDeleted.from_dict(deleted) + args['deleted'] = InstanceGroupManagerReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerScheduledActionManagerAutoScale JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerScheduledActionManagerAutoScale JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerScheduledActionManagerAutoScale JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerScheduledActionManagerAutoScale JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerScheduledActionManagerAutoScale JSON') - if (max_membership_count := _dict.get('max_membership_count')) is not None: + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerScheduledActionManagerAutoScale JSON' + ) + if (max_membership_count := + _dict.get('max_membership_count')) is not None: args['max_membership_count'] = max_membership_count - if (min_membership_count := _dict.get('min_membership_count')) is not None: + if (min_membership_count := + _dict.get('min_membership_count')) is not None: args['min_membership_count'] = min_membership_count return cls(**args) @@ -111197,9 +120336,11 @@ def to_dict(self) -> Dict: _dict['id'] = self.id if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'max_membership_count') and self.max_membership_count is not None: + if hasattr(self, 'max_membership_count' + ) and self.max_membership_count is not None: _dict['max_membership_count'] = self.max_membership_count - if hasattr(self, 'min_membership_count') and self.min_membership_count is not None: + if hasattr(self, 'min_membership_count' + ) and self.min_membership_count is not None: _dict['min_membership_count'] = self.min_membership_count return _dict @@ -111211,18 +120352,23 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerScheduledActionManagerAutoScale object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerScheduledActionManagerAutoScale') -> bool: + def __eq__( + self, other: 'InstanceGroupManagerScheduledActionManagerAutoScale' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerAutoScale') -> bool: + def __ne__( + self, other: 'InstanceGroupManagerScheduledActionManagerAutoScale' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype(InstanceGroupManagerScheduledActionManagerPrototype): +class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype( + InstanceGroupManagerScheduledActionManagerPrototype): """ The auto scale manager to update, and one or more properties to be updated. Either `id` or `href` must be specified, in addition to at least one of @@ -111251,32 +120397,37 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById', 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref']) - ) + ", ".join([ + 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById', + 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref' + ])) raise Exception(msg) -class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity(InstanceNetworkAttachmentPrototypeVirtualNetworkInterface): +class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity( + InstanceNetworkAttachmentPrototypeVirtualNetworkInterface): """ Identifies a virtual network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN']) - ) + ", ".join([ + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ])) raise Exception(msg) -class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext(InstanceNetworkAttachmentPrototypeVirtualNetworkInterface): +class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext( + InstanceNetworkAttachmentPrototypeVirtualNetworkInterface): """ The virtual network interface for this target. @@ -111321,6 +120472,18 @@ class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInt be available on the virtual network interface's subnet. If no address is specified, an available address on the subnet will be automatically selected and reserved. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. :param ResourceGroupIdentity resource_group: (optional) The resource group to use for this virtual network interface. If unspecified, the virtual server instance's resource group will be used. @@ -111340,7 +120503,9 @@ def __init__( enable_infrastructure_nat: Optional[bool] = None, ips: Optional[List['VirtualNetworkInterfaceIPPrototype']] = None, name: Optional[str] = None, - primary_ip: Optional['VirtualNetworkInterfacePrimaryIPPrototype'] = None, + primary_ip: Optional[ + 'VirtualNetworkInterfacePrimaryIPPrototype'] = None, + protocol_state_filtering_mode: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, security_groups: Optional[List['SecurityGroupIdentity']] = None, subnet: Optional['SubnetIdentity'] = None, @@ -111394,6 +120559,18 @@ def __init__( specified, an available address on the subnet will be automatically selected and reserved. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on + the current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. :param ResourceGroupIdentity resource_group: (optional) The resource group to use for this virtual network interface. If unspecified, the virtual server instance's resource group will be used. @@ -111411,19 +120588,23 @@ def __init__( self.ips = ips self.name = name self.primary_ip = primary_ip + self.protocol_state_filtering_mode = protocol_state_filtering_mode self.resource_group = resource_group self.security_groups = security_groups self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext': """Initialize a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (ips := _dict.get('ips')) is not None: args['ips'] = ips @@ -111431,6 +120612,10 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentPrototypeVirtualNet args['name'] = name if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = primary_ip + if (protocol_state_filtering_mode := + _dict.get('protocol_state_filtering_mode')) is not None: + args[ + 'protocol_state_filtering_mode'] = protocol_state_filtering_mode if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (security_groups := _dict.get('security_groups')) is not None: @@ -111447,11 +120632,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'ips') and self.ips is not None: ips_list = [] @@ -111468,12 +120655,17 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() + if hasattr(self, 'protocol_state_filtering_mode' + ) and self.protocol_state_filtering_mode is not None: + _dict[ + 'protocol_state_filtering_mode'] = self.protocol_state_filtering_mode if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -111496,16 +120688,41 @@ def __str__(self) -> str: """Return a `str` version of this InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext') -> bool: + def __eq__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext') -> bool: + def __ne__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ProtocolStateFilteringModeEnum(str, Enum): + """ + The protocol state filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. + """ + + AUTO = 'auto' + DISABLED = 'disabled' + ENABLED = 'enabled' + class InstancePatchProfileInstanceProfileIdentityByHref(InstancePatchProfile): """ @@ -111527,13 +120744,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePatchProfileInstanceProfileIdentityByHref': + def from_dict( + cls, + _dict: Dict) -> 'InstancePatchProfileInstanceProfileIdentityByHref': """Initialize a InstancePatchProfileInstanceProfileIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePatchProfileInstanceProfileIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePatchProfileInstanceProfileIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -111556,13 +120777,17 @@ def __str__(self) -> str: """Return a `str` version of this InstancePatchProfileInstanceProfileIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePatchProfileInstanceProfileIdentityByHref') -> bool: + def __eq__( + self, + other: 'InstancePatchProfileInstanceProfileIdentityByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePatchProfileInstanceProfileIdentityByHref') -> bool: + def __ne__( + self, + other: 'InstancePatchProfileInstanceProfileIdentityByHref') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -111589,13 +120814,17 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePatchProfileInstanceProfileIdentityByName': + def from_dict( + cls, + _dict: Dict) -> 'InstancePatchProfileInstanceProfileIdentityByName': """Initialize a InstancePatchProfileInstanceProfileIdentityByName object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstancePatchProfileInstanceProfileIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in InstancePatchProfileInstanceProfileIdentityByName JSON' + ) return cls(**args) @classmethod @@ -111618,118 +120847,133 @@ def __str__(self) -> str: """Return a `str` version of this InstancePatchProfileInstanceProfileIdentityByName object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePatchProfileInstanceProfileIdentityByName') -> bool: + def __eq__( + self, + other: 'InstancePatchProfileInstanceProfileIdentityByName') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePatchProfileInstanceProfileIdentityByName') -> bool: + def __ne__( + self, + other: 'InstancePatchProfileInstanceProfileIdentityByName') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPatchDedicatedHostGroupIdentity(InstancePlacementTargetPatch): +class InstancePlacementTargetPatchDedicatedHostGroupIdentity( + InstancePlacementTargetPatch): """ Identifies a dedicated host group by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref']) - ) + ", ".join([ + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref' + ])) raise Exception(msg) -class InstancePlacementTargetPatchDedicatedHostIdentity(InstancePlacementTargetPatch): +class InstancePlacementTargetPatchDedicatedHostIdentity( + InstancePlacementTargetPatch): """ Identifies a dedicated host by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTargetPatchDedicatedHostIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById', 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN', 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref']) - ) + ", ".join([ + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById', + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN', + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref' + ])) raise Exception(msg) -class InstancePlacementTargetPrototypeDedicatedHostGroupIdentity(InstancePlacementTargetPrototype): +class InstancePlacementTargetPrototypeDedicatedHostGroupIdentity( + InstancePlacementTargetPrototype): """ Identifies a dedicated host group by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref']) - ) + ", ".join([ + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref' + ])) raise Exception(msg) -class InstancePlacementTargetPrototypeDedicatedHostIdentity(InstancePlacementTargetPrototype): +class InstancePlacementTargetPrototypeDedicatedHostIdentity( + InstancePlacementTargetPrototype): """ Identifies a dedicated host by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById', 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN', 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref']) - ) + ", ".join([ + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById', + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN', + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref' + ])) raise Exception(msg) -class InstancePlacementTargetPrototypePlacementGroupIdentity(InstancePlacementTargetPrototype): +class InstancePlacementTargetPrototypePlacementGroupIdentity( + InstancePlacementTargetPrototype): """ Identifies a placement group by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a InstancePlacementTargetPrototypePlacementGroupIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById', 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN', 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref']) - ) + ", ".join([ + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById', + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN', + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref' + ])) raise Exception(msg) -class InstancePlacementTargetDedicatedHostGroupReference(InstancePlacementTarget): +class InstancePlacementTargetDedicatedHostGroupReference( + InstancePlacementTarget): """ InstancePlacementTargetDedicatedHostGroupReference. @@ -111777,31 +121021,44 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetDedicatedHostGroupReference': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetDedicatedHostGroupReference': """Initialize a InstancePlacementTargetDedicatedHostGroupReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = DedicatedHostGroupReferenceDeleted.from_dict(deleted) + args['deleted'] = DedicatedHostGroupReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstancePlacementTargetDedicatedHostGroupReference JSON' + ) return cls(**args) @classmethod @@ -111837,13 +121094,17 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetDedicatedHostGroupReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetDedicatedHostGroupReference') -> bool: + def __eq__( + self, other: 'InstancePlacementTargetDedicatedHostGroupReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetDedicatedHostGroupReference') -> bool: + def __ne__( + self, other: 'InstancePlacementTargetDedicatedHostGroupReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -111855,7 +121116,6 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_GROUP = 'dedicated_host_group' - class InstancePlacementTargetDedicatedHostReference(InstancePlacementTarget): """ InstancePlacementTargetDedicatedHostReference. @@ -111903,31 +121163,43 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetDedicatedHostReference': + def from_dict( + cls, + _dict: Dict) -> 'InstancePlacementTargetDedicatedHostReference': """Initialize a InstancePlacementTargetDedicatedHostReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetDedicatedHostReference JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetDedicatedHostReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = DedicatedHostReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetDedicatedHostReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetDedicatedHostReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetDedicatedHostReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetDedicatedHostReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstancePlacementTargetDedicatedHostReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstancePlacementTargetDedicatedHostReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstancePlacementTargetDedicatedHostReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstancePlacementTargetDedicatedHostReference JSON' + ) return cls(**args) @classmethod @@ -111963,13 +121235,15 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetDedicatedHostReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetDedicatedHostReference') -> bool: + def __eq__(self, + other: 'InstancePlacementTargetDedicatedHostReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetDedicatedHostReference') -> bool: + def __ne__(self, + other: 'InstancePlacementTargetDedicatedHostReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -111981,7 +121255,6 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST = 'dedicated_host' - class InstancePlacementTargetPlacementGroupReference(InstancePlacementTarget): """ InstancePlacementTargetPlacementGroupReference. @@ -112029,31 +121302,43 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPlacementGroupReference': + def from_dict( + cls, + _dict: Dict) -> 'InstancePlacementTargetPlacementGroupReference': """Initialize a InstancePlacementTargetPlacementGroupReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetPlacementGroupReference JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetPlacementGroupReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = PlacementGroupReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetPlacementGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetPlacementGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetPlacementGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetPlacementGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstancePlacementTargetPlacementGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in InstancePlacementTargetPlacementGroupReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstancePlacementTargetPlacementGroupReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstancePlacementTargetPlacementGroupReference JSON' + ) return cls(**args) @classmethod @@ -112089,13 +121374,15 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPlacementGroupReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPlacementGroupReference') -> bool: + def __eq__(self, + other: 'InstancePlacementTargetPlacementGroupReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPlacementGroupReference') -> bool: + def __ne__(self, + other: 'InstancePlacementTargetPlacementGroupReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -112107,7 +121394,6 @@ class ResourceTypeEnum(str, Enum): PLACEMENT_GROUP = 'placement_group' - class InstanceProfileBandwidthDependent(InstanceProfileBandwidth): """ The total bandwidth shared across the network attachments or network interfaces and @@ -112135,7 +121421,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileBandwidthDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileBandwidthDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileBandwidthDependent JSON' + ) return cls(**args) @classmethod @@ -112176,7 +121464,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileBandwidthEnum(InstanceProfileBandwidth): """ The permitted total bandwidth values (in megabits per second) shared across the @@ -112213,15 +121500,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileBandwidthEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileBandwidthEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileBandwidthEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileBandwidthEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileBandwidthEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileBandwidthEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileBandwidthEnum JSON' + ) return cls(**args) @classmethod @@ -112266,7 +121559,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileBandwidthFixed(InstanceProfileBandwidth): """ The total bandwidth (in megabits per second) shared across the network attachments or @@ -112298,11 +121590,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileBandwidthFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileBandwidthFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileBandwidthFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileBandwidthFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileBandwidthFixed JSON' + ) return cls(**args) @classmethod @@ -112345,7 +121641,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileBandwidthRange(InstanceProfileBandwidth): """ The permitted total bandwidth range (in megabits per second) shared across the network @@ -112390,23 +121685,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileBandwidthRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileBandwidthRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileBandwidthRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileBandwidthRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileBandwidthRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileBandwidthRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileBandwidthRange JSON' + ) return cls(**args) @classmethod @@ -112455,7 +121760,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfileDiskQuantityDependent(InstanceProfileDiskQuantity): """ The number of disks of this configuration for an instance with this profile depends on @@ -112483,7 +121787,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskQuantityDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskQuantityDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskQuantityDependent JSON' + ) return cls(**args) @classmethod @@ -112524,7 +121830,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileDiskQuantityEnum(InstanceProfileDiskQuantity): """ The permitted the number of disks of this configuration for an instance with this @@ -112560,15 +121865,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskQuantityEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileDiskQuantityEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileDiskQuantityEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskQuantityEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskQuantityEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileDiskQuantityEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileDiskQuantityEnum JSON' + ) return cls(**args) @classmethod @@ -112613,7 +121924,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileDiskQuantityFixed(InstanceProfileDiskQuantity): """ The number of disks of this configuration for an instance with this profile. @@ -112644,11 +121954,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskQuantityFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskQuantityFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskQuantityFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileDiskQuantityFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileDiskQuantityFixed JSON' + ) return cls(**args) @classmethod @@ -112691,7 +122005,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileDiskQuantityRange(InstanceProfileDiskQuantity): """ The permitted range for the number of disks of this configuration for an instance with @@ -112735,23 +122048,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskQuantityRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileDiskQuantityRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileDiskQuantityRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileDiskQuantityRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileDiskQuantityRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskQuantityRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskQuantityRange JSON' + ) return cls(**args) @classmethod @@ -112800,7 +122123,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfileDiskSizeDependent(InstanceProfileDiskSize): """ The disk size in GB (gigabytes) of this configuration for an instance with this @@ -112828,7 +122150,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskSizeDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskSizeDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskSizeDependent JSON' + ) return cls(**args) @classmethod @@ -112869,7 +122193,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileDiskSizeEnum(InstanceProfileDiskSize): """ The permitted disk size in GB (gigabytes) of this configuration for an instance with @@ -112905,15 +122228,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskSizeEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileDiskSizeEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileDiskSizeEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskSizeEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskSizeEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileDiskSizeEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileDiskSizeEnum JSON' + ) return cls(**args) @classmethod @@ -112958,7 +122287,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileDiskSizeFixed(InstanceProfileDiskSize): """ The size of the disk in GB (gigabytes). @@ -112989,11 +122317,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskSizeFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskSizeFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskSizeFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileDiskSizeFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileDiskSizeFixed JSON' + ) return cls(**args) @classmethod @@ -113036,7 +122368,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileDiskSizeRange(InstanceProfileDiskSize): """ The permitted range for the disk size of this configuration in GB (gigabytes) for an @@ -113080,23 +122411,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDiskSizeRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileDiskSizeRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileDiskSizeRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileDiskSizeRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileDiskSizeRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileDiskSizeRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileDiskSizeRange JSON' + ) return cls(**args) @classmethod @@ -113145,7 +122486,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfileGPUDependent(InstanceProfileGPU): """ The GPU count for an instance with this profile depends on its configuration. @@ -113172,7 +122512,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUDependent JSON' + ) return cls(**args) @classmethod @@ -113213,7 +122555,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileGPUEnum(InstanceProfileGPU): """ The permitted GPU count values for an instance with this profile. @@ -113248,15 +122589,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileGPUEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileGPUEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileGPUEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileGPUEnum JSON' + ) return cls(**args) @classmethod @@ -113301,7 +122648,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileGPUFixed(InstanceProfileGPU): """ The GPU count for an instance with this profile. @@ -113332,11 +122678,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileGPUFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileGPUFixed JSON' + ) return cls(**args) @classmethod @@ -113379,7 +122729,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileGPUMemoryDependent(InstanceProfileGPUMemory): """ The overall GPU memory value for an instance with this profile depends on its @@ -113407,7 +122756,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUMemoryDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUMemoryDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUMemoryDependent JSON' + ) return cls(**args) @classmethod @@ -113448,7 +122799,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileGPUMemoryEnum(InstanceProfileGPUMemory): """ The permitted overall GPU memory values in GiB (gibibytes) for an instance with this @@ -113484,15 +122834,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUMemoryEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileGPUMemoryEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileGPUMemoryEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUMemoryEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUMemoryEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileGPUMemoryEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileGPUMemoryEnum JSON' + ) return cls(**args) @classmethod @@ -113537,7 +122893,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileGPUMemoryFixed(InstanceProfileGPUMemory): """ The overall GPU memory in GiB (gibibytes) for an instance with this profile. @@ -113568,11 +122923,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUMemoryFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUMemoryFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUMemoryFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileGPUMemoryFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileGPUMemoryFixed JSON' + ) return cls(**args) @classmethod @@ -113615,7 +122974,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileGPUMemoryRange(InstanceProfileGPUMemory): """ The permitted overall GPU memory range in GiB (gibibytes) for an instance with this @@ -113659,23 +123017,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPUMemoryRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileGPUMemoryRange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileGPUMemoryRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileGPUMemoryRange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileGPUMemoryRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileGPUMemoryRange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileGPUMemoryRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileGPUMemoryRange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileGPUMemoryRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPUMemoryRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPUMemoryRange JSON' + ) return cls(**args) @classmethod @@ -113724,7 +123092,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfileGPURange(InstanceProfileGPU): """ The permitted GPU count range for an instance with this profile. @@ -113767,23 +123134,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileGPURange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileGPURange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileGPURange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileGPURange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileGPURange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileGPURange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileGPURange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileGPURange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileGPURange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileGPURange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileGPURange JSON' + ) return cls(**args) @classmethod @@ -113832,7 +123209,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfileIdentityByHref(InstanceProfileIdentity): """ InstanceProfileIdentityByHref. @@ -113859,7 +123235,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceProfileIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceProfileIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -113921,7 +123299,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceProfileIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceProfileIdentityByName JSON' + ) return cls(**args) @classmethod @@ -113981,7 +123361,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileMemoryDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileMemoryDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileMemoryDependent JSON' + ) return cls(**args) @classmethod @@ -114022,7 +123404,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileMemoryEnum(InstanceProfileMemory): """ The permitted memory values (in gibibytes) for an instance with this profile. @@ -114057,15 +123438,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileMemoryEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileMemoryEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileMemoryEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileMemoryEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileMemoryEnum JSON' + ) return cls(**args) @classmethod @@ -114110,7 +123497,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileMemoryFixed(InstanceProfileMemory): """ The memory (in gibibytes) for an instance with this profile. @@ -114141,11 +123527,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileMemoryFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileMemoryFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileMemoryFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileMemoryFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileMemoryFixed JSON' + ) return cls(**args) @classmethod @@ -114188,7 +123578,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileMemoryRange(InstanceProfileMemory): """ The permitted memory range (in gibibytes) for an instance with this profile. @@ -114231,23 +123620,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileMemoryRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileMemoryRange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileMemoryRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileMemoryRange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileMemoryRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileMemoryRange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileMemoryRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileMemoryRange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileMemoryRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileMemoryRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileMemoryRange JSON' + ) return cls(**args) @classmethod @@ -114296,7 +123695,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfileNUMACountDependent(InstanceProfileNUMACount): """ The total number of NUMA nodes for an instance with this profile depends on its @@ -114324,7 +123722,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileNUMACountDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileNUMACountDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileNUMACountDependent JSON' + ) return cls(**args) @classmethod @@ -114365,7 +123765,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileNUMACountFixed(InstanceProfileNUMACount): """ The total number of NUMA nodes for an instance with this profile. @@ -114396,11 +123795,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileNUMACountFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileNUMACountFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileNUMACountFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileNUMACountFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileNUMACountFixed JSON' + ) return cls(**args) @classmethod @@ -114443,8 +123846,8 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - -class InstanceProfileNetworkAttachmentCountDependent(InstanceProfileNetworkAttachmentCount): +class InstanceProfileNetworkAttachmentCountDependent( + InstanceProfileNetworkAttachmentCount): """ The number of network attachments supported on an instance with this profile is dependent on its configuration. @@ -114465,13 +123868,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkAttachmentCountDependent': + def from_dict( + cls, + _dict: Dict) -> 'InstanceProfileNetworkAttachmentCountDependent': """Initialize a InstanceProfileNetworkAttachmentCountDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileNetworkAttachmentCountDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileNetworkAttachmentCountDependent JSON' + ) return cls(**args) @classmethod @@ -114494,13 +123901,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceProfileNetworkAttachmentCountDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceProfileNetworkAttachmentCountDependent') -> bool: + def __eq__(self, + other: 'InstanceProfileNetworkAttachmentCountDependent') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceProfileNetworkAttachmentCountDependent') -> bool: + def __ne__(self, + other: 'InstanceProfileNetworkAttachmentCountDependent') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -114512,8 +123921,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class InstanceProfileNetworkAttachmentCountRange(InstanceProfileNetworkAttachmentCount): +class InstanceProfileNetworkAttachmentCountRange( + InstanceProfileNetworkAttachmentCount): """ The number of network attachments supported on an instance with this profile. @@ -114542,7 +123951,8 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkAttachmentCountRange': + def from_dict(cls, + _dict: Dict) -> 'InstanceProfileNetworkAttachmentCountRange': """Initialize a InstanceProfileNetworkAttachmentCountRange object from a json dictionary.""" args = {} if (max := _dict.get('max')) is not None: @@ -114552,7 +123962,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkAttachmentCountRange': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileNetworkAttachmentCountRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileNetworkAttachmentCountRange JSON' + ) return cls(**args) @classmethod @@ -114579,13 +123991,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceProfileNetworkAttachmentCountRange object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceProfileNetworkAttachmentCountRange') -> bool: + def __eq__(self, + other: 'InstanceProfileNetworkAttachmentCountRange') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceProfileNetworkAttachmentCountRange') -> bool: + def __ne__(self, + other: 'InstanceProfileNetworkAttachmentCountRange') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -114597,8 +124011,8 @@ class TypeEnum(str, Enum): RANGE = 'range' - -class InstanceProfileNetworkInterfaceCountDependent(InstanceProfileNetworkInterfaceCount): +class InstanceProfileNetworkInterfaceCountDependent( + InstanceProfileNetworkInterfaceCount): """ The number of network interfaces supported on an instance with this profile is dependent on its configuration. @@ -114619,13 +124033,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkInterfaceCountDependent': + def from_dict( + cls, + _dict: Dict) -> 'InstanceProfileNetworkInterfaceCountDependent': """Initialize a InstanceProfileNetworkInterfaceCountDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileNetworkInterfaceCountDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileNetworkInterfaceCountDependent JSON' + ) return cls(**args) @classmethod @@ -114648,13 +124066,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceProfileNetworkInterfaceCountDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceProfileNetworkInterfaceCountDependent') -> bool: + def __eq__(self, + other: 'InstanceProfileNetworkInterfaceCountDependent') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceProfileNetworkInterfaceCountDependent') -> bool: + def __ne__(self, + other: 'InstanceProfileNetworkInterfaceCountDependent') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -114666,8 +124086,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class InstanceProfileNetworkInterfaceCountRange(InstanceProfileNetworkInterfaceCount): +class InstanceProfileNetworkInterfaceCountRange( + InstanceProfileNetworkInterfaceCount): """ The number of network interfaces supported on an instance with this profile. @@ -114696,7 +124116,8 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkInterfaceCountRange': + def from_dict(cls, + _dict: Dict) -> 'InstanceProfileNetworkInterfaceCountRange': """Initialize a InstanceProfileNetworkInterfaceCountRange object from a json dictionary.""" args = {} if (max := _dict.get('max')) is not None: @@ -114706,7 +124127,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkInterfaceCountRange': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileNetworkInterfaceCountRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileNetworkInterfaceCountRange JSON' + ) return cls(**args) @classmethod @@ -114733,13 +124156,15 @@ def __str__(self) -> str: """Return a `str` version of this InstanceProfileNetworkInterfaceCountRange object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceProfileNetworkInterfaceCountRange') -> bool: + def __eq__(self, + other: 'InstanceProfileNetworkInterfaceCountRange') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceProfileNetworkInterfaceCountRange') -> bool: + def __ne__(self, + other: 'InstanceProfileNetworkInterfaceCountRange') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -114751,7 +124176,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfilePortSpeedDependent(InstanceProfilePortSpeed): """ The port speed of each network interface of an instance with this profile depends on @@ -114779,7 +124203,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfilePortSpeedDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfilePortSpeedDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfilePortSpeedDependent JSON' + ) return cls(**args) @classmethod @@ -114820,7 +124246,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfilePortSpeedFixed(InstanceProfilePortSpeed): """ The maximum speed (in megabits per second) of each network interface of an instance @@ -114852,11 +124277,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfilePortSpeedFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfilePortSpeedFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfilePortSpeedFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfilePortSpeedFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfilePortSpeedFixed JSON' + ) return cls(**args) @classmethod @@ -114899,7 +124328,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileVCPUDependent(InstanceProfileVCPU): """ The VCPU count for an instance with this profile depends on its configuration. @@ -114926,7 +124354,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVCPUDependent': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVCPUDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVCPUDependent JSON' + ) return cls(**args) @classmethod @@ -114967,7 +124397,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileVCPUEnum(InstanceProfileVCPU): """ The permitted values for VCPU count for an instance with this profile. @@ -115002,15 +124431,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVCPUEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileVCPUEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileVCPUEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVCPUEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVCPUEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileVCPUEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileVCPUEnum JSON' + ) return cls(**args) @classmethod @@ -115055,7 +124490,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileVCPUFixed(InstanceProfileVCPU): """ The VCPU count for an instance with this profile. @@ -115086,11 +124520,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVCPUFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVCPUFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVCPUFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileVCPUFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileVCPUFixed JSON' + ) return cls(**args) @classmethod @@ -115133,7 +124571,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileVCPURange(InstanceProfileVCPU): """ The permitted range for VCPU count for an instance with this profile. @@ -115176,23 +124613,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVCPURange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileVCPURange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileVCPURange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileVCPURange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileVCPURange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileVCPURange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileVCPURange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileVCPURange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileVCPURange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVCPURange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVCPURange JSON' + ) return cls(**args) @classmethod @@ -115241,7 +124688,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstanceProfileVolumeBandwidthDependent(InstanceProfileVolumeBandwidth): """ The storage bandwidth shared across the storage volumes of an instance with this @@ -115263,13 +124709,16 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceProfileVolumeBandwidthDependent': + def from_dict(cls, + _dict: Dict) -> 'InstanceProfileVolumeBandwidthDependent': """Initialize a InstanceProfileVolumeBandwidthDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVolumeBandwidthDependent JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVolumeBandwidthDependent JSON' + ) return cls(**args) @classmethod @@ -115310,7 +124759,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class InstanceProfileVolumeBandwidthEnum(InstanceProfileVolumeBandwidth): """ The permitted storage bandwidth values (in megabits per second) shared across the @@ -115346,15 +124794,21 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVolumeBandwidthEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileVolumeBandwidthEnum JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileVolumeBandwidthEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVolumeBandwidthEnum JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVolumeBandwidthEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in InstanceProfileVolumeBandwidthEnum JSON') + raise ValueError( + 'Required property \'values\' not present in InstanceProfileVolumeBandwidthEnum JSON' + ) return cls(**args) @classmethod @@ -115399,7 +124853,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class InstanceProfileVolumeBandwidthFixed(InstanceProfileVolumeBandwidth): """ The storage bandwidth (in megabits per second) shared across the storage volumes of an @@ -115431,11 +124884,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVolumeBandwidthFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVolumeBandwidthFixed JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVolumeBandwidthFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in InstanceProfileVolumeBandwidthFixed JSON') + raise ValueError( + 'Required property \'value\' not present in InstanceProfileVolumeBandwidthFixed JSON' + ) return cls(**args) @classmethod @@ -115478,7 +124935,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class InstanceProfileVolumeBandwidthRange(InstanceProfileVolumeBandwidth): """ The permitted storage bandwidth range (in megabits per second) shared across the @@ -115522,23 +124978,33 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileVolumeBandwidthRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in InstanceProfileVolumeBandwidthRange JSON') + raise ValueError( + 'Required property \'default\' not present in InstanceProfileVolumeBandwidthRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in InstanceProfileVolumeBandwidthRange JSON') + raise ValueError( + 'Required property \'max\' not present in InstanceProfileVolumeBandwidthRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in InstanceProfileVolumeBandwidthRange JSON') + raise ValueError( + 'Required property \'min\' not present in InstanceProfileVolumeBandwidthRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in InstanceProfileVolumeBandwidthRange JSON') + raise ValueError( + 'Required property \'step\' not present in InstanceProfileVolumeBandwidthRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in InstanceProfileVolumeBandwidthRange JSON') + raise ValueError( + 'Required property \'type\' not present in InstanceProfileVolumeBandwidthRange JSON' + ) return cls(**args) @classmethod @@ -115587,13 +125053,16 @@ class TypeEnum(str, Enum): RANGE = 'range' - class InstancePrototypeInstanceByCatalogOffering(InstancePrototype): """ Create an instance by using a catalog offering. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -115601,6 +125070,9 @@ class InstancePrototypeInstanceByCatalogOffering(InstancePrototype): not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -115661,20 +125133,26 @@ def __init__( catalog_offering: 'InstanceCatalogOfferingPrototype', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, ) -> None: """ Initialize a InstancePrototypeInstanceByCatalogOffering object. @@ -115692,6 +125170,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -115700,6 +125182,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -115751,17 +125236,34 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment', 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment', + 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstancePrototypeInstanceByImage(InstancePrototype): """ Create an instance by using an image. + The image's `user_data_format` must be `cloud_init`. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -115769,6 +125271,9 @@ class InstancePrototypeInstanceByImage(InstancePrototype): not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -115823,20 +125328,26 @@ def __init__( image: 'ImageIdentity', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, ) -> None: """ Initialize a InstancePrototypeInstanceByImage object. @@ -115847,6 +125358,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -115855,6 +125370,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -115906,10 +125424,22 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment', 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment', + 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype): """ @@ -115917,6 +125447,10 @@ class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype): :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -115924,6 +125458,9 @@ class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype): not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -115974,17 +125511,23 @@ class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype): def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -116001,6 +125544,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116009,6 +125556,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -116057,10 +125607,22 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment', 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment', + 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstancePrototypeInstanceBySourceTemplate(InstancePrototype): """ @@ -116072,6 +125634,10 @@ class InstancePrototypeInstanceBySourceTemplate(InstancePrototype): :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116079,6 +125645,9 @@ class InstancePrototypeInstanceBySourceTemplate(InstancePrototype): not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -116152,25 +125721,33 @@ def __init__( self, source_template: 'InstanceTemplateIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, catalog_offering: Optional['InstanceCatalogOfferingPrototype'] = None, image: Optional['ImageIdentity'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, - primary_network_attachment: Optional['InstanceNetworkAttachmentPrototype'] = None, + primary_network_attachment: Optional[ + 'InstanceNetworkAttachmentPrototype'] = None, primary_network_interface: Optional['NetworkInterfacePrototype'] = None, zone: Optional['ZoneIdentity'] = None, ) -> None: @@ -116181,6 +125758,10 @@ def __init__( this virtual server instance from. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116189,6 +125770,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -116265,7 +125849,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -116288,53 +125874,92 @@ def __init__( self.zone = zone @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceTemplate': + def from_dict(cls, + _dict: Dict) -> 'InstancePrototypeInstanceBySourceTemplate': """Initialize a InstancePrototypeInstanceBySourceTemplate object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering if (image := _dict.get('image')) is not None: args['image'] = image - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) if (source_template := _dict.get('source_template')) is not None: args['source_template'] = source_template else: - raise ValueError('Required property \'source_template\' not present in InstancePrototypeInstanceBySourceTemplate JSON') + raise ValueError( + 'Required property \'source_template\' not present in InstancePrototypeInstanceBySourceTemplate JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone return cls(**args) @@ -116347,16 +125972,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -116365,14 +126003,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -116382,21 +126022,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -116409,12 +126055,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -116424,7 +126074,9 @@ def to_dict(self) -> Dict: _dict['image'] = self.image else: _dict['image'] = self.image.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -116432,7 +126084,9 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -116440,17 +126094,26 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment - else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment + else: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface - else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() - if hasattr(self, 'source_template') and self.source_template is not None: + _dict[ + 'primary_network_interface'] = self.primary_network_interface + else: + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) + if hasattr(self, + 'source_template') and self.source_template is not None: if isinstance(self.source_template, dict): _dict['source_template'] = self.source_template else: @@ -116470,16 +126133,28 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceBySourceTemplate object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceBySourceTemplate') -> bool: + def __eq__(self, + other: 'InstancePrototypeInstanceBySourceTemplate') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceBySourceTemplate') -> bool: + def __ne__(self, + other: 'InstancePrototypeInstanceBySourceTemplate') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstancePrototypeInstanceByVolume(InstancePrototype): """ @@ -116487,6 +126162,10 @@ class InstancePrototypeInstanceByVolume(InstancePrototype): :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116494,6 +126173,9 @@ class InstancePrototypeInstanceByVolume(InstancePrototype): not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -116543,17 +126225,23 @@ class InstancePrototypeInstanceByVolume(InstancePrototype): def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByVolumeContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceByVolumeContext', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -116570,6 +126258,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116578,6 +126270,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -116626,10 +126321,22 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment', 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment', + 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstanceTemplateIdentityByCRN(InstanceTemplateIdentity): """ @@ -116657,7 +126364,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -116717,7 +126426,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -116777,7 +126488,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateIdentityById JSON' + ) return cls(**args) @classmethod @@ -116811,12 +126524,17 @@ def __ne__(self, other: 'InstanceTemplateIdentityById') -> bool: return not self == other -class InstanceTemplatePrototypeInstanceTemplateByCatalogOffering(InstanceTemplatePrototype): +class InstanceTemplatePrototypeInstanceTemplateByCatalogOffering( + InstanceTemplatePrototype): """ Create an instance template that creates instances by using a catalog offering. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116824,6 +126542,9 @@ class InstanceTemplatePrototypeInstanceTemplateByCatalogOffering(InstanceTemplat not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -116883,20 +126604,26 @@ def __init__( catalog_offering: 'InstanceCatalogOfferingPrototype', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, ) -> None: """ Initialize a InstanceTemplatePrototypeInstanceTemplateByCatalogOffering object. @@ -116914,6 +126641,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116922,6 +126653,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -116972,17 +126706,35 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment', 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment', + 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateByImage(InstanceTemplatePrototype): + +class InstanceTemplatePrototypeInstanceTemplateByImage(InstanceTemplatePrototype + ): """ Create an instance template that creates instances by using an image. + The image's `user_data_format` must be `cloud_init`. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -116990,6 +126742,9 @@ class InstanceTemplatePrototypeInstanceTemplateByImage(InstanceTemplatePrototype not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -117043,20 +126798,26 @@ def __init__( image: 'ImageIdentity', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, ) -> None: """ Initialize a InstanceTemplatePrototypeInstanceTemplateByImage object. @@ -117067,6 +126828,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -117075,6 +126840,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -117125,17 +126893,34 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment', 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment', + 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(InstanceTemplatePrototype): + +class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot( + InstanceTemplatePrototype): """ Create an instance template that creates instances by using a snapshot. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -117143,6 +126928,9 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(InstanceTemplate not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -117192,17 +126980,23 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(InstanceTemplate def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -117219,6 +127013,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -117227,6 +127025,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -117274,12 +127075,25 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment', 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment', + 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateBySourceTemplate(InstanceTemplatePrototype): + +class InstanceTemplatePrototypeInstanceTemplateBySourceTemplate( + InstanceTemplatePrototype): """ Create an instance template from an existing source instance template. The `primary_network_attachment` and `network_attachments` properties may only be @@ -117289,6 +127103,10 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceTemplate(InstanceTemplate :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -117296,6 +127114,9 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceTemplate(InstanceTemplate not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -117368,25 +127189,33 @@ def __init__( self, source_template: 'InstanceTemplateIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, catalog_offering: Optional['InstanceCatalogOfferingPrototype'] = None, image: Optional['ImageIdentity'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, - primary_network_attachment: Optional['InstanceNetworkAttachmentPrototype'] = None, + primary_network_attachment: Optional[ + 'InstanceNetworkAttachmentPrototype'] = None, primary_network_interface: Optional['NetworkInterfacePrototype'] = None, zone: Optional['ZoneIdentity'] = None, ) -> None: @@ -117397,6 +127226,10 @@ def __init__( this virtual server instance from. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -117405,6 +127238,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -117480,7 +127316,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -117503,53 +127341,93 @@ def __init__( self.zone = zone @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate': """Initialize a InstanceTemplatePrototypeInstanceTemplateBySourceTemplate object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering if (image := _dict.get('image')) is not None: args['image'] = image - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) if (source_template := _dict.get('source_template')) is not None: args['source_template'] = source_template else: - raise ValueError('Required property \'source_template\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceTemplate JSON') + raise ValueError( + 'Required property \'source_template\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceTemplate JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone return cls(**args) @@ -117562,16 +127440,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -117580,14 +127471,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -117597,21 +127490,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -117624,12 +127523,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -117639,7 +127542,9 @@ def to_dict(self) -> Dict: _dict['image'] = self.image else: _dict['image'] = self.image.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -117647,7 +127552,9 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -117655,17 +127562,26 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment - else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment + else: + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface - else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() - if hasattr(self, 'source_template') and self.source_template is not None: + _dict[ + 'primary_network_interface'] = self.primary_network_interface + else: + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) + if hasattr(self, + 'source_template') and self.source_template is not None: if isinstance(self.source_template, dict): _dict['source_template'] = self.source_template else: @@ -117685,23 +127601,42 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplatePrototypeInstanceTemplateBySourceTemplate object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate') -> bool: + def __eq__( + self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate') -> bool: + def __ne__( + self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceTemplate' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(InstanceTemplate): +class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext( + InstanceTemplate): """ Create an instance by using a catalog offering. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -117712,6 +127647,9 @@ class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(InstanceT not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -117779,18 +127717,24 @@ def __init__( catalog_offering: 'InstanceCatalogOfferingPrototype', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, ) -> None: """ Initialize a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext object. @@ -117817,6 +127761,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -117825,6 +127773,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -117871,10 +127822,22 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment', 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment', + 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class InstanceTemplateInstanceByImageInstanceTemplateContext(InstanceTemplate): """ @@ -117882,6 +127845,10 @@ class InstanceTemplateInstanceByImageInstanceTemplateContext(InstanceTemplate): :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -117892,6 +127859,9 @@ class InstanceTemplateInstanceByImageInstanceTemplateContext(InstanceTemplate): not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -117953,18 +127923,24 @@ def __init__( image: 'ImageIdentity', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, ) -> None: """ Initialize a InstanceTemplateInstanceByImageInstanceTemplateContext object. @@ -117984,6 +127960,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -117992,6 +127972,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -118038,17 +128021,34 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment', 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment', + 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(InstanceTemplate): +class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext( + InstanceTemplate): """ Create an instance by using a snapshot. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -118059,6 +128059,9 @@ class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(InstanceTe not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -118122,23 +128125,31 @@ def __init__( id: str, name: str, resource_group: 'ResourceGroupReference', - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, - primary_network_attachment: Optional['InstanceNetworkAttachmentPrototype'] = None, + primary_network_attachment: Optional[ + 'InstanceNetworkAttachmentPrototype'] = None, ) -> None: """ Initialize a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext object. @@ -118159,6 +128170,10 @@ def __init__( in. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -118167,6 +128182,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -118218,10 +128236,22 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment', 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface']) - ) + ", ".join([ + 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment', + 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface' + ])) raise Exception(msg) + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + class KeyIdentityByCRN(KeyIdentity): """ @@ -118249,7 +128279,9 @@ def from_dict(cls, _dict: Dict) -> 'KeyIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in KeyIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in KeyIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -118312,7 +128344,9 @@ def from_dict(cls, _dict: Dict) -> 'KeyIdentityByFingerprint': if (fingerprint := _dict.get('fingerprint')) is not None: args['fingerprint'] = fingerprint else: - raise ValueError('Required property \'fingerprint\' not present in KeyIdentityByFingerprint JSON') + raise ValueError( + 'Required property \'fingerprint\' not present in KeyIdentityByFingerprint JSON' + ) return cls(**args) @classmethod @@ -118372,7 +128406,9 @@ def from_dict(cls, _dict: Dict) -> 'KeyIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in KeyIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in KeyIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -118432,7 +128468,8 @@ def from_dict(cls, _dict: Dict) -> 'KeyIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in KeyIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in KeyIdentityById JSON') return cls(**args) @classmethod @@ -118466,7 +128503,8 @@ def __ne__(self, other: 'KeyIdentityById') -> bool: return not self == other -class LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(LegacyCloudObjectStorageBucketIdentity): +class LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName( + LegacyCloudObjectStorageBucketIdentity): """ LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName. @@ -118487,13 +128525,17 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName': + def from_dict( + cls, _dict: Dict + ) -> 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName': """Initialize a LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName JSON' + ) return cls(**args) @classmethod @@ -118516,13 +128558,19 @@ def __str__(self) -> str: """Return a `str` version of this LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName') -> bool: + def __eq__( + self, other: + 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName') -> bool: + def __ne__( + self, other: + 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -118553,7 +128601,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in LoadBalancerIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in LoadBalancerIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -118613,7 +128663,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -118673,7 +128725,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerIdentityById JSON' + ) return cls(**args) @classmethod @@ -118707,7 +128761,8 @@ def __ne__(self, other: 'LoadBalancerIdentityById') -> bool: return not self == other -class LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref(LoadBalancerListenerDefaultPoolPatch): +class LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref( + LoadBalancerListenerDefaultPoolPatch): """ LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref. @@ -118727,13 +128782,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref': """Initialize a LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -118756,18 +128815,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById(LoadBalancerListenerDefaultPoolPatch): +class LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById( + LoadBalancerListenerDefaultPoolPatch): """ LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById. @@ -118787,13 +128853,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById': """Initialize a LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById JSON' + ) return cls(**args) @classmethod @@ -118816,13 +128886,19 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById') -> bool: + def __eq__( + self, + other: 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById') -> bool: + def __ne__( + self, + other: 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -118853,7 +128929,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -118913,7 +128991,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerIdentityById JSON' + ) return cls(**args) @classmethod @@ -118947,7 +129027,8 @@ def __ne__(self, other: 'LoadBalancerListenerIdentityById') -> bool: return not self == other -class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch(LoadBalancerListenerPolicyTargetPatch): +class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch( + LoadBalancerListenerPolicyTargetPatch): """ LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch. @@ -118979,7 +129060,9 @@ def __init__( self.uri = uri @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch': """Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch object from a json dictionary.""" args = {} if (http_status_code := _dict.get('http_status_code')) is not None: @@ -118998,7 +129081,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'listener') and self.listener is not None: if isinstance(self.listener, dict): @@ -119017,18 +129101,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch(LoadBalancerListenerPolicyTargetPatch): +class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch( + LoadBalancerListenerPolicyTargetPatch): """ LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch. @@ -119054,7 +129145,9 @@ def __init__( self.url = url @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch': """Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch object from a json dictionary.""" args = {} if (http_status_code := _dict.get('http_status_code')) is not None: @@ -119071,7 +129164,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url @@ -119085,38 +129179,46 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity(LoadBalancerListenerPolicyTargetPatch): +class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity( + LoadBalancerListenerPolicyTargetPatch): """ Identifies a load balancer pool by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ])) raise Exception(msg) -class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype(LoadBalancerListenerPolicyTargetPrototype): +class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype( + LoadBalancerListenerPolicyTargetPrototype): """ LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype. @@ -119147,17 +129249,23 @@ def __init__( self.uri = uri @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype': """Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype object from a json dictionary.""" args = {} if (http_status_code := _dict.get('http_status_code')) is not None: args['http_status_code'] = http_status_code else: - raise ValueError('Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype JSON') + raise ValueError( + 'Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype JSON' + ) if (listener := _dict.get('listener')) is not None: args['listener'] = listener else: - raise ValueError('Required property \'listener\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype JSON') + raise ValueError( + 'Required property \'listener\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype JSON' + ) if (uri := _dict.get('uri')) is not None: args['uri'] = uri return cls(**args) @@ -119170,7 +129278,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'listener') and self.listener is not None: if isinstance(self.listener, dict): @@ -119189,18 +129298,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(LoadBalancerListenerPolicyTargetPrototype): +class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype( + LoadBalancerListenerPolicyTargetPrototype): """ LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype. @@ -119224,17 +129340,23 @@ def __init__( self.url = url @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype': """Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype object from a json dictionary.""" args = {} if (http_status_code := _dict.get('http_status_code')) is not None: args['http_status_code'] = http_status_code else: - raise ValueError('Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype JSON') + raise ValueError( + 'Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype JSON' + ) if (url := _dict.get('url')) is not None: args['url'] = url else: - raise ValueError('Required property \'url\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype JSON') + raise ValueError( + 'Required property \'url\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype JSON' + ) return cls(**args) @classmethod @@ -119245,7 +129367,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url @@ -119259,38 +129382,46 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity(LoadBalancerListenerPolicyTargetPrototype): +class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity( + LoadBalancerListenerPolicyTargetPrototype): """ Identifies a load balancer pool by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ])) raise Exception(msg) -class LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect(LoadBalancerListenerPolicyTarget): +class LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect( + LoadBalancerListenerPolicyTarget): """ LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect. @@ -119319,17 +129450,23 @@ def __init__( self.uri = uri @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect': """Initialize a LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect object from a json dictionary.""" args = {} if (http_status_code := _dict.get('http_status_code')) is not None: args['http_status_code'] = http_status_code else: - raise ValueError('Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect JSON') + raise ValueError( + 'Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect JSON' + ) if (listener := _dict.get('listener')) is not None: args['listener'] = LoadBalancerListenerReference.from_dict(listener) else: - raise ValueError('Required property \'listener\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect JSON') + raise ValueError( + 'Required property \'listener\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect JSON' + ) if (uri := _dict.get('uri')) is not None: args['uri'] = uri return cls(**args) @@ -119342,7 +129479,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'listener') and self.listener is not None: if isinstance(self.listener, dict): @@ -119361,18 +129499,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(LoadBalancerListenerPolicyTarget): +class LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL( + LoadBalancerListenerPolicyTarget): """ LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL. @@ -119396,17 +129541,23 @@ def __init__( self.url = url @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL': """Initialize a LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL object from a json dictionary.""" args = {} if (http_status_code := _dict.get('http_status_code')) is not None: args['http_status_code'] = http_status_code else: - raise ValueError('Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL JSON') + raise ValueError( + 'Required property \'http_status_code\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL JSON' + ) if (url := _dict.get('url')) is not None: args['url'] = url else: - raise ValueError('Required property \'url\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL JSON') + raise ValueError( + 'Required property \'url\' not present in LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL JSON' + ) return cls(**args) @classmethod @@ -119417,7 +129568,8 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'http_status_code') and self.http_status_code is not None: + if hasattr(self, + 'http_status_code') and self.http_status_code is not None: _dict['http_status_code'] = self.http_status_code if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url @@ -119431,18 +129583,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetLoadBalancerPoolReference(LoadBalancerListenerPolicyTarget): +class LoadBalancerListenerPolicyTargetLoadBalancerPoolReference( + LoadBalancerListenerPolicyTarget): """ LoadBalancerListenerPolicyTargetLoadBalancerPoolReference. @@ -119482,23 +129641,32 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReference': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReference': """Initialize a LoadBalancerListenerPolicyTargetLoadBalancerPoolReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = LoadBalancerPoolReferenceDeleted.from_dict(deleted) + args['deleted'] = LoadBalancerPoolReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerPolicyTargetLoadBalancerPoolReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerPolicyTargetLoadBalancerPoolReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerPolicyTargetLoadBalancerPoolReference JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerPolicyTargetLoadBalancerPoolReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerListenerPolicyTargetLoadBalancerPoolReference JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerListenerPolicyTargetLoadBalancerPoolReference JSON' + ) return cls(**args) @classmethod @@ -119530,18 +129698,23 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetLoadBalancerPoolReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReference') -> bool: + def __eq__( + self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReference') -> bool: + def __ne__( + self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(LoadBalancerPoolIdentity): +class LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref( + LoadBalancerPoolIdentity): """ LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref. @@ -119561,13 +129734,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref': """Initialize a LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -119590,18 +129767,23 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref') -> bool: + def __eq__( + self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref') -> bool: + def __ne__( + self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerPoolIdentityLoadBalancerPoolIdentityById(LoadBalancerPoolIdentity): +class LoadBalancerPoolIdentityLoadBalancerPoolIdentityById( + LoadBalancerPoolIdentity): """ LoadBalancerPoolIdentityLoadBalancerPoolIdentityById. @@ -119621,13 +129803,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById': """Initialize a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPoolIdentityLoadBalancerPoolIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPoolIdentityLoadBalancerPoolIdentityById JSON' + ) return cls(**args) @classmethod @@ -119650,18 +129836,23 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerPoolIdentityLoadBalancerPoolIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById') -> bool: + def __eq__( + self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById') -> bool: + def __ne__( + self, other: 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerPoolMemberTargetPrototypeIP(LoadBalancerPoolMemberTargetPrototype): +class LoadBalancerPoolMemberTargetPrototypeIP( + LoadBalancerPoolMemberTargetPrototype): """ LoadBalancerPoolMemberTargetPrototypeIP. @@ -119687,13 +129878,16 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeIP': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeIP': """Initialize a LoadBalancerPoolMemberTargetPrototypeIP object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in LoadBalancerPoolMemberTargetPrototypeIP JSON') + raise ValueError( + 'Required property \'address\' not present in LoadBalancerPoolMemberTargetPrototypeIP JSON' + ) return cls(**args) @classmethod @@ -119727,23 +129921,25 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeIP') -> bool: return not self == other -class LoadBalancerPoolMemberTargetPrototypeInstanceIdentity(LoadBalancerPoolMemberTargetPrototype): +class LoadBalancerPoolMemberTargetPrototypeInstanceIdentity( + LoadBalancerPoolMemberTargetPrototype): """ Identifies a virtual server instance by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById', 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN', 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref']) - ) + ", ".join([ + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById', + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN', + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref' + ])) raise Exception(msg) @@ -119779,7 +129975,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in LoadBalancerPoolMemberTargetIP JSON') + raise ValueError( + 'Required property \'address\' not present in LoadBalancerPoolMemberTargetIP JSON' + ) return cls(**args) @classmethod @@ -119813,7 +130011,8 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetIP') -> bool: return not self == other -class LoadBalancerPoolMemberTargetInstanceReference(LoadBalancerPoolMemberTarget): +class LoadBalancerPoolMemberTargetInstanceReference(LoadBalancerPoolMemberTarget + ): """ LoadBalancerPoolMemberTargetInstanceReference. @@ -119856,27 +130055,37 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetInstanceReference': + def from_dict( + cls, + _dict: Dict) -> 'LoadBalancerPoolMemberTargetInstanceReference': """Initialize a LoadBalancerPoolMemberTargetInstanceReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = InstanceReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerPoolMemberTargetInstanceReference JSON' + ) return cls(**args) @classmethod @@ -119910,13 +130119,15 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerPoolMemberTargetInstanceReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerPoolMemberTargetInstanceReference') -> bool: + def __eq__(self, + other: 'LoadBalancerPoolMemberTargetInstanceReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerPoolMemberTargetInstanceReference') -> bool: + def __ne__(self, + other: 'LoadBalancerPoolMemberTargetInstanceReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -119947,7 +130158,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerProfileIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerProfileIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -120007,7 +130220,9 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in LoadBalancerProfileIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in LoadBalancerProfileIdentityByName JSON' + ) return cls(**args) @classmethod @@ -120041,7 +130256,8 @@ def __ne__(self, other: 'LoadBalancerProfileIdentityByName') -> bool: return not self == other -class LoadBalancerProfileInstanceGroupsSupportedDependent(LoadBalancerProfileInstanceGroupsSupported): +class LoadBalancerProfileInstanceGroupsSupportedDependent( + LoadBalancerProfileInstanceGroupsSupported): """ The instance groups support for a load balancer with this profile depends on its configuration. @@ -120062,13 +130278,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileInstanceGroupsSupportedDependent': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerProfileInstanceGroupsSupportedDependent': """Initialize a LoadBalancerProfileInstanceGroupsSupportedDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileInstanceGroupsSupportedDependent JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileInstanceGroupsSupportedDependent JSON' + ) return cls(**args) @classmethod @@ -120091,13 +130311,17 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerProfileInstanceGroupsSupportedDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerProfileInstanceGroupsSupportedDependent') -> bool: + def __eq__( + self, other: 'LoadBalancerProfileInstanceGroupsSupportedDependent' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerProfileInstanceGroupsSupportedDependent') -> bool: + def __ne__( + self, other: 'LoadBalancerProfileInstanceGroupsSupportedDependent' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -120109,8 +130333,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class LoadBalancerProfileInstanceGroupsSupportedFixed(LoadBalancerProfileInstanceGroupsSupported): +class LoadBalancerProfileInstanceGroupsSupportedFixed( + LoadBalancerProfileInstanceGroupsSupported): """ The instance groups support for a load balancer with this profile. @@ -120134,17 +130358,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileInstanceGroupsSupportedFixed': + def from_dict( + cls, + _dict: Dict) -> 'LoadBalancerProfileInstanceGroupsSupportedFixed': """Initialize a LoadBalancerProfileInstanceGroupsSupportedFixed object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileInstanceGroupsSupportedFixed JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileInstanceGroupsSupportedFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in LoadBalancerProfileInstanceGroupsSupportedFixed JSON') + raise ValueError( + 'Required property \'value\' not present in LoadBalancerProfileInstanceGroupsSupportedFixed JSON' + ) return cls(**args) @classmethod @@ -120169,13 +130399,17 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerProfileInstanceGroupsSupportedFixed object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerProfileInstanceGroupsSupportedFixed') -> bool: + def __eq__( + self, + other: 'LoadBalancerProfileInstanceGroupsSupportedFixed') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerProfileInstanceGroupsSupportedFixed') -> bool: + def __ne__( + self, + other: 'LoadBalancerProfileInstanceGroupsSupportedFixed') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -120187,8 +130421,8 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - -class LoadBalancerProfileRouteModeSupportedDependent(LoadBalancerProfileRouteModeSupported): +class LoadBalancerProfileRouteModeSupportedDependent( + LoadBalancerProfileRouteModeSupported): """ The route mode support for a load balancer with this profile depends on its configuration. @@ -120209,13 +130443,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileRouteModeSupportedDependent': + def from_dict( + cls, + _dict: Dict) -> 'LoadBalancerProfileRouteModeSupportedDependent': """Initialize a LoadBalancerProfileRouteModeSupportedDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileRouteModeSupportedDependent JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileRouteModeSupportedDependent JSON' + ) return cls(**args) @classmethod @@ -120238,13 +130476,15 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerProfileRouteModeSupportedDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerProfileRouteModeSupportedDependent') -> bool: + def __eq__(self, + other: 'LoadBalancerProfileRouteModeSupportedDependent') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerProfileRouteModeSupportedDependent') -> bool: + def __ne__(self, + other: 'LoadBalancerProfileRouteModeSupportedDependent') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -120256,8 +130496,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class LoadBalancerProfileRouteModeSupportedFixed(LoadBalancerProfileRouteModeSupported): +class LoadBalancerProfileRouteModeSupportedFixed( + LoadBalancerProfileRouteModeSupported): """ The route mode support for a load balancer with this profile. @@ -120281,17 +130521,22 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileRouteModeSupportedFixed': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerProfileRouteModeSupportedFixed': """Initialize a LoadBalancerProfileRouteModeSupportedFixed object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileRouteModeSupportedFixed JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileRouteModeSupportedFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in LoadBalancerProfileRouteModeSupportedFixed JSON') + raise ValueError( + 'Required property \'value\' not present in LoadBalancerProfileRouteModeSupportedFixed JSON' + ) return cls(**args) @classmethod @@ -120316,13 +130561,15 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerProfileRouteModeSupportedFixed object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerProfileRouteModeSupportedFixed') -> bool: + def __eq__(self, + other: 'LoadBalancerProfileRouteModeSupportedFixed') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerProfileRouteModeSupportedFixed') -> bool: + def __ne__(self, + other: 'LoadBalancerProfileRouteModeSupportedFixed') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -120334,8 +130581,8 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - -class LoadBalancerProfileSecurityGroupsSupportedDependent(LoadBalancerProfileSecurityGroupsSupported): +class LoadBalancerProfileSecurityGroupsSupportedDependent( + LoadBalancerProfileSecurityGroupsSupported): """ The security group support for a load balancer with this profile depends on its configuration. @@ -120356,13 +130603,17 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileSecurityGroupsSupportedDependent': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerProfileSecurityGroupsSupportedDependent': """Initialize a LoadBalancerProfileSecurityGroupsSupportedDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileSecurityGroupsSupportedDependent JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileSecurityGroupsSupportedDependent JSON' + ) return cls(**args) @classmethod @@ -120385,13 +130636,17 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerProfileSecurityGroupsSupportedDependent object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerProfileSecurityGroupsSupportedDependent') -> bool: + def __eq__( + self, other: 'LoadBalancerProfileSecurityGroupsSupportedDependent' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerProfileSecurityGroupsSupportedDependent') -> bool: + def __ne__( + self, other: 'LoadBalancerProfileSecurityGroupsSupportedDependent' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -120403,8 +130658,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - -class LoadBalancerProfileSecurityGroupsSupportedFixed(LoadBalancerProfileSecurityGroupsSupported): +class LoadBalancerProfileSecurityGroupsSupportedFixed( + LoadBalancerProfileSecurityGroupsSupported): """ The security group support for a load balancer with this profile. @@ -120428,17 +130683,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileSecurityGroupsSupportedFixed': + def from_dict( + cls, + _dict: Dict) -> 'LoadBalancerProfileSecurityGroupsSupportedFixed': """Initialize a LoadBalancerProfileSecurityGroupsSupportedFixed object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileSecurityGroupsSupportedFixed JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileSecurityGroupsSupportedFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in LoadBalancerProfileSecurityGroupsSupportedFixed JSON') + raise ValueError( + 'Required property \'value\' not present in LoadBalancerProfileSecurityGroupsSupportedFixed JSON' + ) return cls(**args) @classmethod @@ -120463,13 +130724,17 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerProfileSecurityGroupsSupportedFixed object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerProfileSecurityGroupsSupportedFixed') -> bool: + def __eq__( + self, + other: 'LoadBalancerProfileSecurityGroupsSupportedFixed') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerProfileSecurityGroupsSupportedFixed') -> bool: + def __ne__( + self, + other: 'LoadBalancerProfileSecurityGroupsSupportedFixed') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -120481,7 +130746,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class LoadBalancerProfileUDPSupportedDependent(LoadBalancerProfileUDPSupported): """ The UDP support for a load balancer with this profile depends on its configuration. @@ -120502,13 +130766,16 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileUDPSupportedDependent': + def from_dict(cls, + _dict: Dict) -> 'LoadBalancerProfileUDPSupportedDependent': """Initialize a LoadBalancerProfileUDPSupportedDependent object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileUDPSupportedDependent JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileUDPSupportedDependent JSON' + ) return cls(**args) @classmethod @@ -120549,7 +130816,6 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' - class LoadBalancerProfileUDPSupportedFixed(LoadBalancerProfileUDPSupported): """ The UDP support for a load balancer with this profile. @@ -120580,11 +130846,15 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileUDPSupportedFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in LoadBalancerProfileUDPSupportedFixed JSON') + raise ValueError( + 'Required property \'type\' not present in LoadBalancerProfileUDPSupportedFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in LoadBalancerProfileUDPSupportedFixed JSON') + raise ValueError( + 'Required property \'value\' not present in LoadBalancerProfileUDPSupportedFixed JSON' + ) return cls(**args) @classmethod @@ -120627,7 +130897,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class NetworkACLIdentityByCRN(NetworkACLIdentity): """ NetworkACLIdentityByCRN. @@ -120654,7 +130923,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in NetworkACLIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in NetworkACLIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -120714,7 +130985,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -120774,7 +131047,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLIdentityById JSON' + ) return cls(**args) @classmethod @@ -120828,7 +131103,8 @@ def __init__( *, name: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, - rules: Optional[List['NetworkACLRulePrototypeNetworkACLContext']] = None, + rules: Optional[ + List['NetworkACLRulePrototypeNetworkACLContext']] = None, ) -> None: """ Initialize a NetworkACLPrototypeNetworkACLByRules object. @@ -120860,9 +131136,14 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLPrototypeNetworkACLByRules': if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc else: - raise ValueError('Required property \'vpc\' not present in NetworkACLPrototypeNetworkACLByRules JSON') + raise ValueError( + 'Required property \'vpc\' not present in NetworkACLPrototypeNetworkACLByRules JSON' + ) if (rules := _dict.get('rules')) is not None: - args['rules'] = [NetworkACLRulePrototypeNetworkACLContext.from_dict(v) for v in rules] + args['rules'] = [ + NetworkACLRulePrototypeNetworkACLContext.from_dict(v) + for v in rules + ] return cls(**args) @classmethod @@ -120952,7 +131233,9 @@ def __init__( self.source_network_acl = source_network_acl @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLPrototypeNetworkACLBySourceNetworkACL': + def from_dict( + cls, + _dict: Dict) -> 'NetworkACLPrototypeNetworkACLBySourceNetworkACL': """Initialize a NetworkACLPrototypeNetworkACLBySourceNetworkACL object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -120962,11 +131245,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLPrototypeNetworkACLBySourceNetwork if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc else: - raise ValueError('Required property \'vpc\' not present in NetworkACLPrototypeNetworkACLBySourceNetworkACL JSON') + raise ValueError( + 'Required property \'vpc\' not present in NetworkACLPrototypeNetworkACLBySourceNetworkACL JSON' + ) if (source_network_acl := _dict.get('source_network_acl')) is not None: args['source_network_acl'] = source_network_acl else: - raise ValueError('Required property \'source_network_acl\' not present in NetworkACLPrototypeNetworkACLBySourceNetworkACL JSON') + raise ValueError( + 'Required property \'source_network_acl\' not present in NetworkACLPrototypeNetworkACLBySourceNetworkACL JSON' + ) return cls(**args) @classmethod @@ -120989,7 +131276,9 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'source_network_acl') and self.source_network_acl is not None: + if hasattr( + self, + 'source_network_acl') and self.source_network_acl is not None: if isinstance(self.source_network_acl, dict): _dict['source_network_acl'] = self.source_network_acl else: @@ -121004,18 +131293,23 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLPrototypeNetworkACLBySourceNetworkACL object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLPrototypeNetworkACLBySourceNetworkACL') -> bool: + def __eq__( + self, + other: 'NetworkACLPrototypeNetworkACLBySourceNetworkACL') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLPrototypeNetworkACLBySourceNetworkACL') -> bool: + def __ne__( + self, + other: 'NetworkACLPrototypeNetworkACLBySourceNetworkACL') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(NetworkACLRuleBeforePatch): +class NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref( + NetworkACLRuleBeforePatch): """ NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref. @@ -121035,13 +131329,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref': """Initialize a NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -121064,18 +131362,23 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref') -> bool: + def __eq__( + self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref') -> bool: + def __ne__( + self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class NetworkACLRuleBeforePatchNetworkACLRuleIdentityById(NetworkACLRuleBeforePatch): +class NetworkACLRuleBeforePatchNetworkACLRuleIdentityById( + NetworkACLRuleBeforePatch): """ NetworkACLRuleBeforePatchNetworkACLRuleIdentityById. @@ -121095,13 +131398,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById': """Initialize a NetworkACLRuleBeforePatchNetworkACLRuleIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleBeforePatchNetworkACLRuleIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleBeforePatchNetworkACLRuleIdentityById JSON' + ) return cls(**args) @classmethod @@ -121124,18 +131431,23 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleBeforePatchNetworkACLRuleIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById') -> bool: + def __eq__( + self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById') -> bool: + def __ne__( + self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(NetworkACLRuleBeforePrototype): +class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref( + NetworkACLRuleBeforePrototype): """ NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref. @@ -121155,13 +131467,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref': """Initialize a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -121184,18 +131500,23 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref') -> bool: + def __eq__( + self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref') -> bool: + def __ne__( + self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById(NetworkACLRuleBeforePrototype): +class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById( + NetworkACLRuleBeforePrototype): """ NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById. @@ -121215,13 +131536,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById': """Initialize a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById JSON' + ) return cls(**args) @classmethod @@ -121244,13 +131569,17 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById') -> bool: + def __eq__( + self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById') -> bool: + def __ne__( + self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -121326,51 +131655,72 @@ def __init__( self.protocol = protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolAll': + def from_dict(cls, + _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolAll': """Initialize a NetworkACLRuleItemNetworkACLRuleProtocolAll object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = NetworkACLRuleReference.from_dict(before) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'ip_version\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRuleItemNetworkACLRuleProtocolAll JSON' + ) return cls(**args) @classmethod @@ -121416,13 +131766,15 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleItemNetworkACLRuleProtocolAll object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleItemNetworkACLRuleProtocolAll') -> bool: + def __eq__(self, + other: 'NetworkACLRuleItemNetworkACLRuleProtocolAll') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleItemNetworkACLRuleProtocolAll') -> bool: + def __ne__(self, + other: 'NetworkACLRuleItemNetworkACLRuleProtocolAll') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -121434,7 +131786,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -121443,7 +131794,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -121451,7 +131801,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -121460,7 +131809,6 @@ class ProtocolEnum(str, Enum): ALL = 'all' - class NetworkACLRuleItemNetworkACLRuleProtocolICMP(NetworkACLRuleItem): """ NetworkACLRuleItemNetworkACLRuleProtocolICMP. @@ -121544,53 +131892,74 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolICMP': + def from_dict( + cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolICMP': """Initialize a NetworkACLRuleItemNetworkACLRuleProtocolICMP object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = NetworkACLRuleReference.from_dict(before) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'ip_version\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (code := _dict.get('code')) is not None: args['code'] = code if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRuleItemNetworkACLRuleProtocolICMP JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type return cls(**args) @@ -121642,13 +132011,15 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleItemNetworkACLRuleProtocolICMP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleItemNetworkACLRuleProtocolICMP') -> bool: + def __eq__(self, + other: 'NetworkACLRuleItemNetworkACLRuleProtocolICMP') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleItemNetworkACLRuleProtocolICMP') -> bool: + def __ne__(self, + other: 'NetworkACLRuleItemNetworkACLRuleProtocolICMP') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -121660,7 +132031,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -121669,7 +132039,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -121677,7 +132046,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -121686,7 +132054,6 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' - class NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP(NetworkACLRuleItem): """ NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP. @@ -121782,67 +132149,99 @@ def __init__( self.source_port_min = source_port_min @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP': + def from_dict( + cls, + _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP': """Initialize a NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = NetworkACLRuleReference.from_dict(before) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'ip_version\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') - if (destination_port_max := _dict.get('destination_port_max')) is not None: + raise ValueError( + 'Required property \'source\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) + if (destination_port_max := + _dict.get('destination_port_max')) is not None: args['destination_port_max'] = destination_port_max else: - raise ValueError('Required property \'destination_port_max\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') - if (destination_port_min := _dict.get('destination_port_min')) is not None: + raise ValueError( + 'Required property \'destination_port_max\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) + if (destination_port_min := + _dict.get('destination_port_min')) is not None: args['destination_port_min'] = destination_port_min else: - raise ValueError('Required property \'destination_port_min\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'destination_port_min\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (source_port_max := _dict.get('source_port_max')) is not None: args['source_port_max'] = source_port_max else: - raise ValueError('Required property \'source_port_max\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'source_port_max\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) if (source_port_min := _dict.get('source_port_min')) is not None: args['source_port_min'] = source_port_min else: - raise ValueError('Required property \'source_port_min\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'source_port_min\' not present in NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP JSON' + ) return cls(**args) @classmethod @@ -121876,15 +132275,19 @@ def to_dict(self) -> Dict: _dict['name'] = self.name if hasattr(self, 'source') and self.source is not None: _dict['source'] = self.source - if hasattr(self, 'destination_port_max') and self.destination_port_max is not None: + if hasattr(self, 'destination_port_max' + ) and self.destination_port_max is not None: _dict['destination_port_max'] = self.destination_port_max - if hasattr(self, 'destination_port_min') and self.destination_port_min is not None: + if hasattr(self, 'destination_port_min' + ) and self.destination_port_min is not None: _dict['destination_port_min'] = self.destination_port_min if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'source_port_max') and self.source_port_max is not None: + if hasattr(self, + 'source_port_max') and self.source_port_max is not None: _dict['source_port_max'] = self.source_port_max - if hasattr(self, 'source_port_min') and self.source_port_min is not None: + if hasattr(self, + 'source_port_min') and self.source_port_min is not None: _dict['source_port_min'] = self.source_port_min return _dict @@ -121896,13 +132299,15 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP') -> bool: + def __eq__(self, + other: 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP') -> bool: + def __ne__(self, + other: 'NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -121914,7 +132319,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -121923,7 +132327,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -121931,7 +132334,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -121941,8 +132343,8 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - -class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype(NetworkACLRulePrototypeNetworkACLContext): +class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype( + NetworkACLRulePrototypeNetworkACLContext): """ NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype. @@ -121995,21 +132397,29 @@ def __init__( self.protocol = protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype': """Initialize a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (name := _dict.get('name')) is not None: @@ -122017,11 +132427,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetw if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype JSON' + ) return cls(**args) @classmethod @@ -122056,13 +132470,19 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype') -> bool: + def __eq__( + self, other: + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype') -> bool: + def __ne__( + self, other: + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -122074,7 +132494,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -122083,7 +132502,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -122091,7 +132509,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -122100,8 +132517,8 @@ class ProtocolEnum(str, Enum): ALL = 'all' - -class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype(NetworkACLRulePrototypeNetworkACLContext): +class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype( + NetworkACLRulePrototypeNetworkACLContext): """ NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype. @@ -122168,21 +132585,29 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype': """Initialize a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (name := _dict.get('name')) is not None: @@ -122190,13 +132615,17 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetw if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON' + ) if (code := _dict.get('code')) is not None: args['code'] = code if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type return cls(**args) @@ -122237,13 +132666,19 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype') -> bool: + def __eq__( + self, other: + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype') -> bool: + def __ne__( + self, other: + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -122255,7 +132690,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -122264,7 +132698,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -122272,7 +132705,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -122281,8 +132713,8 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' - -class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype(NetworkACLRulePrototypeNetworkACLContext): +class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype( + NetworkACLRulePrototypeNetworkACLContext): """ NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype. @@ -122359,21 +132791,29 @@ def __init__( self.source_port_min = source_port_min @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype': """Initialize a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (name := _dict.get('name')) is not None: @@ -122381,15 +132821,21 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetw if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON') - if (destination_port_max := _dict.get('destination_port_max')) is not None: + raise ValueError( + 'Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) + if (destination_port_max := + _dict.get('destination_port_max')) is not None: args['destination_port_max'] = destination_port_max - if (destination_port_min := _dict.get('destination_port_min')) is not None: + if (destination_port_min := + _dict.get('destination_port_min')) is not None: args['destination_port_min'] = destination_port_min if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (source_port_max := _dict.get('source_port_max')) is not None: args['source_port_max'] = source_port_max if (source_port_min := _dict.get('source_port_min')) is not None: @@ -122416,15 +132862,19 @@ def to_dict(self) -> Dict: _dict['name'] = self.name if hasattr(self, 'source') and self.source is not None: _dict['source'] = self.source - if hasattr(self, 'destination_port_max') and self.destination_port_max is not None: + if hasattr(self, 'destination_port_max' + ) and self.destination_port_max is not None: _dict['destination_port_max'] = self.destination_port_max - if hasattr(self, 'destination_port_min') and self.destination_port_min is not None: + if hasattr(self, 'destination_port_min' + ) and self.destination_port_min is not None: _dict['destination_port_min'] = self.destination_port_min if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'source_port_max') and self.source_port_max is not None: + if hasattr(self, + 'source_port_max') and self.source_port_max is not None: _dict['source_port_max'] = self.source_port_max - if hasattr(self, 'source_port_min') and self.source_port_min is not None: + if hasattr(self, + 'source_port_min') and self.source_port_min is not None: _dict['source_port_min'] = self.source_port_min return _dict @@ -122436,13 +132886,19 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype') -> bool: + def __eq__( + self, other: + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype') -> bool: + def __ne__( + self, other: + 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -122454,7 +132910,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -122463,7 +132918,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -122471,7 +132925,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -122481,8 +132934,8 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - -class NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(NetworkACLRulePrototype): +class NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype( + NetworkACLRulePrototype): """ NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype. @@ -122539,23 +132992,31 @@ def __init__( self.protocol = protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype': """Initialize a NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = before if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (name := _dict.get('name')) is not None: @@ -122563,11 +133024,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtoco if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype JSON' + ) return cls(**args) @classmethod @@ -122607,13 +133072,17 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype') -> bool: + def __eq__( + self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype') -> bool: + def __ne__( + self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -122625,7 +133094,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -122634,7 +133102,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -122642,7 +133109,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -122651,8 +133117,8 @@ class ProtocolEnum(str, Enum): ALL = 'all' - -class NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype(NetworkACLRulePrototype): +class NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype( + NetworkACLRulePrototype): """ NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype. @@ -122723,23 +133189,31 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype': """Initialize a NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = before if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (name := _dict.get('name')) is not None: @@ -122747,13 +133221,17 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtoco if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON' + ) if (code := _dict.get('code')) is not None: args['code'] = code if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type return cls(**args) @@ -122799,13 +133277,19 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype') -> bool: + def __eq__( + self, + other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype') -> bool: + def __ne__( + self, + other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -122817,7 +133301,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -122826,7 +133309,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -122834,7 +133316,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -122843,8 +133324,8 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' - -class NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype(NetworkACLRulePrototype): +class NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype( + NetworkACLRulePrototype): """ NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype. @@ -122925,23 +133406,31 @@ def __init__( self.source_port_min = source_port_min @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype': """Initialize a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = before if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (name := _dict.get('name')) is not None: @@ -122949,15 +133438,21 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtoco if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON') - if (destination_port_max := _dict.get('destination_port_max')) is not None: + raise ValueError( + 'Required property \'source\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) + if (destination_port_max := + _dict.get('destination_port_max')) is not None: args['destination_port_max'] = destination_port_max - if (destination_port_min := _dict.get('destination_port_min')) is not None: + if (destination_port_min := + _dict.get('destination_port_min')) is not None: args['destination_port_min'] = destination_port_min if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype JSON' + ) if (source_port_max := _dict.get('source_port_max')) is not None: args['source_port_max'] = source_port_max if (source_port_min := _dict.get('source_port_min')) is not None: @@ -122989,15 +133484,19 @@ def to_dict(self) -> Dict: _dict['name'] = self.name if hasattr(self, 'source') and self.source is not None: _dict['source'] = self.source - if hasattr(self, 'destination_port_max') and self.destination_port_max is not None: + if hasattr(self, 'destination_port_max' + ) and self.destination_port_max is not None: _dict['destination_port_max'] = self.destination_port_max - if hasattr(self, 'destination_port_min') and self.destination_port_min is not None: + if hasattr(self, 'destination_port_min' + ) and self.destination_port_min is not None: _dict['destination_port_min'] = self.destination_port_min if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'source_port_max') and self.source_port_max is not None: + if hasattr(self, + 'source_port_max') and self.source_port_max is not None: _dict['source_port_max'] = self.source_port_max - if hasattr(self, 'source_port_min') and self.source_port_min is not None: + if hasattr(self, + 'source_port_min') and self.source_port_min is not None: _dict['source_port_min'] = self.source_port_min return _dict @@ -123009,13 +133508,19 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype') -> bool: + def __eq__( + self, + other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype') -> bool: + def __ne__( + self, + other: 'NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -123027,7 +133532,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -123036,7 +133540,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -123044,7 +133547,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -123054,7 +133556,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class NetworkACLRuleNetworkACLRuleProtocolAll(NetworkACLRule): """ NetworkACLRuleNetworkACLRuleProtocolAll. @@ -123124,51 +133625,72 @@ def __init__( self.protocol = protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolAll': + def from_dict(cls, + _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolAll': """Initialize a NetworkACLRuleNetworkACLRuleProtocolAll object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = NetworkACLRuleReference.from_dict(before) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'ip_version\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRuleNetworkACLRuleProtocolAll JSON' + ) return cls(**args) @classmethod @@ -123232,7 +133754,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -123241,7 +133762,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -123249,7 +133769,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -123258,7 +133777,6 @@ class ProtocolEnum(str, Enum): ALL = 'all' - class NetworkACLRuleNetworkACLRuleProtocolICMP(NetworkACLRule): """ NetworkACLRuleNetworkACLRuleProtocolICMP. @@ -123340,53 +133858,74 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolICMP': + def from_dict(cls, + _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolICMP': """Initialize a NetworkACLRuleNetworkACLRuleProtocolICMP object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = NetworkACLRuleReference.from_dict(before) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'ip_version\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'source\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (code := _dict.get('code')) is not None: args['code'] = code if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRuleNetworkACLRuleProtocolICMP JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type return cls(**args) @@ -123456,7 +133995,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -123465,7 +134003,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -123473,7 +134010,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -123482,7 +134018,6 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' - class NetworkACLRuleNetworkACLRuleProtocolTCPUDP(NetworkACLRule): """ NetworkACLRuleNetworkACLRuleProtocolTCPUDP. @@ -123576,67 +134111,98 @@ def __init__( self.source_port_min = source_port_min @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP': + def from_dict(cls, + _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP': """Initialize a NetworkACLRuleNetworkACLRuleProtocolTCPUDP object from a json dictionary.""" args = {} if (action := _dict.get('action')) is not None: args['action'] = action else: - raise ValueError('Required property \'action\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'action\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (before := _dict.get('before')) is not None: args['before'] = NetworkACLRuleReference.from_dict(before) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'created_at\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (destination := _dict.get('destination')) is not None: args['destination'] = destination else: - raise ValueError('Required property \'destination\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'destination\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'direction\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'ip_version\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'name\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (source := _dict.get('source')) is not None: args['source'] = source else: - raise ValueError('Required property \'source\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') - if (destination_port_max := _dict.get('destination_port_max')) is not None: + raise ValueError( + 'Required property \'source\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) + if (destination_port_max := + _dict.get('destination_port_max')) is not None: args['destination_port_max'] = destination_port_max else: - raise ValueError('Required property \'destination_port_max\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') - if (destination_port_min := _dict.get('destination_port_min')) is not None: + raise ValueError( + 'Required property \'destination_port_max\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) + if (destination_port_min := + _dict.get('destination_port_min')) is not None: args['destination_port_min'] = destination_port_min else: - raise ValueError('Required property \'destination_port_min\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'destination_port_min\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'protocol\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (source_port_max := _dict.get('source_port_max')) is not None: args['source_port_max'] = source_port_max else: - raise ValueError('Required property \'source_port_max\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'source_port_max\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) if (source_port_min := _dict.get('source_port_min')) is not None: args['source_port_min'] = source_port_min else: - raise ValueError('Required property \'source_port_min\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'source_port_min\' not present in NetworkACLRuleNetworkACLRuleProtocolTCPUDP JSON' + ) return cls(**args) @classmethod @@ -123670,15 +134236,19 @@ def to_dict(self) -> Dict: _dict['name'] = self.name if hasattr(self, 'source') and self.source is not None: _dict['source'] = self.source - if hasattr(self, 'destination_port_max') and self.destination_port_max is not None: + if hasattr(self, 'destination_port_max' + ) and self.destination_port_max is not None: _dict['destination_port_max'] = self.destination_port_max - if hasattr(self, 'destination_port_min') and self.destination_port_min is not None: + if hasattr(self, 'destination_port_min' + ) and self.destination_port_min is not None: _dict['destination_port_min'] = self.destination_port_min if hasattr(self, 'protocol') and self.protocol is not None: _dict['protocol'] = self.protocol - if hasattr(self, 'source_port_max') and self.source_port_max is not None: + if hasattr(self, + 'source_port_max') and self.source_port_max is not None: _dict['source_port_max'] = self.source_port_max - if hasattr(self, 'source_port_min') and self.source_port_min is not None: + if hasattr(self, + 'source_port_min') and self.source_port_min is not None: _dict['source_port_min'] = self.source_port_min return _dict @@ -123690,13 +134260,15 @@ def __str__(self) -> str: """Return a `str` version of this NetworkACLRuleNetworkACLRuleProtocolTCPUDP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP') -> bool: + def __eq__(self, + other: 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP') -> bool: + def __ne__(self, + other: 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -123708,7 +134280,6 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' - class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -123717,7 +134288,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -123725,7 +134295,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -123735,28 +134304,29 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - -class NetworkInterfaceIPPrototypeReservedIPIdentity(NetworkInterfaceIPPrototype): +class NetworkInterfaceIPPrototypeReservedIPIdentity(NetworkInterfaceIPPrototype + ): """ Identifies a reserved IP by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a NetworkInterfaceIPPrototypeReservedIPIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['NetworkInterfaceIPPrototypeReservedIPIdentityById', 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref']) - ) + ", ".join([ + 'NetworkInterfaceIPPrototypeReservedIPIdentityById', + 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref' + ])) raise Exception(msg) -class NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext(NetworkInterfaceIPPrototype): +class NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext( + NetworkInterfaceIPPrototype): """ NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext. @@ -123801,7 +134371,9 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext': """Initialize a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: @@ -123836,13 +134408,19 @@ def __str__(self) -> str: """Return a `str` version of this NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext') -> bool: + def __eq__( + self, other: + 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext') -> bool: + def __ne__( + self, other: + 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -123873,7 +134451,9 @@ def from_dict(cls, _dict: Dict) -> 'OperatingSystemIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in OperatingSystemIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in OperatingSystemIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -123933,7 +134513,9 @@ def from_dict(cls, _dict: Dict) -> 'OperatingSystemIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in OperatingSystemIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in OperatingSystemIdentityByName JSON' + ) return cls(**args) @classmethod @@ -123967,27 +134549,31 @@ def __ne__(self, other: 'OperatingSystemIdentityByName') -> bool: return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentity(PublicGatewayFloatingIPPrototype): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentity( + PublicGatewayFloatingIPPrototype): """ Identifies a floating IP by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress']) - ) + ", ".join([ + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById', + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN', + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref', + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress' + ])) raise Exception(msg) -class PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(PublicGatewayFloatingIPPrototype): +class PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext( + PublicGatewayFloatingIPPrototype): """ PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext. @@ -124022,7 +134608,9 @@ def __init__( self.resource_group = resource_group @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext': """Initialize a PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -124056,13 +134644,19 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext') -> bool: + def __eq__( + self, + other: 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext') -> bool: + def __ne__( + self, + other: 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -124087,13 +134681,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityByCRN': + def from_dict( + cls, + _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityByCRN': """Initialize a PublicGatewayIdentityPublicGatewayIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in PublicGatewayIdentityPublicGatewayIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in PublicGatewayIdentityPublicGatewayIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -124116,13 +134714,17 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayIdentityPublicGatewayIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityByCRN') -> bool: + def __eq__( + self, + other: 'PublicGatewayIdentityPublicGatewayIdentityByCRN') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityByCRN') -> bool: + def __ne__( + self, + other: 'PublicGatewayIdentityPublicGatewayIdentityByCRN') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -124147,13 +134749,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityByHref': + def from_dict( + cls, + _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityByHref': """Initialize a PublicGatewayIdentityPublicGatewayIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PublicGatewayIdentityPublicGatewayIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in PublicGatewayIdentityPublicGatewayIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -124176,13 +134782,17 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayIdentityPublicGatewayIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityByHref') -> bool: + def __eq__( + self, + other: 'PublicGatewayIdentityPublicGatewayIdentityByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityByHref') -> bool: + def __ne__( + self, + other: 'PublicGatewayIdentityPublicGatewayIdentityByHref') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -124207,13 +134817,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityById': + def from_dict( + cls, + _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityById': """Initialize a PublicGatewayIdentityPublicGatewayIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in PublicGatewayIdentityPublicGatewayIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in PublicGatewayIdentityPublicGatewayIdentityById JSON' + ) return cls(**args) @classmethod @@ -124236,13 +134850,15 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayIdentityPublicGatewayIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityById') -> bool: + def __eq__(self, + other: 'PublicGatewayIdentityPublicGatewayIdentityById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityById') -> bool: + def __ne__(self, + other: 'PublicGatewayIdentityPublicGatewayIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -124273,7 +134889,9 @@ def from_dict(cls, _dict: Dict) -> 'RegionIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RegionIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in RegionIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -124333,7 +134951,9 @@ def from_dict(cls, _dict: Dict) -> 'RegionIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RegionIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in RegionIdentityByName JSON' + ) return cls(**args) @classmethod @@ -124393,7 +135013,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservationIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservationIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -124453,7 +135075,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservationIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ReservationIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -124513,7 +135137,9 @@ def from_dict(cls, _dict: Dict) -> 'ReservationIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservationIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in ReservationIdentityById JSON' + ) return cls(**args) @classmethod @@ -124547,47 +135173,52 @@ def __ne__(self, other: 'ReservationIdentityById') -> bool: return not self == other -class ReservedIPTargetPrototypeEndpointGatewayIdentity(ReservedIPTargetPrototype): +class ReservedIPTargetPrototypeEndpointGatewayIdentity(ReservedIPTargetPrototype + ): """ ReservedIPTargetPrototypeEndpointGatewayIdentity. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById', 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN', 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref']) - ) + ", ".join([ + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById', + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN', + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref' + ])) raise Exception(msg) -class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity(ReservedIPTargetPrototype): +class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity( + ReservedIPTargetPrototype): """ Identifies a virtual network interface by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN']) - ) + ", ".join([ + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ])) raise Exception(msg) -class ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext(ReservedIPTarget): +class ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext( + ReservedIPTarget): """ ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext. @@ -124618,7 +135249,8 @@ def __init__( name: str, resource_type: str, *, - deleted: Optional['BareMetalServerNetworkInterfaceReferenceTargetContextDeleted'] = None, + deleted: Optional[ + 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted'] = None, ) -> None: """ Initialize a ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext object. @@ -124653,27 +135285,39 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext': """Initialize a ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict(deleted) + args[ + 'deleted'] = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) return cls(**args) @classmethod @@ -124707,13 +135351,19 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -124725,7 +135375,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class ReservedIPTargetEndpointGatewayReference(ReservedIPTarget): """ ReservedIPTargetEndpointGatewayReference. @@ -124773,31 +135422,42 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetEndpointGatewayReference': + def from_dict(cls, + _dict: Dict) -> 'ReservedIPTargetEndpointGatewayReference': """Initialize a ReservedIPTargetEndpointGatewayReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetEndpointGatewayReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = EndpointGatewayReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetEndpointGatewayReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetEndpointGatewayReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPTargetEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPTargetEndpointGatewayReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetEndpointGatewayReference JSON' + ) return cls(**args) @classmethod @@ -124851,7 +135511,6 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' - class ReservedIPTargetGenericResourceReference(ReservedIPTarget): """ Identifying information for a resource that is not native to the VPC API. @@ -124885,19 +135544,24 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetGenericResourceReference': + def from_dict(cls, + _dict: Dict) -> 'ReservedIPTargetGenericResourceReference': """Initialize a ReservedIPTargetGenericResourceReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetGenericResourceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetGenericResourceReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = GenericResourceReferenceDeleted.from_dict(deleted) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetGenericResourceReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetGenericResourceReference JSON' + ) return cls(**args) @classmethod @@ -124945,7 +135609,6 @@ class ResourceTypeEnum(str, Enum): CLOUD_RESOURCE = 'cloud_resource' - class ReservedIPTargetLoadBalancerReference(ReservedIPTarget): """ ReservedIPTargetLoadBalancerReference. @@ -124999,25 +135662,35 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetLoadBalancerReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetLoadBalancerReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetLoadBalancerReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = LoadBalancerReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetLoadBalancerReference JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetLoadBalancerReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetLoadBalancerReference JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetLoadBalancerReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPTargetLoadBalancerReference JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPTargetLoadBalancerReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetLoadBalancerReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetLoadBalancerReference JSON' + ) return cls(**args) @classmethod @@ -125071,7 +135744,6 @@ class ResourceTypeEnum(str, Enum): LOAD_BALANCER = 'load_balancer' - class ReservedIPTargetNetworkInterfaceReferenceTargetContext(ReservedIPTarget): """ ReservedIPTargetNetworkInterfaceReferenceTargetContext. @@ -125102,7 +135774,8 @@ def __init__( name: str, resource_type: str, *, - deleted: Optional['NetworkInterfaceReferenceTargetContextDeleted'] = None, + deleted: Optional[ + 'NetworkInterfaceReferenceTargetContextDeleted'] = None, ) -> None: """ Initialize a ReservedIPTargetNetworkInterfaceReferenceTargetContext object. @@ -125134,27 +135807,39 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetNetworkInterfaceReferenceTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetNetworkInterfaceReferenceTargetContext': """Initialize a ReservedIPTargetNetworkInterfaceReferenceTargetContext object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = NetworkInterfaceReferenceTargetContextDeleted.from_dict(deleted) + args[ + 'deleted'] = NetworkInterfaceReferenceTargetContextDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetNetworkInterfaceReferenceTargetContext JSON' + ) return cls(**args) @classmethod @@ -125188,13 +135873,17 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetNetworkInterfaceReferenceTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetNetworkInterfaceReferenceTargetContext') -> bool: + def __eq__( + self, other: 'ReservedIPTargetNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetNetworkInterfaceReferenceTargetContext') -> bool: + def __ne__( + self, other: 'ReservedIPTargetNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -125206,7 +135895,6 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - class ReservedIPTargetVPNGatewayReference(ReservedIPTarget): """ ReservedIPTargetVPNGatewayReference. @@ -125260,25 +135948,35 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetVPNGatewayReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetVPNGatewayReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetVPNGatewayReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VPNGatewayReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetVPNGatewayReference JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetVPNGatewayReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetVPNGatewayReference JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetVPNGatewayReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPTargetVPNGatewayReference JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPTargetVPNGatewayReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetVPNGatewayReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetVPNGatewayReference JSON' + ) return cls(**args) @classmethod @@ -125332,7 +136030,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' - class ReservedIPTargetVPNServerReference(ReservedIPTarget): """ ReservedIPTargetVPNServerReference. @@ -125386,25 +136083,35 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetVPNServerReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetVPNServerReference JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetVPNServerReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VPNServerReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetVPNServerReference JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetVPNServerReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetVPNServerReference JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetVPNServerReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPTargetVPNServerReference JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPTargetVPNServerReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetVPNServerReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetVPNServerReference JSON' + ) return cls(**args) @classmethod @@ -125458,8 +136165,8 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' - -class ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext(ReservedIPTarget): +class ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext( + ReservedIPTarget): """ ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext. @@ -125497,29 +136204,41 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext': """Initialize a ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON') + raise ValueError( + 'Required property \'name\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext JSON' + ) return cls(**args) @classmethod @@ -125550,13 +136269,19 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -125568,7 +136293,6 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' - class ResourceGroupIdentityById(ResourceGroupIdentity): """ ResourceGroupIdentityById. @@ -125595,7 +136319,9 @@ def from_dict(cls, _dict: Dict) -> 'ResourceGroupIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ResourceGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in ResourceGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -125682,25 +136408,35 @@ def from_dict(cls, _dict: Dict) -> 'RouteCreatorVPNGatewayReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in RouteCreatorVPNGatewayReference JSON') + raise ValueError( + 'Required property \'crn\' not present in RouteCreatorVPNGatewayReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VPNGatewayReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteCreatorVPNGatewayReference JSON') + raise ValueError( + 'Required property \'href\' not present in RouteCreatorVPNGatewayReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RouteCreatorVPNGatewayReference JSON') + raise ValueError( + 'Required property \'id\' not present in RouteCreatorVPNGatewayReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RouteCreatorVPNGatewayReference JSON') + raise ValueError( + 'Required property \'name\' not present in RouteCreatorVPNGatewayReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in RouteCreatorVPNGatewayReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in RouteCreatorVPNGatewayReference JSON' + ) return cls(**args) @classmethod @@ -125754,7 +136490,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' - class RouteCreatorVPNServerReference(RouteCreator): """ RouteCreatorVPNServerReference. @@ -125808,25 +136543,35 @@ def from_dict(cls, _dict: Dict) -> 'RouteCreatorVPNServerReference': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in RouteCreatorVPNServerReference JSON') + raise ValueError( + 'Required property \'crn\' not present in RouteCreatorVPNServerReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VPNServerReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteCreatorVPNServerReference JSON') + raise ValueError( + 'Required property \'href\' not present in RouteCreatorVPNServerReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RouteCreatorVPNServerReference JSON') + raise ValueError( + 'Required property \'id\' not present in RouteCreatorVPNServerReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RouteCreatorVPNServerReference JSON') + raise ValueError( + 'Required property \'name\' not present in RouteCreatorVPNServerReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in RouteCreatorVPNServerReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in RouteCreatorVPNServerReference JSON' + ) return cls(**args) @classmethod @@ -125880,7 +136625,6 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' - class RouteNextHopIP(RouteNextHop): """ RouteNextHopIP. @@ -125913,7 +136657,9 @@ def from_dict(cls, _dict: Dict) -> 'RouteNextHopIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in RouteNextHopIP JSON') + raise ValueError( + 'Required property \'address\' not present in RouteNextHopIP JSON' + ) return cls(**args) @classmethod @@ -125953,17 +136699,17 @@ class RouteNextHopPatchRouteNextHopIP(RouteNextHopPatch): """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RouteNextHopPatchRouteNextHopIP object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP', 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP']) - ) + ", ".join([ + 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP', + 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP' + ])) raise Exception(msg) @@ -125973,17 +136719,17 @@ class RouteNextHopPatchVPNGatewayConnectionIdentity(RouteNextHopPatch): """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RouteNextHopPatchVPNGatewayConnectionIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref']) - ) + ", ".join([ + 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', + 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' + ])) raise Exception(msg) @@ -126031,27 +136777,37 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'RouteNextHopVPNGatewayConnectionReference': + def from_dict(cls, + _dict: Dict) -> 'RouteNextHopVPNGatewayConnectionReference': """Initialize a RouteNextHopVPNGatewayConnectionReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VPNGatewayConnectionReferenceDeleted.from_dict(deleted) + args['deleted'] = VPNGatewayConnectionReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteNextHopVPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'href\' not present in RouteNextHopVPNGatewayConnectionReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RouteNextHopVPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'id\' not present in RouteNextHopVPNGatewayConnectionReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in RouteNextHopVPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'name\' not present in RouteNextHopVPNGatewayConnectionReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in RouteNextHopVPNGatewayConnectionReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in RouteNextHopVPNGatewayConnectionReference JSON' + ) return cls(**args) @classmethod @@ -126085,13 +136841,15 @@ def __str__(self) -> str: """Return a `str` version of this RouteNextHopVPNGatewayConnectionReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RouteNextHopVPNGatewayConnectionReference') -> bool: + def __eq__(self, + other: 'RouteNextHopVPNGatewayConnectionReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RouteNextHopVPNGatewayConnectionReference') -> bool: + def __ne__(self, + other: 'RouteNextHopVPNGatewayConnectionReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -126103,44 +136861,45 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' - -class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP(RoutePrototypeNextHop): +class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP( + RoutePrototypeNextHop): """ RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP', 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP']) - ) + ", ".join([ + 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP', + 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP' + ])) raise Exception(msg) -class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity(RoutePrototypeNextHop): +class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity( + RoutePrototypeNextHop): """ Identifies a VPN gateway connection by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref']) - ) + ", ".join([ + 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', + 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' + ])) raise Exception(msg) @@ -126170,7 +136929,9 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTableIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RoutingTableIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in RoutingTableIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -126230,7 +136991,9 @@ def from_dict(cls, _dict: Dict) -> 'RoutingTableIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RoutingTableIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in RoutingTableIdentityById JSON' + ) return cls(**args) @classmethod @@ -126290,7 +137053,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -126350,7 +137115,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -126410,7 +137177,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -126476,7 +137245,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleLocalPatchCIDR': if (cidr_block := _dict.get('cidr_block')) is not None: args['cidr_block'] = cidr_block else: - raise ValueError('Required property \'cidr_block\' not present in SecurityGroupRuleLocalPatchCIDR JSON') + raise ValueError( + 'Required property \'cidr_block\' not present in SecurityGroupRuleLocalPatchCIDR JSON' + ) return cls(**args) @classmethod @@ -126542,7 +137313,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleLocalPatchIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in SecurityGroupRuleLocalPatchIP JSON') + raise ValueError( + 'Required property \'address\' not present in SecurityGroupRuleLocalPatchIP JSON' + ) return cls(**args) @classmethod @@ -126608,7 +137381,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleLocalPrototypeCIDR': if (cidr_block := _dict.get('cidr_block')) is not None: args['cidr_block'] = cidr_block else: - raise ValueError('Required property \'cidr_block\' not present in SecurityGroupRuleLocalPrototypeCIDR JSON') + raise ValueError( + 'Required property \'cidr_block\' not present in SecurityGroupRuleLocalPrototypeCIDR JSON' + ) return cls(**args) @classmethod @@ -126674,7 +137449,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleLocalPrototypeIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in SecurityGroupRuleLocalPrototypeIP JSON') + raise ValueError( + 'Required property \'address\' not present in SecurityGroupRuleLocalPrototypeIP JSON' + ) return cls(**args) @classmethod @@ -126740,7 +137517,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleLocalCIDR': if (cidr_block := _dict.get('cidr_block')) is not None: args['cidr_block'] = cidr_block else: - raise ValueError('Required property \'cidr_block\' not present in SecurityGroupRuleLocalCIDR JSON') + raise ValueError( + 'Required property \'cidr_block\' not present in SecurityGroupRuleLocalCIDR JSON' + ) return cls(**args) @classmethod @@ -126806,7 +137585,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleLocalIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in SecurityGroupRuleLocalIP JSON') + raise ValueError( + 'Required property \'address\' not present in SecurityGroupRuleLocalIP JSON' + ) return cls(**args) @classmethod @@ -126840,7 +137621,8 @@ def __ne__(self, other: 'SecurityGroupRuleLocalIP') -> bool: return not self == other -class SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(SecurityGroupRulePrototype): +class SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll( + SecurityGroupRulePrototype): """ A rule allowing traffic for all supported protocols. @@ -126914,13 +137696,17 @@ def __init__( self.remote = remote @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll': """Initialize a SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll object from a json dictionary.""" args = {} if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'direction\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (local := _dict.get('local')) is not None: @@ -126928,7 +137714,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototypeSecurityGroupRuleP if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'protocol\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = remote return cls(**args) @@ -126967,13 +137755,17 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll') -> bool: + def __eq__( + self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll') -> bool: + def __ne__( + self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -126985,7 +137777,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -126998,7 +137789,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -127007,8 +137797,8 @@ class ProtocolEnum(str, Enum): ALL = 'all' - -class SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP(SecurityGroupRulePrototype): +class SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP( + SecurityGroupRulePrototype): """ A rule specifying the ICMP traffic to allow. @@ -127096,7 +137886,9 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP': """Initialize a SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP object from a json dictionary.""" args = {} if (code := _dict.get('code')) is not None: @@ -127104,7 +137896,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototypeSecurityGroupRuleP if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'direction\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (local := _dict.get('local')) is not None: @@ -127112,7 +137906,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototypeSecurityGroupRuleP if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'protocol\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = remote if (type := _dict.get('type')) is not None: @@ -127157,13 +137953,17 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP') -> bool: + def __eq__( + self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP') -> bool: + def __ne__( + self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -127175,7 +137975,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -127188,7 +137987,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -127197,8 +137995,8 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' - -class SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP(SecurityGroupRulePrototype): +class SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP( + SecurityGroupRulePrototype): """ A rule specifying the TCP or UDP traffic to allow. Either both `port_min` and `port_max` will be present, or neither. When neither is @@ -127300,13 +138098,17 @@ def __init__( self.remote = remote @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP': """Initialize a SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP object from a json dictionary.""" args = {} if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'direction\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version if (local := _dict.get('local')) is not None: @@ -127318,7 +138120,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototypeSecurityGroupRuleP if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'protocol\' not present in SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = remote return cls(**args) @@ -127361,13 +138165,17 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP') -> bool: + def __eq__( + self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP') -> bool: + def __ne__( + self, other: 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -127379,7 +138187,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -127392,7 +138199,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -127402,7 +138208,6 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - class SecurityGroupRuleRemotePatchCIDR(SecurityGroupRuleRemotePatch): """ SecurityGroupRuleRemotePatchCIDR. @@ -127435,7 +138240,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchCIDR': if (cidr_block := _dict.get('cidr_block')) is not None: args['cidr_block'] = cidr_block else: - raise ValueError('Required property \'cidr_block\' not present in SecurityGroupRuleRemotePatchCIDR JSON') + raise ValueError( + 'Required property \'cidr_block\' not present in SecurityGroupRuleRemotePatchCIDR JSON' + ) return cls(**args) @classmethod @@ -127501,7 +138308,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in SecurityGroupRuleRemotePatchIP JSON') + raise ValueError( + 'Required property \'address\' not present in SecurityGroupRuleRemotePatchIP JSON' + ) return cls(**args) @classmethod @@ -127535,23 +138344,25 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchIP') -> bool: return not self == other -class SecurityGroupRuleRemotePatchSecurityGroupIdentity(SecurityGroupRuleRemotePatch): +class SecurityGroupRuleRemotePatchSecurityGroupIdentity( + SecurityGroupRuleRemotePatch): """ Identifies a security group by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById', 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN', 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref']) - ) + ", ".join([ + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById', + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN', + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref' + ])) raise Exception(msg) @@ -127587,7 +138398,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePrototypeCIDR': if (cidr_block := _dict.get('cidr_block')) is not None: args['cidr_block'] = cidr_block else: - raise ValueError('Required property \'cidr_block\' not present in SecurityGroupRuleRemotePrototypeCIDR JSON') + raise ValueError( + 'Required property \'cidr_block\' not present in SecurityGroupRuleRemotePrototypeCIDR JSON' + ) return cls(**args) @classmethod @@ -127653,7 +138466,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePrototypeIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in SecurityGroupRuleRemotePrototypeIP JSON') + raise ValueError( + 'Required property \'address\' not present in SecurityGroupRuleRemotePrototypeIP JSON' + ) return cls(**args) @classmethod @@ -127687,23 +138502,25 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeIP') -> bool: return not self == other -class SecurityGroupRuleRemotePrototypeSecurityGroupIdentity(SecurityGroupRuleRemotePrototype): +class SecurityGroupRuleRemotePrototypeSecurityGroupIdentity( + SecurityGroupRuleRemotePrototype): """ Identifies a security group by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref']) - ) + ", ".join([ + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById', + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN', + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref' + ])) raise Exception(msg) @@ -127739,7 +138556,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemoteCIDR': if (cidr_block := _dict.get('cidr_block')) is not None: args['cidr_block'] = cidr_block else: - raise ValueError('Required property \'cidr_block\' not present in SecurityGroupRuleRemoteCIDR JSON') + raise ValueError( + 'Required property \'cidr_block\' not present in SecurityGroupRuleRemoteCIDR JSON' + ) return cls(**args) @classmethod @@ -127805,7 +138624,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemoteIP': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in SecurityGroupRuleRemoteIP JSON') + raise ValueError( + 'Required property \'address\' not present in SecurityGroupRuleRemoteIP JSON' + ) return cls(**args) @classmethod @@ -127882,27 +138703,37 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemoteSecurityGroupReference': + def from_dict( + cls, + _dict: Dict) -> 'SecurityGroupRuleRemoteSecurityGroupReference': """Initialize a SecurityGroupRuleRemoteSecurityGroupReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = SecurityGroupReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupRuleRemoteSecurityGroupReference JSON' + ) return cls(**args) @classmethod @@ -127936,13 +138767,15 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleRemoteSecurityGroupReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleRemoteSecurityGroupReference') -> bool: + def __eq__(self, + other: 'SecurityGroupRuleRemoteSecurityGroupReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleRemoteSecurityGroupReference') -> bool: + def __ne__(self, + other: 'SecurityGroupRuleRemoteSecurityGroupReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -128003,37 +138836,53 @@ def __init__( self.protocol = protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolAll': + def from_dict( + cls, + _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolAll': """Initialize a SecurityGroupRuleSecurityGroupRuleProtocolAll object from a json dictionary.""" args = {} if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'direction\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'ip_version\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON' + ) if (local := _dict.get('local')) is not None: args['local'] = local else: - raise ValueError('Required property \'local\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'local\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = remote else: - raise ValueError('Required property \'remote\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'remote\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON' + ) if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON') + raise ValueError( + 'Required property \'protocol\' not present in SecurityGroupRuleSecurityGroupRuleProtocolAll JSON' + ) return cls(**args) @classmethod @@ -128074,13 +138923,15 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleSecurityGroupRuleProtocolAll object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleSecurityGroupRuleProtocolAll') -> bool: + def __eq__(self, + other: 'SecurityGroupRuleSecurityGroupRuleProtocolAll') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleSecurityGroupRuleProtocolAll') -> bool: + def __ne__(self, + other: 'SecurityGroupRuleSecurityGroupRuleProtocolAll') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -128092,7 +138943,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -128105,7 +138955,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -128114,7 +138963,6 @@ class ProtocolEnum(str, Enum): ALL = 'all' - class SecurityGroupRuleSecurityGroupRuleProtocolICMP(SecurityGroupRule): """ A rule specifying the ICMP traffic to allow. @@ -128184,39 +139032,55 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolICMP': + def from_dict( + cls, + _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolICMP': """Initialize a SecurityGroupRuleSecurityGroupRuleProtocolICMP object from a json dictionary.""" args = {} if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'direction\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'ip_version\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON' + ) if (local := _dict.get('local')) is not None: args['local'] = local else: - raise ValueError('Required property \'local\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'local\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = remote else: - raise ValueError('Required property \'remote\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'remote\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON' + ) if (code := _dict.get('code')) is not None: args['code'] = code if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON') + raise ValueError( + 'Required property \'protocol\' not present in SecurityGroupRuleSecurityGroupRuleProtocolICMP JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type return cls(**args) @@ -128263,13 +139127,15 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleSecurityGroupRuleProtocolICMP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleSecurityGroupRuleProtocolICMP') -> bool: + def __eq__(self, + other: 'SecurityGroupRuleSecurityGroupRuleProtocolICMP') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleSecurityGroupRuleProtocolICMP') -> bool: + def __ne__(self, + other: 'SecurityGroupRuleSecurityGroupRuleProtocolICMP') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -128281,7 +139147,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -128294,7 +139159,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -128303,7 +139167,6 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' - class SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP(SecurityGroupRule): """ A rule specifying the TCP or UDP traffic to allow. @@ -128376,33 +139239,47 @@ def __init__( self.protocol = protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP': + def from_dict( + cls, + _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP': """Initialize a SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP object from a json dictionary.""" args = {} if (direction := _dict.get('direction')) is not None: args['direction'] = direction else: - raise ValueError('Required property \'direction\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'direction\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON' + ) if (ip_version := _dict.get('ip_version')) is not None: args['ip_version'] = ip_version else: - raise ValueError('Required property \'ip_version\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'ip_version\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON' + ) if (local := _dict.get('local')) is not None: args['local'] = local else: - raise ValueError('Required property \'local\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'local\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON' + ) if (remote := _dict.get('remote')) is not None: args['remote'] = remote else: - raise ValueError('Required property \'remote\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'remote\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON' + ) if (port_max := _dict.get('port_max')) is not None: args['port_max'] = port_max if (port_min := _dict.get('port_min')) is not None: @@ -128410,7 +139287,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolTC if (protocol := _dict.get('protocol')) is not None: args['protocol'] = protocol else: - raise ValueError('Required property \'protocol\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON') + raise ValueError( + 'Required property \'protocol\' not present in SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP JSON' + ) return cls(**args) @classmethod @@ -128455,13 +139334,17 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP') -> bool: + def __eq__( + self, + other: 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP') -> bool: + def __ne__( + self, + other: 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -128473,7 +139356,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class IpVersionEnum(str, Enum): """ The IP version to enforce. The format of `local.address`, `remote.address`, @@ -128486,7 +139368,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class ProtocolEnum(str, Enum): """ The protocol to enforce. @@ -128496,8 +139377,8 @@ class ProtocolEnum(str, Enum): UDP = 'udp' - -class SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext(SecurityGroupTargetReference): +class SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext( + SecurityGroupTargetReference): """ SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext. @@ -128528,7 +139409,8 @@ def __init__( name: str, resource_type: str, *, - deleted: Optional['BareMetalServerNetworkInterfaceReferenceTargetContextDeleted'] = None, + deleted: Optional[ + 'BareMetalServerNetworkInterfaceReferenceTargetContextDeleted'] = None, ) -> None: """ Initialize a SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext object. @@ -128563,27 +139445,39 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext': """Initialize a SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict(deleted) + args[ + 'deleted'] = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext JSON' + ) return cls(**args) @classmethod @@ -128617,13 +139511,19 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext') -> bool: + def __eq__( + self, other: + 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext') -> bool: + def __ne__( + self, other: + 'SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -128635,8 +139535,8 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - -class SecurityGroupTargetReferenceEndpointGatewayReference(SecurityGroupTargetReference): +class SecurityGroupTargetReferenceEndpointGatewayReference( + SecurityGroupTargetReference): """ SecurityGroupTargetReferenceEndpointGatewayReference. @@ -128683,31 +139583,43 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceEndpointGatewayReference': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupTargetReferenceEndpointGatewayReference': """Initialize a SecurityGroupTargetReferenceEndpointGatewayReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = EndpointGatewayReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SecurityGroupTargetReferenceEndpointGatewayReference JSON' + ) return cls(**args) @classmethod @@ -128743,13 +139655,17 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupTargetReferenceEndpointGatewayReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupTargetReferenceEndpointGatewayReference') -> bool: + def __eq__( + self, other: 'SecurityGroupTargetReferenceEndpointGatewayReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupTargetReferenceEndpointGatewayReference') -> bool: + def __ne__( + self, other: 'SecurityGroupTargetReferenceEndpointGatewayReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -128761,8 +139677,8 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' - -class SecurityGroupTargetReferenceLoadBalancerReference(SecurityGroupTargetReference): +class SecurityGroupTargetReferenceLoadBalancerReference( + SecurityGroupTargetReference): """ SecurityGroupTargetReferenceLoadBalancerReference. @@ -128809,31 +139725,43 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceLoadBalancerReference': + def from_dict( + cls, + _dict: Dict) -> 'SecurityGroupTargetReferenceLoadBalancerReference': """Initialize a SecurityGroupTargetReferenceLoadBalancerReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = LoadBalancerReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SecurityGroupTargetReferenceLoadBalancerReference JSON' + ) return cls(**args) @classmethod @@ -128869,13 +139797,17 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupTargetReferenceLoadBalancerReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupTargetReferenceLoadBalancerReference') -> bool: + def __eq__( + self, + other: 'SecurityGroupTargetReferenceLoadBalancerReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupTargetReferenceLoadBalancerReference') -> bool: + def __ne__( + self, + other: 'SecurityGroupTargetReferenceLoadBalancerReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -128887,8 +139819,8 @@ class ResourceTypeEnum(str, Enum): LOAD_BALANCER = 'load_balancer' - -class SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(SecurityGroupTargetReference): +class SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext( + SecurityGroupTargetReference): """ SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext. @@ -128918,7 +139850,8 @@ def __init__( name: str, resource_type: str, *, - deleted: Optional['NetworkInterfaceReferenceTargetContextDeleted'] = None, + deleted: Optional[ + 'NetworkInterfaceReferenceTargetContextDeleted'] = None, ) -> None: """ Initialize a SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext object. @@ -128950,27 +139883,39 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext': """Initialize a SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = NetworkInterfaceReferenceTargetContextDeleted.from_dict(deleted) + args[ + 'deleted'] = NetworkInterfaceReferenceTargetContextDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext JSON' + ) return cls(**args) @classmethod @@ -129004,13 +139949,19 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext') -> bool: + def __eq__( + self, other: + 'SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext') -> bool: + def __ne__( + self, other: + 'SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -129022,8 +139973,8 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' - -class SecurityGroupTargetReferenceVPNServerReference(SecurityGroupTargetReference): +class SecurityGroupTargetReferenceVPNServerReference( + SecurityGroupTargetReference): """ SecurityGroupTargetReferenceVPNServerReference. @@ -129070,31 +140021,43 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceVPNServerReference': + def from_dict( + cls, + _dict: Dict) -> 'SecurityGroupTargetReferenceVPNServerReference': """Initialize a SecurityGroupTargetReferenceVPNServerReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupTargetReferenceVPNServerReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupTargetReferenceVPNServerReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: args['deleted'] = VPNServerReferenceDeleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetReferenceVPNServerReference JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetReferenceVPNServerReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupTargetReferenceVPNServerReference JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupTargetReferenceVPNServerReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupTargetReferenceVPNServerReference JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupTargetReferenceVPNServerReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SecurityGroupTargetReferenceVPNServerReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SecurityGroupTargetReferenceVPNServerReference JSON' + ) return cls(**args) @classmethod @@ -129130,13 +140093,15 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupTargetReferenceVPNServerReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupTargetReferenceVPNServerReference') -> bool: + def __eq__(self, + other: 'SecurityGroupTargetReferenceVPNServerReference') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupTargetReferenceVPNServerReference') -> bool: + def __ne__(self, + other: 'SecurityGroupTargetReferenceVPNServerReference') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -129148,8 +140113,8 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' - -class SecurityGroupTargetReferenceVirtualNetworkInterfaceReference(SecurityGroupTargetReference): +class SecurityGroupTargetReferenceVirtualNetworkInterfaceReference( + SecurityGroupTargetReference): """ SecurityGroupTargetReferenceVirtualNetworkInterfaceReference. @@ -129207,39 +140172,56 @@ def __init__( self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference': """Initialize a SecurityGroupTargetReferenceVirtualNetworkInterfaceReference object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON' + ) if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = VirtualNetworkInterfaceReferenceDeleted.from_dict(deleted) + args['deleted'] = VirtualNetworkInterfaceReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'name\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON' + ) if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = ReservedIPReference.from_dict(primary_ip) else: - raise ValueError('Required property \'primary_ip\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'primary_ip\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON') + raise ValueError( + 'Required property \'subnet\' not present in SecurityGroupTargetReferenceVirtualNetworkInterfaceReference JSON' + ) return cls(**args) @classmethod @@ -129285,13 +140267,19 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupTargetReferenceVirtualNetworkInterfaceReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference') -> bool: + def __eq__( + self, + other: 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference') -> bool: + def __ne__( + self, + other: 'SecurityGroupTargetReferenceVirtualNetworkInterfaceReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -129303,6 +140291,248 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' +class ShareAccessorBindingAccessorShareReference(ShareAccessorBindingAccessor): + """ + ShareAccessorBindingAccessorShareReference. + + :param str crn: The CRN for this file share. + :param ShareReferenceDeleted deleted: (optional) If present, this property + indicates the referenced resource has been deleted, and provides + some supplementary information. + :param str href: The URL for this file share. + :param str id: The unique identifier for this file share. + :param str name: The name for this share. The name is unique across all shares + in the region. + :param ShareRemote remote: (optional) If present, this property indicates that + the resource associated with this reference + is remote and therefore may not be directly retrievable. + :param str resource_type: The resource type. + """ + + def __init__( + self, + crn: str, + href: str, + id: str, + name: str, + resource_type: str, + *, + deleted: Optional['ShareReferenceDeleted'] = None, + remote: Optional['ShareRemote'] = None, + ) -> None: + """ + Initialize a ShareAccessorBindingAccessorShareReference object. + + :param str crn: The CRN for this file share. + :param str href: The URL for this file share. + :param str id: The unique identifier for this file share. + :param str name: The name for this share. The name is unique across all + shares in the region. + :param str resource_type: The resource type. + :param ShareReferenceDeleted deleted: (optional) If present, this property + indicates the referenced resource has been deleted, and provides + some supplementary information. + :param ShareRemote remote: (optional) If present, this property indicates + that the resource associated with this reference + is remote and therefore may not be directly retrievable. + """ + # pylint: disable=super-init-not-called + self.crn = crn + self.deleted = deleted + self.href = href + self.id = id + self.name = name + self.remote = remote + self.resource_type = resource_type + + @classmethod + def from_dict(cls, + _dict: Dict) -> 'ShareAccessorBindingAccessorShareReference': + """Initialize a ShareAccessorBindingAccessorShareReference object from a json dictionary.""" + args = {} + if (crn := _dict.get('crn')) is not None: + args['crn'] = crn + else: + raise ValueError( + 'Required property \'crn\' not present in ShareAccessorBindingAccessorShareReference JSON' + ) + if (deleted := _dict.get('deleted')) is not None: + args['deleted'] = ShareReferenceDeleted.from_dict(deleted) + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError( + 'Required property \'href\' not present in ShareAccessorBindingAccessorShareReference JSON' + ) + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError( + 'Required property \'id\' not present in ShareAccessorBindingAccessorShareReference JSON' + ) + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError( + 'Required property \'name\' not present in ShareAccessorBindingAccessorShareReference JSON' + ) + if (remote := _dict.get('remote')) is not None: + args['remote'] = ShareRemote.from_dict(remote) + if (resource_type := _dict.get('resource_type')) is not None: + args['resource_type'] = resource_type + else: + raise ValueError( + 'Required property \'resource_type\' not present in ShareAccessorBindingAccessorShareReference JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareAccessorBindingAccessorShareReference object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn + if hasattr(self, 'deleted') and self.deleted is not None: + if isinstance(self.deleted, dict): + _dict['deleted'] = self.deleted + else: + _dict['deleted'] = self.deleted.to_dict() + if hasattr(self, 'href') and self.href is not None: + _dict['href'] = self.href + if hasattr(self, 'id') and self.id is not None: + _dict['id'] = self.id + if hasattr(self, 'name') and self.name is not None: + _dict['name'] = self.name + if hasattr(self, 'remote') and self.remote is not None: + if isinstance(self.remote, dict): + _dict['remote'] = self.remote + else: + _dict['remote'] = self.remote.to_dict() + if hasattr(self, 'resource_type') and self.resource_type is not None: + _dict['resource_type'] = self.resource_type + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareAccessorBindingAccessorShareReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, + other: 'ShareAccessorBindingAccessorShareReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, + other: 'ShareAccessorBindingAccessorShareReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + SHARE = 'share' + + +class ShareAccessorBindingAccessorWatsonxMachineLearningReference( + ShareAccessorBindingAccessor): + """ + ShareAccessorBindingAccessorWatsonxMachineLearningReference. + + :param str crn: The CRN for the watsonx machine learning resource. + :param str resource_type: The resource type. + """ + + def __init__( + self, + crn: str, + resource_type: str, + ) -> None: + """ + Initialize a ShareAccessorBindingAccessorWatsonxMachineLearningReference object. + + :param str crn: The CRN for the watsonx machine learning resource. + :param str resource_type: The resource type. + """ + # pylint: disable=super-init-not-called + self.crn = crn + self.resource_type = resource_type + + @classmethod + def from_dict( + cls, _dict: Dict + ) -> 'ShareAccessorBindingAccessorWatsonxMachineLearningReference': + """Initialize a ShareAccessorBindingAccessorWatsonxMachineLearningReference object from a json dictionary.""" + args = {} + if (crn := _dict.get('crn')) is not None: + args['crn'] = crn + else: + raise ValueError( + 'Required property \'crn\' not present in ShareAccessorBindingAccessorWatsonxMachineLearningReference JSON' + ) + if (resource_type := _dict.get('resource_type')) is not None: + args['resource_type'] = resource_type + else: + raise ValueError( + 'Required property \'resource_type\' not present in ShareAccessorBindingAccessorWatsonxMachineLearningReference JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareAccessorBindingAccessorWatsonxMachineLearningReference object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'crn') and self.crn is not None: + _dict['crn'] = self.crn + if hasattr(self, 'resource_type') and self.resource_type is not None: + _dict['resource_type'] = self.resource_type + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareAccessorBindingAccessorWatsonxMachineLearningReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__( + self, + other: 'ShareAccessorBindingAccessorWatsonxMachineLearningReference' + ) -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__( + self, + other: 'ShareAccessorBindingAccessorWatsonxMachineLearningReference' + ) -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + WATSONX_MACHINE_LEARNING = 'watsonx_machine_learning' + class ShareIdentityByCRN(ShareIdentity): """ @@ -129330,7 +140560,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ShareIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in ShareIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -129390,7 +140622,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ShareIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -129450,7 +140684,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ShareIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in ShareIdentityById JSON' + ) return cls(**args) @classmethod @@ -129484,13 +140720,15 @@ def __ne__(self, other: 'ShareIdentityById') -> bool: return not self == other -class ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(ShareMountTargetPrototype): +class ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup( + ShareMountTargetPrototype): """ The virtual network interface for this share mount target. The virtual network interface must: - be in the same `zone` as the share - have `allow_ip_spoofing` set to `false` - have `enable_infrastructure_nat` set to `true` + - have `protocol_state_filtering_mode` set to `auto` or `enabled` - not be in the same VPC as an existing mount target for this share - not have `ips` other than the `primary_ip` address If an existing virtual network interface is specified, it must not have a floating IP @@ -129505,13 +140743,16 @@ class ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup( - `user_managed`: Encrypted in transit using an instance identity certificate. The `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. :param ShareMountTargetVirtualNetworkInterfacePrototype virtual_network_interface: """ def __init__( self, - virtual_network_interface: 'ShareMountTargetVirtualNetworkInterfacePrototype', + virtual_network_interface: + 'ShareMountTargetVirtualNetworkInterfacePrototype', *, name: Optional[str] = None, transit_encryption: Optional[str] = None, @@ -129530,6 +140771,8 @@ def __init__( certificate. The `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. """ # pylint: disable=super-init-not-called self.name = name @@ -129537,17 +140780,22 @@ def __init__( self.virtual_network_interface = virtual_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup': + def from_dict( + cls, _dict: Dict + ) -> 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup': """Initialize a ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: args['name'] = name if (transit_encryption := _dict.get('transit_encryption')) is not None: args['transit_encryption'] = transit_encryption - if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: + if (virtual_network_interface := + _dict.get('virtual_network_interface')) is not None: args['virtual_network_interface'] = virtual_network_interface else: - raise ValueError('Required property \'virtual_network_interface\' not present in ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup JSON') + raise ValueError( + 'Required property \'virtual_network_interface\' not present in ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup JSON' + ) return cls(**args) @classmethod @@ -129560,13 +140808,19 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'transit_encryption') and self.transit_encryption is not None: + if hasattr( + self, + 'transit_encryption') and self.transit_encryption is not None: _dict['transit_encryption'] = self.transit_encryption - if hasattr(self, 'virtual_network_interface') and self.virtual_network_interface is not None: + if hasattr(self, 'virtual_network_interface' + ) and self.virtual_network_interface is not None: if isinstance(self.virtual_network_interface, dict): - _dict['virtual_network_interface'] = self.virtual_network_interface + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface else: - _dict['virtual_network_interface'] = self.virtual_network_interface.to_dict() + _dict[ + 'virtual_network_interface'] = self.virtual_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -129577,121 +140831,19 @@ def __str__(self) -> str: """Return a `str` version of this ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup') -> bool: - """Return `true` when self and other are equal, false otherwise.""" - if not isinstance(other, self.__class__): - return False - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup') -> bool: - """Return `true` when self and other are not equal, false otherwise.""" - return not self == other - - class TransitEncryptionEnum(str, Enum): - """ - The transit encryption mode to use for this share mount target: - - `none`: Not encrypted in transit. - - `user_managed`: Encrypted in transit using an instance identity certificate. - The - `access_control_mode` for the share must be `security_group`. - """ - - NONE = 'none' - USER_MANAGED = 'user_managed' - - - -class ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(ShareMountTargetPrototype): - """ - The VPC in which clients can mount the file share using this mount target. The VPC - must not be used by another mount target for this share. - Required if the share's `access_control_mode` is `vpc`. - - :param str name: (optional) The name for this share mount target. The name must - not be used by another mount target for the file share. - :param str transit_encryption: (optional) The transit encryption mode to use for - this share mount target: - - `none`: Not encrypted in transit. - - `user_managed`: Encrypted in transit using an instance identity certificate. - The - `access_control_mode` for the share must be `security_group`. - :param VPCIdentity vpc: Identifies a VPC by a unique property. - """ - - def __init__( - self, - vpc: 'VPCIdentity', - *, - name: Optional[str] = None, - transit_encryption: Optional[str] = None, - ) -> None: - """ - Initialize a ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object. - - :param VPCIdentity vpc: Identifies a VPC by a unique property. - :param str name: (optional) The name for this share mount target. The name - must not be used by another mount target for the file share. - :param str transit_encryption: (optional) The transit encryption mode to - use for this share mount target: - - `none`: Not encrypted in transit. - - `user_managed`: Encrypted in transit using an instance identity - certificate. The - `access_control_mode` for the share must be - `security_group`. - """ - # pylint: disable=super-init-not-called - self.name = name - self.transit_encryption = transit_encryption - self.vpc = vpc - - @classmethod - def from_dict(cls, _dict: Dict) -> 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC': - """Initialize a ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object from a json dictionary.""" - args = {} - if (name := _dict.get('name')) is not None: - args['name'] = name - if (transit_encryption := _dict.get('transit_encryption')) is not None: - args['transit_encryption'] = transit_encryption - if (vpc := _dict.get('vpc')) is not None: - args['vpc'] = vpc - else: - raise ValueError('Required property \'vpc\' not present in ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC JSON') - return cls(**args) - - @classmethod - def _from_dict(cls, _dict): - """Initialize a ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object from a json dictionary.""" - return cls.from_dict(_dict) - - def to_dict(self) -> Dict: - """Return a json dictionary representing this model.""" - _dict = {} - if hasattr(self, 'name') and self.name is not None: - _dict['name'] = self.name - if hasattr(self, 'transit_encryption') and self.transit_encryption is not None: - _dict['transit_encryption'] = self.transit_encryption - if hasattr(self, 'vpc') and self.vpc is not None: - if isinstance(self.vpc, dict): - _dict['vpc'] = self.vpc - else: - _dict['vpc'] = self.vpc.to_dict() - return _dict - - def _to_dict(self): - """Return a json dictionary representing this model.""" - return self.to_dict() - - def __str__(self) -> str: - """Return a `str` version of this ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object.""" - return json.dumps(self.to_dict(), indent=2) - - def __eq__(self, other: 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC') -> bool: + def __eq__( + self, other: + 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC') -> bool: + def __ne__( + self, other: + 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -129702,34 +140854,164 @@ class TransitEncryptionEnum(str, Enum): - `user_managed`: Encrypted in transit using an instance identity certificate. The `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. """ NONE = 'none' USER_MANAGED = 'user_managed' - -class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity(ShareMountTargetVirtualNetworkInterfacePrototype): +class ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC( + ShareMountTargetPrototype): """ - Identifies a virtual network interface by a unique property. + The VPC in which clients can mount the file share using this mount target. The VPC + must not be used by another mount target for this share. + Required if the share's `access_control_mode` is `vpc`. + :param str name: (optional) The name for this share mount target. The name must + not be used by another mount target for the file share. + :param str transit_encryption: (optional) The transit encryption mode to use for + this share mount target: + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The + `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. + :param VPCIdentity vpc: Identifies a VPC by a unique property. """ def __init__( self, + vpc: 'VPCIdentity', + *, + name: Optional[str] = None, + transit_encryption: Optional[str] = None, ) -> None: + """ + Initialize a ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object. + + :param VPCIdentity vpc: Identifies a VPC by a unique property. + :param str name: (optional) The name for this share mount target. The name + must not be used by another mount target for the file share. + :param str transit_encryption: (optional) The transit encryption mode to + use for this share mount target: + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity + certificate. The + `access_control_mode` for the share must be + `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. + """ + # pylint: disable=super-init-not-called + self.name = name + self.transit_encryption = transit_encryption + self.vpc = vpc + + @classmethod + def from_dict( + cls, _dict: Dict + ) -> 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC': + """Initialize a ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object from a json dictionary.""" + args = {} + if (name := _dict.get('name')) is not None: + args['name'] = name + if (transit_encryption := _dict.get('transit_encryption')) is not None: + args['transit_encryption'] = transit_encryption + if (vpc := _dict.get('vpc')) is not None: + args['vpc'] = vpc + else: + raise ValueError( + 'Required property \'vpc\' not present in ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'name') and self.name is not None: + _dict['name'] = self.name + if hasattr( + self, + 'transit_encryption') and self.transit_encryption is not None: + _dict['transit_encryption'] = self.transit_encryption + if hasattr(self, 'vpc') and self.vpc is not None: + if isinstance(self.vpc, dict): + _dict['vpc'] = self.vpc + else: + _dict['vpc'] = self.vpc.to_dict() + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__( + self, + other: 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC' + ) -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__( + self, + other: 'ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC' + ) -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class TransitEncryptionEnum(str, Enum): + """ + The transit encryption mode to use for this share mount target: + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The + `access_control_mode` for the share must be `security_group`. + The specified value must be listed in the share's + `allowed_transit_encryption_modes`. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' + + +class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity( + ShareMountTargetVirtualNetworkInterfacePrototype): + """ + Identifies a virtual network interface by a unique property. + + """ + + def __init__(self,) -> None: """ Initialize a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN']) - ) + ", ".join([ + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref', + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ])) raise Exception(msg) -class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext(ShareMountTargetVirtualNetworkInterfacePrototype): +class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext( + ShareMountTargetVirtualNetworkInterfacePrototype): """ The virtual network interface for this target. @@ -129774,6 +141056,18 @@ class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePro be available on the virtual network interface's subnet. If no address is specified, an available address on the subnet will be automatically selected and reserved. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. :param ResourceGroupIdentity resource_group: (optional) The resource group to use for this virtual network interface. If unspecified, the share's resource group will be used. @@ -129793,7 +141087,9 @@ def __init__( enable_infrastructure_nat: Optional[bool] = None, ips: Optional[List['VirtualNetworkInterfaceIPPrototype']] = None, name: Optional[str] = None, - primary_ip: Optional['VirtualNetworkInterfacePrimaryIPPrototype'] = None, + primary_ip: Optional[ + 'VirtualNetworkInterfacePrimaryIPPrototype'] = None, + protocol_state_filtering_mode: Optional[str] = None, resource_group: Optional['ResourceGroupIdentity'] = None, security_groups: Optional[List['SecurityGroupIdentity']] = None, subnet: Optional['SubnetIdentity'] = None, @@ -129847,6 +141143,18 @@ def __init__( specified, an available address on the subnet will be automatically selected and reserved. + :param str protocol_state_filtering_mode: (optional) The protocol state + filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on + the current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. :param ResourceGroupIdentity resource_group: (optional) The resource group to use for this virtual network interface. If unspecified, the share's resource group will be used. @@ -129864,19 +141172,23 @@ def __init__( self.ips = ips self.name = name self.primary_ip = primary_ip + self.protocol_state_filtering_mode = protocol_state_filtering_mode self.resource_group = resource_group self.security_groups = security_groups self.subnet = subnet @classmethod - def from_dict(cls, _dict: Dict) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext': + def from_dict( + cls, _dict: Dict + ) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext': """Initialize a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext object from a json dictionary.""" args = {} if (allow_ip_spoofing := _dict.get('allow_ip_spoofing')) is not None: args['allow_ip_spoofing'] = allow_ip_spoofing if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete - if (enable_infrastructure_nat := _dict.get('enable_infrastructure_nat')) is not None: + if (enable_infrastructure_nat := + _dict.get('enable_infrastructure_nat')) is not None: args['enable_infrastructure_nat'] = enable_infrastructure_nat if (ips := _dict.get('ips')) is not None: args['ips'] = ips @@ -129884,6 +141196,10 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetVirtualNetworkInterfaceProto args['name'] = name if (primary_ip := _dict.get('primary_ip')) is not None: args['primary_ip'] = primary_ip + if (protocol_state_filtering_mode := + _dict.get('protocol_state_filtering_mode')) is not None: + args[ + 'protocol_state_filtering_mode'] = protocol_state_filtering_mode if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (security_groups := _dict.get('security_groups')) is not None: @@ -129900,11 +141216,13 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: + if hasattr(self, + 'allow_ip_spoofing') and self.allow_ip_spoofing is not None: _dict['allow_ip_spoofing'] = self.allow_ip_spoofing if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete - if hasattr(self, 'enable_infrastructure_nat') and self.enable_infrastructure_nat is not None: + if hasattr(self, 'enable_infrastructure_nat' + ) and self.enable_infrastructure_nat is not None: _dict['enable_infrastructure_nat'] = self.enable_infrastructure_nat if hasattr(self, 'ips') and self.ips is not None: ips_list = [] @@ -129921,12 +141239,17 @@ def to_dict(self) -> Dict: _dict['primary_ip'] = self.primary_ip else: _dict['primary_ip'] = self.primary_ip.to_dict() + if hasattr(self, 'protocol_state_filtering_mode' + ) and self.protocol_state_filtering_mode is not None: + _dict[ + 'protocol_state_filtering_mode'] = self.protocol_state_filtering_mode if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'security_groups') and self.security_groups is not None: + if hasattr(self, + 'security_groups') and self.security_groups is not None: security_groups_list = [] for v in self.security_groups: if isinstance(v, dict): @@ -129949,16 +141272,41 @@ def __str__(self) -> str: """Return a `str` version of this ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext') -> bool: + def __eq__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext') -> bool: + def __ne__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ProtocolStateFilteringModeEnum(str, Enum): + """ + The protocol state filtering mode to use for this virtual network interface. If + `auto`, protocol state packet filtering is enabled or disabled based on the + virtual network interface's `target` resource type: + - `bare_metal_server_network_attachment`: disabled + - `instance_network_attachment`: enabled + - `share_mount_target`: enabled + Protocol state filtering monitors each network connection flowing over this + virtual network interface, and drops any packets that are invalid based on the + current connection state and protocol. See [Protocol state filtering + mode](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) + for more information. + """ + + AUTO = 'auto' + DISABLED = 'disabled' + ENABLED = 'enabled' + class ShareProfileCapacityDependentRange(ShareProfileCapacity): """ @@ -129999,19 +141347,27 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileCapacityDependentRange': if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in ShareProfileCapacityDependentRange JSON') + raise ValueError( + 'Required property \'max\' not present in ShareProfileCapacityDependentRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in ShareProfileCapacityDependentRange JSON') + raise ValueError( + 'Required property \'min\' not present in ShareProfileCapacityDependentRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in ShareProfileCapacityDependentRange JSON') + raise ValueError( + 'Required property \'step\' not present in ShareProfileCapacityDependentRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileCapacityDependentRange JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileCapacityDependentRange JSON' + ) return cls(**args) @classmethod @@ -130059,7 +141415,6 @@ class TypeEnum(str, Enum): DEPENDENT_RANGE = 'dependent_range' - class ShareProfileCapacityEnum(ShareProfileCapacity): """ The permitted total capacities (in gigabytes) of a share with this profile. @@ -130094,15 +141449,21 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileCapacityEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in ShareProfileCapacityEnum JSON') + raise ValueError( + 'Required property \'default\' not present in ShareProfileCapacityEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileCapacityEnum JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileCapacityEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in ShareProfileCapacityEnum JSON') + raise ValueError( + 'Required property \'values\' not present in ShareProfileCapacityEnum JSON' + ) return cls(**args) @classmethod @@ -130147,7 +141508,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class ShareProfileCapacityFixed(ShareProfileCapacity): """ The permitted total capacity (in gigabytes) of a share with this profile is fixed. @@ -130178,11 +141538,15 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileCapacityFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileCapacityFixed JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileCapacityFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in ShareProfileCapacityFixed JSON') + raise ValueError( + 'Required property \'value\' not present in ShareProfileCapacityFixed JSON' + ) return cls(**args) @classmethod @@ -130225,7 +141589,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class ShareProfileCapacityRange(ShareProfileCapacity): """ The permitted total capacity range (in gigabytes) of a share with this profile. @@ -130268,23 +141631,33 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileCapacityRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in ShareProfileCapacityRange JSON') + raise ValueError( + 'Required property \'default\' not present in ShareProfileCapacityRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in ShareProfileCapacityRange JSON') + raise ValueError( + 'Required property \'max\' not present in ShareProfileCapacityRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in ShareProfileCapacityRange JSON') + raise ValueError( + 'Required property \'min\' not present in ShareProfileCapacityRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in ShareProfileCapacityRange JSON') + raise ValueError( + 'Required property \'step\' not present in ShareProfileCapacityRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileCapacityRange JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileCapacityRange JSON' + ) return cls(**args) @classmethod @@ -130333,7 +141706,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class ShareProfileIOPSDependentRange(ShareProfileIOPS): """ The permitted IOPS range of a share with this profile depends on its configuration. @@ -130372,19 +141744,27 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileIOPSDependentRange': if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in ShareProfileIOPSDependentRange JSON') + raise ValueError( + 'Required property \'max\' not present in ShareProfileIOPSDependentRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in ShareProfileIOPSDependentRange JSON') + raise ValueError( + 'Required property \'min\' not present in ShareProfileIOPSDependentRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in ShareProfileIOPSDependentRange JSON') + raise ValueError( + 'Required property \'step\' not present in ShareProfileIOPSDependentRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileIOPSDependentRange JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileIOPSDependentRange JSON' + ) return cls(**args) @classmethod @@ -130432,7 +141812,6 @@ class TypeEnum(str, Enum): DEPENDENT_RANGE = 'dependent_range' - class ShareProfileIOPSEnum(ShareProfileIOPS): """ The permitted IOPS values of a share with this profile. @@ -130467,15 +141846,21 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileIOPSEnum': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in ShareProfileIOPSEnum JSON') + raise ValueError( + 'Required property \'default\' not present in ShareProfileIOPSEnum JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileIOPSEnum JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileIOPSEnum JSON' + ) if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError('Required property \'values\' not present in ShareProfileIOPSEnum JSON') + raise ValueError( + 'Required property \'values\' not present in ShareProfileIOPSEnum JSON' + ) return cls(**args) @classmethod @@ -130520,7 +141905,6 @@ class TypeEnum(str, Enum): ENUM = 'enum' - class ShareProfileIOPSFixed(ShareProfileIOPS): """ The permitted IOPS of a share with this profile is fixed. @@ -130551,11 +141935,15 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileIOPSFixed': if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileIOPSFixed JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileIOPSFixed JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in ShareProfileIOPSFixed JSON') + raise ValueError( + 'Required property \'value\' not present in ShareProfileIOPSFixed JSON' + ) return cls(**args) @classmethod @@ -130598,7 +141986,6 @@ class TypeEnum(str, Enum): FIXED = 'fixed' - class ShareProfileIOPSRange(ShareProfileIOPS): """ The permitted IOPS range of a share with this profile. @@ -130641,23 +142028,33 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileIOPSRange': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError('Required property \'default\' not present in ShareProfileIOPSRange JSON') + raise ValueError( + 'Required property \'default\' not present in ShareProfileIOPSRange JSON' + ) if (max := _dict.get('max')) is not None: args['max'] = max else: - raise ValueError('Required property \'max\' not present in ShareProfileIOPSRange JSON') + raise ValueError( + 'Required property \'max\' not present in ShareProfileIOPSRange JSON' + ) if (min := _dict.get('min')) is not None: args['min'] = min else: - raise ValueError('Required property \'min\' not present in ShareProfileIOPSRange JSON') + raise ValueError( + 'Required property \'min\' not present in ShareProfileIOPSRange JSON' + ) if (step := _dict.get('step')) is not None: args['step'] = step else: - raise ValueError('Required property \'step\' not present in ShareProfileIOPSRange JSON') + raise ValueError( + 'Required property \'step\' not present in ShareProfileIOPSRange JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in ShareProfileIOPSRange JSON') + raise ValueError( + 'Required property \'type\' not present in ShareProfileIOPSRange JSON' + ) return cls(**args) @classmethod @@ -130706,7 +142103,6 @@ class TypeEnum(str, Enum): RANGE = 'range' - class ShareProfileIdentityByHref(ShareProfileIdentity): """ ShareProfileIdentityByHref. @@ -130733,7 +142129,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareProfileIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ShareProfileIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -130793,7 +142191,9 @@ def from_dict(cls, _dict: Dict) -> 'ShareProfileIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ShareProfileIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in ShareProfileIdentityByName JSON' + ) return cls(**args) @classmethod @@ -130827,28 +142227,186 @@ def __ne__(self, other: 'ShareProfileIdentityByName') -> bool: return not self == other +class SharePrototypeShareByOriginShare(SharePrototype): + """ + Create an accessor file share for an existing file share. The values for + `initial_owner`, + `access_control_mode`, `encryption_key`, `zone`, `profile`, `iops` and `size` will be + inherited from `origin_share`. + + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. + :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount + targets for the file share. Each mount target must be in a unique VPC. + :param str name: (optional) The name for this share. The name must not be used + by another share in the region. If unspecified, the name will be a hyphenated + list of randomly-selected words. + :param SharePrototypeShareContext replica_share: (optional) + :param List[str] user_tags: (optional) Tags for this resource. + :param ShareIdentity origin_share: The origin share for the accessor share. The + origin share must have an + `access_control_mode` of `security_group`, and must not have an + `accessor_binding_role` of `accessor`. + The specified share may be in a different account, subject to IAM policies. + """ + + def __init__( + self, + origin_share: 'ShareIdentity', + *, + allowed_transit_encryption_modes: Optional[List[str]] = None, + mount_targets: Optional[List['ShareMountTargetPrototype']] = None, + name: Optional[str] = None, + replica_share: Optional['SharePrototypeShareContext'] = None, + user_tags: Optional[List[str]] = None, + ) -> None: + """ + Initialize a SharePrototypeShareByOriginShare object. + + :param ShareIdentity origin_share: The origin share for the accessor share. + The origin share must have an + `access_control_mode` of `security_group`, and must not have an + `accessor_binding_role` of `accessor`. + The specified share may be in a different account, subject to IAM policies. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. + :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount + targets for the file share. Each mount target must be in a unique VPC. + :param str name: (optional) The name for this share. The name must not be + used by another share in the region. If unspecified, the name will be a + hyphenated list of randomly-selected words. + :param SharePrototypeShareContext replica_share: (optional) + :param List[str] user_tags: (optional) Tags for this resource. + """ + # pylint: disable=super-init-not-called + self.allowed_transit_encryption_modes = allowed_transit_encryption_modes + self.mount_targets = mount_targets + self.name = name + self.replica_share = replica_share + self.user_tags = user_tags + self.origin_share = origin_share + + @classmethod + def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareByOriginShare': + """Initialize a SharePrototypeShareByOriginShare object from a json dictionary.""" + args = {} + if (allowed_transit_encryption_modes := + _dict.get('allowed_transit_encryption_modes')) is not None: + args[ + 'allowed_transit_encryption_modes'] = allowed_transit_encryption_modes + if (mount_targets := _dict.get('mount_targets')) is not None: + args['mount_targets'] = mount_targets + if (name := _dict.get('name')) is not None: + args['name'] = name + if (replica_share := _dict.get('replica_share')) is not None: + args['replica_share'] = SharePrototypeShareContext.from_dict( + replica_share) + if (user_tags := _dict.get('user_tags')) is not None: + args['user_tags'] = user_tags + if (origin_share := _dict.get('origin_share')) is not None: + args['origin_share'] = origin_share + else: + raise ValueError( + 'Required property \'origin_share\' not present in SharePrototypeShareByOriginShare JSON' + ) + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a SharePrototypeShareByOriginShare object from a json dictionary.""" + return cls.from_dict(_dict) + + def to_dict(self) -> Dict: + """Return a json dictionary representing this model.""" + _dict = {} + if hasattr(self, 'allowed_transit_encryption_modes' + ) and self.allowed_transit_encryption_modes is not None: + _dict[ + 'allowed_transit_encryption_modes'] = self.allowed_transit_encryption_modes + if hasattr(self, 'mount_targets') and self.mount_targets is not None: + mount_targets_list = [] + for v in self.mount_targets: + if isinstance(v, dict): + mount_targets_list.append(v) + else: + mount_targets_list.append(v.to_dict()) + _dict['mount_targets'] = mount_targets_list + if hasattr(self, 'name') and self.name is not None: + _dict['name'] = self.name + if hasattr(self, 'replica_share') and self.replica_share is not None: + if isinstance(self.replica_share, dict): + _dict['replica_share'] = self.replica_share + else: + _dict['replica_share'] = self.replica_share.to_dict() + if hasattr(self, 'user_tags') and self.user_tags is not None: + _dict['user_tags'] = self.user_tags + if hasattr(self, 'origin_share') and self.origin_share is not None: + if isinstance(self.origin_share, dict): + _dict['origin_share'] = self.origin_share + else: + _dict['origin_share'] = self.origin_share.to_dict() + return _dict + + def _to_dict(self): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this SharePrototypeShareByOriginShare object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'SharePrototypeShareByOriginShare') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'SharePrototypeShareByOriginShare') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class AllowedTransitEncryptionModesEnum(str, Enum): + """ + An allowed transit encryption mode for this share. + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' + + class SharePrototypeShareBySize(SharePrototype): """ Create a file share by size. - :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The share must be in the `defined_performance` - profile family, and the value must be in the range supported by the share's - specified size. - In addition, each client accessing the share will be restricted to 48,000 IOPS. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount targets for the file share. Each mount target must be in a unique VPC. :param str name: (optional) The name for this share. The name must not be used by another share in the region. If unspecified, the name will be a hyphenated list of randomly-selected words. - :param ShareProfileIdentity profile: The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use - for this file share. The profile must support the share's specified IOPS and - size. :param SharePrototypeShareContext replica_share: (optional) :param List[str] user_tags: (optional) Tags for this resource. - :param ZoneIdentity zone: The zone this file share will reside in. For a replica - share, this must be a different zone in the same region as the source share. :param str access_control_mode: (optional) The access control mode for the share: - `security_group`: The security groups on the virtual network interface for a @@ -130864,21 +142422,33 @@ class SharePrototypeShareBySize(SharePrototype): :param ShareInitialOwner initial_owner: (optional) The owner assigned to the file share at creation. Subsequent changes to the owner must be performed by a client that has mounted the file share. + :param int iops: (optional) The maximum input/output operations per second + (IOPS) for the file share. The share must be in the `defined_performance` + profile family, and the value must be in the range supported by the share's + specified size. + In addition, each client accessing the share will be restricted to 48,000 IOPS. + :param ShareProfileIdentity profile: The + [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use + for this file share. The profile must support the share's specified IOPS and + size. :param ResourceGroupIdentity resource_group: (optional) The resource group to use. If unspecified, the account's [default resource group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. :param int size: The size of the file share rounded up to the next gigabyte. The maximum size for a share may increase in the future. + :param ZoneIdentity zone: The zone this file share will reside in. For a replica + share, this must be a different + zone in the same region as the source share. """ def __init__( self, profile: 'ShareProfileIdentity', - zone: 'ZoneIdentity', size: int, + zone: 'ZoneIdentity', *, - iops: Optional[int] = None, + allowed_transit_encryption_modes: Optional[List[str]] = None, mount_targets: Optional[List['ShareMountTargetPrototype']] = None, name: Optional[str] = None, replica_share: Optional['SharePrototypeShareContext'] = None, @@ -130886,6 +142456,7 @@ def __init__( access_control_mode: Optional[str] = None, encryption_key: Optional['EncryptionKeyIdentity'] = None, initial_owner: Optional['ShareInitialOwner'] = None, + iops: Optional[int] = None, resource_group: Optional['ResourceGroupIdentity'] = None, ) -> None: """ @@ -130893,20 +142464,22 @@ def __init__( :param ShareProfileIdentity profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) - to use for this file share. The profile must support the share's specified - IOPS and size. - :param ZoneIdentity zone: The zone this file share will reside in. For a - replica share, this must be a different zone in the same region as the - source share. + to use + for this file share. The profile must support the share's specified IOPS + and size. :param int size: The size of the file share rounded up to the next gigabyte. The maximum size for a share may increase in the future. - :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The share must be in the `defined_performance` - profile family, and the value must be in the range supported by the share's - specified size. - In addition, each client accessing the share will be restricted to 48,000 - IOPS. + :param ZoneIdentity zone: The zone this file share will reside in. For a + replica share, this must be a different + zone in the same region as the source share. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount targets for the file share. Each mount target must be in a unique VPC. :param str name: (optional) The name for this share. The name must not be @@ -130932,59 +142505,78 @@ def __init__( :param ShareInitialOwner initial_owner: (optional) The owner assigned to the file share at creation. Subsequent changes to the owner must be performed by a client that has mounted the file share. + :param int iops: (optional) The maximum input/output operations per second + (IOPS) for the file share. The share must be in the `defined_performance` + profile family, and the value must be in the range supported by the share's + specified size. + In addition, each client accessing the share will be restricted to 48,000 + IOPS. :param ResourceGroupIdentity resource_group: (optional) The resource group to use. If unspecified, the account's [default resource group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. """ # pylint: disable=super-init-not-called - self.iops = iops + self.allowed_transit_encryption_modes = allowed_transit_encryption_modes self.mount_targets = mount_targets self.name = name - self.profile = profile self.replica_share = replica_share self.user_tags = user_tags - self.zone = zone self.access_control_mode = access_control_mode self.encryption_key = encryption_key self.initial_owner = initial_owner + self.iops = iops + self.profile = profile self.resource_group = resource_group self.size = size + self.zone = zone @classmethod def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareBySize': """Initialize a SharePrototypeShareBySize object from a json dictionary.""" args = {} - if (iops := _dict.get('iops')) is not None: - args['iops'] = iops + if (allowed_transit_encryption_modes := + _dict.get('allowed_transit_encryption_modes')) is not None: + args[ + 'allowed_transit_encryption_modes'] = allowed_transit_encryption_modes if (mount_targets := _dict.get('mount_targets')) is not None: args['mount_targets'] = mount_targets if (name := _dict.get('name')) is not None: args['name'] = name - if (profile := _dict.get('profile')) is not None: - args['profile'] = profile - else: - raise ValueError('Required property \'profile\' not present in SharePrototypeShareBySize JSON') if (replica_share := _dict.get('replica_share')) is not None: - args['replica_share'] = SharePrototypeShareContext.from_dict(replica_share) + args['replica_share'] = SharePrototypeShareContext.from_dict( + replica_share) if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags - if (zone := _dict.get('zone')) is not None: - args['zone'] = zone - else: - raise ValueError('Required property \'zone\' not present in SharePrototypeShareBySize JSON') - if (access_control_mode := _dict.get('access_control_mode')) is not None: + if (access_control_mode := + _dict.get('access_control_mode')) is not None: args['access_control_mode'] = access_control_mode if (encryption_key := _dict.get('encryption_key')) is not None: args['encryption_key'] = encryption_key if (initial_owner := _dict.get('initial_owner')) is not None: args['initial_owner'] = ShareInitialOwner.from_dict(initial_owner) + if (iops := _dict.get('iops')) is not None: + args['iops'] = iops + if (profile := _dict.get('profile')) is not None: + args['profile'] = profile + else: + raise ValueError( + 'Required property \'profile\' not present in SharePrototypeShareBySize JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (size := _dict.get('size')) is not None: args['size'] = size else: - raise ValueError('Required property \'size\' not present in SharePrototypeShareBySize JSON') + raise ValueError( + 'Required property \'size\' not present in SharePrototypeShareBySize JSON' + ) + if (zone := _dict.get('zone')) is not None: + args['zone'] = zone + else: + raise ValueError( + 'Required property \'zone\' not present in SharePrototypeShareBySize JSON' + ) return cls(**args) @classmethod @@ -130995,8 +142587,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'iops') and self.iops is not None: - _dict['iops'] = self.iops + if hasattr(self, 'allowed_transit_encryption_modes' + ) and self.allowed_transit_encryption_modes is not None: + _dict[ + 'allowed_transit_encryption_modes'] = self.allowed_transit_encryption_modes if hasattr(self, 'mount_targets') and self.mount_targets is not None: mount_targets_list = [] for v in self.mount_targets: @@ -131007,11 +142601,6 @@ def to_dict(self) -> Dict: _dict['mount_targets'] = mount_targets_list if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'profile') and self.profile is not None: - if isinstance(self.profile, dict): - _dict['profile'] = self.profile - else: - _dict['profile'] = self.profile.to_dict() if hasattr(self, 'replica_share') and self.replica_share is not None: if isinstance(self.replica_share, dict): _dict['replica_share'] = self.replica_share @@ -131019,12 +142608,9 @@ def to_dict(self) -> Dict: _dict['replica_share'] = self.replica_share.to_dict() if hasattr(self, 'user_tags') and self.user_tags is not None: _dict['user_tags'] = self.user_tags - if hasattr(self, 'zone') and self.zone is not None: - if isinstance(self.zone, dict): - _dict['zone'] = self.zone - else: - _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'access_control_mode') and self.access_control_mode is not None: + if hasattr( + self, + 'access_control_mode') and self.access_control_mode is not None: _dict['access_control_mode'] = self.access_control_mode if hasattr(self, 'encryption_key') and self.encryption_key is not None: if isinstance(self.encryption_key, dict): @@ -131036,6 +142622,13 @@ def to_dict(self) -> Dict: _dict['initial_owner'] = self.initial_owner else: _dict['initial_owner'] = self.initial_owner.to_dict() + if hasattr(self, 'iops') and self.iops is not None: + _dict['iops'] = self.iops + if hasattr(self, 'profile') and self.profile is not None: + if isinstance(self.profile, dict): + _dict['profile'] = self.profile + else: + _dict['profile'] = self.profile.to_dict() if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group @@ -131043,6 +142636,11 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group.to_dict() if hasattr(self, 'size') and self.size is not None: _dict['size'] = self.size + if hasattr(self, 'zone') and self.zone is not None: + if isinstance(self.zone, dict): + _dict['zone'] = self.zone + else: + _dict['zone'] = self.zone.to_dict() return _dict def _to_dict(self): @@ -131063,6 +142661,19 @@ def __ne__(self, other: 'SharePrototypeShareBySize') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class AllowedTransitEncryptionModesEnum(str, Enum): + """ + An allowed transit encryption mode for this share. + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' + class AccessControlModeEnum(str, Enum): """ The access control mode for the share: @@ -131078,7 +142689,6 @@ class AccessControlModeEnum(str, Enum): VPC = 'vpc' - class SharePrototypeShareBySourceShare(SharePrototype): """ Create a replica file share for an existing file share. The values for @@ -131086,24 +142696,20 @@ class SharePrototypeShareBySourceShare(SharePrototype): `access_control_mode`, `encryption_key` and `size` will be inherited from `source_share`. - :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The share must be in the `defined_performance` - profile family, and the value must be in the range supported by the share's - specified size. - In addition, each client accessing the share will be restricted to 48,000 IOPS. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount targets for the file share. Each mount target must be in a unique VPC. :param str name: (optional) The name for this share. The name must not be used by another share in the region. If unspecified, the name will be a hyphenated list of randomly-selected words. - :param ShareProfileIdentity profile: The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use - for this file share. The profile must support the share's specified IOPS and - size. :param SharePrototypeShareContext replica_share: (optional) :param List[str] user_tags: (optional) Tags for this resource. - :param ZoneIdentity zone: The zone this file share will reside in. For a replica - share, this must be a different zone in the same region as the source share. :param EncryptionKeyIdentity encryption_key: (optional) The root key to use to wrap the data encryption key for the share. This property must be specified if the `source_share` is in a different region @@ -131111,6 +142717,15 @@ class SharePrototypeShareBySourceShare(SharePrototype): an `encryption` type of `user_managed`, and must not be specified otherwise (its value will be inherited from `source_share`). + :param int iops: (optional) The maximum input/output operations per second + (IOPS) for the file share. The share must be in the `defined_performance` + profile family, and the value must be in the range supported by the share's + specified size. + In addition, each client accessing the share will be restricted to 48,000 IOPS. + :param ShareProfileIdentity profile: The + [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use + for this file share. The profile must support the share's specified IOPS and + size. :param str replication_cron_spec: The cron specification for the file share replication schedule. Replication of a share can be scheduled to occur at most once per hour. @@ -131123,21 +142738,25 @@ class SharePrototypeShareBySourceShare(SharePrototype): specified by CRN, it may be in an [associated partner region](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-replication). + :param ZoneIdentity zone: The zone this file share will reside in. For a replica + share, this must be a different + zone in the same region as the source share. """ def __init__( self, profile: 'ShareProfileIdentity', - zone: 'ZoneIdentity', replication_cron_spec: str, source_share: 'ShareIdentity', + zone: 'ZoneIdentity', *, - iops: Optional[int] = None, + allowed_transit_encryption_modes: Optional[List[str]] = None, mount_targets: Optional[List['ShareMountTargetPrototype']] = None, name: Optional[str] = None, replica_share: Optional['SharePrototypeShareContext'] = None, user_tags: Optional[List[str]] = None, encryption_key: Optional['EncryptionKeyIdentity'] = None, + iops: Optional[int] = None, resource_group: Optional['ResourceGroupIdentity'] = None, ) -> None: """ @@ -131145,11 +142764,9 @@ def __init__( :param ShareProfileIdentity profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) - to use for this file share. The profile must support the share's specified - IOPS and size. - :param ZoneIdentity zone: The zone this file share will reside in. For a - replica share, this must be a different zone in the same region as the - source share. + to use + for this file share. The profile must support the share's specified IOPS + and size. :param str replication_cron_spec: The cron specification for the file share replication schedule. Replication of a share can be scheduled to occur at most once per hour. @@ -131159,12 +142776,16 @@ def __init__( specified by CRN, it may be in an [associated partner region](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-replication). - :param int iops: (optional) The maximum input/output operations per second - (IOPS) for the file share. The share must be in the `defined_performance` - profile family, and the value must be in the range supported by the share's - specified size. - In addition, each client accessing the share will be restricted to 48,000 - IOPS. + :param ZoneIdentity zone: The zone this file share will reside in. For a + replica share, this must be a different + zone in the same region as the source share. + :param List[str] allowed_transit_encryption_modes: (optional) The transit + encryption modes to allow for this share. If unspecified: + - If share mount targets are specified, and those share mount targets all + specify a + `transit_encryption` of `user_managed`, then only `user_managed` will be + allowed. + - Otherwise, all `transit_encryption` modes will be allowed. :param List[ShareMountTargetPrototype] mount_targets: (optional) The mount targets for the file share. Each mount target must be in a unique VPC. :param str name: (optional) The name for this share. The name must not be @@ -131179,57 +142800,78 @@ def __init__( an `encryption` type of `user_managed`, and must not be specified otherwise (its value will be inherited from `source_share`). + :param int iops: (optional) The maximum input/output operations per second + (IOPS) for the file share. The share must be in the `defined_performance` + profile family, and the value must be in the range supported by the share's + specified size. + In addition, each client accessing the share will be restricted to 48,000 + IOPS. :param ResourceGroupIdentity resource_group: (optional) The resource group to use. If unspecified, the resource group from the source share will be used. """ # pylint: disable=super-init-not-called - self.iops = iops + self.allowed_transit_encryption_modes = allowed_transit_encryption_modes self.mount_targets = mount_targets self.name = name - self.profile = profile self.replica_share = replica_share self.user_tags = user_tags - self.zone = zone self.encryption_key = encryption_key + self.iops = iops + self.profile = profile self.replication_cron_spec = replication_cron_spec self.resource_group = resource_group self.source_share = source_share + self.zone = zone @classmethod def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareBySourceShare': """Initialize a SharePrototypeShareBySourceShare object from a json dictionary.""" args = {} - if (iops := _dict.get('iops')) is not None: - args['iops'] = iops + if (allowed_transit_encryption_modes := + _dict.get('allowed_transit_encryption_modes')) is not None: + args[ + 'allowed_transit_encryption_modes'] = allowed_transit_encryption_modes if (mount_targets := _dict.get('mount_targets')) is not None: args['mount_targets'] = mount_targets if (name := _dict.get('name')) is not None: args['name'] = name - if (profile := _dict.get('profile')) is not None: - args['profile'] = profile - else: - raise ValueError('Required property \'profile\' not present in SharePrototypeShareBySourceShare JSON') if (replica_share := _dict.get('replica_share')) is not None: - args['replica_share'] = SharePrototypeShareContext.from_dict(replica_share) + args['replica_share'] = SharePrototypeShareContext.from_dict( + replica_share) if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags - if (zone := _dict.get('zone')) is not None: - args['zone'] = zone - else: - raise ValueError('Required property \'zone\' not present in SharePrototypeShareBySourceShare JSON') if (encryption_key := _dict.get('encryption_key')) is not None: args['encryption_key'] = encryption_key - if (replication_cron_spec := _dict.get('replication_cron_spec')) is not None: + if (iops := _dict.get('iops')) is not None: + args['iops'] = iops + if (profile := _dict.get('profile')) is not None: + args['profile'] = profile + else: + raise ValueError( + 'Required property \'profile\' not present in SharePrototypeShareBySourceShare JSON' + ) + if (replication_cron_spec := + _dict.get('replication_cron_spec')) is not None: args['replication_cron_spec'] = replication_cron_spec else: - raise ValueError('Required property \'replication_cron_spec\' not present in SharePrototypeShareBySourceShare JSON') + raise ValueError( + 'Required property \'replication_cron_spec\' not present in SharePrototypeShareBySourceShare JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (source_share := _dict.get('source_share')) is not None: args['source_share'] = source_share else: - raise ValueError('Required property \'source_share\' not present in SharePrototypeShareBySourceShare JSON') + raise ValueError( + 'Required property \'source_share\' not present in SharePrototypeShareBySourceShare JSON' + ) + if (zone := _dict.get('zone')) is not None: + args['zone'] = zone + else: + raise ValueError( + 'Required property \'zone\' not present in SharePrototypeShareBySourceShare JSON' + ) return cls(**args) @classmethod @@ -131240,8 +142882,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'iops') and self.iops is not None: - _dict['iops'] = self.iops + if hasattr(self, 'allowed_transit_encryption_modes' + ) and self.allowed_transit_encryption_modes is not None: + _dict[ + 'allowed_transit_encryption_modes'] = self.allowed_transit_encryption_modes if hasattr(self, 'mount_targets') and self.mount_targets is not None: mount_targets_list = [] for v in self.mount_targets: @@ -131252,11 +142896,6 @@ def to_dict(self) -> Dict: _dict['mount_targets'] = mount_targets_list if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'profile') and self.profile is not None: - if isinstance(self.profile, dict): - _dict['profile'] = self.profile - else: - _dict['profile'] = self.profile.to_dict() if hasattr(self, 'replica_share') and self.replica_share is not None: if isinstance(self.replica_share, dict): _dict['replica_share'] = self.replica_share @@ -131264,17 +142903,20 @@ def to_dict(self) -> Dict: _dict['replica_share'] = self.replica_share.to_dict() if hasattr(self, 'user_tags') and self.user_tags is not None: _dict['user_tags'] = self.user_tags - if hasattr(self, 'zone') and self.zone is not None: - if isinstance(self.zone, dict): - _dict['zone'] = self.zone - else: - _dict['zone'] = self.zone.to_dict() if hasattr(self, 'encryption_key') and self.encryption_key is not None: if isinstance(self.encryption_key, dict): _dict['encryption_key'] = self.encryption_key else: _dict['encryption_key'] = self.encryption_key.to_dict() - if hasattr(self, 'replication_cron_spec') and self.replication_cron_spec is not None: + if hasattr(self, 'iops') and self.iops is not None: + _dict['iops'] = self.iops + if hasattr(self, 'profile') and self.profile is not None: + if isinstance(self.profile, dict): + _dict['profile'] = self.profile + else: + _dict['profile'] = self.profile.to_dict() + if hasattr(self, 'replication_cron_spec' + ) and self.replication_cron_spec is not None: _dict['replication_cron_spec'] = self.replication_cron_spec if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): @@ -131286,6 +142928,11 @@ def to_dict(self) -> Dict: _dict['source_share'] = self.source_share else: _dict['source_share'] = self.source_share.to_dict() + if hasattr(self, 'zone') and self.zone is not None: + if isinstance(self.zone, dict): + _dict['zone'] = self.zone + else: + _dict['zone'] = self.zone.to_dict() return _dict def _to_dict(self): @@ -131306,8 +142953,22 @@ def __ne__(self, other: 'SharePrototypeShareBySourceShare') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class AllowedTransitEncryptionModesEnum(str, Enum): + """ + An allowed transit encryption mode for this share. + - `none`: Not encrypted in transit. + - `user_managed`: Encrypted in transit using an instance identity certificate. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + NONE = 'none' + USER_MANAGED = 'user_managed' + -class SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots(SnapshotConsistencyGroupPrototype): +class SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots( + SnapshotConsistencyGroupPrototype): """ SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots. @@ -131354,19 +143015,27 @@ def __init__( self.snapshots = snapshots @classmethod - def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots': + def from_dict( + cls, _dict: Dict + ) -> 'SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots': """Initialize a SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots object from a json dictionary.""" args = {} - if (delete_snapshots_on_delete := _dict.get('delete_snapshots_on_delete')) is not None: + if (delete_snapshots_on_delete := + _dict.get('delete_snapshots_on_delete')) is not None: args['delete_snapshots_on_delete'] = delete_snapshots_on_delete if (name := _dict.get('name')) is not None: args['name'] = name if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (snapshots := _dict.get('snapshots')) is not None: - args['snapshots'] = [SnapshotPrototypeSnapshotConsistencyGroupContext.from_dict(v) for v in snapshots] + args['snapshots'] = [ + SnapshotPrototypeSnapshotConsistencyGroupContext.from_dict(v) + for v in snapshots + ] else: - raise ValueError('Required property \'snapshots\' not present in SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots JSON') + raise ValueError( + 'Required property \'snapshots\' not present in SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots JSON' + ) return cls(**args) @classmethod @@ -131377,8 +143046,10 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'delete_snapshots_on_delete') and self.delete_snapshots_on_delete is not None: - _dict['delete_snapshots_on_delete'] = self.delete_snapshots_on_delete + if hasattr(self, 'delete_snapshots_on_delete' + ) and self.delete_snapshots_on_delete is not None: + _dict[ + 'delete_snapshots_on_delete'] = self.delete_snapshots_on_delete if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'resource_group') and self.resource_group is not None: @@ -131404,13 +143075,19 @@ def __str__(self) -> str: """Return a `str` version of this SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots') -> bool: + def __eq__( + self, other: + 'SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots') -> bool: + def __ne__( + self, other: + 'SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -131441,7 +143118,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SnapshotIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in SnapshotIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -131501,7 +143180,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SnapshotIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in SnapshotIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -131561,7 +143242,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SnapshotIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in SnapshotIdentityById JSON' + ) return cls(**args) @classmethod @@ -131672,11 +143355,14 @@ def __init__( self.source_snapshot = source_snapshot @classmethod - def from_dict(cls, _dict: Dict) -> 'SnapshotPrototypeSnapshotBySourceSnapshot': + def from_dict(cls, + _dict: Dict) -> 'SnapshotPrototypeSnapshotBySourceSnapshot': """Initialize a SnapshotPrototypeSnapshotBySourceSnapshot object from a json dictionary.""" args = {} if (clones := _dict.get('clones')) is not None: - args['clones'] = [SnapshotClonePrototype.from_dict(v) for v in clones] + args['clones'] = [ + SnapshotClonePrototype.from_dict(v) for v in clones + ] if (name := _dict.get('name')) is not None: args['name'] = name if (resource_group := _dict.get('resource_group')) is not None: @@ -131686,9 +143372,12 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotPrototypeSnapshotBySourceSnapshot': if (encryption_key := _dict.get('encryption_key')) is not None: args['encryption_key'] = encryption_key if (source_snapshot := _dict.get('source_snapshot')) is not None: - args['source_snapshot'] = SnapshotIdentityByCRN.from_dict(source_snapshot) + args['source_snapshot'] = SnapshotIdentityByCRN.from_dict( + source_snapshot) else: - raise ValueError('Required property \'source_snapshot\' not present in SnapshotPrototypeSnapshotBySourceSnapshot JSON') + raise ValueError( + 'Required property \'source_snapshot\' not present in SnapshotPrototypeSnapshotBySourceSnapshot JSON' + ) return cls(**args) @classmethod @@ -131721,7 +143410,8 @@ def to_dict(self) -> Dict: _dict['encryption_key'] = self.encryption_key else: _dict['encryption_key'] = self.encryption_key.to_dict() - if hasattr(self, 'source_snapshot') and self.source_snapshot is not None: + if hasattr(self, + 'source_snapshot') and self.source_snapshot is not None: if isinstance(self.source_snapshot, dict): _dict['source_snapshot'] = self.source_snapshot else: @@ -131736,13 +143426,15 @@ def __str__(self) -> str: """Return a `str` version of this SnapshotPrototypeSnapshotBySourceSnapshot object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SnapshotPrototypeSnapshotBySourceSnapshot') -> bool: + def __eq__(self, + other: 'SnapshotPrototypeSnapshotBySourceSnapshot') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SnapshotPrototypeSnapshotBySourceSnapshot') -> bool: + def __ne__(self, + other: 'SnapshotPrototypeSnapshotBySourceSnapshot') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -131795,11 +143487,14 @@ def __init__( self.source_volume = source_volume @classmethod - def from_dict(cls, _dict: Dict) -> 'SnapshotPrototypeSnapshotBySourceVolume': + def from_dict(cls, + _dict: Dict) -> 'SnapshotPrototypeSnapshotBySourceVolume': """Initialize a SnapshotPrototypeSnapshotBySourceVolume object from a json dictionary.""" args = {} if (clones := _dict.get('clones')) is not None: - args['clones'] = [SnapshotClonePrototype.from_dict(v) for v in clones] + args['clones'] = [ + SnapshotClonePrototype.from_dict(v) for v in clones + ] if (name := _dict.get('name')) is not None: args['name'] = name if (resource_group := _dict.get('resource_group')) is not None: @@ -131809,7 +143504,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotPrototypeSnapshotBySourceVolume': if (source_volume := _dict.get('source_volume')) is not None: args['source_volume'] = source_volume else: - raise ValueError('Required property \'source_volume\' not present in SnapshotPrototypeSnapshotBySourceVolume JSON') + raise ValueError( + 'Required property \'source_volume\' not present in SnapshotPrototypeSnapshotBySourceVolume JSON' + ) return cls(**args) @classmethod @@ -131889,7 +143586,9 @@ def from_dict(cls, _dict: Dict) -> 'SubnetIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SubnetIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in SubnetIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -131949,7 +143648,9 @@ def from_dict(cls, _dict: Dict) -> 'SubnetIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SubnetIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in SubnetIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -132009,7 +143710,9 @@ def from_dict(cls, _dict: Dict) -> 'SubnetIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SubnetIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in SubnetIdentityById JSON' + ) return cls(**args) @classmethod @@ -132146,11 +143849,15 @@ def from_dict(cls, _dict: Dict) -> 'SubnetPrototypeSubnetByCIDR': if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc else: - raise ValueError('Required property \'vpc\' not present in SubnetPrototypeSubnetByCIDR JSON') + raise ValueError( + 'Required property \'vpc\' not present in SubnetPrototypeSubnetByCIDR JSON' + ) if (ipv4_cidr_block := _dict.get('ipv4_cidr_block')) is not None: args['ipv4_cidr_block'] = ipv4_cidr_block else: - raise ValueError('Required property \'ipv4_cidr_block\' not present in SubnetPrototypeSubnetByCIDR JSON') + raise ValueError( + 'Required property \'ipv4_cidr_block\' not present in SubnetPrototypeSubnetByCIDR JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone return cls(**args) @@ -132192,7 +143899,8 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'ipv4_cidr_block') and self.ipv4_cidr_block is not None: + if hasattr(self, + 'ipv4_cidr_block') and self.ipv4_cidr_block is not None: _dict['ipv4_cidr_block'] = self.ipv4_cidr_block if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): @@ -132227,7 +143935,6 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - class SubnetPrototypeSubnetByTotalCount(SubnetPrototype): """ SubnetPrototypeSubnetByTotalCount. @@ -132324,15 +144031,22 @@ def from_dict(cls, _dict: Dict) -> 'SubnetPrototypeSubnetByTotalCount': if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc else: - raise ValueError('Required property \'vpc\' not present in SubnetPrototypeSubnetByTotalCount JSON') - if (total_ipv4_address_count := _dict.get('total_ipv4_address_count')) is not None: + raise ValueError( + 'Required property \'vpc\' not present in SubnetPrototypeSubnetByTotalCount JSON' + ) + if (total_ipv4_address_count := + _dict.get('total_ipv4_address_count')) is not None: args['total_ipv4_address_count'] = total_ipv4_address_count else: - raise ValueError('Required property \'total_ipv4_address_count\' not present in SubnetPrototypeSubnetByTotalCount JSON') + raise ValueError( + 'Required property \'total_ipv4_address_count\' not present in SubnetPrototypeSubnetByTotalCount JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in SubnetPrototypeSubnetByTotalCount JSON') + raise ValueError( + 'Required property \'zone\' not present in SubnetPrototypeSubnetByTotalCount JSON' + ) return cls(**args) @classmethod @@ -132372,7 +144086,8 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'total_ipv4_address_count') and self.total_ipv4_address_count is not None: + if hasattr(self, 'total_ipv4_address_count' + ) and self.total_ipv4_address_count is not None: _dict['total_ipv4_address_count'] = self.total_ipv4_address_count if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): @@ -132407,8 +144122,8 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' - -class SubnetPublicGatewayPatchPublicGatewayIdentityByCRN(SubnetPublicGatewayPatch): +class SubnetPublicGatewayPatchPublicGatewayIdentityByCRN( + SubnetPublicGatewayPatch): """ SubnetPublicGatewayPatchPublicGatewayIdentityByCRN. @@ -132428,13 +144143,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN': """Initialize a SubnetPublicGatewayPatchPublicGatewayIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SubnetPublicGatewayPatchPublicGatewayIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in SubnetPublicGatewayPatchPublicGatewayIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -132457,18 +144176,23 @@ def __str__(self) -> str: """Return a `str` version of this SubnetPublicGatewayPatchPublicGatewayIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN') -> bool: + def __eq__( + self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN') -> bool: + def __ne__( + self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SubnetPublicGatewayPatchPublicGatewayIdentityByHref(SubnetPublicGatewayPatch): +class SubnetPublicGatewayPatchPublicGatewayIdentityByHref( + SubnetPublicGatewayPatch): """ SubnetPublicGatewayPatchPublicGatewayIdentityByHref. @@ -132488,13 +144212,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref': """Initialize a SubnetPublicGatewayPatchPublicGatewayIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SubnetPublicGatewayPatchPublicGatewayIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in SubnetPublicGatewayPatchPublicGatewayIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -132517,18 +144245,23 @@ def __str__(self) -> str: """Return a `str` version of this SubnetPublicGatewayPatchPublicGatewayIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref') -> bool: + def __eq__( + self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref') -> bool: + def __ne__( + self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SubnetPublicGatewayPatchPublicGatewayIdentityById(SubnetPublicGatewayPatch): +class SubnetPublicGatewayPatchPublicGatewayIdentityById(SubnetPublicGatewayPatch + ): """ SubnetPublicGatewayPatchPublicGatewayIdentityById. @@ -132548,13 +144281,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'SubnetPublicGatewayPatchPublicGatewayIdentityById': + def from_dict( + cls, + _dict: Dict) -> 'SubnetPublicGatewayPatchPublicGatewayIdentityById': """Initialize a SubnetPublicGatewayPatchPublicGatewayIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SubnetPublicGatewayPatchPublicGatewayIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in SubnetPublicGatewayPatchPublicGatewayIdentityById JSON' + ) return cls(**args) @classmethod @@ -132577,13 +144314,17 @@ def __str__(self) -> str: """Return a `str` version of this SubnetPublicGatewayPatchPublicGatewayIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityById') -> bool: + def __eq__( + self, + other: 'SubnetPublicGatewayPatchPublicGatewayIdentityById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityById') -> bool: + def __ne__( + self, + other: 'SubnetPublicGatewayPatchPublicGatewayIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -132608,13 +144349,16 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'TrustedProfileIdentityTrustedProfileByCRN': + def from_dict(cls, + _dict: Dict) -> 'TrustedProfileIdentityTrustedProfileByCRN': """Initialize a TrustedProfileIdentityTrustedProfileByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in TrustedProfileIdentityTrustedProfileByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in TrustedProfileIdentityTrustedProfileByCRN JSON' + ) return cls(**args) @classmethod @@ -132637,13 +144381,15 @@ def __str__(self) -> str: """Return a `str` version of this TrustedProfileIdentityTrustedProfileByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'TrustedProfileIdentityTrustedProfileByCRN') -> bool: + def __eq__(self, + other: 'TrustedProfileIdentityTrustedProfileByCRN') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'TrustedProfileIdentityTrustedProfileByCRN') -> bool: + def __ne__(self, + other: 'TrustedProfileIdentityTrustedProfileByCRN') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -132668,13 +144414,16 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'TrustedProfileIdentityTrustedProfileById': + def from_dict(cls, + _dict: Dict) -> 'TrustedProfileIdentityTrustedProfileById': """Initialize a TrustedProfileIdentityTrustedProfileById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in TrustedProfileIdentityTrustedProfileById JSON') + raise ValueError( + 'Required property \'id\' not present in TrustedProfileIdentityTrustedProfileById JSON' + ) return cls(**args) @classmethod @@ -132708,7 +144457,8 @@ def __ne__(self, other: 'TrustedProfileIdentityTrustedProfileById') -> bool: return not self == other -class VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype(VPCDNSResolverPrototype): +class VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype( + VPCDNSResolverPrototype): """ Manually specify the DNS server addresses for this VPC. @@ -132754,17 +144504,25 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype': """Initialize a VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype object from a json dictionary.""" args = {} if (manual_servers := _dict.get('manual_servers')) is not None: - args['manual_servers'] = [DNSServerPrototype.from_dict(v) for v in manual_servers] + args['manual_servers'] = [ + DNSServerPrototype.from_dict(v) for v in manual_servers + ] else: - raise ValueError('Required property \'manual_servers\' not present in VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype JSON') + raise ValueError( + 'Required property \'manual_servers\' not present in VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype JSON') + raise ValueError( + 'Required property \'type\' not present in VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype JSON' + ) return cls(**args) @classmethod @@ -132795,13 +144553,17 @@ def __str__(self) -> str: """Return a `str` version of this VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype') -> bool: + def __eq__( + self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype') -> bool: + def __ne__( + self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -132813,8 +144575,8 @@ class TypeEnum(str, Enum): MANUAL = 'manual' - -class VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype(VPCDNSResolverPrototype): +class VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype( + VPCDNSResolverPrototype): """ The system will provide DNS server addresses for this VPC. The system-provided DNS server addresses depend on whether any endpoint gateways reside in the VPC, and @@ -132839,7 +144601,9 @@ def __init__( self.type = type @classmethod - def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype': + def from_dict( + cls, _dict: Dict + ) -> 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype': """Initialize a VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: @@ -132866,13 +144630,17 @@ def __str__(self) -> str: """Return a `str` version of this VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype') -> bool: + def __eq__( + self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype') -> bool: + def __ne__( + self, other: 'VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -132884,7 +144652,6 @@ class TypeEnum(str, Enum): SYSTEM = 'system' - class VPCDNSResolverTypeDelegated(VPCDNSResolver): """ The DNS server addresses are delegated to the DNS resolver of another VPC. @@ -132894,7 +144661,10 @@ class VPCDNSResolverTypeDelegated(VPCDNSResolver): - by the system when `dns.resolver.type` is `system` - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual`. + - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str type: The type of the DNS resolver used for the VPC. :param VPCReferenceDNSResolverContext vpc: The VPC whose DNS resolver provides the DNS server addresses for this VPC. @@ -132916,7 +144686,10 @@ def __init__( - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - using `dns.resolver.manual_servers` when the `dns.resolver.type` is - `manual`. + `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str type: The type of the DNS resolver used for the VPC. :param VPCReferenceDNSResolverContext vpc: The VPC whose DNS resolver provides the DNS server addresses for this VPC. @@ -132934,15 +144707,21 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverTypeDelegated': if (servers := _dict.get('servers')) is not None: args['servers'] = [DNSServer.from_dict(v) for v in servers] else: - raise ValueError('Required property \'servers\' not present in VPCDNSResolverTypeDelegated JSON') + raise ValueError( + 'Required property \'servers\' not present in VPCDNSResolverTypeDelegated JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPCDNSResolverTypeDelegated JSON') + raise ValueError( + 'Required property \'type\' not present in VPCDNSResolverTypeDelegated JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReferenceDNSResolverContext.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in VPCDNSResolverTypeDelegated JSON') + raise ValueError( + 'Required property \'vpc\' not present in VPCDNSResolverTypeDelegated JSON' + ) return cls(**args) @classmethod @@ -132996,7 +144775,6 @@ class TypeEnum(str, Enum): DELEGATED = 'delegated' - class VPCDNSResolverTypeManual(VPCDNSResolver): """ The DNS server addresses are manually specified. @@ -133006,7 +144784,10 @@ class VPCDNSResolverTypeManual(VPCDNSResolver): - by the system when `dns.resolver.type` is `system` - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual`. + - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param List[DNSServer] manual_servers: The manually specified DNS servers for this VPC. If the DNS servers have `zone_affinity`, the DHCP [Domain Name Server @@ -133016,6 +144797,9 @@ class VPCDNSResolverTypeManual(VPCDNSResolver): If the DNS servers do not have `zone_affinity`, the DHCP [Domain Name Server Option](https://datatracker.ietf.org/doc/html/rfc2132#section-3.8) for each zone will list all the manual DNS servers in the order specified. + The maximum number of manual DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str type: The type of the DNS resolver used for the VPC. """ @@ -133034,7 +144818,10 @@ def __init__( - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - using `dns.resolver.manual_servers` when the `dns.resolver.type` is - `manual`. + `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param List[DNSServer] manual_servers: The manually specified DNS servers for this VPC. If the DNS servers have `zone_affinity`, the DHCP [Domain Name Server @@ -133044,6 +144831,9 @@ def __init__( If the DNS servers do not have `zone_affinity`, the DHCP [Domain Name Server Option](https://datatracker.ietf.org/doc/html/rfc2132#section-3.8) for each zone will list all the manual DNS servers in the order specified. + The maximum number of manual DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str type: The type of the DNS resolver used for the VPC. """ # pylint: disable=super-init-not-called @@ -133058,15 +144848,23 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverTypeManual': if (servers := _dict.get('servers')) is not None: args['servers'] = [DNSServer.from_dict(v) for v in servers] else: - raise ValueError('Required property \'servers\' not present in VPCDNSResolverTypeManual JSON') + raise ValueError( + 'Required property \'servers\' not present in VPCDNSResolverTypeManual JSON' + ) if (manual_servers := _dict.get('manual_servers')) is not None: - args['manual_servers'] = [DNSServer.from_dict(v) for v in manual_servers] + args['manual_servers'] = [ + DNSServer.from_dict(v) for v in manual_servers + ] else: - raise ValueError('Required property \'manual_servers\' not present in VPCDNSResolverTypeManual JSON') + raise ValueError( + 'Required property \'manual_servers\' not present in VPCDNSResolverTypeManual JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPCDNSResolverTypeManual JSON') + raise ValueError( + 'Required property \'type\' not present in VPCDNSResolverTypeManual JSON' + ) return cls(**args) @classmethod @@ -133123,7 +144921,6 @@ class TypeEnum(str, Enum): MANUAL = 'manual' - class VPCDNSResolverTypeSystem(VPCDNSResolver): """ The DNS server addresses are provided by the system and depend on the configuration. @@ -133133,7 +144930,10 @@ class VPCDNSResolverTypeSystem(VPCDNSResolver): - by the system when `dns.resolver.type` is `system` - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual`. + - using `dns.resolver.manual_servers` when the `dns.resolver.type` is `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str configuration: The configuration of the system DNS resolver for this VPC. - `custom_resolver`: A custom DNS resolver is configured for this VPC. @@ -133167,7 +144967,10 @@ def __init__( - using the DNS servers in `dns.resolver.vpc` when `dns.resolver.type` is `delegated` - using `dns.resolver.manual_servers` when the `dns.resolver.type` is - `manual`. + `manual` + The maximum number of DNS servers is expected to + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param str configuration: The configuration of the system DNS resolver for this VPC. - `custom_resolver`: A custom DNS resolver is configured for this VPC. @@ -133198,15 +145001,21 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverTypeSystem': if (servers := _dict.get('servers')) is not None: args['servers'] = [DNSServer.from_dict(v) for v in servers] else: - raise ValueError('Required property \'servers\' not present in VPCDNSResolverTypeSystem JSON') + raise ValueError( + 'Required property \'servers\' not present in VPCDNSResolverTypeSystem JSON' + ) if (configuration := _dict.get('configuration')) is not None: args['configuration'] = configuration else: - raise ValueError('Required property \'configuration\' not present in VPCDNSResolverTypeSystem JSON') + raise ValueError( + 'Required property \'configuration\' not present in VPCDNSResolverTypeSystem JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPCDNSResolverTypeSystem JSON') + raise ValueError( + 'Required property \'type\' not present in VPCDNSResolverTypeSystem JSON' + ) return cls(**args) @classmethod @@ -133271,7 +145080,6 @@ class ConfigurationEnum(str, Enum): DEFAULT = 'default' PRIVATE_RESOLVER = 'private_resolver' - class TypeEnum(str, Enum): """ The type of the DNS resolver used for the VPC. @@ -133280,7 +145088,6 @@ class TypeEnum(str, Enum): SYSTEM = 'system' - class VPCDNSResolverVPCPatchVPCIdentityByCRN(VPCDNSResolverVPCPatch): """ VPCDNSResolverVPCPatchVPCIdentityByCRN. @@ -133307,7 +145114,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverVPCPatchVPCIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPCDNSResolverVPCPatchVPCIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in VPCDNSResolverVPCPatchVPCIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -133361,13 +145170,16 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverVPCPatchVPCIdentityByHref': + def from_dict(cls, + _dict: Dict) -> 'VPCDNSResolverVPCPatchVPCIdentityByHref': """Initialize a VPCDNSResolverVPCPatchVPCIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCDNSResolverVPCPatchVPCIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VPCDNSResolverVPCPatchVPCIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -133427,7 +145239,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverVPCPatchVPCIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPCDNSResolverVPCPatchVPCIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VPCDNSResolverVPCPatchVPCIdentityById JSON' + ) return cls(**args) @classmethod @@ -133487,7 +145301,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPCIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in VPCIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -133547,7 +145363,9 @@ def from_dict(cls, _dict: Dict) -> 'VPCIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPCIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VPCIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -133607,7 +145425,8 @@ def from_dict(cls, _dict: Dict) -> 'VPCIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPCIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VPCIdentityById JSON') return cls(**args) @classmethod @@ -133641,7 +145460,8 @@ def __ne__(self, other: 'VPCIdentityById') -> bool: return not self == other -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN(VPNGatewayConnectionIKEIdentityPrototype): +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN( + VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN. @@ -133665,17 +145485,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN': """Initialize a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN JSON' + ) return cls(**args) @classmethod @@ -133700,13 +145526,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -133721,8 +145553,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname(VPNGatewayConnectionIKEIdentityPrototype): +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname( + VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname. @@ -133746,17 +145578,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname': """Initialize a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname JSON' + ) return cls(**args) @classmethod @@ -133781,13 +145619,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -133802,8 +145646,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4(VPNGatewayConnectionIKEIdentityPrototype): +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4( + VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4. @@ -133827,17 +145671,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4': """Initialize a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 JSON' + ) return cls(**args) @classmethod @@ -133862,13 +145712,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -133883,8 +145739,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID(VPNGatewayConnectionIKEIdentityPrototype): +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID( + VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID. @@ -133908,17 +145764,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID': """Initialize a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID JSON' + ) return cls(**args) @classmethod @@ -133943,13 +145805,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -133964,8 +145832,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN(VPNGatewayConnectionIKEIdentity): +class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN( + VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN. @@ -133995,17 +145863,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN': """Initialize a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN JSON' + ) return cls(**args) @classmethod @@ -134030,13 +145904,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -134054,8 +145934,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname(VPNGatewayConnectionIKEIdentity): +class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname( + VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname. @@ -134085,17 +145965,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname': """Initialize a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname JSON' + ) return cls(**args) @classmethod @@ -134120,13 +146006,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -134144,8 +146036,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4(VPNGatewayConnectionIKEIdentity): +class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4( + VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4. @@ -134175,17 +146067,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4': """Initialize a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 JSON' + ) return cls(**args) @classmethod @@ -134210,13 +146108,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -134234,8 +146138,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID(VPNGatewayConnectionIKEIdentity): +class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID( + VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID. @@ -134265,17 +146169,23 @@ def __init__( self.value = value @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID': """Initialize a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID object from a json dictionary.""" args = {} if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID JSON' + ) if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError('Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID JSON') + raise ValueError( + 'Required property \'value\' not present in VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID JSON' + ) return cls(**args) @classmethod @@ -134300,13 +146210,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -134324,8 +146240,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' - -class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref(VPNGatewayConnectionIKEPolicyPatch): +class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref( + VPNGatewayConnectionIKEPolicyPatch): """ VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref. @@ -134345,13 +146261,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref': """Initialize a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -134374,18 +146294,23 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref') -> bool: + def __eq__( + self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref') -> bool: + def __ne__( + self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById(VPNGatewayConnectionIKEPolicyPatch): +class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById( + VPNGatewayConnectionIKEPolicyPatch): """ VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById. @@ -134405,13 +146330,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById': """Initialize a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById JSON' + ) return cls(**args) @classmethod @@ -134434,18 +146363,23 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById') -> bool: + def __eq__( + self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById') -> bool: + def __ne__( + self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref(VPNGatewayConnectionIKEPolicyPrototype): +class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref( + VPNGatewayConnectionIKEPolicyPrototype): """ VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref. @@ -134465,13 +146399,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref': """Initialize a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -134494,18 +146432,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById(VPNGatewayConnectionIKEPolicyPrototype): +class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById( + VPNGatewayConnectionIKEPolicyPrototype): """ VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById. @@ -134525,13 +146470,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById': """Initialize a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById JSON' + ) return cls(**args) @classmethod @@ -134554,18 +146503,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(VPNGatewayConnectionIPsecPolicyPatch): +class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref( + VPNGatewayConnectionIPsecPolicyPatch): """ VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref. @@ -134585,13 +146541,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref': """Initialize a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -134614,18 +146574,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById(VPNGatewayConnectionIPsecPolicyPatch): +class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById( + VPNGatewayConnectionIPsecPolicyPatch): """ VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById. @@ -134645,13 +146612,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById': """Initialize a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById JSON' + ) return cls(**args) @classmethod @@ -134674,18 +146645,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(VPNGatewayConnectionIPsecPolicyPrototype): +class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref( + VPNGatewayConnectionIPsecPolicyPrototype): """ VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref. @@ -134705,13 +146683,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref': """Initialize a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -134734,18 +146716,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById(VPNGatewayConnectionIPsecPolicyPrototype): +class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById( + VPNGatewayConnectionIPsecPolicyPrototype): """ VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById. @@ -134765,13 +146754,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById': """Initialize a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById JSON' + ) return cls(**args) @classmethod @@ -134794,18 +146787,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch(VPNGatewayConnectionPeerPatch): +class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch( + VPNGatewayConnectionPeerPatch): """ The peer VPN gateway for this connection. If `peer.type` is `ipv4_address`, only `peer.address` may be specified. If `peer.type` is fqdn, only `peer.fqdn` may be @@ -134813,21 +146813,22 @@ class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch(VPNGa """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch', 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch']) - ) + ", ".join([ + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch', + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch' + ])) raise Exception(msg) -class VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch(VPNGatewayConnectionPeerPatch): +class VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch( + VPNGatewayConnectionPeerPatch): """ The peer VPN gateway for this connection. If `peer.type` is `ipv4_address`, only `peer.address` may be specified. If `peer.type` is fqdn, only `peer.fqdn` may be @@ -134835,17 +146836,17 @@ class VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch( """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch', 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch']) - ) + ", ".join([ + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch', + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch' + ])) raise Exception(msg) @@ -134977,31 +146978,48 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyMode': if (admin_state_up := _dict.get('admin_state_up')) is not None: args['admin_state_up'] = admin_state_up else: - raise ValueError('Required property \'admin_state_up\' not present in VPNGatewayConnectionPolicyMode JSON') - if (authentication_mode := _dict.get('authentication_mode')) is not None: + raise ValueError( + 'Required property \'admin_state_up\' not present in VPNGatewayConnectionPolicyMode JSON' + ) + if (authentication_mode := + _dict.get('authentication_mode')) is not None: args['authentication_mode'] = authentication_mode else: - raise ValueError('Required property \'authentication_mode\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'authentication_mode\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPNGatewayConnectionPolicyMode JSON') - if (dead_peer_detection := _dict.get('dead_peer_detection')) is not None: - args['dead_peer_detection'] = VPNGatewayConnectionDPD.from_dict(dead_peer_detection) + raise ValueError( + 'Required property \'created_at\' not present in VPNGatewayConnectionPolicyMode JSON' + ) + if (dead_peer_detection := + _dict.get('dead_peer_detection')) is not None: + args['dead_peer_detection'] = VPNGatewayConnectionDPD.from_dict( + dead_peer_detection) else: - raise ValueError('Required property \'dead_peer_detection\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'dead_peer_detection\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (establish_mode := _dict.get('establish_mode')) is not None: args['establish_mode'] = establish_mode else: - raise ValueError('Required property \'establish_mode\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'establish_mode\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (ike_policy := _dict.get('ike_policy')) is not None: args['ike_policy'] = IKEPolicyReference.from_dict(ike_policy) if (ipsec_policy := _dict.get('ipsec_policy')) is not None: @@ -135009,35 +147027,54 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyMode': if (mode := _dict.get('mode')) is not None: args['mode'] = mode else: - raise ValueError('Required property \'mode\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'mode\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'name\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (psk := _dict.get('psk')) is not None: args['psk'] = psk else: - raise ValueError('Required property \'psk\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'psk\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'status\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [VPNGatewayConnectionStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + VPNGatewayConnectionStatusReason.from_dict(v) + for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (local := _dict.get('local')) is not None: args['local'] = VPNGatewayConnectionPolicyModeLocal.from_dict(local) else: - raise ValueError('Required property \'local\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'local\' not present in VPNGatewayConnectionPolicyMode JSON' + ) if (peer := _dict.get('peer')) is not None: args['peer'] = peer else: - raise ValueError('Required property \'peer\' not present in VPNGatewayConnectionPolicyMode JSON') + raise ValueError( + 'Required property \'peer\' not present in VPNGatewayConnectionPolicyMode JSON' + ) return cls(**args) @classmethod @@ -135050,15 +147087,20 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'admin_state_up') and self.admin_state_up is not None: _dict['admin_state_up'] = self.admin_state_up - if hasattr(self, 'authentication_mode') and self.authentication_mode is not None: + if hasattr( + self, + 'authentication_mode') and self.authentication_mode is not None: _dict['authentication_mode'] = self.authentication_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'dead_peer_detection') and self.dead_peer_detection is not None: + if hasattr( + self, + 'dead_peer_detection') and self.dead_peer_detection is not None: if isinstance(self.dead_peer_detection, dict): _dict['dead_peer_detection'] = self.dead_peer_detection else: - _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict() + _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict( + ) if hasattr(self, 'establish_mode') and self.establish_mode is not None: _dict['establish_mode'] = self.establish_mode if hasattr(self, 'href') and self.href is not None: @@ -135130,7 +147172,6 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' - class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -135148,7 +147189,6 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' - class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -135157,7 +147197,6 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -135165,7 +147204,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' - class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -135175,8 +147213,8 @@ class StatusEnum(str, Enum): UP = 'up' - -class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress(VPNGatewayConnectionPolicyModePeerPrototype): +class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress( + VPNGatewayConnectionPolicyModePeerPrototype): """ VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress. @@ -135196,7 +147234,8 @@ def __init__( cidrs: List[str], address: str, *, - ike_identity: Optional['VPNGatewayConnectionIKEIdentityPrototype'] = None, + ike_identity: Optional[ + 'VPNGatewayConnectionIKEIdentityPrototype'] = None, ) -> None: """ Initialize a VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress object. @@ -135218,19 +147257,25 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress': """Initialize a VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress object from a json dictionary.""" args = {} if (cidrs := _dict.get('cidrs')) is not None: args['cidrs'] = cidrs else: - raise ValueError('Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress JSON' + ) if (ike_identity := _dict.get('ike_identity')) is not None: args['ike_identity'] = ike_identity if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'address\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress JSON' + ) return cls(**args) @classmethod @@ -135260,18 +147305,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN(VPNGatewayConnectionPolicyModePeerPrototype): +class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN( + VPNGatewayConnectionPolicyModePeerPrototype): """ VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN. @@ -135291,7 +147343,8 @@ def __init__( cidrs: List[str], fqdn: str, *, - ike_identity: Optional['VPNGatewayConnectionIKEIdentityPrototype'] = None, + ike_identity: Optional[ + 'VPNGatewayConnectionIKEIdentityPrototype'] = None, ) -> None: """ Initialize a VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN object. @@ -135312,19 +147365,25 @@ def __init__( self.fqdn = fqdn @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN': """Initialize a VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN object from a json dictionary.""" args = {} if (cidrs := _dict.get('cidrs')) is not None: args['cidrs'] = cidrs else: - raise ValueError('Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN JSON' + ) if (ike_identity := _dict.get('ike_identity')) is not None: args['ike_identity'] = ike_identity if (fqdn := _dict.get('fqdn')) is not None: args['fqdn'] = fqdn else: - raise ValueError('Required property \'fqdn\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'fqdn\' not present in VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN JSON' + ) return cls(**args) @classmethod @@ -135354,18 +147413,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress(VPNGatewayConnectionPolicyModePeer): +class VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress( + VPNGatewayConnectionPolicyModePeer): """ VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress. @@ -135398,25 +147464,35 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress': """Initialize a VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress object from a json dictionary.""" args = {} if (cidrs := _dict.get('cidrs')) is not None: args['cidrs'] = cidrs else: - raise ValueError('Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON' + ) if (ike_identity := _dict.get('ike_identity')) is not None: args['ike_identity'] = ike_identity else: - raise ValueError('Required property \'ike_identity\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'ike_identity\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON' + ) if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'address\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress JSON' + ) return cls(**args) @classmethod @@ -135448,13 +147524,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -135467,8 +147549,8 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' - -class VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN(VPNGatewayConnectionPolicyModePeer): +class VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN( + VPNGatewayConnectionPolicyModePeer): """ VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN. @@ -135500,25 +147582,35 @@ def __init__( self.fqdn = fqdn @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN': """Initialize a VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN object from a json dictionary.""" args = {} if (cidrs := _dict.get('cidrs')) is not None: args['cidrs'] = cidrs else: - raise ValueError('Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'cidrs\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON' + ) if (ike_identity := _dict.get('ike_identity')) is not None: args['ike_identity'] = ike_identity else: - raise ValueError('Required property \'ike_identity\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'ike_identity\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON' + ) if (fqdn := _dict.get('fqdn')) is not None: args['fqdn'] = fqdn else: - raise ValueError('Required property \'fqdn\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'fqdn\' not present in VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN JSON' + ) return cls(**args) @classmethod @@ -135550,13 +147642,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -135569,8 +147667,8 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' - -class VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(VPNGatewayConnectionPrototype): +class VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype( + VPNGatewayConnectionPrototype): """ VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype. @@ -135605,10 +147703,12 @@ def __init__( peer: 'VPNGatewayConnectionPolicyModePeerPrototype', *, admin_state_up: Optional[bool] = None, - dead_peer_detection: Optional['VPNGatewayConnectionDPDPrototype'] = None, + dead_peer_detection: Optional[ + 'VPNGatewayConnectionDPDPrototype'] = None, establish_mode: Optional[str] = None, ike_policy: Optional['VPNGatewayConnectionIKEPolicyPrototype'] = None, - ipsec_policy: Optional['VPNGatewayConnectionIPsecPolicyPrototype'] = None, + ipsec_policy: Optional[ + 'VPNGatewayConnectionIPsecPolicyPrototype'] = None, name: Optional[str] = None, ) -> None: """ @@ -135649,13 +147749,18 @@ def __init__( self.peer = peer @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype': """Initialize a VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype object from a json dictionary.""" args = {} if (admin_state_up := _dict.get('admin_state_up')) is not None: args['admin_state_up'] = admin_state_up - if (dead_peer_detection := _dict.get('dead_peer_detection')) is not None: - args['dead_peer_detection'] = VPNGatewayConnectionDPDPrototype.from_dict(dead_peer_detection) + if (dead_peer_detection := + _dict.get('dead_peer_detection')) is not None: + args[ + 'dead_peer_detection'] = VPNGatewayConnectionDPDPrototype.from_dict( + dead_peer_detection) if (establish_mode := _dict.get('establish_mode')) is not None: args['establish_mode'] = establish_mode if (ike_policy := _dict.get('ike_policy')) is not None: @@ -135667,15 +147772,23 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPrototypeVPNGatewayConne if (psk := _dict.get('psk')) is not None: args['psk'] = psk else: - raise ValueError('Required property \'psk\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype JSON') + raise ValueError( + 'Required property \'psk\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype JSON' + ) if (local := _dict.get('local')) is not None: - args['local'] = VPNGatewayConnectionPolicyModeLocalPrototype.from_dict(local) + args[ + 'local'] = VPNGatewayConnectionPolicyModeLocalPrototype.from_dict( + local) else: - raise ValueError('Required property \'local\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype JSON') + raise ValueError( + 'Required property \'local\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype JSON' + ) if (peer := _dict.get('peer')) is not None: args['peer'] = peer else: - raise ValueError('Required property \'peer\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype JSON') + raise ValueError( + 'Required property \'peer\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype JSON' + ) return cls(**args) @classmethod @@ -135688,11 +147801,14 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'admin_state_up') and self.admin_state_up is not None: _dict['admin_state_up'] = self.admin_state_up - if hasattr(self, 'dead_peer_detection') and self.dead_peer_detection is not None: + if hasattr( + self, + 'dead_peer_detection') and self.dead_peer_detection is not None: if isinstance(self.dead_peer_detection, dict): _dict['dead_peer_detection'] = self.dead_peer_detection else: - _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict() + _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict( + ) if hasattr(self, 'establish_mode') and self.establish_mode is not None: _dict['establish_mode'] = self.establish_mode if hasattr(self, 'ike_policy') and self.ike_policy is not None: @@ -135729,13 +147845,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -135757,8 +147879,8 @@ class EstablishModeEnum(str, Enum): PEER_ONLY = 'peer_only' - -class VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(VPNGatewayConnectionPrototype): +class VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype( + VPNGatewayConnectionPrototype): """ VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype. @@ -135794,12 +147916,15 @@ def __init__( peer: 'VPNGatewayConnectionStaticRouteModePeerPrototype', *, admin_state_up: Optional[bool] = None, - dead_peer_detection: Optional['VPNGatewayConnectionDPDPrototype'] = None, + dead_peer_detection: Optional[ + 'VPNGatewayConnectionDPDPrototype'] = None, establish_mode: Optional[str] = None, ike_policy: Optional['VPNGatewayConnectionIKEPolicyPrototype'] = None, - ipsec_policy: Optional['VPNGatewayConnectionIPsecPolicyPrototype'] = None, + ipsec_policy: Optional[ + 'VPNGatewayConnectionIPsecPolicyPrototype'] = None, name: Optional[str] = None, - local: Optional['VPNGatewayConnectionStaticRouteModeLocalPrototype'] = None, + local: Optional[ + 'VPNGatewayConnectionStaticRouteModeLocalPrototype'] = None, routing_protocol: Optional[str] = None, ) -> None: """ @@ -135843,13 +147968,18 @@ def __init__( self.routing_protocol = routing_protocol @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype': """Initialize a VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype object from a json dictionary.""" args = {} if (admin_state_up := _dict.get('admin_state_up')) is not None: args['admin_state_up'] = admin_state_up - if (dead_peer_detection := _dict.get('dead_peer_detection')) is not None: - args['dead_peer_detection'] = VPNGatewayConnectionDPDPrototype.from_dict(dead_peer_detection) + if (dead_peer_detection := + _dict.get('dead_peer_detection')) is not None: + args[ + 'dead_peer_detection'] = VPNGatewayConnectionDPDPrototype.from_dict( + dead_peer_detection) if (establish_mode := _dict.get('establish_mode')) is not None: args['establish_mode'] = establish_mode if (ike_policy := _dict.get('ike_policy')) is not None: @@ -135861,13 +147991,19 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPrototypeVPNGatewayConne if (psk := _dict.get('psk')) is not None: args['psk'] = psk else: - raise ValueError('Required property \'psk\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype JSON') + raise ValueError( + 'Required property \'psk\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype JSON' + ) if (local := _dict.get('local')) is not None: - args['local'] = VPNGatewayConnectionStaticRouteModeLocalPrototype.from_dict(local) + args[ + 'local'] = VPNGatewayConnectionStaticRouteModeLocalPrototype.from_dict( + local) if (peer := _dict.get('peer')) is not None: args['peer'] = peer else: - raise ValueError('Required property \'peer\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype JSON') + raise ValueError( + 'Required property \'peer\' not present in VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype JSON' + ) if (routing_protocol := _dict.get('routing_protocol')) is not None: args['routing_protocol'] = routing_protocol return cls(**args) @@ -135882,11 +148018,14 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'admin_state_up') and self.admin_state_up is not None: _dict['admin_state_up'] = self.admin_state_up - if hasattr(self, 'dead_peer_detection') and self.dead_peer_detection is not None: + if hasattr( + self, + 'dead_peer_detection') and self.dead_peer_detection is not None: if isinstance(self.dead_peer_detection, dict): _dict['dead_peer_detection'] = self.dead_peer_detection else: - _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict() + _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict( + ) if hasattr(self, 'establish_mode') and self.establish_mode is not None: _dict['establish_mode'] = self.establish_mode if hasattr(self, 'ike_policy') and self.ike_policy is not None: @@ -135913,7 +148052,8 @@ def to_dict(self) -> Dict: _dict['peer'] = self.peer else: _dict['peer'] = self.peer.to_dict() - if hasattr(self, 'routing_protocol') and self.routing_protocol is not None: + if hasattr(self, + 'routing_protocol') and self.routing_protocol is not None: _dict['routing_protocol'] = self.routing_protocol return _dict @@ -135925,13 +148065,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -135952,7 +148098,6 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' - class RoutingProtocolEnum(str, Enum): """ Routing protocols are disabled for this VPN gateway connection. @@ -135961,7 +148106,6 @@ class RoutingProtocolEnum(str, Enum): NONE = 'none' - class VPNGatewayConnectionRouteMode(VPNGatewayConnection): """ VPNGatewayConnectionRouteMode. @@ -136060,8 +148204,9 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode']) - ) + ", ".join([ + 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode' + ])) raise Exception(msg) @classmethod @@ -136071,8 +148216,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionRouteMode': if disc_class != cls: return disc_class.from_dict(_dict) msg = "Cannot convert dictionary into an instance of base class 'VPNGatewayConnectionRouteMode'. The discriminator value should map to a valid subclass: {1}".format( - ", ".join(['VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode']) - ) + ", ".join([ + 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode' + ])) raise Exception(msg) @classmethod @@ -136083,10 +148229,13 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['none'] = 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode' + mapping[ + 'none'] = 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode' disc_value = _dict.get('routing_protocol') if disc_value is None: - raise ValueError('Discriminator property \'routing_protocol\' not found in VPNGatewayConnectionRouteMode JSON') + raise ValueError( + 'Discriminator property \'routing_protocol\' not found in VPNGatewayConnectionRouteMode JSON' + ) class_name = mapping.get(disc_value, disc_value) try: disc_class = getattr(sys.modules[__name__], class_name) @@ -136103,7 +148252,6 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' - class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -136121,7 +148269,6 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' - class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -136130,7 +148277,6 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -136138,7 +148284,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' - class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -136148,8 +148293,8 @@ class StatusEnum(str, Enum): UP = 'up' - -class VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(VPNGatewayConnectionStaticRouteModePeerPrototype): +class VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress( + VPNGatewayConnectionStaticRouteModePeerPrototype): """ VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress. @@ -136167,7 +148312,8 @@ def __init__( self, address: str, *, - ike_identity: Optional['VPNGatewayConnectionIKEIdentityPrototype'] = None, + ike_identity: Optional[ + 'VPNGatewayConnectionIKEIdentityPrototype'] = None, ) -> None: """ Initialize a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress object. @@ -136187,7 +148333,9 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress': """Initialize a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress object from a json dictionary.""" args = {} if (ike_identity := _dict.get('ike_identity')) is not None: @@ -136195,7 +148343,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerProto if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'address\' not present in VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress JSON' + ) return cls(**args) @classmethod @@ -136223,18 +148373,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN(VPNGatewayConnectionStaticRouteModePeerPrototype): +class VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN( + VPNGatewayConnectionStaticRouteModePeerPrototype): """ VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN. @@ -136252,7 +148409,8 @@ def __init__( self, fqdn: str, *, - ike_identity: Optional['VPNGatewayConnectionIKEIdentityPrototype'] = None, + ike_identity: Optional[ + 'VPNGatewayConnectionIKEIdentityPrototype'] = None, ) -> None: """ Initialize a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN object. @@ -136271,7 +148429,9 @@ def __init__( self.fqdn = fqdn @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN': """Initialize a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN object from a json dictionary.""" args = {} if (ike_identity := _dict.get('ike_identity')) is not None: @@ -136279,7 +148439,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerProto if (fqdn := _dict.get('fqdn')) is not None: args['fqdn'] = fqdn else: - raise ValueError('Required property \'fqdn\' not present in VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'fqdn\' not present in VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN JSON' + ) return cls(**args) @classmethod @@ -136307,18 +148469,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress(VPNGatewayConnectionStaticRouteModePeer): +class VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress( + VPNGatewayConnectionStaticRouteModePeer): """ VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress. @@ -136347,21 +148516,29 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress': """Initialize a VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress object from a json dictionary.""" args = {} if (ike_identity := _dict.get('ike_identity')) is not None: args['ike_identity'] = ike_identity else: - raise ValueError('Required property \'ike_identity\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'ike_identity\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress JSON' + ) if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress JSON') + raise ValueError( + 'Required property \'address\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress JSON' + ) return cls(**args) @classmethod @@ -136391,13 +148568,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -136410,8 +148593,8 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' - -class VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN(VPNGatewayConnectionStaticRouteModePeer): +class VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN( + VPNGatewayConnectionStaticRouteModePeer): """ VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN. @@ -136439,21 +148622,29 @@ def __init__( self.fqdn = fqdn @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN': """Initialize a VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN object from a json dictionary.""" args = {} if (ike_identity := _dict.get('ike_identity')) is not None: args['ike_identity'] = ike_identity else: - raise ValueError('Required property \'ike_identity\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'ike_identity\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN JSON' + ) if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError('Required property \'type\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'type\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN JSON' + ) if (fqdn := _dict.get('fqdn')) is not None: args['fqdn'] = fqdn else: - raise ValueError('Required property \'fqdn\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN JSON') + raise ValueError( + 'Required property \'fqdn\' not present in VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN JSON' + ) return cls(**args) @classmethod @@ -136483,13 +148674,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -136502,7 +148699,6 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' - class VPNGatewayPolicyMode(VPNGateway): """ VPNGatewayPolicyMode. @@ -136619,69 +148815,109 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayPolicyMode': """Initialize a VPNGatewayPolicyMode object from a json dictionary.""" args = {} if (connections := _dict.get('connections')) is not None: - args['connections'] = [VPNGatewayConnectionReference.from_dict(v) for v in connections] + args['connections'] = [ + VPNGatewayConnectionReference.from_dict(v) for v in connections + ] else: - raise ValueError('Required property \'connections\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'connections\' not present in VPNGatewayPolicyMode JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'created_at\' not present in VPNGatewayPolicyMode JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'crn\' not present in VPNGatewayPolicyMode JSON' + ) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VPNGatewayHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VPNGatewayHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in VPNGatewayPolicyMode JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'health_state\' not present in VPNGatewayPolicyMode JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayPolicyMode JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayPolicyMode JSON' + ) if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [VPNGatewayLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + VPNGatewayLifecycleReason.from_dict(v) + for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in VPNGatewayPolicyMode JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in VPNGatewayPolicyMode JSON' + ) if (members := _dict.get('members')) is not None: args['members'] = [VPNGatewayMember.from_dict(v) for v in members] else: - raise ValueError('Required property \'members\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'members\' not present in VPNGatewayPolicyMode JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'name\' not present in VPNGatewayPolicyMode JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'resource_group\' not present in VPNGatewayPolicyMode JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNGatewayPolicyMode JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'subnet\' not present in VPNGatewayPolicyMode JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'vpc\' not present in VPNGatewayPolicyMode JSON' + ) if (mode := _dict.get('mode')) is not None: args['mode'] = mode else: - raise ValueError('Required property \'mode\' not present in VPNGatewayPolicyMode JSON') + raise ValueError( + 'Required property \'mode\' not present in VPNGatewayPolicyMode JSON' + ) return cls(**args) @classmethod @@ -136718,7 +148954,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -136726,7 +148963,8 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'members') and self.members is not None: members_list = [] @@ -136794,7 +149032,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway. @@ -136808,7 +149045,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -136816,7 +149052,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' - class ModeEnum(str, Enum): """ Policy mode VPN gateway. @@ -136825,7 +149060,6 @@ class ModeEnum(str, Enum): POLICY = 'policy' - class VPNGatewayPrototypeVPNGatewayPolicyModePrototype(VPNGatewayPrototype): """ VPNGatewayPrototypeVPNGatewayPolicyModePrototype. @@ -136863,7 +149097,9 @@ def __init__( self.mode = mode @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype': + def from_dict( + cls, + _dict: Dict) -> 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype': """Initialize a VPNGatewayPrototypeVPNGatewayPolicyModePrototype object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -136873,7 +149109,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayPrototypeVPNGatewayPolicyModeProto if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in VPNGatewayPrototypeVPNGatewayPolicyModePrototype JSON') + raise ValueError( + 'Required property \'subnet\' not present in VPNGatewayPrototypeVPNGatewayPolicyModePrototype JSON' + ) if (mode := _dict.get('mode')) is not None: args['mode'] = mode return cls(**args) @@ -136910,13 +149148,17 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayPrototypeVPNGatewayPolicyModePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype') -> bool: + def __eq__( + self, + other: 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype') -> bool: + def __ne__( + self, + other: 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -136928,7 +149170,6 @@ class ModeEnum(str, Enum): POLICY = 'policy' - class VPNGatewayPrototypeVPNGatewayRouteModePrototype(VPNGatewayPrototype): """ VPNGatewayPrototypeVPNGatewayRouteModePrototype. @@ -136966,7 +149207,9 @@ def __init__( self.mode = mode @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayPrototypeVPNGatewayRouteModePrototype': + def from_dict( + cls, + _dict: Dict) -> 'VPNGatewayPrototypeVPNGatewayRouteModePrototype': """Initialize a VPNGatewayPrototypeVPNGatewayRouteModePrototype object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -136976,7 +149219,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayPrototypeVPNGatewayRouteModeProtot if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError('Required property \'subnet\' not present in VPNGatewayPrototypeVPNGatewayRouteModePrototype JSON') + raise ValueError( + 'Required property \'subnet\' not present in VPNGatewayPrototypeVPNGatewayRouteModePrototype JSON' + ) if (mode := _dict.get('mode')) is not None: args['mode'] = mode return cls(**args) @@ -137013,13 +149258,17 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayPrototypeVPNGatewayRouteModePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayPrototypeVPNGatewayRouteModePrototype') -> bool: + def __eq__( + self, + other: 'VPNGatewayPrototypeVPNGatewayRouteModePrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayPrototypeVPNGatewayRouteModePrototype') -> bool: + def __ne__( + self, + other: 'VPNGatewayPrototypeVPNGatewayRouteModePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -137031,7 +149280,6 @@ class ModeEnum(str, Enum): ROUTE = 'route' - class VPNGatewayRouteMode(VPNGateway): """ VPNGatewayRouteMode. @@ -137148,69 +149396,109 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayRouteMode': """Initialize a VPNGatewayRouteMode object from a json dictionary.""" args = {} if (connections := _dict.get('connections')) is not None: - args['connections'] = [VPNGatewayConnectionReference.from_dict(v) for v in connections] + args['connections'] = [ + VPNGatewayConnectionReference.from_dict(v) for v in connections + ] else: - raise ValueError('Required property \'connections\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'connections\' not present in VPNGatewayRouteMode JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'created_at\' not present in VPNGatewayRouteMode JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'crn\' not present in VPNGatewayRouteMode JSON' + ) if (health_reasons := _dict.get('health_reasons')) is not None: - args['health_reasons'] = [VPNGatewayHealthReason.from_dict(v) for v in health_reasons] + args['health_reasons'] = [ + VPNGatewayHealthReason.from_dict(v) for v in health_reasons + ] else: - raise ValueError('Required property \'health_reasons\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'health_reasons\' not present in VPNGatewayRouteMode JSON' + ) if (health_state := _dict.get('health_state')) is not None: args['health_state'] = health_state else: - raise ValueError('Required property \'health_state\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'health_state\' not present in VPNGatewayRouteMode JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayRouteMode JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayRouteMode JSON' + ) if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [VPNGatewayLifecycleReason.from_dict(v) for v in lifecycle_reasons] + args['lifecycle_reasons'] = [ + VPNGatewayLifecycleReason.from_dict(v) + for v in lifecycle_reasons + ] else: - raise ValueError('Required property \'lifecycle_reasons\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'lifecycle_reasons\' not present in VPNGatewayRouteMode JSON' + ) if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: - raise ValueError('Required property \'lifecycle_state\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'lifecycle_state\' not present in VPNGatewayRouteMode JSON' + ) if (members := _dict.get('members')) is not None: args['members'] = [VPNGatewayMember.from_dict(v) for v in members] else: - raise ValueError('Required property \'members\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'members\' not present in VPNGatewayRouteMode JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'name\' not present in VPNGatewayRouteMode JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'resource_group\' not present in VPNGatewayRouteMode JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNGatewayRouteMode JSON' + ) if (subnet := _dict.get('subnet')) is not None: args['subnet'] = SubnetReference.from_dict(subnet) else: - raise ValueError('Required property \'subnet\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'subnet\' not present in VPNGatewayRouteMode JSON' + ) if (vpc := _dict.get('vpc')) is not None: args['vpc'] = VPCReference.from_dict(vpc) else: - raise ValueError('Required property \'vpc\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'vpc\' not present in VPNGatewayRouteMode JSON' + ) if (mode := _dict.get('mode')) is not None: args['mode'] = mode else: - raise ValueError('Required property \'mode\' not present in VPNGatewayRouteMode JSON') + raise ValueError( + 'Required property \'mode\' not present in VPNGatewayRouteMode JSON' + ) return cls(**args) @classmethod @@ -137247,7 +149535,8 @@ def to_dict(self) -> Dict: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id - if hasattr(self, 'lifecycle_reasons') and self.lifecycle_reasons is not None: + if hasattr(self, + 'lifecycle_reasons') and self.lifecycle_reasons is not None: lifecycle_reasons_list = [] for v in self.lifecycle_reasons: if isinstance(v, dict): @@ -137255,7 +149544,8 @@ def to_dict(self) -> Dict: else: lifecycle_reasons_list.append(v.to_dict()) _dict['lifecycle_reasons'] = lifecycle_reasons_list - if hasattr(self, 'lifecycle_state') and self.lifecycle_state is not None: + if hasattr(self, + 'lifecycle_state') and self.lifecycle_state is not None: _dict['lifecycle_state'] = self.lifecycle_state if hasattr(self, 'members') and self.members is not None: members_list = [] @@ -137323,7 +149613,6 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' - class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway. @@ -137337,7 +149626,6 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -137345,7 +149633,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' - class ModeEnum(str, Enum): """ Route mode VPN gateway. @@ -137354,7 +149641,6 @@ class ModeEnum(str, Enum): ROUTE = 'route' - class VPNServerAuthenticationByCertificate(VPNServerAuthentication): """ VPNServerAuthenticationByCertificate. @@ -137394,11 +149680,16 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationByCertificate': if (method := _dict.get('method')) is not None: args['method'] = method else: - raise ValueError('Required property \'method\' not present in VPNServerAuthenticationByCertificate JSON') + raise ValueError( + 'Required property \'method\' not present in VPNServerAuthenticationByCertificate JSON' + ) if (client_ca := _dict.get('client_ca')) is not None: - args['client_ca'] = CertificateInstanceReference.from_dict(client_ca) + args['client_ca'] = CertificateInstanceReference.from_dict( + client_ca) else: - raise ValueError('Required property \'client_ca\' not present in VPNServerAuthenticationByCertificate JSON') + raise ValueError( + 'Required property \'client_ca\' not present in VPNServerAuthenticationByCertificate JSON' + ) if (crl := _dict.get('crl')) is not None: args['crl'] = crl return cls(**args) @@ -137449,7 +149740,6 @@ class MethodEnum(str, Enum): USERNAME = 'username' - class VPNServerAuthenticationByUsername(VPNServerAuthentication): """ VPNServerAuthenticationByUsername. @@ -137482,11 +149772,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationByUsername': if (method := _dict.get('method')) is not None: args['method'] = method else: - raise ValueError('Required property \'method\' not present in VPNServerAuthenticationByUsername JSON') + raise ValueError( + 'Required property \'method\' not present in VPNServerAuthenticationByUsername JSON' + ) if (identity_provider := _dict.get('identity_provider')) is not None: args['identity_provider'] = identity_provider else: - raise ValueError('Required property \'identity_provider\' not present in VPNServerAuthenticationByUsername JSON') + raise ValueError( + 'Required property \'identity_provider\' not present in VPNServerAuthenticationByUsername JSON' + ) return cls(**args) @classmethod @@ -137499,7 +149793,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'method') and self.method is not None: _dict['method'] = self.method - if hasattr(self, 'identity_provider') and self.identity_provider is not None: + if hasattr(self, + 'identity_provider') and self.identity_provider is not None: if isinstance(self.identity_provider, dict): _dict['identity_provider'] = self.identity_provider else: @@ -137533,8 +149828,8 @@ class MethodEnum(str, Enum): USERNAME = 'username' - -class VPNServerAuthenticationByUsernameIdProviderByIAM(VPNServerAuthenticationByUsernameIdProvider): +class VPNServerAuthenticationByUsernameIdProviderByIAM( + VPNServerAuthenticationByUsernameIdProvider): """ VPNServerAuthenticationByUsernameIdProviderByIAM. @@ -137564,13 +149859,17 @@ def __init__( self.provider_type = provider_type @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationByUsernameIdProviderByIAM': + def from_dict( + cls, + _dict: Dict) -> 'VPNServerAuthenticationByUsernameIdProviderByIAM': """Initialize a VPNServerAuthenticationByUsernameIdProviderByIAM object from a json dictionary.""" args = {} if (provider_type := _dict.get('provider_type')) is not None: args['provider_type'] = provider_type else: - raise ValueError('Required property \'provider_type\' not present in VPNServerAuthenticationByUsernameIdProviderByIAM JSON') + raise ValueError( + 'Required property \'provider_type\' not present in VPNServerAuthenticationByUsernameIdProviderByIAM JSON' + ) return cls(**args) @classmethod @@ -137593,13 +149892,17 @@ def __str__(self) -> str: """Return a `str` version of this VPNServerAuthenticationByUsernameIdProviderByIAM object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNServerAuthenticationByUsernameIdProviderByIAM') -> bool: + def __eq__( + self, + other: 'VPNServerAuthenticationByUsernameIdProviderByIAM') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNServerAuthenticationByUsernameIdProviderByIAM') -> bool: + def __ne__( + self, + other: 'VPNServerAuthenticationByUsernameIdProviderByIAM') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -137615,8 +149918,8 @@ class ProviderTypeEnum(str, Enum): IAM = 'iam' - -class VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype(VPNServerAuthenticationPrototype): +class VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype( + VPNServerAuthenticationPrototype): """ VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype. @@ -137649,17 +149952,23 @@ def __init__( self.crl = crl @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype': + def from_dict( + cls, _dict: Dict + ) -> 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype': """Initialize a VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype object from a json dictionary.""" args = {} if (method := _dict.get('method')) is not None: args['method'] = method else: - raise ValueError('Required property \'method\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype JSON') + raise ValueError( + 'Required property \'method\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype JSON' + ) if (client_ca := _dict.get('client_ca')) is not None: args['client_ca'] = client_ca else: - raise ValueError('Required property \'client_ca\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype JSON') + raise ValueError( + 'Required property \'client_ca\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype JSON' + ) if (crl := _dict.get('crl')) is not None: args['crl'] = crl return cls(**args) @@ -137691,13 +150000,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype') -> bool: + def __eq__( + self, other: + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype') -> bool: + def __ne__( + self, other: + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -137710,8 +150025,8 @@ class MethodEnum(str, Enum): USERNAME = 'username' - -class VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype(VPNServerAuthenticationPrototype): +class VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype( + VPNServerAuthenticationPrototype): """ VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype. @@ -137737,17 +150052,23 @@ def __init__( self.identity_provider = identity_provider @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype': + def from_dict( + cls, _dict: Dict + ) -> 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype': """Initialize a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype object from a json dictionary.""" args = {} if (method := _dict.get('method')) is not None: args['method'] = method else: - raise ValueError('Required property \'method\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype JSON') + raise ValueError( + 'Required property \'method\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype JSON' + ) if (identity_provider := _dict.get('identity_provider')) is not None: args['identity_provider'] = identity_provider else: - raise ValueError('Required property \'identity_provider\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype JSON') + raise ValueError( + 'Required property \'identity_provider\' not present in VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype JSON' + ) return cls(**args) @classmethod @@ -137760,7 +150081,8 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'method') and self.method is not None: _dict['method'] = self.method - if hasattr(self, 'identity_provider') and self.identity_provider is not None: + if hasattr(self, + 'identity_provider') and self.identity_provider is not None: if isinstance(self.identity_provider, dict): _dict['identity_provider'] = self.identity_provider else: @@ -137775,13 +150097,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype') -> bool: + def __eq__( + self, other: + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype') -> bool: + def __ne__( + self, other: + 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -137794,29 +150122,30 @@ class MethodEnum(str, Enum): USERNAME = 'username' - -class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext(VirtualNetworkInterfaceIPPrototype): +class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext( + VirtualNetworkInterfaceIPPrototype): """ Identifies a reserved IP by a unique property. The reserved IP must be currently unbound and in the primary IP's subnet. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById', 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref']) - ) + ", ".join([ + 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById', + 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref' + ])) raise Exception(msg) -class VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext(VirtualNetworkInterfaceIPPrototype): +class VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext( + VirtualNetworkInterfaceIPPrototype): """ The prototype for a new reserved IP. Must be in the primary IP's subnet. @@ -137861,7 +150190,9 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext': """Initialize a VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: @@ -137896,39 +150227,47 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext(VirtualNetworkInterfacePrimaryIPPrototype): +class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext( + VirtualNetworkInterfacePrimaryIPPrototype): """ Identifies a reserved IP by a unique property. Required if `subnet` is not specified. The reserved IP must be currently unbound. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById', 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref']) - ) + ", ".join([ + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById', + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref' + ])) raise Exception(msg) -class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext(VirtualNetworkInterfacePrimaryIPPrototype): +class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext( + VirtualNetworkInterfacePrimaryIPPrototype): """ The prototype for a new reserved IP. Requires `subnet` to be specified. @@ -137973,7 +150312,9 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext': """Initialize a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: @@ -138008,18 +150349,25 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext(VirtualNetworkInterfaceTarget): +class VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext( + VirtualNetworkInterfaceTarget): """ VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext. @@ -138056,25 +150404,35 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext': """Initialize a VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'id\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'name\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) return cls(**args) @classmethod @@ -138103,13 +150461,19 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -138121,8 +150485,8 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_NETWORK_ATTACHMENT = 'bare_metal_server_network_attachment' - -class VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext(VirtualNetworkInterfaceTarget): +class VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext( + VirtualNetworkInterfaceTarget): """ VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext. @@ -138156,25 +150520,35 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext': """Initialize a VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'id\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'name\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext JSON' + ) return cls(**args) @classmethod @@ -138203,13 +150577,19 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -138221,8 +150601,8 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' - -class VirtualNetworkInterfaceTargetShareMountTargetReference(VirtualNetworkInterfaceTarget): +class VirtualNetworkInterfaceTargetShareMountTargetReference( + VirtualNetworkInterfaceTarget): """ VirtualNetworkInterfaceTargetShareMountTargetReference. @@ -138266,27 +150646,38 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceTargetShareMountTargetReference': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfaceTargetShareMountTargetReference': """Initialize a VirtualNetworkInterfaceTargetShareMountTargetReference object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: - args['deleted'] = ShareMountTargetReferenceDeleted.from_dict(deleted) + args['deleted'] = ShareMountTargetReferenceDeleted.from_dict( + deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON') + raise ValueError( + 'Required property \'id\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON') + raise ValueError( + 'Required property \'name\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VirtualNetworkInterfaceTargetShareMountTargetReference JSON' + ) return cls(**args) @classmethod @@ -138320,13 +150711,17 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfaceTargetShareMountTargetReference object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfaceTargetShareMountTargetReference') -> bool: + def __eq__( + self, other: 'VirtualNetworkInterfaceTargetShareMountTargetReference' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfaceTargetShareMountTargetReference') -> bool: + def __ne__( + self, other: 'VirtualNetworkInterfaceTargetShareMountTargetReference' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -138338,28 +150733,30 @@ class ResourceTypeEnum(str, Enum): SHARE_MOUNT_TARGET = 'share_mount_target' - -class VolumeAttachmentPrototypeVolumeVolumeIdentity(VolumeAttachmentPrototypeVolume): +class VolumeAttachmentPrototypeVolumeVolumeIdentity( + VolumeAttachmentPrototypeVolume): """ Identifies a volume by a unique property. """ - def __init__( - self, - ) -> None: + def __init__(self,) -> None: """ Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentity object. """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById', 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN', 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref']) - ) + ", ".join([ + 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById', + 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN', + 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref' + ])) raise Exception(msg) -class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext(VolumeAttachmentPrototypeVolume): +class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext( + VolumeAttachmentPrototypeVolume): """ VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext. @@ -138411,8 +150808,10 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity', 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot']) - ) + ", ".join([ + 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity', + 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot' + ])) raise Exception(msg) @@ -138442,7 +150841,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeIdentityByCRN': if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VolumeIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in VolumeIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -138502,7 +150903,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -138562,7 +150965,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeIdentityById': if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VolumeIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VolumeIdentityById JSON' + ) return cls(**args) @classmethod @@ -138622,7 +151027,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfileIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeProfileIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeProfileIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -138682,7 +151089,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfileIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VolumeProfileIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in VolumeProfileIdentityByName JSON' + ) return cls(**args) @classmethod @@ -138802,7 +151211,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumePrototypeVolumeByCapacity': if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in VolumePrototypeVolumeByCapacity JSON') + raise ValueError( + 'Required property \'profile\' not present in VolumePrototypeVolumeByCapacity JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (user_tags := _dict.get('user_tags')) is not None: @@ -138810,11 +151221,15 @@ def from_dict(cls, _dict: Dict) -> 'VolumePrototypeVolumeByCapacity': if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in VolumePrototypeVolumeByCapacity JSON') + raise ValueError( + 'Required property \'zone\' not present in VolumePrototypeVolumeByCapacity JSON' + ) if (capacity := _dict.get('capacity')) is not None: args['capacity'] = capacity else: - raise ValueError('Required property \'capacity\' not present in VolumePrototypeVolumeByCapacity JSON') + raise ValueError( + 'Required property \'capacity\' not present in VolumePrototypeVolumeByCapacity JSON' + ) if (encryption_key := _dict.get('encryption_key')) is not None: args['encryption_key'] = encryption_key return cls(**args) @@ -138969,7 +151384,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumePrototypeVolumeBySourceSnapshot': if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in VolumePrototypeVolumeBySourceSnapshot JSON') + raise ValueError( + 'Required property \'profile\' not present in VolumePrototypeVolumeBySourceSnapshot JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (user_tags := _dict.get('user_tags')) is not None: @@ -138977,7 +151394,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumePrototypeVolumeBySourceSnapshot': if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in VolumePrototypeVolumeBySourceSnapshot JSON') + raise ValueError( + 'Required property \'zone\' not present in VolumePrototypeVolumeBySourceSnapshot JSON' + ) if (capacity := _dict.get('capacity')) is not None: args['capacity'] = capacity if (encryption_key := _dict.get('encryption_key')) is not None: @@ -138985,7 +151404,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumePrototypeVolumeBySourceSnapshot': if (source_snapshot := _dict.get('source_snapshot')) is not None: args['source_snapshot'] = source_snapshot else: - raise ValueError('Required property \'source_snapshot\' not present in VolumePrototypeVolumeBySourceSnapshot JSON') + raise ValueError( + 'Required property \'source_snapshot\' not present in VolumePrototypeVolumeBySourceSnapshot JSON' + ) return cls(**args) @classmethod @@ -139024,7 +151445,8 @@ def to_dict(self) -> Dict: _dict['encryption_key'] = self.encryption_key else: _dict['encryption_key'] = self.encryption_key.to_dict() - if hasattr(self, 'source_snapshot') and self.source_snapshot is not None: + if hasattr(self, + 'source_snapshot') and self.source_snapshot is not None: if isinstance(self.source_snapshot, dict): _dict['source_snapshot'] = self.source_snapshot else: @@ -139076,7 +151498,9 @@ def from_dict(cls, _dict: Dict) -> 'ZoneIdentityByHref': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ZoneIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ZoneIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -139136,7 +151560,9 @@ def from_dict(cls, _dict: Dict) -> 'ZoneIdentityByName': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in ZoneIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in ZoneIdentityByName JSON' + ) return cls(**args) @classmethod @@ -139170,7 +151596,8 @@ def __ne__(self, other: 'ZoneIdentityByName') -> bool: return not self == other -class BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN(BackupPolicyScopePrototypeEnterpriseIdentity): +class BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN( + BackupPolicyScopePrototypeEnterpriseIdentity): """ BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN. @@ -139190,13 +151617,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN': """Initialize a BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -139219,18 +151650,26 @@ def __str__(self) -> str: """Return a `str` version of this BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN') -> bool: + def __eq__( + self, other: + 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN') -> bool: + def __ne__( + self, other: + 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): +class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity +): """ BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -139250,13 +151689,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': """Initialize a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -139279,18 +151722,26 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): +class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity +): """ BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref. @@ -139310,13 +151761,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': """Initialize a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -139339,18 +151794,26 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): +class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity +): """ BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById. @@ -139370,13 +151833,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': """Initialize a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -139399,18 +151866,25 @@ def __str__(self) -> str: """Return a `str` version of this BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class EndpointGatewayReservedIPReservedIPIdentityByHref(EndpointGatewayReservedIPReservedIPIdentity): +class EndpointGatewayReservedIPReservedIPIdentityByHref( + EndpointGatewayReservedIPReservedIPIdentity): """ EndpointGatewayReservedIPReservedIPIdentityByHref. @@ -139430,13 +151904,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPIdentityByHref': + def from_dict( + cls, + _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPIdentityByHref': """Initialize a EndpointGatewayReservedIPReservedIPIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in EndpointGatewayReservedIPReservedIPIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in EndpointGatewayReservedIPReservedIPIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -139459,18 +151937,23 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayReservedIPReservedIPIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'EndpointGatewayReservedIPReservedIPIdentityByHref') -> bool: + def __eq__( + self, + other: 'EndpointGatewayReservedIPReservedIPIdentityByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPIdentityByHref') -> bool: + def __ne__( + self, + other: 'EndpointGatewayReservedIPReservedIPIdentityByHref') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class EndpointGatewayReservedIPReservedIPIdentityById(EndpointGatewayReservedIPReservedIPIdentity): +class EndpointGatewayReservedIPReservedIPIdentityById( + EndpointGatewayReservedIPReservedIPIdentity): """ EndpointGatewayReservedIPReservedIPIdentityById. @@ -139490,13 +151973,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPIdentityById': + def from_dict( + cls, + _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPIdentityById': """Initialize a EndpointGatewayReservedIPReservedIPIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in EndpointGatewayReservedIPReservedIPIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in EndpointGatewayReservedIPReservedIPIdentityById JSON' + ) return cls(**args) @classmethod @@ -139519,18 +152006,23 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayReservedIPReservedIPIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'EndpointGatewayReservedIPReservedIPIdentityById') -> bool: + def __eq__( + self, + other: 'EndpointGatewayReservedIPReservedIPIdentityById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPIdentityById') -> bool: + def __ne__( + self, + other: 'EndpointGatewayReservedIPReservedIPIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(EndpointGatewayTargetPrototypeProviderCloudServiceIdentity): +class EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN( + EndpointGatewayTargetPrototypeProviderCloudServiceIdentity): """ EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN. @@ -139556,17 +152048,23 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN': """Initialize a EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN object from a json dictionary.""" args = {} if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN JSON') + raise ValueError( + 'Required property \'resource_type\' not present in EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -139591,13 +152089,19 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -139610,8 +152114,8 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' - -class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity): +class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName( + EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity): """ The name of this provider infrastructure service. @@ -139637,17 +152141,23 @@ def __init__( self.name = name @classmethod - def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName': + def from_dict( + cls, _dict: Dict + ) -> 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName': """Initialize a EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName object from a json dictionary.""" args = {} if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName JSON') + raise ValueError( + 'Required property \'resource_type\' not present in EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName JSON') + raise ValueError( + 'Required property \'name\' not present in EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName JSON' + ) return cls(**args) @classmethod @@ -139672,13 +152182,19 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName') -> bool: + def __eq__( + self, other: + 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName') -> bool: + def __ne__( + self, other: + 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -139691,8 +152207,8 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' - -class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref(FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity): +class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref( + FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity): """ FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref. @@ -139721,13 +152237,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref': """Initialize a FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -139750,18 +152270,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById(FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity): +class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById( + FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity): """ FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById. @@ -139795,13 +152322,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById': """Initialize a FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -139824,18 +152355,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FloatingIPTargetPatchNetworkInterfaceIdentity): +class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref( + FloatingIPTargetPatchNetworkInterfaceIdentity): """ FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref. @@ -139863,13 +152401,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref': """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -139892,18 +152434,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById(FloatingIPTargetPatchNetworkInterfaceIdentity): +class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById( + FloatingIPTargetPatchNetworkInterfaceIdentity): """ FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById. @@ -139934,13 +152483,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById': """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -139963,18 +152516,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(FloatingIPTargetPatchVirtualNetworkInterfaceIdentity): +class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + FloatingIPTargetPatchVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -139994,13 +152554,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': """Initialize a FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -140023,18 +152587,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(FloatingIPTargetPatchVirtualNetworkInterfaceIdentity): +class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + FloatingIPTargetPatchVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref. @@ -140054,13 +152625,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': """Initialize a FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -140083,18 +152658,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(FloatingIPTargetPatchVirtualNetworkInterfaceIdentity): +class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + FloatingIPTargetPatchVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById. @@ -140114,13 +152696,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': """Initialize a FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -140143,18 +152729,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref(FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity): +class FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref( + FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref. @@ -140183,13 +152776,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref': """Initialize a FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -140212,18 +152809,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById(FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity): +class FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById( + FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById. @@ -140257,13 +152861,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById': """Initialize a FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -140286,18 +152894,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FloatingIPTargetPrototypeNetworkInterfaceIdentity): +class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref( + FloatingIPTargetPrototypeNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref. @@ -140325,13 +152940,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref': """Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -140354,18 +152973,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById(FloatingIPTargetPrototypeNetworkInterfaceIdentity): +class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById( + FloatingIPTargetPrototypeNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById. @@ -140396,13 +153022,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById': """Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -140425,18 +153055,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity): +class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -140456,13 +153093,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': """Initialize a FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -140485,18 +153126,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity): +class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref. @@ -140516,13 +153164,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': """Initialize a FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -140545,18 +153197,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity): +class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById. @@ -140576,13 +153235,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': """Initialize a FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -140605,18 +153268,25 @@ def __str__(self) -> str: """Return a `str` version of this FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(FlowLogCollectorTargetPrototypeInstanceIdentity): +class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN( + FlowLogCollectorTargetPrototypeInstanceIdentity): """ FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN. @@ -140636,13 +153306,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN': """Initialize a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -140665,18 +153339,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(FlowLogCollectorTargetPrototypeInstanceIdentity): +class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref( + FlowLogCollectorTargetPrototypeInstanceIdentity): """ FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref. @@ -140696,13 +153377,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref': """Initialize a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -140725,18 +153410,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById(FlowLogCollectorTargetPrototypeInstanceIdentity): +class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById( + FlowLogCollectorTargetPrototypeInstanceIdentity): """ FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById. @@ -140756,13 +153448,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById': """Initialize a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById JSON' + ) return cls(**args) @classmethod @@ -140785,18 +153481,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref(FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity): +class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref( + FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity): """ FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref. @@ -140816,13 +153519,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref': """Initialize a FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -140845,18 +153552,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById(FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity): +class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById( + FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity): """ FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById. @@ -140876,13 +153590,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById': """Initialize a FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById JSON' + ) return cls(**args) @classmethod @@ -140905,18 +153623,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity): +class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref( + FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity): """ FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref. @@ -140944,13 +153669,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref': """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -140973,18 +153702,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity): +class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById( + FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity): """ FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById. @@ -141015,13 +153751,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById': """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -141044,18 +153784,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(FlowLogCollectorTargetPrototypeSubnetIdentity): +class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN( + FlowLogCollectorTargetPrototypeSubnetIdentity): """ FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN. @@ -141075,13 +153822,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN': """Initialize a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -141104,18 +153855,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN') -> bool: + def __eq__( + self, + other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN') -> bool: + def __ne__( + self, + other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(FlowLogCollectorTargetPrototypeSubnetIdentity): +class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref( + FlowLogCollectorTargetPrototypeSubnetIdentity): """ FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref. @@ -141135,13 +153893,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref': """Initialize a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -141164,18 +153926,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref') -> bool: + def __eq__( + self, + other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref') -> bool: + def __ne__( + self, + other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById(FlowLogCollectorTargetPrototypeSubnetIdentity): +class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById( + FlowLogCollectorTargetPrototypeSubnetIdentity): """ FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById. @@ -141195,13 +153964,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById': """Initialize a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById JSON' + ) return cls(**args) @classmethod @@ -141224,18 +153997,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById') -> bool: + def __eq__( + self, + other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById') -> bool: + def __ne__( + self, + other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(FlowLogCollectorTargetPrototypeVPCIdentity): +class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN( + FlowLogCollectorTargetPrototypeVPCIdentity): """ FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN. @@ -141255,13 +154035,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN': """Initialize a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -141284,18 +154068,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN') -> bool: + def __eq__( + self, + other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN') -> bool: + def __ne__( + self, + other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(FlowLogCollectorTargetPrototypeVPCIdentity): +class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref( + FlowLogCollectorTargetPrototypeVPCIdentity): """ FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref. @@ -141315,13 +154106,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref': """Initialize a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -141344,18 +154139,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref') -> bool: + def __eq__( + self, + other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref') -> bool: + def __ne__( + self, + other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById(FlowLogCollectorTargetPrototypeVPCIdentity): +class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById( + FlowLogCollectorTargetPrototypeVPCIdentity): """ FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById. @@ -141375,13 +154177,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById': """Initialize a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById JSON' + ) return cls(**args) @classmethod @@ -141404,18 +154210,23 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById') -> bool: + def __eq__( + self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById') -> bool: + def __ne__( + self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity): +class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity): """ FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -141435,13 +154246,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': """Initialize a FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -141464,18 +154279,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity): +class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity): """ FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref. @@ -141495,13 +154317,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': """Initialize a FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -141524,18 +154350,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity): +class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity): """ FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById. @@ -141555,13 +154388,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': """Initialize a FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -141584,18 +154421,25 @@ def __str__(self) -> str: """Return a `str` version of this FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(InstanceGroupManagerActionPrototypeScheduledActionPrototype): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec( + InstanceGroupManagerActionPrototypeScheduledActionPrototype): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec. @@ -141626,12 +154470,15 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup', 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager']) - ) + ", ".join([ + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup', + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager' + ])) raise Exception(msg) -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt(InstanceGroupManagerActionPrototypeScheduledActionPrototype): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt( + InstanceGroupManagerActionPrototypeScheduledActionPrototype): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt. @@ -141660,12 +154507,15 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup', 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager']) - ) + ", ".join([ + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup', + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager' + ])) raise Exception(msg) -class InstanceGroupManagerActionScheduledActionGroupTarget(InstanceGroupManagerActionScheduledAction): +class InstanceGroupManagerActionScheduledActionGroupTarget( + InstanceGroupManagerActionScheduledAction): """ InstanceGroupManagerActionScheduledActionGroupTarget. @@ -141778,49 +154628,72 @@ def __init__( self.group = group @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionScheduledActionGroupTarget': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerActionScheduledActionGroupTarget': """Initialize a InstanceGroupManagerActionScheduledActionGroupTarget object from a json dictionary.""" args = {} if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete else: - raise ValueError('Required property \'auto_delete\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') - if (auto_delete_timeout := _dict.get('auto_delete_timeout')) is not None: + raise ValueError( + 'Required property \'auto_delete\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) + if (auto_delete_timeout := + _dict.get('auto_delete_timeout')) is not None: args['auto_delete_timeout'] = auto_delete_timeout else: - raise ValueError('Required property \'auto_delete_timeout\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'auto_delete_timeout\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'status\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (updated_at := _dict.get('updated_at')) is not None: args['updated_at'] = string_to_datetime(updated_at) else: - raise ValueError('Required property \'updated_at\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'updated_at\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (action_type := _dict.get('action_type')) is not None: args['action_type'] = action_type else: - raise ValueError('Required property \'action_type\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'action_type\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) if (cron_spec := _dict.get('cron_spec')) is not None: args['cron_spec'] = cron_spec if (last_applied_at := _dict.get('last_applied_at')) is not None: @@ -141828,9 +154701,12 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionScheduledActionGro if (next_run_at := _dict.get('next_run_at')) is not None: args['next_run_at'] = string_to_datetime(next_run_at) if (group := _dict.get('group')) is not None: - args['group'] = InstanceGroupManagerScheduledActionGroup.from_dict(group) + args['group'] = InstanceGroupManagerScheduledActionGroup.from_dict( + group) else: - raise ValueError('Required property \'group\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON') + raise ValueError( + 'Required property \'group\' not present in InstanceGroupManagerActionScheduledActionGroupTarget JSON' + ) return cls(**args) @classmethod @@ -141843,7 +154719,9 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete - if hasattr(self, 'auto_delete_timeout') and self.auto_delete_timeout is not None: + if hasattr( + self, + 'auto_delete_timeout') and self.auto_delete_timeout is not None: _dict['auto_delete_timeout'] = self.auto_delete_timeout if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -141863,7 +154741,8 @@ def to_dict(self) -> Dict: _dict['action_type'] = self.action_type if hasattr(self, 'cron_spec') and self.cron_spec is not None: _dict['cron_spec'] = self.cron_spec - if hasattr(self, 'last_applied_at') and self.last_applied_at is not None: + if hasattr(self, + 'last_applied_at') and self.last_applied_at is not None: _dict['last_applied_at'] = datetime_to_string(self.last_applied_at) if hasattr(self, 'next_run_at') and self.next_run_at is not None: _dict['next_run_at'] = datetime_to_string(self.next_run_at) @@ -141882,13 +154761,17 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionScheduledActionGroupTarget object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionScheduledActionGroupTarget') -> bool: + def __eq__( + self, other: 'InstanceGroupManagerActionScheduledActionGroupTarget' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionScheduledActionGroupTarget') -> bool: + def __ne__( + self, other: 'InstanceGroupManagerActionScheduledActionGroupTarget' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -141899,7 +154782,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' - class StatusEnum(str, Enum): """ The status of the instance group action @@ -141916,7 +154798,6 @@ class StatusEnum(str, Enum): INCOMPATIBLE = 'incompatible' OMITTED = 'omitted' - class ActionTypeEnum(str, Enum): """ The type of action for the instance group. @@ -141925,8 +154806,8 @@ class ActionTypeEnum(str, Enum): SCHEDULED = 'scheduled' - -class InstanceGroupManagerActionScheduledActionManagerTarget(InstanceGroupManagerActionScheduledAction): +class InstanceGroupManagerActionScheduledActionManagerTarget( + InstanceGroupManagerActionScheduledAction): """ InstanceGroupManagerActionScheduledActionManagerTarget. @@ -142039,49 +154920,72 @@ def __init__( self.manager = manager @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionScheduledActionManagerTarget': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerActionScheduledActionManagerTarget': """Initialize a InstanceGroupManagerActionScheduledActionManagerTarget object from a json dictionary.""" args = {} if (auto_delete := _dict.get('auto_delete')) is not None: args['auto_delete'] = auto_delete else: - raise ValueError('Required property \'auto_delete\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') - if (auto_delete_timeout := _dict.get('auto_delete_timeout')) is not None: + raise ValueError( + 'Required property \'auto_delete\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) + if (auto_delete_timeout := + _dict.get('auto_delete_timeout')) is not None: args['auto_delete_timeout'] = auto_delete_timeout else: - raise ValueError('Required property \'auto_delete_timeout\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'auto_delete_timeout\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'resource_type\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'status\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (updated_at := _dict.get('updated_at')) is not None: args['updated_at'] = string_to_datetime(updated_at) else: - raise ValueError('Required property \'updated_at\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'updated_at\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (action_type := _dict.get('action_type')) is not None: args['action_type'] = action_type else: - raise ValueError('Required property \'action_type\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'action_type\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) if (cron_spec := _dict.get('cron_spec')) is not None: args['cron_spec'] = cron_spec if (last_applied_at := _dict.get('last_applied_at')) is not None: @@ -142091,7 +154995,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionScheduledActionMan if (manager := _dict.get('manager')) is not None: args['manager'] = manager else: - raise ValueError('Required property \'manager\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON') + raise ValueError( + 'Required property \'manager\' not present in InstanceGroupManagerActionScheduledActionManagerTarget JSON' + ) return cls(**args) @classmethod @@ -142104,7 +155010,9 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'auto_delete') and self.auto_delete is not None: _dict['auto_delete'] = self.auto_delete - if hasattr(self, 'auto_delete_timeout') and self.auto_delete_timeout is not None: + if hasattr( + self, + 'auto_delete_timeout') and self.auto_delete_timeout is not None: _dict['auto_delete_timeout'] = self.auto_delete_timeout if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) @@ -142124,7 +155032,8 @@ def to_dict(self) -> Dict: _dict['action_type'] = self.action_type if hasattr(self, 'cron_spec') and self.cron_spec is not None: _dict['cron_spec'] = self.cron_spec - if hasattr(self, 'last_applied_at') and self.last_applied_at is not None: + if hasattr(self, + 'last_applied_at') and self.last_applied_at is not None: _dict['last_applied_at'] = datetime_to_string(self.last_applied_at) if hasattr(self, 'next_run_at') and self.next_run_at is not None: _dict['next_run_at'] = datetime_to_string(self.next_run_at) @@ -142143,13 +155052,17 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionScheduledActionManagerTarget object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionScheduledActionManagerTarget') -> bool: + def __eq__( + self, other: 'InstanceGroupManagerActionScheduledActionManagerTarget' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionScheduledActionManagerTarget') -> bool: + def __ne__( + self, other: 'InstanceGroupManagerActionScheduledActionManagerTarget' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -142160,7 +155073,6 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' - class StatusEnum(str, Enum): """ The status of the instance group action @@ -142177,7 +155089,6 @@ class StatusEnum(str, Enum): INCOMPATIBLE = 'incompatible' OMITTED = 'omitted' - class ActionTypeEnum(str, Enum): """ The type of action for the instance group. @@ -142186,8 +155097,8 @@ class ActionTypeEnum(str, Enum): SCHEDULED = 'scheduled' - -class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype): +class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref( + InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype): """ InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref. @@ -142220,17 +155131,23 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref': """Initialize a InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref object from a json dictionary.""" args = {} - if (max_membership_count := _dict.get('max_membership_count')) is not None: + if (max_membership_count := + _dict.get('max_membership_count')) is not None: args['max_membership_count'] = max_membership_count - if (min_membership_count := _dict.get('min_membership_count')) is not None: + if (min_membership_count := + _dict.get('min_membership_count')) is not None: args['min_membership_count'] = min_membership_count if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref JSON' + ) return cls(**args) @classmethod @@ -142241,9 +155158,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'max_membership_count') and self.max_membership_count is not None: + if hasattr(self, 'max_membership_count' + ) and self.max_membership_count is not None: _dict['max_membership_count'] = self.max_membership_count - if hasattr(self, 'min_membership_count') and self.min_membership_count is not None: + if hasattr(self, 'min_membership_count' + ) and self.min_membership_count is not None: _dict['min_membership_count'] = self.min_membership_count if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href @@ -142257,18 +155176,25 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype): +class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById( + InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype): """ InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById. @@ -142301,17 +155227,23 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById': """Initialize a InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById object from a json dictionary.""" args = {} - if (max_membership_count := _dict.get('max_membership_count')) is not None: + if (max_membership_count := + _dict.get('max_membership_count')) is not None: args['max_membership_count'] = max_membership_count - if (min_membership_count := _dict.get('min_membership_count')) is not None: + if (min_membership_count := + _dict.get('min_membership_count')) is not None: args['min_membership_count'] = min_membership_count if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById JSON' + ) return cls(**args) @classmethod @@ -142322,9 +155254,11 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'max_membership_count') and self.max_membership_count is not None: + if hasattr(self, 'max_membership_count' + ) and self.max_membership_count is not None: _dict['max_membership_count'] = self.max_membership_count - if hasattr(self, 'min_membership_count') and self.min_membership_count is not None: + if hasattr(self, 'min_membership_count' + ) and self.min_membership_count is not None: _dict['min_membership_count'] = self.min_membership_count if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id @@ -142338,18 +155272,26 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): +class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity +): """ InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -142369,13 +155311,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': """Initialize a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -142398,18 +155344,26 @@ def __str__(self) -> str: """Return a `str` version of this InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): +class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity +): """ InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref. @@ -142429,13 +155383,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': """Initialize a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -142458,18 +155416,26 @@ def __str__(self) -> str: """Return a `str` version of this InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): +class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity +): """ InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById. @@ -142489,13 +155455,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': """Initialize a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -142518,18 +155488,25 @@ def __str__(self) -> str: """Return a `str` version of this InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(InstancePlacementTargetPatchDedicatedHostGroupIdentity): +class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN( + InstancePlacementTargetPatchDedicatedHostGroupIdentity): """ InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN. @@ -142549,13 +155526,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN': """Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -142578,18 +155559,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(InstancePlacementTargetPatchDedicatedHostGroupIdentity): +class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref( + InstancePlacementTargetPatchDedicatedHostGroupIdentity): """ InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref. @@ -142609,13 +155597,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref': """Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -142638,18 +155630,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById(InstancePlacementTargetPatchDedicatedHostGroupIdentity): +class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById( + InstancePlacementTargetPatchDedicatedHostGroupIdentity): """ InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById. @@ -142669,13 +155668,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById': """Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -142698,18 +155701,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(InstancePlacementTargetPatchDedicatedHostIdentity): +class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN( + InstancePlacementTargetPatchDedicatedHostIdentity): """ InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN. @@ -142729,13 +155739,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN': """Initialize a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -142758,18 +155772,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(InstancePlacementTargetPatchDedicatedHostIdentity): +class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref( + InstancePlacementTargetPatchDedicatedHostIdentity): """ InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref. @@ -142789,13 +155810,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref': """Initialize a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -142818,18 +155843,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById(InstancePlacementTargetPatchDedicatedHostIdentity): +class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById( + InstancePlacementTargetPatchDedicatedHostIdentity): """ InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById. @@ -142849,13 +155881,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById': """Initialize a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById JSON' + ) return cls(**args) @classmethod @@ -142878,18 +155914,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity): +class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN( + InstancePlacementTargetPrototypeDedicatedHostGroupIdentity): """ InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN. @@ -142909,13 +155952,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN': """Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -142938,18 +155985,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity): +class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref( + InstancePlacementTargetPrototypeDedicatedHostGroupIdentity): """ InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref. @@ -142969,13 +156023,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref': """Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -142998,18 +156056,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity): +class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById( + InstancePlacementTargetPrototypeDedicatedHostGroupIdentity): """ InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById. @@ -143029,13 +156094,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById': """Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -143058,18 +156127,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(InstancePlacementTargetPrototypeDedicatedHostIdentity): +class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN( + InstancePlacementTargetPrototypeDedicatedHostIdentity): """ InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN. @@ -143089,13 +156165,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN': """Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -143118,18 +156198,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(InstancePlacementTargetPrototypeDedicatedHostIdentity): +class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref( + InstancePlacementTargetPrototypeDedicatedHostIdentity): """ InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref. @@ -143149,13 +156236,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref': """Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -143178,18 +156269,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById(InstancePlacementTargetPrototypeDedicatedHostIdentity): +class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById( + InstancePlacementTargetPrototypeDedicatedHostIdentity): """ InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById. @@ -143209,13 +156307,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById': """Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById JSON' + ) return cls(**args) @classmethod @@ -143238,18 +156340,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(InstancePlacementTargetPrototypePlacementGroupIdentity): +class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN( + InstancePlacementTargetPrototypePlacementGroupIdentity): """ InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN. @@ -143269,13 +156378,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN': """Initialize a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -143298,18 +156411,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(InstancePlacementTargetPrototypePlacementGroupIdentity): +class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref( + InstancePlacementTargetPrototypePlacementGroupIdentity): """ InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref. @@ -143329,13 +156449,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref': """Initialize a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -143358,18 +156482,25 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById(InstancePlacementTargetPrototypePlacementGroupIdentity): +class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById( + InstancePlacementTargetPrototypePlacementGroupIdentity): """ InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById. @@ -143389,13 +156520,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById': """Initialize a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -143418,23 +156553,34 @@ def __str__(self) -> str: """Return a `str` version of this InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById') -> bool: + def __eq__( + self, other: + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById') -> bool: + def __ne__( + self, other: + 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment(InstancePrototypeInstanceByCatalogOffering): +class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment( + InstancePrototypeInstanceByCatalogOffering): """ InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -143442,6 +156588,9 @@ class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanc not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -143500,21 +156649,28 @@ def __init__( zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment object. @@ -143526,6 +156682,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -143534,6 +156694,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -143588,7 +156751,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -143607,51 +156772,89 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment': """Initialize a InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering else: - raise ValueError('Required property \'catalog_offering\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'catalog_offering\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -143662,16 +156865,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -143680,14 +156896,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -143697,21 +156915,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -143724,12 +156948,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -143739,7 +156967,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -143747,11 +156977,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -143762,23 +156996,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface(InstancePrototypeInstanceByCatalogOffering): +class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface( + InstancePrototypeInstanceByCatalogOffering): """ InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -143786,6 +157041,9 @@ class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanc not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -143844,20 +157102,26 @@ def __init__( zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, ) -> None: """ @@ -143870,6 +157134,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -143878,6 +157146,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -143931,7 +157202,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -143950,51 +157223,88 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface': """Initialize a InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering else: - raise ValueError('Required property \'catalog_offering\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'catalog_offering\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -144005,16 +157315,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -144023,14 +157346,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -144040,21 +157365,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -144067,12 +157398,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -144082,7 +157417,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -144090,11 +157427,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -144105,23 +157446,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ -class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment(InstancePrototypeInstanceByImage): + DISABLED = 'disabled' + SGX = 'sgx' + + +class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment( + InstancePrototypeInstanceByImage): """ InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -144129,6 +157491,9 @@ class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -144188,21 +157553,28 @@ def __init__( zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment object. @@ -144215,6 +157587,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -144223,6 +157599,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -144277,7 +157656,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -144296,51 +157677,89 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment': """Initialize a InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (image := _dict.get('image')) is not None: args['image'] = image else: - raise ValueError('Required property \'image\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'image\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -144351,16 +157770,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -144369,14 +157801,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -144386,21 +157820,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -144413,11 +157853,14 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'image') and self.image is not None: if isinstance(self.image, dict): _dict['image'] = self.image @@ -144428,7 +157871,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -144436,11 +157881,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -144451,23 +157900,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface(InstancePrototypeInstanceByImage): +class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface( + InstancePrototypeInstanceByImage): """ InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -144475,6 +157945,9 @@ class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface( not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -144534,20 +158007,26 @@ def __init__( zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, ) -> None: """ @@ -144561,6 +158040,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -144569,6 +158052,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -144622,7 +158108,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -144641,51 +158129,88 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface': """Initialize a InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (image := _dict.get('image')) is not None: args['image'] = image else: - raise ValueError('Required property \'image\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'image\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -144696,16 +158221,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -144714,14 +158252,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -144731,21 +158271,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -144758,11 +158304,14 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'image') and self.image is not None: if isinstance(self.image, dict): _dict['image'] = self.image @@ -144773,7 +158322,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -144781,11 +158332,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -144796,23 +158351,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment(InstancePrototypeInstanceBySourceSnapshot): +class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment( + InstancePrototypeInstanceBySourceSnapshot): """ InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -144820,6 +158396,9 @@ class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceB not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -144874,24 +158453,31 @@ class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceB def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment object. @@ -144905,6 +158491,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -144913,6 +158503,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -144964,7 +158557,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -144982,49 +158577,87 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment': """Initialize a InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -145035,16 +158668,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -145053,14 +158699,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -145070,21 +158718,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -145097,17 +158751,22 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -145115,11 +158774,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -145130,23 +158793,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface(InstancePrototypeInstanceBySourceSnapshot): +class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface( + InstancePrototypeInstanceBySourceSnapshot): """ InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -145154,6 +158838,9 @@ class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceB not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -145208,18 +158895,24 @@ class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceB def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -145239,6 +158932,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -145247,6 +158944,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -145297,7 +158997,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -145315,49 +159017,86 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface': """Initialize a InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -145368,16 +159107,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -145386,14 +159138,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -145403,21 +159157,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -145430,17 +159190,22 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -145448,11 +159213,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -145463,23 +159232,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ -class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment(InstancePrototypeInstanceByVolume): + DISABLED = 'disabled' + SGX = 'sgx' + + +class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment( + InstancePrototypeInstanceByVolume): """ InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -145487,6 +159277,9 @@ class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachme not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -145540,24 +159333,31 @@ class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachme def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByVolumeContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceByVolumeContext', zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment object. @@ -145571,6 +159371,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -145579,6 +159383,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -145630,7 +159437,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -145648,49 +159457,87 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment': """Initialize a InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -145701,16 +159548,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -145719,14 +159579,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -145736,21 +159598,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -145763,17 +159631,22 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -145781,11 +159654,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -145796,23 +159673,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface(InstancePrototypeInstanceByVolume): +class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface( + InstancePrototypeInstanceByVolume): """ InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -145820,6 +159718,9 @@ class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfac not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -145873,18 +159774,24 @@ class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfac def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByVolumeContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceByVolumeContext', zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -145904,6 +159811,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -145912,6 +159823,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -145962,7 +159876,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -145980,49 +159896,86 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface': """Initialize a InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -146033,16 +159986,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -146051,14 +160017,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -146068,21 +160036,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -146095,17 +160069,22 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -146113,11 +160092,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -146128,23 +160111,44 @@ def __str__(self) -> str: """Return a `str` version of this InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering): +class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment( + InstanceTemplatePrototypeInstanceTemplateByCatalogOffering): """ InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -146152,6 +160156,9 @@ class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplate not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -146209,21 +160216,28 @@ def __init__( zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment object. @@ -146235,6 +160249,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -146243,6 +160261,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -146296,7 +160317,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -146315,51 +160338,89 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment': """Initialize a InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering else: - raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'catalog_offering\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -146370,16 +160431,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -146388,14 +160462,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -146405,21 +160481,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -146432,12 +160514,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -146447,7 +160533,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -146455,11 +160543,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -146470,23 +160562,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering): + +class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface( + InstanceTemplatePrototypeInstanceTemplateByCatalogOffering): """ InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -146494,6 +160607,9 @@ class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplate not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -146551,20 +160667,26 @@ def __init__( zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, ) -> None: """ @@ -146577,6 +160699,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -146585,6 +160711,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -146637,7 +160766,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -146656,51 +160787,88 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface': """Initialize a InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering else: - raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'catalog_offering\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -146711,16 +160879,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -146729,14 +160910,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -146746,21 +160929,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -146773,12 +160962,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -146788,7 +160981,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -146796,11 +160991,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -146811,23 +161010,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment(InstanceTemplatePrototypeInstanceTemplateByImage): +class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment( + InstanceTemplatePrototypeInstanceTemplateByImage): """ InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -146835,6 +161055,9 @@ class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageIns not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -146893,21 +161116,28 @@ def __init__( zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment object. @@ -146920,6 +161150,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -146928,6 +161162,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -146981,7 +161218,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -147000,51 +161239,89 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment': """Initialize a InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (image := _dict.get('image')) is not None: args['image'] = image else: - raise ValueError('Required property \'image\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'image\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -147055,16 +161332,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -147073,14 +161363,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -147090,21 +161382,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -147117,11 +161415,14 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'image') and self.image is not None: if isinstance(self.image, dict): _dict['image'] = self.image @@ -147132,7 +161433,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -147140,11 +161443,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -147155,23 +161462,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface(InstanceTemplatePrototypeInstanceTemplateByImage): +class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface( + InstanceTemplatePrototypeInstanceTemplateByImage): """ InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -147179,6 +161507,9 @@ class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageIns not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -147237,20 +161568,26 @@ def __init__( zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, ) -> None: """ @@ -147264,6 +161601,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -147272,6 +161613,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -147324,7 +161668,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -147343,51 +161689,88 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface': """Initialize a InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (image := _dict.get('image')) is not None: args['image'] = image else: - raise ValueError('Required property \'image\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'image\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -147398,16 +161781,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -147416,14 +161812,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -147433,21 +161831,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -147460,11 +161864,14 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'image') and self.image is not None: if isinstance(self.image, dict): _dict['image'] = self.image @@ -147475,7 +161882,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -147483,11 +161892,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -147498,23 +161911,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot): + +class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment( + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot): """ InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -147522,6 +161956,9 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateB not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -147575,24 +162012,31 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateB def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment object. @@ -147606,6 +162050,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -147614,6 +162062,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -147664,7 +162115,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -147682,49 +162135,87 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment': """Initialize a InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -147735,16 +162226,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -147753,14 +162257,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -147770,21 +162276,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -147797,17 +162309,22 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -147815,11 +162332,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -147830,23 +162351,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot): +class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface( + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot): """ InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -147854,6 +162396,9 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateB not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled @@ -147907,18 +162452,24 @@ class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateB def __init__( self, - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, name: Optional[str] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, @@ -147938,6 +162489,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -147946,6 +162501,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -147995,7 +162553,9 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.keys = keys self.metadata_service = metadata_service self.name = name @@ -148013,49 +162573,86 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface': """Initialize a InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -148066,16 +162663,29 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'keys') and self.keys is not None: keys_list = [] for v in self.keys: @@ -148084,14 +162694,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -148101,21 +162713,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -148128,17 +162746,22 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -148146,11 +162769,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -148161,23 +162788,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext): +class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment( + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext): """ InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -148188,6 +162836,9 @@ class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceBy not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -148253,19 +162904,26 @@ def __init__( zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment object. @@ -148286,6 +162944,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -148294,6 +162956,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -148343,9 +163008,11 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.created_at = created_at self.crn = crn self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.href = href self.id = id self.keys = keys @@ -148366,71 +163033,122 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment': """Initialize a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering else: - raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'catalog_offering\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -148441,20 +163159,33 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -148467,14 +163198,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -148484,21 +163217,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -148511,12 +163250,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -148526,7 +163269,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -148534,11 +163279,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -148549,23 +163298,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext): +class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface( + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext): """ InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -148576,6 +163346,9 @@ class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceBy not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -148641,18 +163414,24 @@ def __init__( zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, ) -> None: """ @@ -148674,6 +163453,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -148682,6 +163465,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -148730,9 +163516,11 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.created_at = created_at self.crn = crn self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.href = href self.id = id self.keys = keys @@ -148753,71 +163541,121 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface': """Initialize a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (catalog_offering := _dict.get('catalog_offering')) is not None: args['catalog_offering'] = catalog_offering else: - raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'catalog_offering\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -148828,20 +163666,33 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -148854,14 +163705,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -148871,21 +163724,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -148898,12 +163757,16 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'catalog_offering') and self.catalog_offering is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr(self, + 'catalog_offering') and self.catalog_offering is not None: if isinstance(self.catalog_offering, dict): _dict['catalog_offering'] = self.catalog_offering else: @@ -148913,7 +163776,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -148921,11 +163786,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -148936,23 +163805,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment(InstanceTemplateInstanceByImageInstanceTemplateContext): +class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment( + InstanceTemplateInstanceByImageInstanceTemplateContext): """ InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -148963,6 +163853,9 @@ class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInsta not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -149029,19 +163922,26 @@ def __init__( zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment object. @@ -149063,6 +163963,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -149071,6 +163975,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -149120,9 +164027,11 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.created_at = created_at self.crn = crn self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.href = href self.id = id self.keys = keys @@ -149143,71 +164052,122 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment': """Initialize a InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'resource_group\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (image := _dict.get('image')) is not None: args['image'] = image else: - raise ValueError('Required property \'image\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'image\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -149218,20 +164178,33 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -149244,14 +164217,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -149261,21 +164236,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -149288,11 +164269,14 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'image') and self.image is not None: if isinstance(self.image, dict): _dict['image'] = self.image @@ -149303,7 +164287,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -149311,11 +164297,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -149326,23 +164316,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' -class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface(InstanceTemplateInstanceByImageInstanceTemplateContext): + +class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface( + InstanceTemplateInstanceByImageInstanceTemplateContext): """ InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -149353,6 +164364,9 @@ class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInsta not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -149419,18 +164433,24 @@ def __init__( zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - boot_volume_attachment: Optional['VolumeAttachmentPrototypeInstanceByImageContext'] = None, + boot_volume_attachment: Optional[ + 'VolumeAttachmentPrototypeInstanceByImageContext'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, ) -> None: """ @@ -149453,6 +164473,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -149461,6 +164485,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -149509,9 +164536,11 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.created_at = created_at self.crn = crn self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.href = href self.id = id self.keys = keys @@ -149532,71 +164561,121 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface': """Initialize a InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'resource_group\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(boot_volume_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + boot_volume_attachment) if (image := _dict.get('image')) is not None: args['image'] = image else: - raise ValueError('Required property \'image\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'image\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -149607,20 +164686,33 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -149633,14 +164725,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -149650,21 +164744,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -149677,11 +164777,14 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) if hasattr(self, 'image') and self.image is not None: if isinstance(self.image, dict): _dict['image'] = self.image @@ -149692,7 +164795,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -149700,11 +164805,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -149715,23 +164824,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' -class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext): + +class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment( + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext): """ InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -149742,6 +164872,9 @@ class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceByS not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -149805,23 +164938,30 @@ def __init__( id: str, name: str, resource_group: 'ResourceGroupReference', - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', primary_network_attachment: 'InstanceNetworkAttachmentPrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, ) -> None: """ Initialize a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment object. @@ -149844,6 +164984,10 @@ def __init__( primary network attachment to create for the virtual server instance. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -149852,6 +164996,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -149900,9 +165047,11 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.created_at = created_at self.crn = crn self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.href = href self.id = id self.keys = keys @@ -149923,71 +165072,125 @@ def __init__( self.primary_network_attachment = primary_network_attachment @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment': """Initialize a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) - else: - raise ValueError('Required property \'primary_network_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) + else: + raise ValueError( + 'Required property \'primary_network_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' + ) return cls(**args) @classmethod @@ -149998,20 +165201,33 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -150024,14 +165240,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -150041,21 +165259,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -150068,12 +165292,17 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -150086,7 +165315,9 @@ def to_dict(self) -> Dict: _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -150094,11 +165325,15 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) return _dict def _to_dict(self): @@ -150109,23 +165344,44 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment') -> bool: + def __eq__( + self, other: + 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment') -> bool: + def __ne__( + self, other: + 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ -class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext): + DISABLED = 'disabled' + SGX = 'sgx' + + +class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface( + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext): """ InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute mode + to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. :param datetime created_at: The date and time that the instance template was created. :param str crn: The CRN for this instance template. @@ -150136,6 +165392,9 @@ class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceByS not subsequently managed. Accordingly, it is reflected as an [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param str href: The URL for this instance template. :param str id: The unique identifier for this instance template. :param List[KeyIdentity] keys: (optional) The public SSH keys for the @@ -150201,23 +165460,31 @@ def __init__( id: str, name: str, resource_group: 'ResourceGroupReference', - boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', + boot_volume_attachment: + 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext', zone: 'ZoneIdentity', primary_network_interface: 'NetworkInterfacePrototype', *, - availability_policy: Optional['InstanceAvailabilityPolicyPrototype'] = None, - default_trusted_profile: Optional['InstanceDefaultTrustedProfilePrototype'] = None, + availability_policy: Optional[ + 'InstanceAvailabilityPolicyPrototype'] = None, + confidential_compute_mode: Optional[str] = None, + default_trusted_profile: Optional[ + 'InstanceDefaultTrustedProfilePrototype'] = None, + enable_secure_boot: Optional[bool] = None, keys: Optional[List['KeyIdentity']] = None, metadata_service: Optional['InstanceMetadataServicePrototype'] = None, placement_target: Optional['InstancePlacementTargetPrototype'] = None, profile: Optional['InstanceProfileIdentity'] = None, - reservation_affinity: Optional['InstanceReservationAffinityPrototype'] = None, + reservation_affinity: Optional[ + 'InstanceReservationAffinityPrototype'] = None, total_volume_bandwidth: Optional[int] = None, user_data: Optional[str] = None, volume_attachments: Optional[List['VolumeAttachmentPrototype']] = None, vpc: Optional['VPCIdentity'] = None, - network_attachments: Optional[List['InstanceNetworkAttachmentPrototype']] = None, - primary_network_attachment: Optional['InstanceNetworkAttachmentPrototype'] = None, + network_attachments: Optional[ + List['InstanceNetworkAttachmentPrototype']] = None, + primary_network_attachment: Optional[ + 'InstanceNetworkAttachmentPrototype'] = None, network_interfaces: Optional[List['NetworkInterfacePrototype']] = None, ) -> None: """ @@ -150241,6 +165508,10 @@ def __init__( instance network interface to create. :param InstanceAvailabilityPolicyPrototype availability_policy: (optional) The availability policy to use for this virtual server instance. + :param str confidential_compute_mode: (optional) The confidential compute + mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will + be used. :param InstanceDefaultTrustedProfilePrototype default_trusted_profile: (optional) The default trusted profile configuration to use for this virtual server instance @@ -150249,6 +165520,9 @@ def __init__( [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. + :param bool enable_secure_boot: (optional) Indicates whether secure boot is + enabled for this virtual server instance. + If unspecified, the default secure boot mode from the profile will be used. :param List[KeyIdentity] keys: (optional) The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the virtual server instance as cloud-init vendor data. For @@ -150300,9 +165574,11 @@ def __init__( """ # pylint: disable=super-init-not-called self.availability_policy = availability_policy + self.confidential_compute_mode = confidential_compute_mode self.created_at = created_at self.crn = crn self.default_trusted_profile = default_trusted_profile + self.enable_secure_boot = enable_secure_boot self.href = href self.id = id self.keys = keys @@ -150324,73 +165600,130 @@ def __init__( self.primary_network_interface = primary_network_interface @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface': """Initialize a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface object from a json dictionary.""" args = {} - if (availability_policy := _dict.get('availability_policy')) is not None: - args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) + if (availability_policy := + _dict.get('availability_policy')) is not None: + args[ + 'availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict( + availability_policy) + if (confidential_compute_mode := + _dict.get('confidential_compute_mode')) is not None: + args['confidential_compute_mode'] = confidential_compute_mode if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'created_at\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') - if (default_trusted_profile := _dict.get('default_trusted_profile')) is not None: - args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(default_trusted_profile) + raise ValueError( + 'Required property \'crn\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) + if (default_trusted_profile := + _dict.get('default_trusted_profile')) is not None: + args[ + 'default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict( + default_trusted_profile) + if (enable_secure_boot := _dict.get('enable_secure_boot')) is not None: + args['enable_secure_boot'] = enable_secure_boot if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'href\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'id\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (keys := _dict.get('keys')) is not None: args['keys'] = keys if (metadata_service := _dict.get('metadata_service')) is not None: - args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(metadata_service) + args[ + 'metadata_service'] = InstanceMetadataServicePrototype.from_dict( + metadata_service) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'name\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (placement_target := _dict.get('placement_target')) is not None: args['placement_target'] = placement_target if (profile := _dict.get('profile')) is not None: args['profile'] = profile - if (reservation_affinity := _dict.get('reservation_affinity')) is not None: - args['reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict(reservation_affinity) + if (reservation_affinity := + _dict.get('reservation_affinity')) is not None: + args[ + 'reservation_affinity'] = InstanceReservationAffinityPrototype.from_dict( + reservation_affinity) if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + args['resource_group'] = ResourceGroupReference.from_dict( + resource_group) else: - raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') - if (total_volume_bandwidth := _dict.get('total_volume_bandwidth')) is not None: + raise ValueError( + 'Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) + if (total_volume_bandwidth := + _dict.get('total_volume_bandwidth')) is not None: args['total_volume_bandwidth'] = total_volume_bandwidth if (user_data := _dict.get('user_data')) is not None: args['user_data'] = user_data if (volume_attachments := _dict.get('volume_attachments')) is not None: - args['volume_attachments'] = [VolumeAttachmentPrototype.from_dict(v) for v in volume_attachments] + args['volume_attachments'] = [ + VolumeAttachmentPrototype.from_dict(v) + for v in volume_attachments + ] if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc - if (boot_volume_attachment := _dict.get('boot_volume_attachment')) is not None: - args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) - else: - raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') - if (network_attachments := _dict.get('network_attachments')) is not None: - args['network_attachments'] = [InstanceNetworkAttachmentPrototype.from_dict(v) for v in network_attachments] - if (primary_network_attachment := _dict.get('primary_network_attachment')) is not None: - args['primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict(primary_network_attachment) + if (boot_volume_attachment := + _dict.get('boot_volume_attachment')) is not None: + args[ + 'boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + boot_volume_attachment) + else: + raise ValueError( + 'Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) + if (network_attachments := + _dict.get('network_attachments')) is not None: + args['network_attachments'] = [ + InstanceNetworkAttachmentPrototype.from_dict(v) + for v in network_attachments + ] + if (primary_network_attachment := + _dict.get('primary_network_attachment')) is not None: + args[ + 'primary_network_attachment'] = InstanceNetworkAttachmentPrototype.from_dict( + primary_network_attachment) if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') + raise ValueError( + 'Required property \'zone\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) if (network_interfaces := _dict.get('network_interfaces')) is not None: - args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in network_interfaces] - if (primary_network_interface := _dict.get('primary_network_interface')) is not None: - args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(primary_network_interface) - else: - raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') + args['network_interfaces'] = [ + NetworkInterfacePrototype.from_dict(v) + for v in network_interfaces + ] + if (primary_network_interface := + _dict.get('primary_network_interface')) is not None: + args[ + 'primary_network_interface'] = NetworkInterfacePrototype.from_dict( + primary_network_interface) + else: + raise ValueError( + 'Required property \'primary_network_interface\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' + ) return cls(**args) @classmethod @@ -150401,20 +165734,33 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if hasattr(self, 'availability_policy') and self.availability_policy is not None: + if hasattr( + self, + 'availability_policy') and self.availability_policy is not None: if isinstance(self.availability_policy, dict): _dict['availability_policy'] = self.availability_policy else: - _dict['availability_policy'] = self.availability_policy.to_dict() + _dict['availability_policy'] = self.availability_policy.to_dict( + ) + if hasattr(self, 'confidential_compute_mode' + ) and self.confidential_compute_mode is not None: + _dict['confidential_compute_mode'] = self.confidential_compute_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) if hasattr(self, 'crn') and self.crn is not None: _dict['crn'] = self.crn - if hasattr(self, 'default_trusted_profile') and self.default_trusted_profile is not None: + if hasattr(self, 'default_trusted_profile' + ) and self.default_trusted_profile is not None: if isinstance(self.default_trusted_profile, dict): _dict['default_trusted_profile'] = self.default_trusted_profile else: - _dict['default_trusted_profile'] = self.default_trusted_profile.to_dict() + _dict[ + 'default_trusted_profile'] = self.default_trusted_profile.to_dict( + ) + if hasattr( + self, + 'enable_secure_boot') and self.enable_secure_boot is not None: + _dict['enable_secure_boot'] = self.enable_secure_boot if hasattr(self, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -150427,14 +165773,16 @@ def to_dict(self) -> Dict: else: keys_list.append(v.to_dict()) _dict['keys'] = keys_list - if hasattr(self, 'metadata_service') and self.metadata_service is not None: + if hasattr(self, + 'metadata_service') and self.metadata_service is not None: if isinstance(self.metadata_service, dict): _dict['metadata_service'] = self.metadata_service else: _dict['metadata_service'] = self.metadata_service.to_dict() if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'placement_target') and self.placement_target is not None: + if hasattr(self, + 'placement_target') and self.placement_target is not None: if isinstance(self.placement_target, dict): _dict['placement_target'] = self.placement_target else: @@ -150444,21 +165792,27 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() - if hasattr(self, 'reservation_affinity') and self.reservation_affinity is not None: + if hasattr(self, 'reservation_affinity' + ) and self.reservation_affinity is not None: if isinstance(self.reservation_affinity, dict): _dict['reservation_affinity'] = self.reservation_affinity else: - _dict['reservation_affinity'] = self.reservation_affinity.to_dict() + _dict[ + 'reservation_affinity'] = self.reservation_affinity.to_dict( + ) if hasattr(self, 'resource_group') and self.resource_group is not None: if isinstance(self.resource_group, dict): _dict['resource_group'] = self.resource_group else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'total_volume_bandwidth') and self.total_volume_bandwidth is not None: + if hasattr(self, 'total_volume_bandwidth' + ) and self.total_volume_bandwidth is not None: _dict['total_volume_bandwidth'] = self.total_volume_bandwidth if hasattr(self, 'user_data') and self.user_data is not None: _dict['user_data'] = self.user_data - if hasattr(self, 'volume_attachments') and self.volume_attachments is not None: + if hasattr( + self, + 'volume_attachments') and self.volume_attachments is not None: volume_attachments_list = [] for v in self.volume_attachments: if isinstance(v, dict): @@ -150471,12 +165825,17 @@ def to_dict(self) -> Dict: _dict['vpc'] = self.vpc else: _dict['vpc'] = self.vpc.to_dict() - if hasattr(self, 'boot_volume_attachment') and self.boot_volume_attachment is not None: + if hasattr(self, 'boot_volume_attachment' + ) and self.boot_volume_attachment is not None: if isinstance(self.boot_volume_attachment, dict): _dict['boot_volume_attachment'] = self.boot_volume_attachment else: - _dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict() - if hasattr(self, 'network_attachments') and self.network_attachments is not None: + _dict[ + 'boot_volume_attachment'] = self.boot_volume_attachment.to_dict( + ) + if hasattr( + self, + 'network_attachments') and self.network_attachments is not None: network_attachments_list = [] for v in self.network_attachments: if isinstance(v, dict): @@ -150484,17 +165843,23 @@ def to_dict(self) -> Dict: else: network_attachments_list.append(v.to_dict()) _dict['network_attachments'] = network_attachments_list - if hasattr(self, 'primary_network_attachment') and self.primary_network_attachment is not None: + if hasattr(self, 'primary_network_attachment' + ) and self.primary_network_attachment is not None: if isinstance(self.primary_network_attachment, dict): - _dict['primary_network_attachment'] = self.primary_network_attachment + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment else: - _dict['primary_network_attachment'] = self.primary_network_attachment.to_dict() + _dict[ + 'primary_network_attachment'] = self.primary_network_attachment.to_dict( + ) if hasattr(self, 'zone') and self.zone is not None: if isinstance(self.zone, dict): _dict['zone'] = self.zone else: _dict['zone'] = self.zone.to_dict() - if hasattr(self, 'network_interfaces') and self.network_interfaces is not None: + if hasattr( + self, + 'network_interfaces') and self.network_interfaces is not None: network_interfaces_list = [] for v in self.network_interfaces: if isinstance(v, dict): @@ -150502,11 +165867,15 @@ def to_dict(self) -> Dict: else: network_interfaces_list.append(v.to_dict()) _dict['network_interfaces'] = network_interfaces_list - if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None: + if hasattr(self, 'primary_network_interface' + ) and self.primary_network_interface is not None: if isinstance(self.primary_network_interface, dict): - _dict['primary_network_interface'] = self.primary_network_interface + _dict[ + 'primary_network_interface'] = self.primary_network_interface else: - _dict['primary_network_interface'] = self.primary_network_interface.to_dict() + _dict[ + 'primary_network_interface'] = self.primary_network_interface.to_dict( + ) return _dict def _to_dict(self): @@ -150517,18 +165886,35 @@ def __str__(self) -> str: """Return a `str` version of this InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface') -> bool: + def __eq__( + self, other: + 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface') -> bool: + def __ne__( + self, other: + 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class ConfidentialComputeModeEnum(str, Enum): + """ + The confidential compute mode to use for this virtual server instance. + If unspecified, the default confidential compute mode from the profile will be + used. + """ + + DISABLED = 'disabled' + SGX = 'sgx' + -class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity): +class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref( + LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity): """ LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref. @@ -150548,13 +165934,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref': """Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -150577,18 +165967,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity): +class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById( + LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity): """ LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById. @@ -150608,13 +166005,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById': """Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById JSON' + ) return cls(**args) @classmethod @@ -150637,18 +166038,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity): +class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref( + LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity): """ LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref. @@ -150668,13 +166076,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref': """Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -150697,18 +166109,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity): +class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById( + LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity): """ LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById. @@ -150728,13 +166147,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById': """Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById JSON' + ) return cls(**args) @classmethod @@ -150757,18 +166180,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById') -> bool: + def __eq__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById') -> bool: + def __ne__( + self, other: + 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): +class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN( + LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): """ LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN. @@ -150788,13 +166218,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN': """Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -150817,18 +166251,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): +class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref( + LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): """ LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref. @@ -150848,13 +166289,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref': """Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -150877,18 +166322,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref') -> bool: + def __eq__( + self, other: + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref') -> bool: + def __ne__( + self, other: + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): +class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById( + LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): """ LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById. @@ -150908,13 +166360,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById': """Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById JSON' + ) return cls(**args) @classmethod @@ -150937,18 +166393,25 @@ def __str__(self) -> str: """Return a `str` version of this LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById') -> bool: + def __eq__( + self, other: + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById') -> bool: + def __ne__( + self, other: + 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class NetworkInterfaceIPPrototypeReservedIPIdentityByHref(NetworkInterfaceIPPrototypeReservedIPIdentity): +class NetworkInterfaceIPPrototypeReservedIPIdentityByHref( + NetworkInterfaceIPPrototypeReservedIPIdentity): """ NetworkInterfaceIPPrototypeReservedIPIdentityByHref. @@ -150968,13 +166431,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref': """Initialize a NetworkInterfaceIPPrototypeReservedIPIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in NetworkInterfaceIPPrototypeReservedIPIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in NetworkInterfaceIPPrototypeReservedIPIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -150997,18 +166464,23 @@ def __str__(self) -> str: """Return a `str` version of this NetworkInterfaceIPPrototypeReservedIPIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref') -> bool: + def __eq__( + self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref') -> bool: + def __ne__( + self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class NetworkInterfaceIPPrototypeReservedIPIdentityById(NetworkInterfaceIPPrototypeReservedIPIdentity): +class NetworkInterfaceIPPrototypeReservedIPIdentityById( + NetworkInterfaceIPPrototypeReservedIPIdentity): """ NetworkInterfaceIPPrototypeReservedIPIdentityById. @@ -151028,13 +166500,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceIPPrototypeReservedIPIdentityById': + def from_dict( + cls, + _dict: Dict) -> 'NetworkInterfaceIPPrototypeReservedIPIdentityById': """Initialize a NetworkInterfaceIPPrototypeReservedIPIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in NetworkInterfaceIPPrototypeReservedIPIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in NetworkInterfaceIPPrototypeReservedIPIdentityById JSON' + ) return cls(**args) @classmethod @@ -151057,18 +166533,23 @@ def __str__(self) -> str: """Return a `str` version of this NetworkInterfaceIPPrototypeReservedIPIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityById') -> bool: + def __eq__( + self, + other: 'NetworkInterfaceIPPrototypeReservedIPIdentityById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityById') -> bool: + def __ne__( + self, + other: 'NetworkInterfaceIPPrototypeReservedIPIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress( + PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress. @@ -151088,13 +166569,17 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress': + def from_dict( + cls, _dict: Dict + ) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress': """Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress JSON') + raise ValueError( + 'Required property \'address\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress JSON' + ) return cls(**args) @classmethod @@ -151117,18 +166602,25 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress') -> bool: + def __eq__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress') -> bool: + def __ne__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN( + PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN. @@ -151148,13 +166640,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN': """Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -151177,18 +166673,25 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN') -> bool: + def __eq__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN') -> bool: + def __ne__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref( + PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref. @@ -151208,13 +166711,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref': """Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -151237,18 +166744,25 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref') -> bool: + def __eq__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref') -> bool: + def __ne__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById( + PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById. @@ -151268,13 +166782,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById': """Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById JSON' + ) return cls(**args) @classmethod @@ -151297,18 +166815,25 @@ def __str__(self) -> str: """Return a `str` version of this PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById') -> bool: + def __eq__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById') -> bool: + def __ne__( + self, other: + 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(ReservedIPTargetPrototypeEndpointGatewayIdentity): +class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN( + ReservedIPTargetPrototypeEndpointGatewayIdentity): """ ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN. @@ -151328,13 +166853,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN': """Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -151357,18 +166886,25 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(ReservedIPTargetPrototypeEndpointGatewayIdentity): +class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref( + ReservedIPTargetPrototypeEndpointGatewayIdentity): """ ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref. @@ -151388,13 +166924,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref': """Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -151417,18 +166957,25 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById(ReservedIPTargetPrototypeEndpointGatewayIdentity): +class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById( + ReservedIPTargetPrototypeEndpointGatewayIdentity): """ ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById. @@ -151448,13 +166995,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById': """Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById JSON' + ) return cls(**args) @classmethod @@ -151477,18 +167028,25 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity): +class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -151508,13 +167066,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': """Initialize a ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -151537,18 +167099,25 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity): +class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref. @@ -151568,13 +167137,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': """Initialize a ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -151597,18 +167170,25 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity): +class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById. @@ -151628,13 +167208,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': """Initialize a ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -151657,18 +167241,25 @@ def __str__(self) -> str: """Return a `str` version of this ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(RouteNextHopPatchRouteNextHopIP): +class RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP( + RouteNextHopPatchRouteNextHopIP): """ RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP. @@ -151694,13 +167285,17 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP': + def from_dict( + cls, _dict: Dict + ) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP': """Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP JSON') + raise ValueError( + 'Required property \'address\' not present in RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP JSON' + ) return cls(**args) @classmethod @@ -151723,18 +167318,23 @@ def __str__(self) -> str: """Return a `str` version of this RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP') -> bool: + def __eq__( + self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP') -> bool: + def __ne__( + self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(RouteNextHopPatchRouteNextHopIP): +class RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP( + RouteNextHopPatchRouteNextHopIP): """ RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP. @@ -151768,13 +167368,17 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP': + def from_dict( + cls, _dict: Dict + ) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP': """Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP JSON') + raise ValueError( + 'Required property \'address\' not present in RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP JSON' + ) return cls(**args) @classmethod @@ -151797,18 +167401,23 @@ def __str__(self) -> str: """Return a `str` version of this RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP') -> bool: + def __eq__( + self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP') -> bool: + def __ne__( + self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(RouteNextHopPatchVPNGatewayConnectionIdentity): +class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref( + RouteNextHopPatchVPNGatewayConnectionIdentity): """ RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref. @@ -151828,13 +167437,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref': """Initialize a RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -151857,18 +167470,25 @@ def __str__(self) -> str: """Return a `str` version of this RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref') -> bool: + def __eq__( + self, other: + 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref') -> bool: + def __ne__( + self, other: + 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(RouteNextHopPatchVPNGatewayConnectionIdentity): +class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById( + RouteNextHopPatchVPNGatewayConnectionIdentity): """ RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById. @@ -151888,13 +167508,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById': """Initialize a RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById JSON' + ) return cls(**args) @classmethod @@ -151917,18 +167541,25 @@ def __str__(self) -> str: """Return a `str` version of this RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById') -> bool: + def __eq__( + self, other: + 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById') -> bool: + def __ne__( + self, other: + 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP): +class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP( + RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP): """ RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP. @@ -151954,13 +167585,17 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP': + def from_dict( + cls, _dict: Dict + ) -> 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP': """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP JSON') + raise ValueError( + 'Required property \'address\' not present in RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP JSON' + ) return cls(**args) @classmethod @@ -151983,18 +167618,25 @@ def __str__(self) -> str: """Return a `str` version of this RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP') -> bool: + def __eq__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP') -> bool: + def __ne__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP): +class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP( + RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP): """ RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP. @@ -152028,13 +167670,17 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP': + def from_dict( + cls, _dict: Dict + ) -> 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP': """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError('Required property \'address\' not present in RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP JSON') + raise ValueError( + 'Required property \'address\' not present in RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP JSON' + ) return cls(**args) @classmethod @@ -152057,18 +167703,25 @@ def __str__(self) -> str: """Return a `str` version of this RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP') -> bool: + def __eq__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP') -> bool: + def __ne__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity): +class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref( + RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity): """ RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref. @@ -152088,13 +167741,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref': """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -152117,18 +167774,25 @@ def __str__(self) -> str: """Return a `str` version of this RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref') -> bool: + def __eq__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref') -> bool: + def __ne__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity): +class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById( + RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity): """ RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById. @@ -152148,13 +167812,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById': """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById JSON' + ) return cls(**args) @classmethod @@ -152177,18 +167845,25 @@ def __str__(self) -> str: """Return a `str` version of this RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById') -> bool: + def __eq__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById') -> bool: + def __ne__( + self, other: + 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(SecurityGroupRuleRemotePatchSecurityGroupIdentity): +class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN( + SecurityGroupRuleRemotePatchSecurityGroupIdentity): """ SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN. @@ -152208,13 +167883,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN': """Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -152237,18 +167916,25 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN') -> bool: + def __eq__( + self, other: + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN') -> bool: + def __ne__( + self, other: + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(SecurityGroupRuleRemotePatchSecurityGroupIdentity): +class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref( + SecurityGroupRuleRemotePatchSecurityGroupIdentity): """ SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref. @@ -152268,13 +167954,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref': """Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -152297,18 +167987,25 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref') -> bool: + def __eq__( + self, other: + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref') -> bool: + def __ne__( + self, other: + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById(SecurityGroupRuleRemotePatchSecurityGroupIdentity): +class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById( + SecurityGroupRuleRemotePatchSecurityGroupIdentity): """ SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById. @@ -152328,13 +168025,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById': """Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -152357,18 +168058,25 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById') -> bool: + def __eq__( + self, other: + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById') -> bool: + def __ne__( + self, other: + 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): +class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN( + SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): """ SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN. @@ -152388,13 +168096,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN': """Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -152417,18 +168129,25 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN') -> bool: + def __eq__( + self, other: + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN') -> bool: + def __ne__( + self, other: + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): +class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref( + SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): """ SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref. @@ -152448,13 +168167,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref': """Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -152477,18 +168200,25 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref') -> bool: + def __eq__( + self, other: + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref') -> bool: + def __ne__( + self, other: + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): +class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById( + SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): """ SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById. @@ -152508,13 +168238,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById': """Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById JSON' + ) return cls(**args) @classmethod @@ -152537,18 +168271,26 @@ def __str__(self) -> str: """Return a `str` version of this SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById') -> bool: + def __eq__( + self, other: + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById') -> bool: + def __ne__( + self, other: + 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity): +class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity +): """ ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -152568,13 +168310,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN': """Initialize a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -152597,18 +168343,26 @@ def __str__(self) -> str: """Return a `str` version of this ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __eq__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN') -> bool: + def __ne__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity): +class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity +): """ ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref. @@ -152628,13 +168382,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref': """Initialize a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -152657,18 +168415,26 @@ def __str__(self) -> str: """Return a `str` version of this ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __eq__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref') -> bool: + def __ne__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity): +class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity +): """ ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById. @@ -152688,13 +168454,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById': """Initialize a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById JSON' + ) return cls(**args) @classmethod @@ -152717,18 +168487,25 @@ def __str__(self) -> str: """Return a `str` version of this ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __eq__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById') -> bool: + def __ne__( + self, other: + 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch(VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch): +class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch( + VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch): """ VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch. @@ -152751,7 +168528,9 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch': """Initialize a VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: @@ -152778,18 +168557,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch(VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch): +class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch( + VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch): """ VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch. @@ -152812,7 +168598,9 @@ def __init__( self.fqdn = fqdn @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch': """Initialize a VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch object from a json dictionary.""" args = {} if (fqdn := _dict.get('fqdn')) is not None: @@ -152839,18 +168627,26 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch(VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch): +class VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch( + VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch +): """ VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch. @@ -152873,7 +168669,9 @@ def __init__( self.address = address @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch': """Initialize a VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: @@ -152900,18 +168698,26 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch(VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch): +class VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch( + VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch +): """ VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch. @@ -152934,7 +168740,9 @@ def __init__( self.fqdn = fqdn @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch': """Initialize a VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch object from a json dictionary.""" args = {} if (fqdn := _dict.get('fqdn')) is not None: @@ -152961,18 +168769,25 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch') -> bool: + def __eq__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch') -> bool: + def __ne__( + self, other: + 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode(VPNGatewayConnectionRouteMode): +class VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode( + VPNGatewayConnectionRouteMode): """ VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode. @@ -153107,37 +168922,56 @@ def __init__( self.tunnels = tunnels @classmethod - def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode': + def from_dict( + cls, _dict: Dict + ) -> 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode': """Initialize a VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode object from a json dictionary.""" args = {} if (admin_state_up := _dict.get('admin_state_up')) is not None: args['admin_state_up'] = admin_state_up else: - raise ValueError('Required property \'admin_state_up\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') - if (authentication_mode := _dict.get('authentication_mode')) is not None: + raise ValueError( + 'Required property \'admin_state_up\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) + if (authentication_mode := + _dict.get('authentication_mode')) is not None: args['authentication_mode'] = authentication_mode else: - raise ValueError('Required property \'authentication_mode\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'authentication_mode\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: - raise ValueError('Required property \'created_at\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') - if (dead_peer_detection := _dict.get('dead_peer_detection')) is not None: - args['dead_peer_detection'] = VPNGatewayConnectionDPD.from_dict(dead_peer_detection) + raise ValueError( + 'Required property \'created_at\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) + if (dead_peer_detection := + _dict.get('dead_peer_detection')) is not None: + args['dead_peer_detection'] = VPNGatewayConnectionDPD.from_dict( + dead_peer_detection) else: - raise ValueError('Required property \'dead_peer_detection\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'dead_peer_detection\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (establish_mode := _dict.get('establish_mode')) is not None: args['establish_mode'] = establish_mode else: - raise ValueError('Required property \'establish_mode\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'establish_mode\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'href\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'id\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (ike_policy := _dict.get('ike_policy')) is not None: args['ike_policy'] = IKEPolicyReference.from_dict(ike_policy) if (ipsec_policy := _dict.get('ipsec_policy')) is not None: @@ -153145,43 +168979,70 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionRouteModeVPNGatewayConne if (mode := _dict.get('mode')) is not None: args['mode'] = mode else: - raise ValueError('Required property \'mode\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'mode\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError('Required property \'name\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'name\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (psk := _dict.get('psk')) is not None: args['psk'] = psk else: - raise ValueError('Required property \'psk\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'psk\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (resource_type := _dict.get('resource_type')) is not None: args['resource_type'] = resource_type else: - raise ValueError('Required property \'resource_type\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'resource_type\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError('Required property \'status\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'status\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (status_reasons := _dict.get('status_reasons')) is not None: - args['status_reasons'] = [VPNGatewayConnectionStatusReason.from_dict(v) for v in status_reasons] + args['status_reasons'] = [ + VPNGatewayConnectionStatusReason.from_dict(v) + for v in status_reasons + ] else: - raise ValueError('Required property \'status_reasons\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'status_reasons\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (local := _dict.get('local')) is not None: - args['local'] = VPNGatewayConnectionStaticRouteModeLocal.from_dict(local) + args['local'] = VPNGatewayConnectionStaticRouteModeLocal.from_dict( + local) else: - raise ValueError('Required property \'local\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'local\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (peer := _dict.get('peer')) is not None: args['peer'] = peer else: - raise ValueError('Required property \'peer\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'peer\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (routing_protocol := _dict.get('routing_protocol')) is not None: args['routing_protocol'] = routing_protocol else: - raise ValueError('Required property \'routing_protocol\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'routing_protocol\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) if (tunnels := _dict.get('tunnels')) is not None: - args['tunnels'] = [VPNGatewayConnectionStaticRouteModeTunnel.from_dict(v) for v in tunnels] + args['tunnels'] = [ + VPNGatewayConnectionStaticRouteModeTunnel.from_dict(v) + for v in tunnels + ] else: - raise ValueError('Required property \'tunnels\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') + raise ValueError( + 'Required property \'tunnels\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' + ) return cls(**args) @classmethod @@ -153194,15 +169055,20 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'admin_state_up') and self.admin_state_up is not None: _dict['admin_state_up'] = self.admin_state_up - if hasattr(self, 'authentication_mode') and self.authentication_mode is not None: + if hasattr( + self, + 'authentication_mode') and self.authentication_mode is not None: _dict['authentication_mode'] = self.authentication_mode if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'dead_peer_detection') and self.dead_peer_detection is not None: + if hasattr( + self, + 'dead_peer_detection') and self.dead_peer_detection is not None: if isinstance(self.dead_peer_detection, dict): _dict['dead_peer_detection'] = self.dead_peer_detection else: - _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict() + _dict['dead_peer_detection'] = self.dead_peer_detection.to_dict( + ) if hasattr(self, 'establish_mode') and self.establish_mode is not None: _dict['establish_mode'] = self.establish_mode if hasattr(self, 'href') and self.href is not None: @@ -153247,7 +169113,8 @@ def to_dict(self) -> Dict: _dict['peer'] = self.peer else: _dict['peer'] = self.peer.to_dict() - if hasattr(self, 'routing_protocol') and self.routing_protocol is not None: + if hasattr(self, + 'routing_protocol') and self.routing_protocol is not None: _dict['routing_protocol'] = self.routing_protocol if hasattr(self, 'tunnels') and self.tunnels is not None: tunnels_list = [] @@ -153267,13 +169134,19 @@ def __str__(self) -> str: """Return a `str` version of this VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode') -> bool: + def __eq__( + self, + other: 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode') -> bool: + def __ne__( + self, + other: 'VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -153284,7 +169157,6 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' - class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -153302,7 +169174,6 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' - class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -153311,7 +169182,6 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' - class ResourceTypeEnum(str, Enum): """ The resource type. @@ -153319,7 +169189,6 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' - class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -153328,7 +169197,6 @@ class StatusEnum(str, Enum): DOWN = 'down' UP = 'up' - class RoutingProtocolEnum(str, Enum): """ Routing protocols are disabled for this VPN gateway connection. @@ -153337,8 +169205,9 @@ class RoutingProtocolEnum(str, Enum): NONE = 'none' - -class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref(VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext): +class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref( + VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext +): """ VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref. @@ -153358,13 +169227,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref': """Initialize a VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref JSON' + ) return cls(**args) @classmethod @@ -153387,18 +169260,26 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById(VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext): +class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById( + VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext +): """ VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById. @@ -153418,13 +169299,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById': """Initialize a VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById JSON') + raise ValueError( + 'Required property \'id\' not present in VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById JSON' + ) return cls(**args) @classmethod @@ -153447,18 +169332,26 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext): +class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref( + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext +): """ VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref. @@ -153478,13 +169371,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref': """Initialize a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref JSON' + ) return cls(**args) @classmethod @@ -153507,18 +169404,26 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext): +class VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById( + VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext +): """ VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById. @@ -153538,13 +169443,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById': + def from_dict( + cls, _dict: Dict + ) -> 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById': """Initialize a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById JSON') + raise ValueError( + 'Required property \'id\' not present in VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById JSON' + ) return cls(**args) @classmethod @@ -153567,18 +169476,25 @@ def __str__(self) -> str: """Return a `str` version of this VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById') -> bool: + def __eq__( + self, other: + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById') -> bool: + def __ne__( + self, other: + 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(VolumeAttachmentPrototypeVolumeVolumeIdentity): +class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN( + VolumeAttachmentPrototypeVolumeVolumeIdentity): """ VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN. @@ -153598,13 +169514,17 @@ def __init__( self.crn = crn @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN': + def from_dict( + cls, _dict: Dict + ) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN': """Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN object from a json dictionary.""" args = {} if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError('Required property \'crn\' not present in VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN JSON') + raise ValueError( + 'Required property \'crn\' not present in VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN JSON' + ) return cls(**args) @classmethod @@ -153627,18 +169547,25 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN') -> bool: + def __eq__( + self, + other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN') -> bool: + def __ne__( + self, + other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(VolumeAttachmentPrototypeVolumeVolumeIdentity): +class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref( + VolumeAttachmentPrototypeVolumeVolumeIdentity): """ VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref. @@ -153658,13 +169585,17 @@ def __init__( self.href = href @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref': + def from_dict( + cls, _dict: Dict + ) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref': """Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref object from a json dictionary.""" args = {} if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError('Required property \'href\' not present in VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref JSON') + raise ValueError( + 'Required property \'href\' not present in VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref JSON' + ) return cls(**args) @classmethod @@ -153687,18 +169618,25 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref') -> bool: + def __eq__( + self, + other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref') -> bool: + def __ne__( + self, + other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById(VolumeAttachmentPrototypeVolumeVolumeIdentity): +class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById( + VolumeAttachmentPrototypeVolumeVolumeIdentity): """ VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById. @@ -153718,13 +169656,17 @@ def __init__( self.id = id @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById': + def from_dict( + cls, _dict: Dict + ) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById': """Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById object from a json dictionary.""" args = {} if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError('Required property \'id\' not present in VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById JSON') + raise ValueError( + 'Required property \'id\' not present in VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById JSON' + ) return cls(**args) @classmethod @@ -153747,18 +169689,25 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById') -> bool: + def __eq__( + self, + other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById') -> bool: + def __ne__( + self, + other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext): +class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity( + VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext): """ VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity. @@ -153833,7 +169782,9 @@ def __init__( self.encryption_key = encryption_key @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity': + def from_dict( + cls, _dict: Dict + ) -> 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity': """Initialize a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity object from a json dictionary.""" args = {} if (iops := _dict.get('iops')) is not None: @@ -153843,7 +169794,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumePrototy if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity JSON') + raise ValueError( + 'Required property \'profile\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (user_tags := _dict.get('user_tags')) is not None: @@ -153851,7 +169804,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumePrototy if (capacity := _dict.get('capacity')) is not None: args['capacity'] = capacity else: - raise ValueError('Required property \'capacity\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity JSON') + raise ValueError( + 'Required property \'capacity\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity JSON' + ) if (encryption_key := _dict.get('encryption_key')) is not None: args['encryption_key'] = encryption_key return cls(**args) @@ -153897,18 +169852,25 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity') -> bool: + def __eq__( + self, other: + 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity') -> bool: + def __ne__( + self, other: + 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext): +class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot( + VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext): """ VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot. @@ -153990,7 +169952,9 @@ def __init__( self.source_snapshot = source_snapshot @classmethod - def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot': + def from_dict( + cls, _dict: Dict + ) -> 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot': """Initialize a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot object from a json dictionary.""" args = {} if (iops := _dict.get('iops')) is not None: @@ -154000,7 +169964,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumePrototy if (profile := _dict.get('profile')) is not None: args['profile'] = profile else: - raise ValueError('Required property \'profile\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot JSON') + raise ValueError( + 'Required property \'profile\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot JSON' + ) if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = resource_group if (user_tags := _dict.get('user_tags')) is not None: @@ -154012,7 +169978,9 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumePrototy if (source_snapshot := _dict.get('source_snapshot')) is not None: args['source_snapshot'] = source_snapshot else: - raise ValueError('Required property \'source_snapshot\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot JSON') + raise ValueError( + 'Required property \'source_snapshot\' not present in VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot JSON' + ) return cls(**args) @classmethod @@ -154046,7 +170014,8 @@ def to_dict(self) -> Dict: _dict['encryption_key'] = self.encryption_key else: _dict['encryption_key'] = self.encryption_key.to_dict() - if hasattr(self, 'source_snapshot') and self.source_snapshot is not None: + if hasattr(self, + 'source_snapshot') and self.source_snapshot is not None: if isinstance(self.source_snapshot, dict): _dict['source_snapshot'] = self.source_snapshot else: @@ -154061,18 +170030,25 @@ def __str__(self) -> str: """Return a `str` version of this VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot') -> bool: + def __eq__( + self, other: + 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot') -> bool: + def __ne__( + self, other: + 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup( + InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup. @@ -154110,7 +170086,9 @@ def __init__( self.group = group @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup': """Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -154118,9 +170096,13 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduled if (cron_spec := _dict.get('cron_spec')) is not None: args['cron_spec'] = cron_spec if (group := _dict.get('group')) is not None: - args['group'] = InstanceGroupManagerScheduledActionGroupPrototype.from_dict(group) + args[ + 'group'] = InstanceGroupManagerScheduledActionGroupPrototype.from_dict( + group) else: - raise ValueError('Required property \'group\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup JSON') + raise ValueError( + 'Required property \'group\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup JSON' + ) return cls(**args) @classmethod @@ -154150,18 +170132,25 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager( + InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager. @@ -154199,7 +170188,9 @@ def __init__( self.manager = manager @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager': """Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -154209,7 +170200,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduled if (manager := _dict.get('manager')) is not None: args['manager'] = manager else: - raise ValueError('Required property \'manager\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager JSON') + raise ValueError( + 'Required property \'manager\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager JSON' + ) return cls(**args) @classmethod @@ -154239,18 +170232,25 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup( + InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup. @@ -154286,7 +170286,9 @@ def __init__( self.group = group @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup': """Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -154294,9 +170296,13 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduled if (run_at := _dict.get('run_at')) is not None: args['run_at'] = string_to_datetime(run_at) if (group := _dict.get('group')) is not None: - args['group'] = InstanceGroupManagerScheduledActionGroupPrototype.from_dict(group) + args[ + 'group'] = InstanceGroupManagerScheduledActionGroupPrototype.from_dict( + group) else: - raise ValueError('Required property \'group\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup JSON') + raise ValueError( + 'Required property \'group\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup JSON' + ) return cls(**args) @classmethod @@ -154326,18 +170332,25 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager( + InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager. @@ -154373,7 +170386,9 @@ def __init__( self.manager = manager @classmethod - def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager': + def from_dict( + cls, _dict: Dict + ) -> 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager': """Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager object from a json dictionary.""" args = {} if (name := _dict.get('name')) is not None: @@ -154383,7 +170398,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduled if (manager := _dict.get('manager')) is not None: args['manager'] = manager else: - raise ValueError('Required property \'manager\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager JSON') + raise ValueError( + 'Required property \'manager\' not present in InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager JSON' + ) return cls(**args) @classmethod @@ -154413,16 +170430,23 @@ def __str__(self) -> str: """Return a `str` version of this InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager') -> bool: + def __eq__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager' + ) -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager') -> bool: + def __ne__( + self, other: + 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager' + ) -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + ############################################################################## # Pagers ############################################################################## @@ -155097,6 +171121,7 @@ def __init__( name: str = None, status: List[str] = None, visibility: str = None, + user_data_format: List[str] = None, ) -> None: """ Initialize a ImagesPager object. @@ -155110,6 +171135,9 @@ def __init__( `status` property matching one of the specified comma-separated values. :param str visibility: (optional) Filters the collection to images with a `visibility` property matching the specified value. + :param List[str] user_data_format: (optional) Filters the collection to + images with a `user_data_format` property matching one of the specified + comma-separated values. """ self._has_next = True self._client = client @@ -155119,6 +171147,7 @@ def __init__( self._name = name self._status = status self._visibility = visibility + self._user_data_format = user_data_format def has_next(self) -> bool: """ @@ -155141,6 +171170,7 @@ def get_next(self) -> List[dict]: name=self._name, status=self._status, visibility=self._visibility, + user_data_format=self._user_data_format, start=self._page_context.get('next'), ).get_result() @@ -155349,9 +171379,9 @@ def __init__( :param str reservation_id: (optional) Filters the collection to resources with a `reservation.id` property matching the specified identifier. :param str reservation_crn: (optional) Filters the collection to resources - with a `reservation.crn` property matching the specified CRN. + with a `reservation.crn` property matching the specified identifier. :param str reservation_name: (optional) Filters the collection to resources - with a `reservation.name` property matching the exact specified name. + with a `reservation.name` property matching the specified identifier. :param str vpc_id: (optional) Filters the collection to resources with a `vpc.id` property matching the specified identifier. :param str vpc_crn: (optional) Filters the collection to resources with a @@ -156931,9 +172961,12 @@ def get_next(self) -> List[dict]: copies_crn=self._copies_crn, copies_remote_region_name=self._copies_remote_region_name, source_snapshot_id=self._source_snapshot_id, - source_snapshot_remote_region_name=self._source_snapshot_remote_region_name, - source_volume_remote_region_name=self._source_volume_remote_region_name, - source_image_remote_region_name=self._source_image_remote_region_name, + source_snapshot_remote_region_name=self. + _source_snapshot_remote_region_name, + source_volume_remote_region_name=self. + _source_volume_remote_region_name, + source_image_remote_region_name=self. + _source_image_remote_region_name, clones_zone_name=self._clones_zone_name, snapshot_consistency_group_id=self._snapshot_consistency_group_id, snapshot_consistency_group_crn=self._snapshot_consistency_group_crn, @@ -157124,6 +173157,74 @@ def get_all(self) -> List[dict]: return results +class ShareAccessorBindingsPager: + """ + ShareAccessorBindingsPager can be used to simplify the use of the "list_share_accessor_bindings" method. + """ + + def __init__( + self, + *, + client: VpcV1, + id: str, + limit: int = None, + ) -> None: + """ + Initialize a ShareAccessorBindingsPager object. + :param str id: The file share identifier. + :param int limit: (optional) The number of resources to return on a page. + """ + self._has_next = True + self._client = client + self._page_context = {'next': None} + self._id = id + self._limit = limit + + def has_next(self) -> bool: + """ + Returns true if there are potentially more results to be retrieved. + """ + return self._has_next + + def get_next(self) -> List[dict]: + """ + Returns the next page of results. + :return: A List[dict], where each element is a dict that represents an instance of ShareAccessorBinding. + :rtype: List[dict] + """ + if not self.has_next(): + raise StopIteration(message='No more results available') + + result = self._client.list_share_accessor_bindings( + id=self._id, + limit=self._limit, + start=self._page_context.get('next'), + ).get_result() + + next = None + next_page_link = result.get('next') + if next_page_link is not None: + next = get_query_param(next_page_link.get('href'), 'start') + self._page_context['next'] = next + if next is None: + self._has_next = False + + return result.get('accessor_bindings') + + def get_all(self) -> List[dict]: + """ + Returns all results by invoking get_next() repeatedly + until all pages of results have been retrieved. + :return: A List[dict], where each element is a dict that represents an instance of ShareAccessorBinding. + :rtype: List[dict] + """ + results = [] + while self.has_next(): + next_page = self.get_next() + results.extend(next_page) + return results + + class ShareMountTargetsPager: """ ShareMountTargetsPager can be used to simplify the use of the "list_share_mount_targets" method. @@ -158134,6 +174235,74 @@ def get_all(self) -> List[dict]: return results +class IkePolicyConnectionsPager: + """ + IkePolicyConnectionsPager can be used to simplify the use of the "list_ike_policy_connections" method. + """ + + def __init__( + self, + *, + client: VpcV1, + id: str, + limit: int = None, + ) -> None: + """ + Initialize a IkePolicyConnectionsPager object. + :param str id: The IKE policy identifier. + :param int limit: (optional) The number of resources to return on a page. + """ + self._has_next = True + self._client = client + self._page_context = {'next': None} + self._id = id + self._limit = limit + + def has_next(self) -> bool: + """ + Returns true if there are potentially more results to be retrieved. + """ + return self._has_next + + def get_next(self) -> List[dict]: + """ + Returns the next page of results. + :return: A List[dict], where each element is a dict that represents an instance of VPNGatewayConnection. + :rtype: List[dict] + """ + if not self.has_next(): + raise StopIteration(message='No more results available') + + result = self._client.list_ike_policy_connections( + id=self._id, + limit=self._limit, + start=self._page_context.get('next'), + ).get_result() + + next = None + next_page_link = result.get('next') + if next_page_link is not None: + next = get_query_param(next_page_link.get('href'), 'start') + self._page_context['next'] = next + if next is None: + self._has_next = False + + return result.get('connections') + + def get_all(self) -> List[dict]: + """ + Returns all results by invoking get_next() repeatedly + until all pages of results have been retrieved. + :return: A List[dict], where each element is a dict that represents an instance of VPNGatewayConnection. + :rtype: List[dict] + """ + results = [] + while self.has_next(): + next_page = self.get_next() + results.extend(next_page) + return results + + class IpsecPoliciesPager: """ IpsecPoliciesPager can be used to simplify the use of the "list_ipsec_policies" method. @@ -158198,6 +174367,74 @@ def get_all(self) -> List[dict]: return results +class IpsecPolicyConnectionsPager: + """ + IpsecPolicyConnectionsPager can be used to simplify the use of the "list_ipsec_policy_connections" method. + """ + + def __init__( + self, + *, + client: VpcV1, + id: str, + limit: int = None, + ) -> None: + """ + Initialize a IpsecPolicyConnectionsPager object. + :param str id: The IPsec policy identifier. + :param int limit: (optional) The number of resources to return on a page. + """ + self._has_next = True + self._client = client + self._page_context = {'next': None} + self._id = id + self._limit = limit + + def has_next(self) -> bool: + """ + Returns true if there are potentially more results to be retrieved. + """ + return self._has_next + + def get_next(self) -> List[dict]: + """ + Returns the next page of results. + :return: A List[dict], where each element is a dict that represents an instance of VPNGatewayConnection. + :rtype: List[dict] + """ + if not self.has_next(): + raise StopIteration(message='No more results available') + + result = self._client.list_ipsec_policy_connections( + id=self._id, + limit=self._limit, + start=self._page_context.get('next'), + ).get_result() + + next = None + next_page_link = result.get('next') + if next_page_link is not None: + next = get_query_param(next_page_link.get('href'), 'start') + self._page_context['next'] = next + if next is None: + self._has_next = False + + return result.get('connections') + + def get_all(self) -> List[dict]: + """ + Returns all results by invoking get_next() repeatedly + until all pages of results have been retrieved. + :return: A List[dict], where each element is a dict that represents an instance of VPNGatewayConnection. + :rtype: List[dict] + """ + results = [] + while self.has_next(): + next_page = self.get_next() + results.extend(next_page) + return results + + class VpnGatewaysPager: """ VpnGatewaysPager can be used to simplify the use of the "list_vpn_gateways" method. @@ -158281,6 +174518,79 @@ def get_all(self) -> List[dict]: return results +class VpnGatewayConnectionsPager: + """ + VpnGatewayConnectionsPager can be used to simplify the use of the "list_vpn_gateway_connections" method. + """ + + def __init__( + self, + *, + client: VpcV1, + vpn_gateway_id: str, + limit: int = None, + status: str = None, + ) -> None: + """ + Initialize a VpnGatewayConnectionsPager object. + :param str vpn_gateway_id: The VPN gateway identifier. + :param int limit: (optional) The number of resources to return on a page. + :param str status: (optional) Filters the collection to VPN gateway + connections with a `status` property matching the specified value. + """ + self._has_next = True + self._client = client + self._page_context = {'next': None} + self._vpn_gateway_id = vpn_gateway_id + self._limit = limit + self._status = status + + def has_next(self) -> bool: + """ + Returns true if there are potentially more results to be retrieved. + """ + return self._has_next + + def get_next(self) -> List[dict]: + """ + Returns the next page of results. + :return: A List[dict], where each element is a dict that represents an instance of VPNGatewayConnection. + :rtype: List[dict] + """ + if not self.has_next(): + raise StopIteration(message='No more results available') + + result = self._client.list_vpn_gateway_connections( + vpn_gateway_id=self._vpn_gateway_id, + limit=self._limit, + status=self._status, + start=self._page_context.get('next'), + ).get_result() + + next = None + next_page_link = result.get('next') + if next_page_link is not None: + next = get_query_param(next_page_link.get('href'), 'start') + self._page_context['next'] = next + if next is None: + self._has_next = False + + return result.get('connections') + + def get_all(self) -> List[dict]: + """ + Returns all results by invoking get_next() repeatedly + until all pages of results have been retrieved. + :return: A List[dict], where each element is a dict that represents an instance of VPNGatewayConnection. + :rtype: List[dict] + """ + results = [] + while self.has_next(): + next_page = self.get_next() + results.extend(next_page) + return results + + class VpnServersPager: """ VpnServersPager can be used to simplify the use of the "list_vpn_servers" method. diff --git a/requirements.txt b/requirements.txt index 60e626e..251a621 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ python_dateutil>=2.5.3,<3.0.0 -ibm_cloud_sdk_core>=3.20.0 \ No newline at end of file +ibm_cloud_sdk_core>=3.20.1 \ No newline at end of file diff --git a/test/integration/test_gen2.py b/test/integration/test_gen2.py index cc392ad..debd54f 100644 --- a/test/integration/test_gen2.py +++ b/test/integration/test_gen2.py @@ -826,11 +826,16 @@ def test_create_share(self, createGen2Service): share = create_share(createGen2Service, store['share_profile_name'], generate_name("share"), store['zone'], 200) assertCreateResponse(share) store['share_id'] = share.get_result()['id'] - share_replica = create_share_replica(createGen2Service, store['share_profile_name'], generate_name("share"), store['zone'], store['share_id'], '0 */5 * * *') + store['share_crn'] = share.get_result()['crn'] + share_replica = create_share_replica(createGen2Service, store['share_profile_name'], generate_name("share-replica"), store['zone'], store['share_id'], '0 */5 * * *') assertCreateResponse(share_replica) store['share_replica_id'] = share_replica.get_result()['id'] store['share_replica_etag'] = share_replica.get_headers()['ETag'] + def test_create_accessor_share(self, createGen2Service): + share = create_accessor_share(createGen2Service, store['share_profile_name'], generate_name("share-accessor")) + assertCreateResponse(share) + store['share_accessor_id'] = share.get_result()['id'] def test_get_share(self, createGen2Service): share = get_share(createGen2Service, store['share_id']) @@ -872,7 +877,7 @@ def test_delete_share_mount_target(self, createGen2Service): assertDeleteRequestAcceptedResponse(response) # def test_delete_share_source(self, createGen2Service): - # response = delete_share_source(createGen2Service, store['share_replica_id']) + # response = delete_share_source(createGen2Service, store['share_id']) # assertDeleteResponse(response) def test_delete_share(self, createGen2Service): @@ -1121,44 +1126,44 @@ def test_update_vpn_gateway_connection(self, createGen2Service): # local_cidrs def test_create_vpn_gateway_connection_local_cidrs(self, createGen2Service): - local_cidr = add_vpn_gateway_connections_local_cidr( - createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "192.132.10.0/28") + local_cidr = add_vpn_gateway_connection_local_cidr( + createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "192.132.10.0", "28") assert local_cidr.status_code == 204 - def test_list_vpn_gateway_connections_local_cidrs(self, createGen2Service): - local_cidr = list_vpn_gateway_connections_local_cidrs( + def test_list_vpn_gateway_connection_local_cidrs(self, createGen2Service): + local_cidr = list_vpn_gateway_connection_local_cidrs( createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id']) assert local_cidr.status_code == 200 - def test_check_vpn_gateway_connections_local_cidr(self, createGen2Service): - local_cidr = check_vpn_gateway_connections_local_cidr( - createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "192.132.10.0/28") + def test_check_vpn_gateway_connection_local_cidr(self, createGen2Service): + local_cidr = check_vpn_gateway_connection_local_cidr( + createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "192.132.10.0", "28") assert local_cidr.status_code == 204 - def test_remove_vpn_gateway_connections_local_cidr(self, createGen2Service): - local_cidr = remove_vpn_gateway_connections_local_cidr( - createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "192.132.10.0/28") + def test_remove_vpn_gateway_connection_local_cidr(self, createGen2Service): + local_cidr = remove_vpn_gateway_connection_local_cidr( + createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "192.132.10.0", "28") assert local_cidr.status_code == 204 # peer_cidrs def test_create_vpn_gateway_connection_peer_cidrs(self, createGen2Service): - peer_cidr = add_vpn_gateway_connections_peer_cidr( - createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "202.138.10.0/28") + peer_cidr = add_vpn_gateway_connection_peer_cidr( + createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "202.138.10.0", "28") assert peer_cidr.status_code == 204 - def test_list_vpn_gateway_connections_peer_cidrs(self, createGen2Service): - peer_cidr = list_vpn_gateway_connections_peer_cidrs( + def test_list_vpn_gateway_connection_peer_cidrs(self, createGen2Service): + peer_cidr = list_vpn_gateway_connection_peer_cidrs( createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id']) assert peer_cidr.status_code == 200 - def test_check_vpn_gateway_connections_peer_cidr(self, createGen2Service): - peer_cidr = check_vpn_gateway_connections_peer_cidr( - createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "202.138.10.0/28") + def test_check_vpn_gateway_connection_peer_cidr(self, createGen2Service): + peer_cidr = check_vpn_gateway_connection_peer_cidr( + createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "202.138.10.0", "28") assert peer_cidr.status_code == 204 - def test_remove_vpn_gateway_connections_peer_cidr(self, createGen2Service): - peer_cidr = remove_vpn_gateway_connections_peer_cidr( - createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "202.138.10.0/28") + def test_remove_vpn_gateway_connection_peer_cidr(self, createGen2Service): + peer_cidr = remove_vpn_gateway_connection_peer_cidr( + createGen2Service, store['created_vpn_gateway_id'], store['created_vpn_gateway_connection_id'], "202.138.10.0", "28") assert peer_cidr.status_code == 204 @@ -1817,11 +1822,11 @@ def test_delete_vpc_dns_res_binding(self, createGen2Service): def test_delete_vpc(self, createGen2Service): vpc = delete_vpc(createGen2Service, store['created_vpc']) assertDeleteResponse(vpc) - - + def test_delete_vpc(self, createGen2Service): vpc = delete_vpc(createGen2Service, store['created_vpc_hub']) assertDeleteResponse(vpc) + def test_delete_image(self, createGen2Service): image = delete_image(createGen2Service, store['image_id']) assertDeleteResponse(image) @@ -4117,6 +4122,20 @@ def create_share(service, share_profile_name, name, zone_name, size): ) return share +def create_accessor_share(service, shareCRN, name): + share_identity = { + 'crn': shareCRN, + } + share_prototype_model = { + 'name': name, + 'origin_share': share_identity, + } + + share = service.create_share( + share_prototype=share_prototype_model, + ) + return share + def create_share_replica(service, share_profile_name, name, zone_name, share_id, cron_spec): share_profile_identity_model = { 'name': share_profile_name, @@ -4741,9 +4760,6 @@ def update_vpc_dns_res_binding(service,vpcId, vpcDnsResolutionBindingID): ) return response - - - # -------------------------------------------------------- # delete_vpc() # -------------------------------------------------------- @@ -5228,10 +5244,11 @@ def create_vpn_gateway_connection(service, vpn_gateway_id): 'routing_protocol': 'none', } - response = service.create_vpn_gateway_connection( - vpn_gateway_id, + response = service.vpc_service.create_vpn_gateway_connection( + vpn_gateway_id='testString', vpn_gateway_connection_prototype=vpn_gateway_connection_prototype_model, ) + return response # -------------------------------------------------------- # delete_vpn_gateway_connection() @@ -5267,80 +5284,80 @@ def update_vpn_gateway_connection(service, vpn_gateway_id, id): return response # -------------------------------------------------------- -# list_vpn_gateway_connections_local_cidrs() +# list_vpn_gateway_connection_local_cidrs() # -------------------------------------------------------- -def list_vpn_gateway_connections_local_cidrs(service, vpn_gateway_id, id): +def list_vpn_gateway_connection_local_cidrs(service, vpn_gateway_id, id): response = service.list_vpn_gateway_connections_local_cidrs( vpn_gateway_id, id) return response # -------------------------------------------------------- -# remove_vpn_gateway_connections_local_cidr() +# remove_vpn_gateway_connection_local_cidr() # -------------------------------------------------------- -def remove_vpn_gateway_connections_local_cidr(service, vpn_gateway_id, id, cidr): +def remove_vpn_gateway_connection_local_cidr(service, vpn_gateway_id, id, prefix_address, prefix_length): response = service.remove_vpn_gateway_connections_local_cidr( - vpn_gateway_id, id, cidr) + vpn_gateway_id, id, prefix_address, prefix_length) return response # -------------------------------------------------------- -# check_vpn_gateway_connections_local_cidr() +# check_vpn_gateway_connection_local_cidr() # -------------------------------------------------------- -def check_vpn_gateway_connections_local_cidr(service, vpn_gateway_id, id, cidr): +def check_vpn_gateway_connection_local_cidr(service, vpn_gateway_id, id, prefix_address, prefix_length): response = service.check_vpn_gateway_connections_local_cidr( - vpn_gateway_id, id, cidr) + vpn_gateway_id, id, prefix_address, prefix_length) return response # -------------------------------------------------------- -# add_vpn_gateway_connections_local_cidr() +# add_vpn_gateway_connection_local_cidr() # -------------------------------------------------------- -def add_vpn_gateway_connections_local_cidr(service, vpn_gateway_id, id, cidr): +def add_vpn_gateway_connection_local_cidr(service, vpn_gateway_id, id, prefix_address, prefix_length): response = service.add_vpn_gateway_connections_local_cidr( - vpn_gateway_id, id, cidr) + vpn_gateway_id, id, prefix_address, prefix_length) return response # -------------------------------------------------------- -# list_vpn_gateway_connections_peer_cidrs() +# list_vpn_gateway_connection_peer_cidrs() # -------------------------------------------------------- -def list_vpn_gateway_connections_peer_cidrs(service, vpn_gateway_id, id): +def list_vpn_gateway_connection_peer_cidrs(service, vpn_gateway_id, id): response = service.list_vpn_gateway_connections_peer_cidrs( vpn_gateway_id, id) return response # -------------------------------------------------------- -# remove_vpn_gateway_connections_peer_cidr() +# remove_vpn_gateway_connection_peer_cidr() # -------------------------------------------------------- -def remove_vpn_gateway_connections_peer_cidr(service, vpn_gateway_id, id, cidr): +def remove_vpn_gateway_connection_peer_cidr(service, vpn_gateway_id, id, prefix_address, prefix_length): response = service.remove_vpn_gateway_connections_peer_cidr( - vpn_gateway_id, id, cidr) + vpn_gateway_id, id, prefix_address, prefix_length) return response # -------------------------------------------------------- -# check_vpn_gateway_connections_peer_cidr() +# check_vpn_gateway_connection_peer_cidr() # -------------------------------------------------------- -def check_vpn_gateway_connections_peer_cidr(service, vpn_gateway_id, id, cidr): +def check_vpn_gateway_connection_peer_cidr(service, vpn_gateway_id, id, prefix_address, prefix_length): response = service.check_vpn_gateway_connections_peer_cidr( - vpn_gateway_id, id, cidr) + vpn_gateway_id, id, prefix_address, prefix_length) return response # -------------------------------------------------------- -# add_vpn_gateway_connections_peer_cidr() +# add_vpn_gateway_connection_peer_cidr() # -------------------------------------------------------- -def add_vpn_gateway_connections_peer_cidr(service, vpn_gateway_id, id, cidr): +def add_vpn_gateway_connection_peer_cidr(service, vpn_gateway_id, id, prefix_address, prefix_length): response = service.add_vpn_gateway_connections_peer_cidr( - vpn_gateway_id, id, cidr) + vpn_gateway_id, id, prefix_address, prefix_length) return response # -------------------------------------------------------- @@ -6269,6 +6286,9 @@ def assertListResponse(output, rType): # +def assertPagerListResponse(output): + assert len(output) != 0 + def assertGetNameResponse(output): response = output.get_result() assert output.status_code == 200 @@ -6299,7 +6319,3 @@ def assertDeleteResponse(output): def assertDeleteRequestAcceptedResponse(output): response = output.get_result() assert output.status_code == 202 - - -def assertPagerListResponse(output): - assert len(output) != 0 \ No newline at end of file diff --git a/test/unit/test_vpc_v1.py b/test/unit/test_vpc_v1.py index 3bf74f6..63b6da0 100644 --- a/test/unit/test_vpc_v1.py +++ b/test/unit/test_vpc_v1.py @@ -12,7 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - """ Unit Tests for VpcV1 """ @@ -50,15 +49,8 @@ def preprocess_url(operation_path: str): The returned request URL is used to register the mock response so it needs to match the request URL that is formed by the requests library. """ - # First, unquote the path since it might have some quoted/escaped characters in it - # due to how the generator inserts the operation paths into the unit test code. - operation_path = urllib.parse.unquote(operation_path) - - # Next, quote the path using urllib so that we approximate what will - # happen during request processing. - operation_path = urllib.parse.quote(operation_path, safe='/') - # Finally, form the request URL from the base URL and operation path. + # Form the request URL from the base URL and operation path. request_url = _base_url + operation_path # If the request url does NOT end with a /, then just return it as-is. @@ -107,7 +99,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -115,9 +111,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListVpcs: @@ -165,7 +159,8 @@ def test_list_vpcs_all_params(self): assert 'start={}'.format(start) in query_string assert 'limit={}'.format(limit) in query_string assert 'resource_group.id={}'.format(resource_group_id) in query_string - assert 'classic_access={}'.format('true' if classic_access else 'false') in query_string + assert 'classic_access={}'.format( + 'true' if classic_access else 'false') in query_string def test_list_vpcs_all_params_with_retries(self): # Enable retries and run test_list_vpcs_all_params. @@ -225,10 +220,12 @@ def test_list_vpcs_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpcs(**req_copy) @@ -347,7 +344,9 @@ def test_create_vpc_all_params(self): # Construct a dict representation of a VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype model vpcdns_resolver_prototype_model = {} - vpcdns_resolver_prototype_model['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_prototype_model['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_prototype_model['type'] = 'manual' # Construct a dict representation of a VPCDNSPrototype model @@ -445,10 +444,12 @@ def test_create_vpc_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpc(**req_copy) @@ -560,7 +561,10 @@ def test_delete_vpc_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpc(**req_copy) @@ -641,7 +645,10 @@ def test_get_vpc_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc(**req_copy) @@ -687,11 +694,14 @@ def test_update_vpc_all_params(self): # Construct a dict representation of a VPCDNSResolverVPCPatchVPCIdentityById model vpcdns_resolver_vpc_patch_model = {} - vpcdns_resolver_vpc_patch_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a dict representation of a VPCDNSResolverPatch model vpcdns_resolver_patch_model = {} - vpcdns_resolver_patch_model['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_patch_model['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_patch_model['type'] = 'delegated' vpcdns_resolver_patch_model['vpc'] = vpcdns_resolver_vpc_patch_model @@ -761,11 +771,14 @@ def test_update_vpc_required_params(self): # Construct a dict representation of a VPCDNSResolverVPCPatchVPCIdentityById model vpcdns_resolver_vpc_patch_model = {} - vpcdns_resolver_vpc_patch_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a dict representation of a VPCDNSResolverPatch model vpcdns_resolver_patch_model = {} - vpcdns_resolver_patch_model['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_patch_model['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_patch_model['type'] = 'delegated' vpcdns_resolver_patch_model['vpc'] = vpcdns_resolver_vpc_patch_model @@ -833,11 +846,14 @@ def test_update_vpc_value_error(self): # Construct a dict representation of a VPCDNSResolverVPCPatchVPCIdentityById model vpcdns_resolver_vpc_patch_model = {} - vpcdns_resolver_vpc_patch_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a dict representation of a VPCDNSResolverPatch model vpcdns_resolver_patch_model = {} - vpcdns_resolver_patch_model['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_patch_model['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_patch_model['type'] = 'delegated' vpcdns_resolver_patch_model['vpc'] = vpcdns_resolver_vpc_patch_model @@ -861,7 +877,10 @@ def test_update_vpc_value_error(self): "vpc_patch": vpc_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpc(**req_copy) @@ -942,7 +961,10 @@ def test_get_vpc_default_network_acl_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_default_network_acl(**req_copy) @@ -1023,7 +1045,10 @@ def test_get_vpc_default_routing_table_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_default_routing_table(**req_copy) @@ -1104,7 +1129,10 @@ def test_get_vpc_default_security_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_default_security_group(**req_copy) @@ -1232,7 +1260,10 @@ def test_list_vpc_address_prefixes_value_error(self): "vpc_id": vpc_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpc_address_prefixes(**req_copy) @@ -1412,7 +1443,10 @@ def test_create_vpc_address_prefix_value_error(self): "zone": zone, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpc_address_prefix(**req_copy) @@ -1491,7 +1525,10 @@ def test_delete_vpc_address_prefix_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpc_address_prefix(**req_copy) @@ -1576,7 +1613,10 @@ def test_get_vpc_address_prefix_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_address_prefix(**req_copy) @@ -1678,7 +1718,10 @@ def test_update_vpc_address_prefix_value_error(self): "address_prefix_patch": address_prefix_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpc_address_prefix(**req_copy) @@ -1788,7 +1831,8 @@ def test_list_vpc_dns_resolution_bindings_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_vpc_dns_resolution_bindings_required_params_with_retries(self): + def test_list_vpc_dns_resolution_bindings_required_params_with_retries( + self): # Enable retries and run test_list_vpc_dns_resolution_bindings_required_params. _service.enable_retries() self.test_list_vpc_dns_resolution_bindings_required_params() @@ -1821,7 +1865,10 @@ def test_list_vpc_dns_resolution_bindings_value_error(self): "vpc_id": vpc_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpc_dns_resolution_bindings(**req_copy) @@ -1866,7 +1913,8 @@ def test_list_vpc_dns_resolution_bindings_with_pager_get_next(self): sort='name', limit=10, name='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', account_id='bb1b52262f7441a586f49068482f1e60', ) @@ -1907,7 +1955,8 @@ def test_list_vpc_dns_resolution_bindings_with_pager_get_all(self): sort='name', limit=10, name='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', account_id='bb1b52262f7441a586f49068482f1e60', ) @@ -2002,7 +2051,10 @@ def test_create_vpc_dns_resolution_binding_value_error(self): "vpc": vpc, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpc_dns_resolution_binding(**req_copy) @@ -2027,7 +2079,8 @@ def test_delete_vpc_dns_resolution_binding_all_params(self): delete_vpc_dns_resolution_binding() """ # Set up mock - url = preprocess_url('/vpcs/testString/dns_resolution_bindings/testString') + url = preprocess_url( + '/vpcs/testString/dns_resolution_bindings/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}' responses.add( responses.DELETE, @@ -2067,7 +2120,8 @@ def test_delete_vpc_dns_resolution_binding_value_error(self): test_delete_vpc_dns_resolution_binding_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/dns_resolution_bindings/testString') + url = preprocess_url( + '/vpcs/testString/dns_resolution_bindings/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}' responses.add( responses.DELETE, @@ -2087,7 +2141,10 @@ def test_delete_vpc_dns_resolution_binding_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpc_dns_resolution_binding(**req_copy) @@ -2112,7 +2169,8 @@ def test_get_vpc_dns_resolution_binding_all_params(self): get_vpc_dns_resolution_binding() """ # Set up mock - url = preprocess_url('/vpcs/testString/dns_resolution_bindings/testString') + url = preprocess_url( + '/vpcs/testString/dns_resolution_bindings/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}' responses.add( responses.GET, @@ -2152,7 +2210,8 @@ def test_get_vpc_dns_resolution_binding_value_error(self): test_get_vpc_dns_resolution_binding_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/dns_resolution_bindings/testString') + url = preprocess_url( + '/vpcs/testString/dns_resolution_bindings/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}' responses.add( responses.GET, @@ -2172,7 +2231,10 @@ def test_get_vpc_dns_resolution_binding_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_dns_resolution_binding(**req_copy) @@ -2197,7 +2259,8 @@ def test_update_vpc_dns_resolution_binding_all_params(self): update_vpc_dns_resolution_binding() """ # Set up mock - url = preprocess_url('/vpcs/testString/dns_resolution_bindings/testString') + url = preprocess_url( + '/vpcs/testString/dns_resolution_bindings/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}' responses.add( responses.PATCH, @@ -2209,7 +2272,8 @@ def test_update_vpc_dns_resolution_binding_all_params(self): # Construct a dict representation of a VPCDNSResolutionBindingPatch model vpcdns_resolution_binding_patch_model = {} - vpcdns_resolution_binding_patch_model['name'] = 'my-dns-resolution-binding-updated' + vpcdns_resolution_binding_patch_model[ + 'name'] = 'my-dns-resolution-binding-updated' # Set up parameter values vpc_id = 'testString' @@ -2246,7 +2310,8 @@ def test_update_vpc_dns_resolution_binding_value_error(self): test_update_vpc_dns_resolution_binding_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/dns_resolution_bindings/testString') + url = preprocess_url( + '/vpcs/testString/dns_resolution_bindings/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "endpoint_gateway"}], "health_reasons": [{"code": "disconnected_from_bound_vpc", "message": "The VPC specified in the DNS resolution binding has been disconnected.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "id": "r006-8a524686-fcf6-4947-a59b-188c1ed78ad1", "lifecycle_state": "stable", "name": "my-dns-resolution-binding", "resource_type": "vpc_dns_resolution_binding", "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "vpc"}}' responses.add( responses.PATCH, @@ -2258,7 +2323,8 @@ def test_update_vpc_dns_resolution_binding_value_error(self): # Construct a dict representation of a VPCDNSResolutionBindingPatch model vpcdns_resolution_binding_patch_model = {} - vpcdns_resolution_binding_patch_model['name'] = 'my-dns-resolution-binding-updated' + vpcdns_resolution_binding_patch_model[ + 'name'] = 'my-dns-resolution-binding-updated' # Set up parameter values vpc_id = 'testString' @@ -2272,7 +2338,10 @@ def test_update_vpc_dns_resolution_binding_value_error(self): "vpcdns_resolution_binding_patch": vpcdns_resolution_binding_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpc_dns_resolution_binding(**req_copy) @@ -2298,7 +2367,7 @@ def test_list_vpc_routes_all_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -2348,7 +2417,7 @@ def test_list_vpc_routes_required_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -2386,7 +2455,7 @@ def test_list_vpc_routes_value_error(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -2403,7 +2472,10 @@ def test_list_vpc_routes_value_error(self): "vpc_id": vpc_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpc_routes(**req_copy) @@ -2423,8 +2495,8 @@ def test_list_vpc_routes_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/vpcs/testString/routes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' - mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -2461,8 +2533,8 @@ def test_list_vpc_routes_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/vpcs/testString/routes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' - mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -2502,7 +2574,7 @@ def test_create_vpc_route_all_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -2521,7 +2593,7 @@ def test_create_vpc_route_all_params(self): # Set up parameter values vpc_id = 'testString' - destination = 'testString' + destination = '192.168.3.0/24' zone = zone_identity_model action = 'deliver' advertise = False @@ -2547,7 +2619,7 @@ def test_create_vpc_route_all_params(self): assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body['destination'] == 'testString' + assert req_body['destination'] == '192.168.3.0/24' assert req_body['zone'] == zone_identity_model assert req_body['action'] == 'deliver' assert req_body['advertise'] == False @@ -2571,7 +2643,7 @@ def test_create_vpc_route_value_error(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -2590,7 +2662,7 @@ def test_create_vpc_route_value_error(self): # Set up parameter values vpc_id = 'testString' - destination = 'testString' + destination = '192.168.3.0/24' zone = zone_identity_model action = 'deliver' advertise = False @@ -2605,7 +2677,10 @@ def test_create_vpc_route_value_error(self): "zone": zone, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpc_route(**req_copy) @@ -2684,7 +2759,10 @@ def test_delete_vpc_route_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpc_route(**req_copy) @@ -2710,7 +2788,7 @@ def test_get_vpc_route_all_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -2750,7 +2828,7 @@ def test_get_vpc_route_value_error(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -2769,7 +2847,10 @@ def test_get_vpc_route_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_route(**req_copy) @@ -2795,7 +2876,7 @@ def test_update_vpc_route_all_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -2851,7 +2932,7 @@ def test_update_vpc_route_value_error(self): """ # Set up mock url = preprocess_url('/vpcs/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -2883,7 +2964,10 @@ def test_update_vpc_route_value_error(self): "route_patch": route_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpc_route(**req_copy) @@ -2941,7 +3025,8 @@ def test_list_vpc_routing_tables_all_params(self): query_string = urllib.parse.unquote_plus(query_string) assert 'start={}'.format(start) in query_string assert 'limit={}'.format(limit) in query_string - assert 'is_default={}'.format('true' if is_default else 'false') in query_string + assert 'is_default={}'.format( + 'true' if is_default else 'false') in query_string def test_list_vpc_routing_tables_all_params_with_retries(self): # Enable retries and run test_list_vpc_routing_tables_all_params. @@ -3014,7 +3099,10 @@ def test_list_vpc_routing_tables_value_error(self): "vpc_id": vpc_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpc_routing_tables(**req_copy) @@ -3138,7 +3226,7 @@ def test_create_vpc_routing_table_all_params(self): route_prototype_model = {} route_prototype_model['action'] = 'deliver' route_prototype_model['advertise'] = False - route_prototype_model['destination'] = 'testString' + route_prototype_model['destination'] = '192.168.3.0/24' route_prototype_model['name'] = 'my-route-1' route_prototype_model['next_hop'] = route_prototype_next_hop_model route_prototype_model['priority'] = 1 @@ -3224,7 +3312,7 @@ def test_create_vpc_routing_table_value_error(self): route_prototype_model = {} route_prototype_model['action'] = 'deliver' route_prototype_model['advertise'] = False - route_prototype_model['destination'] = 'testString' + route_prototype_model['destination'] = '192.168.3.0/24' route_prototype_model['name'] = 'my-route-1' route_prototype_model['next_hop'] = route_prototype_next_hop_model route_prototype_model['priority'] = 1 @@ -3246,7 +3334,10 @@ def test_create_vpc_routing_table_value_error(self): "vpc_id": vpc_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpc_routing_table(**req_copy) @@ -3364,7 +3455,10 @@ def test_delete_vpc_routing_table_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpc_routing_table(**req_copy) @@ -3449,7 +3543,10 @@ def test_get_vpc_routing_table_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_routing_table(**req_copy) @@ -3490,7 +3587,9 @@ def test_update_vpc_routing_table_all_params(self): # Construct a dict representation of a RoutingTablePatch model routing_table_patch_model = {} - routing_table_patch_model['accept_routes_from'] = [resource_filter_model] + routing_table_patch_model['accept_routes_from'] = [ + resource_filter_model + ] routing_table_patch_model['advertise_routes_to'] = ['transit_gateway'] routing_table_patch_model['name'] = 'my-routing-table-2' routing_table_patch_model['route_direct_link_ingress'] = True @@ -3551,7 +3650,9 @@ def test_update_vpc_routing_table_required_params(self): # Construct a dict representation of a RoutingTablePatch model routing_table_patch_model = {} - routing_table_patch_model['accept_routes_from'] = [resource_filter_model] + routing_table_patch_model['accept_routes_from'] = [ + resource_filter_model + ] routing_table_patch_model['advertise_routes_to'] = ['transit_gateway'] routing_table_patch_model['name'] = 'my-routing-table-2' routing_table_patch_model['route_direct_link_ingress'] = True @@ -3610,7 +3711,9 @@ def test_update_vpc_routing_table_value_error(self): # Construct a dict representation of a RoutingTablePatch model routing_table_patch_model = {} - routing_table_patch_model['accept_routes_from'] = [resource_filter_model] + routing_table_patch_model['accept_routes_from'] = [ + resource_filter_model + ] routing_table_patch_model['advertise_routes_to'] = ['transit_gateway'] routing_table_patch_model['name'] = 'my-routing-table-2' routing_table_patch_model['route_direct_link_ingress'] = True @@ -3630,7 +3733,10 @@ def test_update_vpc_routing_table_value_error(self): "routing_table_patch": routing_table_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpc_routing_table(**req_copy) @@ -3655,8 +3761,9 @@ def test_list_vpc_routing_table_routes_all_params(self): list_vpc_routing_table_routes() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes') + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -3704,8 +3811,9 @@ def test_list_vpc_routing_table_routes_required_params(self): test_list_vpc_routing_table_routes_required_params() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes') + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -3744,8 +3852,9 @@ def test_list_vpc_routing_table_routes_value_error(self): test_list_vpc_routing_table_routes_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes') + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -3764,7 +3873,10 @@ def test_list_vpc_routing_table_routes_value_error(self): "routing_table_id": routing_table_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpc_routing_table_routes(**req_copy) @@ -3783,9 +3895,10 @@ def test_list_vpc_routing_table_routes_with_pager_get_next(self): test_list_vpc_routing_table_routes_with_pager_get_next() """ # Set up a two-page mock response - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' - mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -3821,9 +3934,10 @@ def test_list_vpc_routing_table_routes_with_pager_get_all(self): test_list_vpc_routing_table_routes_with_pager_get_all() """ # Set up a two-page mock response - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' - mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"destination","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response2 = '{"routes":[{"action":"delegate","advertise":false,"created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -3862,8 +3976,9 @@ def test_create_vpc_routing_table_route_all_params(self): create_vpc_routing_table_route() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes') + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -3883,7 +3998,7 @@ def test_create_vpc_routing_table_route_all_params(self): # Set up parameter values vpc_id = 'testString' routing_table_id = 'testString' - destination = 'testString' + destination = '192.168.3.0/24' zone = zone_identity_model action = 'deliver' advertise = False @@ -3910,7 +4025,7 @@ def test_create_vpc_routing_table_route_all_params(self): assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body['destination'] == 'testString' + assert req_body['destination'] == '192.168.3.0/24' assert req_body['zone'] == zone_identity_model assert req_body['action'] == 'deliver' assert req_body['advertise'] == False @@ -3933,8 +4048,9 @@ def test_create_vpc_routing_table_route_value_error(self): test_create_vpc_routing_table_route_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes') + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -3954,7 +4070,7 @@ def test_create_vpc_routing_table_route_value_error(self): # Set up parameter values vpc_id = 'testString' routing_table_id = 'testString' - destination = 'testString' + destination = '192.168.3.0/24' zone = zone_identity_model action = 'deliver' advertise = False @@ -3970,7 +4086,10 @@ def test_create_vpc_routing_table_route_value_error(self): "zone": zone, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpc_routing_table_route(**req_copy) @@ -3995,7 +4114,8 @@ def test_delete_vpc_routing_table_route_all_params(self): delete_vpc_routing_table_route() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString') + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes/testString') responses.add( responses.DELETE, url, @@ -4034,7 +4154,8 @@ def test_delete_vpc_routing_table_route_value_error(self): test_delete_vpc_routing_table_route_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString') + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes/testString') responses.add( responses.DELETE, url, @@ -4053,7 +4174,10 @@ def test_delete_vpc_routing_table_route_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpc_routing_table_route(**req_copy) @@ -4078,8 +4202,9 @@ def test_get_vpc_routing_table_route_all_params(self): get_vpc_routing_table_route() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes/testString') + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -4120,8 +4245,9 @@ def test_get_vpc_routing_table_route_value_error(self): test_get_vpc_routing_table_route_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes/testString') + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -4142,7 +4268,10 @@ def test_get_vpc_routing_table_route_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpc_routing_table_route(**req_copy) @@ -4167,8 +4296,9 @@ def test_update_vpc_routing_table_route_all_params(self): update_vpc_routing_table_route() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes/testString') + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -4225,8 +4355,9 @@ def test_update_vpc_routing_table_route_value_error(self): test_update_vpc_routing_table_route_value_error() """ # Set up mock - url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString') - mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "destination", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + url = preprocess_url( + '/vpcs/testString/routing_tables/testString/routes/testString') + mock_response = '{"action": "delegate", "advertise": false, "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -4260,7 +4391,10 @@ def test_update_vpc_routing_table_route_value_error(self): "route_patch": route_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpc_routing_table_route(**req_copy) @@ -4318,7 +4452,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -4326,9 +4464,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListSubnets: @@ -4391,7 +4527,8 @@ def test_list_subnets_all_params(self): assert 'vpc.crn={}'.format(vpc_crn) in query_string assert 'vpc.name={}'.format(vpc_name) in query_string assert 'routing_table.id={}'.format(routing_table_id) in query_string - assert 'routing_table.name={}'.format(routing_table_name) in query_string + assert 'routing_table.name={}'.format( + routing_table_name) in query_string def test_list_subnets_all_params_with_retries(self): # Enable retries and run test_list_subnets_all_params. @@ -4451,10 +4588,12 @@ def test_list_subnets_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_subnets(**req_copy) @@ -4499,7 +4638,8 @@ def test_list_subnets_with_pager_get_next(self): resource_group_id='testString', zone_name='us-south-1', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', routing_table_id='testString', routing_table_name='my-routing-table', @@ -4541,7 +4681,8 @@ def test_list_subnets_with_pager_get_all(self): resource_group_id='testString', zone_name='us-south-1', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', routing_table_id='testString', routing_table_name='my-routing-table', @@ -4574,11 +4715,13 @@ def test_create_subnet_all_params(self): # Construct a dict representation of a NetworkACLIdentityById model network_acl_identity_model = {} - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a dict representation of a PublicGatewayIdentityPublicGatewayIdentityById model public_gateway_identity_model = {} - public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -4586,7 +4729,8 @@ def test_create_subnet_all_params(self): # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} - routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -4651,11 +4795,13 @@ def test_create_subnet_value_error(self): # Construct a dict representation of a NetworkACLIdentityById model network_acl_identity_model = {} - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a dict representation of a PublicGatewayIdentityPublicGatewayIdentityById model public_gateway_identity_model = {} - public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -4663,7 +4809,8 @@ def test_create_subnet_value_error(self): # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} - routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -4693,7 +4840,10 @@ def test_create_subnet_value_error(self): "subnet_prototype": subnet_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_subnet(**req_copy) @@ -4768,7 +4918,10 @@ def test_delete_subnet_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_subnet(**req_copy) @@ -4849,7 +5002,10 @@ def test_get_subnet_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_subnet(**req_copy) @@ -4886,15 +5042,18 @@ def test_update_subnet_all_params(self): # Construct a dict representation of a NetworkACLIdentityById model network_acl_identity_model = {} - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a dict representation of a SubnetPublicGatewayPatchPublicGatewayIdentityById model subnet_public_gateway_patch_model = {} - subnet_public_gateway_patch_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + subnet_public_gateway_patch_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} - routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a dict representation of a SubnetPatch model subnet_patch_model = {} @@ -4948,15 +5107,18 @@ def test_update_subnet_value_error(self): # Construct a dict representation of a NetworkACLIdentityById model network_acl_identity_model = {} - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a dict representation of a SubnetPublicGatewayPatchPublicGatewayIdentityById model subnet_public_gateway_patch_model = {} - subnet_public_gateway_patch_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + subnet_public_gateway_patch_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} - routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a dict representation of a SubnetPatch model subnet_patch_model = {} @@ -4975,7 +5137,10 @@ def test_update_subnet_value_error(self): "subnet_patch": subnet_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_subnet(**req_copy) @@ -5056,7 +5221,10 @@ def test_get_subnet_network_acl_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_subnet_network_acl(**req_copy) @@ -5093,7 +5261,8 @@ def test_replace_subnet_network_acl_all_params(self): # Construct a dict representation of a NetworkACLIdentityById model network_acl_identity_model = {} - network_acl_identity_model['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Set up parameter values id = 'testString' @@ -5140,7 +5309,8 @@ def test_replace_subnet_network_acl_value_error(self): # Construct a dict representation of a NetworkACLIdentityById model network_acl_identity_model = {} - network_acl_identity_model['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Set up parameter values id = 'testString' @@ -5152,7 +5322,10 @@ def test_replace_subnet_network_acl_value_error(self): "network_acl_identity": network_acl_identity, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.replace_subnet_network_acl(**req_copy) @@ -5227,7 +5400,10 @@ def test_unset_subnet_public_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.unset_subnet_public_gateway(**req_copy) @@ -5308,7 +5484,10 @@ def test_get_subnet_public_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_subnet_public_gateway(**req_copy) @@ -5345,7 +5524,8 @@ def test_set_subnet_public_gateway_all_params(self): # Construct a dict representation of a PublicGatewayIdentityPublicGatewayIdentityById model public_gateway_identity_model = {} - public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Set up parameter values id = 'testString' @@ -5392,7 +5572,8 @@ def test_set_subnet_public_gateway_value_error(self): # Construct a dict representation of a PublicGatewayIdentityPublicGatewayIdentityById model public_gateway_identity_model = {} - public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Set up parameter values id = 'testString' @@ -5404,7 +5585,10 @@ def test_set_subnet_public_gateway_value_error(self): "public_gateway_identity": public_gateway_identity, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.set_subnet_public_gateway(**req_copy) @@ -5485,7 +5669,10 @@ def test_get_subnet_routing_table_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_subnet_routing_table(**req_copy) @@ -5522,7 +5709,8 @@ def test_replace_subnet_routing_table_all_params(self): # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} - routing_table_identity_model['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' # Set up parameter values id = 'testString' @@ -5569,7 +5757,8 @@ def test_replace_subnet_routing_table_value_error(self): # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} - routing_table_identity_model['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' # Set up parameter values id = 'testString' @@ -5581,7 +5770,10 @@ def test_replace_subnet_routing_table_value_error(self): "routing_table_identity": routing_table_identity, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.replace_subnet_routing_table(**req_copy) @@ -5651,7 +5843,8 @@ def test_list_subnet_reserved_ips_all_params(self): assert 'target.id={}'.format(target_id) in query_string assert 'target.crn={}'.format(target_crn) in query_string assert 'target.name={}'.format(target_name) in query_string - assert 'target.resource_type={}'.format(target_resource_type) in query_string + assert 'target.resource_type={}'.format( + target_resource_type) in query_string def test_list_subnet_reserved_ips_all_params_with_retries(self): # Enable retries and run test_list_subnet_reserved_ips_all_params. @@ -5724,7 +5917,10 @@ def test_list_subnet_reserved_ips_value_error(self): "subnet_id": subnet_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_subnet_reserved_ips(**req_copy) @@ -5769,7 +5965,8 @@ def test_list_subnet_reserved_ips_with_pager_get_next(self): limit=10, sort='name', target_id='testString', - target_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', + target_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -5810,7 +6007,8 @@ def test_list_subnet_reserved_ips_with_pager_get_all(self): limit=10, sort='name', target_id='testString', - target_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', + target_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -5842,7 +6040,8 @@ def test_create_subnet_reserved_ip_all_params(self): # Construct a dict representation of a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById model reserved_ip_target_prototype_model = {} - reserved_ip_target_prototype_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_prototype_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' # Set up parameter values subnet_id = 'testString' @@ -5898,7 +6097,8 @@ def test_create_subnet_reserved_ip_value_error(self): # Construct a dict representation of a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById model reserved_ip_target_prototype_model = {} - reserved_ip_target_prototype_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_prototype_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' # Set up parameter values subnet_id = 'testString' @@ -5912,7 +6112,10 @@ def test_create_subnet_reserved_ip_value_error(self): "subnet_id": subnet_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_subnet_reserved_ip(**req_copy) @@ -5991,7 +6194,10 @@ def test_delete_subnet_reserved_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_subnet_reserved_ip(**req_copy) @@ -6076,7 +6282,10 @@ def test_get_subnet_reserved_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_subnet_reserved_ip(**req_copy) @@ -6178,7 +6387,10 @@ def test_update_subnet_reserved_ip_value_error(self): "reserved_ip_patch": reserved_ip_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_subnet_reserved_ip(**req_copy) @@ -6236,7 +6448,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -6244,9 +6460,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListImages: @@ -6261,7 +6475,7 @@ def test_list_images_all_params(self): """ # Set up mock url = preprocess_url('/images') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -6277,6 +6491,7 @@ def test_list_images_all_params(self): name = 'testString' status = ['available'] visibility = 'private' + user_data_format = ['cloud_init'] # Invoke method response = _service.list_images( @@ -6286,6 +6501,7 @@ def test_list_images_all_params(self): name=name, status=status, visibility=visibility, + user_data_format=user_data_format, headers={}, ) @@ -6301,6 +6517,8 @@ def test_list_images_all_params(self): assert 'name={}'.format(name) in query_string assert 'status={}'.format(','.join(status)) in query_string assert 'visibility={}'.format(visibility) in query_string + assert 'user_data_format={}'.format( + ','.join(user_data_format)) in query_string def test_list_images_all_params_with_retries(self): # Enable retries and run test_list_images_all_params. @@ -6318,7 +6536,7 @@ def test_list_images_required_params(self): """ # Set up mock url = preprocess_url('/images') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -6350,7 +6568,7 @@ def test_list_images_value_error(self): """ # Set up mock url = preprocess_url('/images') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -6360,10 +6578,12 @@ def test_list_images_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_images(**req_copy) @@ -6383,8 +6603,8 @@ def test_list_images_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/images') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}' - mock_response2 = '{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_data_format":"cloud_init","visibility":"private"}],"total_count":2,"limit":1}' + mock_response2 = '{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_data_format":"cloud_init","visibility":"private"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -6409,6 +6629,7 @@ def test_list_images_with_pager_get_next(self): name='testString', status=['available'], visibility='private', + user_data_format=['cloud_init'], ) while pager.has_next(): next_page = pager.get_next() @@ -6423,8 +6644,8 @@ def test_list_images_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/images') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}' - mock_response2 = '{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_data_format":"cloud_init","visibility":"private"}],"total_count":2,"limit":1}' + mock_response2 = '{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deprecation_at":"2019-01-01T12:00:00.000Z","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","obsolescence_at":"2019-01-01T12:00:00.000Z","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"image","source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_data_format":"cloud_init","visibility":"private"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -6448,6 +6669,7 @@ def test_list_images_with_pager_get_all(self): name='testString', status=['available'], visibility='private', + user_data_format=['cloud_init'], ) all_results = pager.get_all() assert all_results is not None @@ -6466,7 +6688,7 @@ def test_create_image_all_params(self): """ # Set up mock url = preprocess_url('/images') - mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}' + mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}' responses.add( responses.POST, url, @@ -6481,11 +6703,13 @@ def test_create_image_all_params(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a ImageFilePrototype model image_file_prototype_model = {} - image_file_prototype_model['href'] = 'cos://us-south/my-bucket/my-image.qcow2' + image_file_prototype_model[ + 'href'] = 'cos://us-south/my-bucket/my-image.qcow2' # Construct a dict representation of a OperatingSystemIdentityByName model operating_system_identity_model = {} @@ -6500,7 +6724,8 @@ def test_create_image_all_params(self): image_prototype_model['encrypted_data_key'] = 'testString' image_prototype_model['encryption_key'] = encryption_key_identity_model image_prototype_model['file'] = image_file_prototype_model - image_prototype_model['operating_system'] = operating_system_identity_model + image_prototype_model[ + 'operating_system'] = operating_system_identity_model # Set up parameter values image_prototype = image_prototype_model @@ -6534,7 +6759,7 @@ def test_create_image_value_error(self): """ # Set up mock url = preprocess_url('/images') - mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}' + mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}' responses.add( responses.POST, url, @@ -6549,11 +6774,13 @@ def test_create_image_value_error(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a ImageFilePrototype model image_file_prototype_model = {} - image_file_prototype_model['href'] = 'cos://us-south/my-bucket/my-image.qcow2' + image_file_prototype_model[ + 'href'] = 'cos://us-south/my-bucket/my-image.qcow2' # Construct a dict representation of a OperatingSystemIdentityByName model operating_system_identity_model = {} @@ -6568,7 +6795,8 @@ def test_create_image_value_error(self): image_prototype_model['encrypted_data_key'] = 'testString' image_prototype_model['encryption_key'] = encryption_key_identity_model image_prototype_model['file'] = image_file_prototype_model - image_prototype_model['operating_system'] = operating_system_identity_model + image_prototype_model[ + 'operating_system'] = operating_system_identity_model # Set up parameter values image_prototype = image_prototype_model @@ -6578,7 +6806,10 @@ def test_create_image_value_error(self): "image_prototype": image_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_image(**req_copy) @@ -6653,7 +6884,10 @@ def test_delete_image_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_image(**req_copy) @@ -6679,7 +6913,7 @@ def test_get_image_all_params(self): """ # Set up mock url = preprocess_url('/images/testString') - mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}' + mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}' responses.add( responses.GET, url, @@ -6717,7 +6951,7 @@ def test_get_image_value_error(self): """ # Set up mock url = preprocess_url('/images/testString') - mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}' + mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}' responses.add( responses.GET, url, @@ -6734,7 +6968,10 @@ def test_get_image_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_image(**req_copy) @@ -6760,7 +6997,7 @@ def test_update_image_all_params(self): """ # Set up mock url = preprocess_url('/images/testString') - mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}' + mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}' responses.add( responses.PATCH, url, @@ -6809,7 +7046,7 @@ def test_update_image_value_error(self): """ # Set up mock url = preprocess_url('/images/testString') - mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}' + mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deprecation_at": "2019-01-01T12:00:00.000Z", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "obsolescence_at": "2019-01-01T12:00:00.000Z", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "image", "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_data_format": "cloud_init", "visibility": "private"}' responses.add( responses.PATCH, url, @@ -6834,7 +7071,10 @@ def test_update_image_value_error(self): "image_patch": image_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_image(**req_copy) @@ -6909,7 +7149,10 @@ def test_deprecate_image_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.deprecate_image(**req_copy) @@ -6984,7 +7227,10 @@ def test_obsolete_image_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.obsolete_image(**req_copy) @@ -7109,7 +7355,10 @@ def test_list_image_export_jobs_value_error(self): "image_id": image_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_image_export_jobs(**req_copy) @@ -7146,7 +7395,8 @@ def test_create_image_export_job_all_params(self): # Construct a dict representation of a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model cloud_object_storage_bucket_identity_model = {} - cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue' + cloud_object_storage_bucket_identity_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Set up parameter values image_id = 'testString' @@ -7168,7 +7418,8 @@ def test_create_image_export_job_all_params(self): assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body['storage_bucket'] == cloud_object_storage_bucket_identity_model + assert req_body[ + 'storage_bucket'] == cloud_object_storage_bucket_identity_model assert req_body['format'] == 'qcow2' assert req_body['name'] == 'my-image-export' @@ -7199,7 +7450,8 @@ def test_create_image_export_job_value_error(self): # Construct a dict representation of a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model cloud_object_storage_bucket_identity_model = {} - cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue' + cloud_object_storage_bucket_identity_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Set up parameter values image_id = 'testString' @@ -7213,7 +7465,10 @@ def test_create_image_export_job_value_error(self): "storage_bucket": storage_bucket, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_image_export_job(**req_copy) @@ -7292,7 +7547,10 @@ def test_delete_image_export_job_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_image_export_job(**req_copy) @@ -7377,7 +7635,10 @@ def test_get_image_export_job_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_image_export_job(**req_copy) @@ -7477,7 +7738,10 @@ def test_update_image_export_job_value_error(self): "image_export_job_patch": image_export_job_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_image_export_job(**req_copy) @@ -7503,7 +7767,7 @@ def test_list_operating_systems_all_params(self): """ # Set up mock url = preprocess_url('/operating_systems') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}], "total_count": 132}' responses.add( responses.GET, url, @@ -7548,7 +7812,7 @@ def test_list_operating_systems_required_params(self): """ # Set up mock url = preprocess_url('/operating_systems') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}], "total_count": 132}' responses.add( responses.GET, url, @@ -7580,7 +7844,7 @@ def test_list_operating_systems_value_error(self): """ # Set up mock url = preprocess_url('/operating_systems') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}], "total_count": 132}' responses.add( responses.GET, url, @@ -7590,10 +7854,12 @@ def test_list_operating_systems_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_operating_systems(**req_copy) @@ -7613,8 +7879,8 @@ def test_list_operating_systems_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/operating_systems') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' - mock_response2 = '{"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"operating_systems":[{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' + mock_response2 = '{"operating_systems":[{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -7649,8 +7915,8 @@ def test_list_operating_systems_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/operating_systems') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' - mock_response2 = '{"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"operating_systems":[{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' + mock_response2 = '{"operating_systems":[{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -7688,7 +7954,7 @@ def test_get_operating_system_all_params(self): """ # Set up mock url = preprocess_url('/operating_systems/testString') - mock_response = '{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}' + mock_response = '{"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}' responses.add( responses.GET, url, @@ -7726,7 +7992,7 @@ def test_get_operating_system_value_error(self): """ # Set up mock url = preprocess_url('/operating_systems/testString') - mock_response = '{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}' + mock_response = '{"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}' responses.add( responses.GET, url, @@ -7743,7 +8009,10 @@ def test_get_operating_system_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_operating_system(**req_copy) @@ -7801,7 +8070,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -7809,9 +8082,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListKeys: @@ -7913,10 +8184,12 @@ def test_list_keys_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_keys(**req_copy) @@ -8044,7 +8317,8 @@ def test_create_key_all_params(self): assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body['public_key'] == 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En' + assert req_body[ + 'public_key'] == 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En' assert req_body['name'] == 'my-key' assert req_body['resource_group'] == resource_group_identity_model assert req_body['type'] == 'rsa' @@ -8089,7 +8363,10 @@ def test_create_key_value_error(self): "public_key": public_key, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_key(**req_copy) @@ -8164,7 +8441,10 @@ def test_delete_key_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_key(**req_copy) @@ -8245,7 +8525,10 @@ def test_get_key_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_key(**req_copy) @@ -8341,7 +8624,10 @@ def test_update_key_value_error(self): "key_patch": key_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_key(**req_copy) @@ -8399,7 +8685,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -8407,9 +8697,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListInstanceProfiles: @@ -8424,7 +8712,7 @@ def test_list_instance_profiles_all_params(self): """ # Set up mock url = preprocess_url('/instance/profiles') - mock_response = '{"profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}]}' + mock_response = '{"profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "confidential_compute_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "secure_boot_modes": {"default": false, "type": "enum", "values": [true]}, "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}]}' responses.add( responses.GET, url, @@ -8456,7 +8744,7 @@ def test_list_instance_profiles_value_error(self): """ # Set up mock url = preprocess_url('/instance/profiles') - mock_response = '{"profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}]}' + mock_response = '{"profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "confidential_compute_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "secure_boot_modes": {"default": false, "type": "enum", "values": [true]}, "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}]}' responses.add( responses.GET, url, @@ -8466,10 +8754,12 @@ def test_list_instance_profiles_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_profiles(**req_copy) @@ -8495,7 +8785,7 @@ def test_get_instance_profile_all_params(self): """ # Set up mock url = preprocess_url('/instance/profiles/testString') - mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}' + mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "confidential_compute_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "secure_boot_modes": {"default": false, "type": "enum", "values": [true]}, "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}' responses.add( responses.GET, url, @@ -8533,7 +8823,7 @@ def test_get_instance_profile_value_error(self): """ # Set up mock url = preprocess_url('/instance/profiles/testString') - mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}' + mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "confidential_compute_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_attachment_count": {"max": 5, "min": 1, "type": "range"}, "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "numa_count": {"type": "fixed", "value": 2}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "resource_type": "instance_profile", "secure_boot_modes": {"default": false, "type": "enum", "values": [true]}, "status": "current", "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}' responses.add( responses.GET, url, @@ -8550,7 +8840,10 @@ def test_get_instance_profile_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_profile(**req_copy) @@ -8576,7 +8869,7 @@ def test_list_instance_templates_all_params(self): """ # Set up mock url = preprocess_url('/instance/templates') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}' responses.add( responses.GET, url, @@ -8608,7 +8901,7 @@ def test_list_instance_templates_value_error(self): """ # Set up mock url = preprocess_url('/instance/templates') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}], "total_count": 132}' responses.add( responses.GET, url, @@ -8618,10 +8911,12 @@ def test_list_instance_templates_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_templates(**req_copy) @@ -8647,7 +8942,7 @@ def test_create_instance_template_all_params(self): """ # Set up mock url = preprocess_url('/instance/templates') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' responses.add( responses.POST, url, @@ -8662,12 +8957,14 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a TrustedProfileIdentityTrustedProfileById model trusted_profile_identity_model = {} - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a dict representation of a InstanceDefaultTrustedProfilePrototype model instance_default_trusted_profile_prototype_model = {} instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model # Construct a dict representation of a KeyIdentityById model key_identity_model = {} @@ -8681,7 +8978,8 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_prototype_model = {} - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a dict representation of a InstanceProfileIdentityByName model instance_profile_identity_model = {} @@ -8689,12 +8987,15 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a ReservationIdentityById model reservation_identity_model = {} - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a dict representation of a InstanceReservationAffinityPrototype model instance_reservation_affinity_prototype_model = {} instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -8702,13 +9003,16 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model volume_attachment_prototype_volume_model = {} - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a dict representation of a VolumeAttachmentPrototype model volume_attachment_prototype_model = {} - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -8716,7 +9020,8 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a VolumeProfileIdentityByName model volume_profile_identity_model = {} @@ -8725,26 +9030,41 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a VolumePrototypeInstanceByImageContext model volume_prototype_instance_by_image_context_model = {} volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] # Construct a dict representation of a VolumeAttachmentPrototypeInstanceByImageContext model volume_attachment_prototype_instance_by_image_context_model = {} - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + # Construct a dict representation of a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN model + catalog_offering_version_plan_identity_model = {} + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' # Construct a dict representation of a CatalogOfferingIdentityCatalogOfferingByCRN model catalog_offering_identity_model = {} - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' # Construct a dict representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model instance_catalog_offering_prototype_model = {} - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model # Construct a dict representation of a ImageIdentityById model image_identity_model = {} @@ -8758,13 +9078,17 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -8772,20 +9096,33 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model instance_network_attachment_prototype_virtual_network_interface_model = {} - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a InstanceNetworkAttachmentPrototype model instance_network_attachment_prototype_model = {} - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_model = {} @@ -8796,14 +9133,19 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a NetworkInterfacePrototype model network_interface_prototype_model = {} network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -8811,27 +9153,48 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a InstanceTemplatePrototypeInstanceTemplateBySourceTemplate model instance_template_prototype_model = {} - instance_template_prototype_model['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_model['default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_model[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_model[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_model[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_model['enable_secure_boot'] = True instance_template_prototype_model['keys'] = [key_identity_model] - instance_template_prototype_model['metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_model[ + 'metadata_service'] = instance_metadata_service_prototype_model instance_template_prototype_model['name'] = 'my-instance-template' - instance_template_prototype_model['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_model['profile'] = instance_profile_identity_model - instance_template_prototype_model['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_model['resource_group'] = resource_group_identity_model + instance_template_prototype_model[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_model[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_model[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_model[ + 'resource_group'] = resource_group_identity_model instance_template_prototype_model['total_volume_bandwidth'] = 500 instance_template_prototype_model['user_data'] = 'testString' - instance_template_prototype_model['volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_model['volume_attachments'] = [ + volume_attachment_prototype_model + ] instance_template_prototype_model['vpc'] = vpc_identity_model - instance_template_prototype_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_prototype_model['catalog_offering'] = instance_catalog_offering_prototype_model + instance_template_prototype_model[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_prototype_model[ + 'catalog_offering'] = instance_catalog_offering_prototype_model instance_template_prototype_model['image'] = image_identity_model - instance_template_prototype_model['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_prototype_model['network_interfaces'] = [network_interface_prototype_model] - instance_template_prototype_model['primary_network_attachment'] = instance_network_attachment_prototype_model - instance_template_prototype_model['primary_network_interface'] = network_interface_prototype_model - instance_template_prototype_model['source_template'] = instance_template_identity_model + instance_template_prototype_model['network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_prototype_model['network_interfaces'] = [ + network_interface_prototype_model + ] + instance_template_prototype_model[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_prototype_model[ + 'primary_network_interface'] = network_interface_prototype_model + instance_template_prototype_model[ + 'source_template'] = instance_template_identity_model instance_template_prototype_model['zone'] = zone_identity_model # Set up parameter values @@ -8866,7 +9229,7 @@ def test_create_instance_template_value_error(self): """ # Set up mock url = preprocess_url('/instance/templates') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' responses.add( responses.POST, url, @@ -8881,12 +9244,14 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a TrustedProfileIdentityTrustedProfileById model trusted_profile_identity_model = {} - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a dict representation of a InstanceDefaultTrustedProfilePrototype model instance_default_trusted_profile_prototype_model = {} instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model # Construct a dict representation of a KeyIdentityById model key_identity_model = {} @@ -8900,7 +9265,8 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_prototype_model = {} - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a dict representation of a InstanceProfileIdentityByName model instance_profile_identity_model = {} @@ -8908,12 +9274,15 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a ReservationIdentityById model reservation_identity_model = {} - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a dict representation of a InstanceReservationAffinityPrototype model instance_reservation_affinity_prototype_model = {} instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -8921,13 +9290,16 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model volume_attachment_prototype_volume_model = {} - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a dict representation of a VolumeAttachmentPrototype model volume_attachment_prototype_model = {} - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -8935,7 +9307,8 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a VolumeProfileIdentityByName model volume_profile_identity_model = {} @@ -8944,26 +9317,41 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a VolumePrototypeInstanceByImageContext model volume_prototype_instance_by_image_context_model = {} volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] # Construct a dict representation of a VolumeAttachmentPrototypeInstanceByImageContext model volume_attachment_prototype_instance_by_image_context_model = {} - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + # Construct a dict representation of a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN model + catalog_offering_version_plan_identity_model = {} + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' # Construct a dict representation of a CatalogOfferingIdentityCatalogOfferingByCRN model catalog_offering_identity_model = {} - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' # Construct a dict representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model instance_catalog_offering_prototype_model = {} - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model # Construct a dict representation of a ImageIdentityById model image_identity_model = {} @@ -8977,13 +9365,17 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -8991,20 +9383,33 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model instance_network_attachment_prototype_virtual_network_interface_model = {} - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a InstanceNetworkAttachmentPrototype model instance_network_attachment_prototype_model = {} - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_model = {} @@ -9015,14 +9420,19 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a NetworkInterfacePrototype model network_interface_prototype_model = {} network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -9030,27 +9440,48 @@ def test_create_instance_template_value_error(self): # Construct a dict representation of a InstanceTemplatePrototypeInstanceTemplateBySourceTemplate model instance_template_prototype_model = {} - instance_template_prototype_model['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_model['default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_model[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_model[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_model[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_model['enable_secure_boot'] = True instance_template_prototype_model['keys'] = [key_identity_model] - instance_template_prototype_model['metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_model[ + 'metadata_service'] = instance_metadata_service_prototype_model instance_template_prototype_model['name'] = 'my-instance-template' - instance_template_prototype_model['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_model['profile'] = instance_profile_identity_model - instance_template_prototype_model['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_model['resource_group'] = resource_group_identity_model + instance_template_prototype_model[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_model[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_model[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_model[ + 'resource_group'] = resource_group_identity_model instance_template_prototype_model['total_volume_bandwidth'] = 500 instance_template_prototype_model['user_data'] = 'testString' - instance_template_prototype_model['volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_model['volume_attachments'] = [ + volume_attachment_prototype_model + ] instance_template_prototype_model['vpc'] = vpc_identity_model - instance_template_prototype_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_prototype_model['catalog_offering'] = instance_catalog_offering_prototype_model + instance_template_prototype_model[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_prototype_model[ + 'catalog_offering'] = instance_catalog_offering_prototype_model instance_template_prototype_model['image'] = image_identity_model - instance_template_prototype_model['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_prototype_model['network_interfaces'] = [network_interface_prototype_model] - instance_template_prototype_model['primary_network_attachment'] = instance_network_attachment_prototype_model - instance_template_prototype_model['primary_network_interface'] = network_interface_prototype_model - instance_template_prototype_model['source_template'] = instance_template_identity_model + instance_template_prototype_model['network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_prototype_model['network_interfaces'] = [ + network_interface_prototype_model + ] + instance_template_prototype_model[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_prototype_model[ + 'primary_network_interface'] = network_interface_prototype_model + instance_template_prototype_model[ + 'source_template'] = instance_template_identity_model instance_template_prototype_model['zone'] = zone_identity_model # Set up parameter values @@ -9061,7 +9492,10 @@ def test_create_instance_template_value_error(self): "instance_template_prototype": instance_template_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_template(**req_copy) @@ -9136,7 +9570,10 @@ def test_delete_instance_template_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_template(**req_copy) @@ -9162,7 +9599,7 @@ def test_get_instance_template_all_params(self): """ # Set up mock url = preprocess_url('/instance/templates/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' responses.add( responses.GET, url, @@ -9200,7 +9637,7 @@ def test_get_instance_template_value_error(self): """ # Set up mock url = preprocess_url('/instance/templates/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' responses.add( responses.GET, url, @@ -9217,7 +9654,10 @@ def test_get_instance_template_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_template(**req_copy) @@ -9243,7 +9683,7 @@ def test_update_instance_template_all_params(self): """ # Set up mock url = preprocess_url('/instance/templates/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' responses.add( responses.PATCH, url, @@ -9290,7 +9730,7 @@ def test_update_instance_template_value_error(self): """ # Set up mock url = preprocess_url('/instance/templates/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "enable_secure_boot": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "reservation_affinity": {"policy": "disabled", "pool": [{"id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "total_volume_bandwidth": 500, "user_data": "user_data", "volume_attachments": [{"delete_volume_on_instance_delete": false, "name": "my-volume-attachment", "volume": {"id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 100, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "user_tags": ["user_tags"]}}, "image": {"id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "zone": {"name": "us-south-1"}, "network_attachments": [{"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}], "primary_network_attachment": {"name": "my-instance-network-attachment", "virtual_network_interface": {"allow_ip_spoofing": true, "auto_delete": false, "enable_infrastructure_nat": true, "ips": [{"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}], "name": "my-virtual-network-interface", "primary_ip": {"id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "protocol_state_filtering_mode": "auto", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345"}, "security_groups": [{"id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}}}' responses.add( responses.PATCH, url, @@ -9313,7 +9753,10 @@ def test_update_instance_template_value_error(self): "instance_template_patch": instance_template_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_template(**req_copy) @@ -9339,7 +9782,7 @@ def test_list_instances_all_params(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -9398,11 +9841,16 @@ def test_list_instances_all_params(self): assert 'resource_group.id={}'.format(resource_group_id) in query_string assert 'name={}'.format(name) in query_string assert 'dedicated_host.id={}'.format(dedicated_host_id) in query_string - assert 'dedicated_host.crn={}'.format(dedicated_host_crn) in query_string - assert 'dedicated_host.name={}'.format(dedicated_host_name) in query_string - assert 'placement_group.id={}'.format(placement_group_id) in query_string - assert 'placement_group.crn={}'.format(placement_group_crn) in query_string - assert 'placement_group.name={}'.format(placement_group_name) in query_string + assert 'dedicated_host.crn={}'.format( + dedicated_host_crn) in query_string + assert 'dedicated_host.name={}'.format( + dedicated_host_name) in query_string + assert 'placement_group.id={}'.format( + placement_group_id) in query_string + assert 'placement_group.crn={}'.format( + placement_group_crn) in query_string + assert 'placement_group.name={}'.format( + placement_group_name) in query_string assert 'reservation.id={}'.format(reservation_id) in query_string assert 'reservation.crn={}'.format(reservation_crn) in query_string assert 'reservation.name={}'.format(reservation_name) in query_string @@ -9426,7 +9874,7 @@ def test_list_instances_required_params(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -9458,7 +9906,7 @@ def test_list_instances_value_error(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -9468,10 +9916,12 @@ def test_list_instances_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instances(**req_copy) @@ -9491,8 +9941,8 @@ def test_list_instances_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/instances') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' - mock_response2 = '{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"confidential_compute_mode":"disabled","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"enable_secure_boot":true,"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response2 = '{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"confidential_compute_mode":"disabled","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"enable_secure_boot":true,"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -9516,16 +9966,20 @@ def test_list_instances_with_pager_get_next(self): resource_group_id='testString', name='testString', dedicated_host_id='testString', - dedicated_host_crn='crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a', + dedicated_host_crn= + 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a', dedicated_host_name='my-dedicated-host', placement_group_id='testString', - placement_group_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871', + placement_group_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871', placement_group_name='my-placement-group', reservation_id='testString', - reservation_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63', + reservation_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63', reservation_name='my-reservation', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', ) while pager.has_next(): @@ -9541,8 +9995,8 @@ def test_list_instances_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/instances') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' - mock_response2 = '{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"confidential_compute_mode":"disabled","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"enable_secure_boot":true,"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response2 = '{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}},"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"confidential_compute_mode":"disabled","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a","id":"0717-1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"enable_secure_boot":true,"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"health_reasons":[{"code":"reservation_expired","message":"The reservation cannot be used because it has expired.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"numa_count":2,"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-attachment","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"instance_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e","id":"0717-10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"7187-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"}]},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","resource_type":"volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -9565,16 +10019,20 @@ def test_list_instances_with_pager_get_all(self): resource_group_id='testString', name='testString', dedicated_host_id='testString', - dedicated_host_crn='crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a', + dedicated_host_crn= + 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a', dedicated_host_name='my-dedicated-host', placement_group_id='testString', - placement_group_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871', + placement_group_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871', placement_group_name='my-placement-group', reservation_id='testString', - reservation_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63', + reservation_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63', reservation_name='my-reservation', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', ) all_results = pager.get_all() @@ -9594,7 +10052,7 @@ def test_create_instance_all_params(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -9609,12 +10067,14 @@ def test_create_instance_all_params(self): # Construct a dict representation of a TrustedProfileIdentityTrustedProfileById model trusted_profile_identity_model = {} - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a dict representation of a InstanceDefaultTrustedProfilePrototype model instance_default_trusted_profile_prototype_model = {} instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model # Construct a dict representation of a KeyIdentityById model key_identity_model = {} @@ -9628,7 +10088,8 @@ def test_create_instance_all_params(self): # Construct a dict representation of a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_prototype_model = {} - instance_placement_target_prototype_model['id'] = '0787-84e4793a-7cd8-4a7b-b253-818aa19d0512' + instance_placement_target_prototype_model[ + 'id'] = '0787-84e4793a-7cd8-4a7b-b253-818aa19d0512' # Construct a dict representation of a InstanceProfileIdentityByName model instance_profile_identity_model = {} @@ -9636,12 +10097,15 @@ def test_create_instance_all_params(self): # Construct a dict representation of a ReservationIdentityById model reservation_identity_model = {} - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a dict representation of a InstanceReservationAffinityPrototype model instance_reservation_affinity_prototype_model = {} instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -9659,17 +10123,22 @@ def test_create_instance_all_params(self): volume_attachment_prototype_volume_model = {} volume_attachment_prototype_volume_model['iops'] = 10000 volume_attachment_prototype_volume_model['name'] = 'my-data-volume' - volume_attachment_prototype_volume_model['profile'] = volume_profile_identity_model - volume_attachment_prototype_volume_model['resource_group'] = resource_group_identity_model + volume_attachment_prototype_volume_model[ + 'profile'] = volume_profile_identity_model + volume_attachment_prototype_volume_model[ + 'resource_group'] = resource_group_identity_model volume_attachment_prototype_volume_model['user_tags'] = [] volume_attachment_prototype_volume_model['capacity'] = 1000 - volume_attachment_prototype_volume_model['encryption_key'] = encryption_key_identity_model + volume_attachment_prototype_volume_model[ + 'encryption_key'] = encryption_key_identity_model # Construct a dict representation of a VolumeAttachmentPrototype model volume_attachment_prototype_model = {} - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -9678,26 +10147,42 @@ def test_create_instance_all_params(self): # Construct a dict representation of a VolumePrototypeInstanceByImageContext model volume_prototype_instance_by_image_context_model = {} volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 - volume_prototype_instance_by_image_context_model['name'] = 'my-boot-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'name'] = 'my-boot-volume' + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] # Construct a dict representation of a VolumeAttachmentPrototypeInstanceByImageContext model volume_attachment_prototype_instance_by_image_context_model = {} - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + # Construct a dict representation of a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN model + catalog_offering_version_plan_identity_model = {} + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' # Construct a dict representation of a CatalogOfferingIdentityCatalogOfferingByCRN model catalog_offering_identity_model = {} - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' # Construct a dict representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model instance_catalog_offering_prototype_model = {} - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model # Construct a dict representation of a ImageIdentityById model image_identity_model = {} @@ -9711,13 +10196,17 @@ def test_create_instance_all_params(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -9725,20 +10214,33 @@ def test_create_instance_all_params(self): # Construct a dict representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model instance_network_attachment_prototype_virtual_network_interface_model = {} - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a InstanceNetworkAttachmentPrototype model instance_network_attachment_prototype_model = {} - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_model = {} @@ -9749,14 +10251,19 @@ def test_create_instance_all_params(self): # Construct a dict representation of a NetworkInterfacePrototype model network_interface_prototype_model = {} network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -9764,27 +10271,46 @@ def test_create_instance_all_params(self): # Construct a dict representation of a InstancePrototypeInstanceBySourceTemplate model instance_prototype_model = {} - instance_prototype_model['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_model['default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_model[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_model['confidential_compute_mode'] = 'disabled' + instance_prototype_model[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_model['enable_secure_boot'] = True instance_prototype_model['keys'] = [key_identity_model] - instance_prototype_model['metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_model[ + 'metadata_service'] = instance_metadata_service_prototype_model instance_prototype_model['name'] = 'my-instance' - instance_prototype_model['placement_target'] = instance_placement_target_prototype_model + instance_prototype_model[ + 'placement_target'] = instance_placement_target_prototype_model instance_prototype_model['profile'] = instance_profile_identity_model - instance_prototype_model['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_model['resource_group'] = resource_group_identity_model + instance_prototype_model[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_model[ + 'resource_group'] = resource_group_identity_model instance_prototype_model['total_volume_bandwidth'] = 500 instance_prototype_model['user_data'] = 'testString' - instance_prototype_model['volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_model['volume_attachments'] = [ + volume_attachment_prototype_model + ] instance_prototype_model['vpc'] = vpc_identity_model - instance_prototype_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_prototype_model['catalog_offering'] = instance_catalog_offering_prototype_model + instance_prototype_model[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_prototype_model[ + 'catalog_offering'] = instance_catalog_offering_prototype_model instance_prototype_model['image'] = image_identity_model - instance_prototype_model['network_attachments'] = [instance_network_attachment_prototype_model] - instance_prototype_model['network_interfaces'] = [network_interface_prototype_model] - instance_prototype_model['primary_network_attachment'] = instance_network_attachment_prototype_model - instance_prototype_model['primary_network_interface'] = network_interface_prototype_model - instance_prototype_model['source_template'] = instance_template_identity_model + instance_prototype_model['network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_prototype_model['network_interfaces'] = [ + network_interface_prototype_model + ] + instance_prototype_model[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + instance_prototype_model[ + 'primary_network_interface'] = network_interface_prototype_model + instance_prototype_model[ + 'source_template'] = instance_template_identity_model instance_prototype_model['zone'] = zone_identity_model # Set up parameter values @@ -9819,7 +10345,7 @@ def test_create_instance_value_error(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -9834,12 +10360,14 @@ def test_create_instance_value_error(self): # Construct a dict representation of a TrustedProfileIdentityTrustedProfileById model trusted_profile_identity_model = {} - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a dict representation of a InstanceDefaultTrustedProfilePrototype model instance_default_trusted_profile_prototype_model = {} instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model # Construct a dict representation of a KeyIdentityById model key_identity_model = {} @@ -9853,7 +10381,8 @@ def test_create_instance_value_error(self): # Construct a dict representation of a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_prototype_model = {} - instance_placement_target_prototype_model['id'] = '0787-84e4793a-7cd8-4a7b-b253-818aa19d0512' + instance_placement_target_prototype_model[ + 'id'] = '0787-84e4793a-7cd8-4a7b-b253-818aa19d0512' # Construct a dict representation of a InstanceProfileIdentityByName model instance_profile_identity_model = {} @@ -9861,12 +10390,15 @@ def test_create_instance_value_error(self): # Construct a dict representation of a ReservationIdentityById model reservation_identity_model = {} - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a dict representation of a InstanceReservationAffinityPrototype model instance_reservation_affinity_prototype_model = {} instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -9884,17 +10416,22 @@ def test_create_instance_value_error(self): volume_attachment_prototype_volume_model = {} volume_attachment_prototype_volume_model['iops'] = 10000 volume_attachment_prototype_volume_model['name'] = 'my-data-volume' - volume_attachment_prototype_volume_model['profile'] = volume_profile_identity_model - volume_attachment_prototype_volume_model['resource_group'] = resource_group_identity_model + volume_attachment_prototype_volume_model[ + 'profile'] = volume_profile_identity_model + volume_attachment_prototype_volume_model[ + 'resource_group'] = resource_group_identity_model volume_attachment_prototype_volume_model['user_tags'] = [] volume_attachment_prototype_volume_model['capacity'] = 1000 - volume_attachment_prototype_volume_model['encryption_key'] = encryption_key_identity_model + volume_attachment_prototype_volume_model[ + 'encryption_key'] = encryption_key_identity_model # Construct a dict representation of a VolumeAttachmentPrototype model volume_attachment_prototype_model = {} - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -9903,26 +10440,42 @@ def test_create_instance_value_error(self): # Construct a dict representation of a VolumePrototypeInstanceByImageContext model volume_prototype_instance_by_image_context_model = {} volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 - volume_prototype_instance_by_image_context_model['name'] = 'my-boot-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'name'] = 'my-boot-volume' + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] # Construct a dict representation of a VolumeAttachmentPrototypeInstanceByImageContext model volume_attachment_prototype_instance_by_image_context_model = {} - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + # Construct a dict representation of a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN model + catalog_offering_version_plan_identity_model = {} + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' # Construct a dict representation of a CatalogOfferingIdentityCatalogOfferingByCRN model catalog_offering_identity_model = {} - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' # Construct a dict representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model instance_catalog_offering_prototype_model = {} - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model # Construct a dict representation of a ImageIdentityById model image_identity_model = {} @@ -9936,13 +10489,17 @@ def test_create_instance_value_error(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -9950,20 +10507,33 @@ def test_create_instance_value_error(self): # Construct a dict representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model instance_network_attachment_prototype_virtual_network_interface_model = {} - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a InstanceNetworkAttachmentPrototype model instance_network_attachment_prototype_model = {} - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_model = {} @@ -9974,14 +10544,19 @@ def test_create_instance_value_error(self): # Construct a dict representation of a NetworkInterfacePrototype model network_interface_prototype_model = {} network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -9989,27 +10564,46 @@ def test_create_instance_value_error(self): # Construct a dict representation of a InstancePrototypeInstanceBySourceTemplate model instance_prototype_model = {} - instance_prototype_model['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_model['default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_model[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_model['confidential_compute_mode'] = 'disabled' + instance_prototype_model[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_model['enable_secure_boot'] = True instance_prototype_model['keys'] = [key_identity_model] - instance_prototype_model['metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_model[ + 'metadata_service'] = instance_metadata_service_prototype_model instance_prototype_model['name'] = 'my-instance' - instance_prototype_model['placement_target'] = instance_placement_target_prototype_model + instance_prototype_model[ + 'placement_target'] = instance_placement_target_prototype_model instance_prototype_model['profile'] = instance_profile_identity_model - instance_prototype_model['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_model['resource_group'] = resource_group_identity_model + instance_prototype_model[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_model[ + 'resource_group'] = resource_group_identity_model instance_prototype_model['total_volume_bandwidth'] = 500 instance_prototype_model['user_data'] = 'testString' - instance_prototype_model['volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_model['volume_attachments'] = [ + volume_attachment_prototype_model + ] instance_prototype_model['vpc'] = vpc_identity_model - instance_prototype_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_prototype_model['catalog_offering'] = instance_catalog_offering_prototype_model + instance_prototype_model[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_prototype_model[ + 'catalog_offering'] = instance_catalog_offering_prototype_model instance_prototype_model['image'] = image_identity_model - instance_prototype_model['network_attachments'] = [instance_network_attachment_prototype_model] - instance_prototype_model['network_interfaces'] = [network_interface_prototype_model] - instance_prototype_model['primary_network_attachment'] = instance_network_attachment_prototype_model - instance_prototype_model['primary_network_interface'] = network_interface_prototype_model - instance_prototype_model['source_template'] = instance_template_identity_model + instance_prototype_model['network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_prototype_model['network_interfaces'] = [ + network_interface_prototype_model + ] + instance_prototype_model[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + instance_prototype_model[ + 'primary_network_interface'] = network_interface_prototype_model + instance_prototype_model[ + 'source_template'] = instance_template_identity_model instance_prototype_model['zone'] = zone_identity_model # Set up parameter values @@ -10020,7 +10614,10 @@ def test_create_instance_value_error(self): "instance_prototype": instance_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance(**req_copy) @@ -10132,7 +10729,10 @@ def test_delete_instance_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance(**req_copy) @@ -10158,7 +10758,7 @@ def test_get_instance_all_params(self): """ # Set up mock url = preprocess_url('/instances/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -10196,7 +10796,7 @@ def test_get_instance_value_error(self): """ # Set up mock url = preprocess_url('/instances/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -10213,7 +10813,10 @@ def test_get_instance_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance(**req_copy) @@ -10239,7 +10842,7 @@ def test_update_instance_all_params(self): """ # Set up mock url = preprocess_url('/instances/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -10260,7 +10863,8 @@ def test_update_instance_all_params(self): # Construct a dict representation of a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_patch_model = {} - instance_placement_target_patch_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_patch_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a dict representation of a InstancePatchProfileInstanceProfileIdentityByName model instance_patch_profile_model = {} @@ -10268,21 +10872,30 @@ def test_update_instance_all_params(self): # Construct a dict representation of a ReservationIdentityById model reservation_identity_model = {} - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a dict representation of a InstanceReservationAffinityPatch model instance_reservation_affinity_patch_model = {} instance_reservation_affinity_patch_model['policy'] = 'disabled' - instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_patch_model['pool'] = [ + reservation_identity_model + ] # Construct a dict representation of a InstancePatch model instance_patch_model = {} - instance_patch_model['availability_policy'] = instance_availability_policy_patch_model - instance_patch_model['metadata_service'] = instance_metadata_service_patch_model + instance_patch_model[ + 'availability_policy'] = instance_availability_policy_patch_model + instance_patch_model['confidential_compute_mode'] = 'disabled' + instance_patch_model['enable_secure_boot'] = True + instance_patch_model[ + 'metadata_service'] = instance_metadata_service_patch_model instance_patch_model['name'] = 'my-instance' - instance_patch_model['placement_target'] = instance_placement_target_patch_model + instance_patch_model[ + 'placement_target'] = instance_placement_target_patch_model instance_patch_model['profile'] = instance_patch_profile_model - instance_patch_model['reservation_affinity'] = instance_reservation_affinity_patch_model + instance_patch_model[ + 'reservation_affinity'] = instance_reservation_affinity_patch_model instance_patch_model['total_volume_bandwidth'] = 500 # Set up parameter values @@ -10321,7 +10934,7 @@ def test_update_instance_required_params(self): """ # Set up mock url = preprocess_url('/instances/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -10342,7 +10955,8 @@ def test_update_instance_required_params(self): # Construct a dict representation of a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_patch_model = {} - instance_placement_target_patch_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_patch_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a dict representation of a InstancePatchProfileInstanceProfileIdentityByName model instance_patch_profile_model = {} @@ -10350,21 +10964,30 @@ def test_update_instance_required_params(self): # Construct a dict representation of a ReservationIdentityById model reservation_identity_model = {} - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a dict representation of a InstanceReservationAffinityPatch model instance_reservation_affinity_patch_model = {} instance_reservation_affinity_patch_model['policy'] = 'disabled' - instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_patch_model['pool'] = [ + reservation_identity_model + ] # Construct a dict representation of a InstancePatch model instance_patch_model = {} - instance_patch_model['availability_policy'] = instance_availability_policy_patch_model - instance_patch_model['metadata_service'] = instance_metadata_service_patch_model + instance_patch_model[ + 'availability_policy'] = instance_availability_policy_patch_model + instance_patch_model['confidential_compute_mode'] = 'disabled' + instance_patch_model['enable_secure_boot'] = True + instance_patch_model[ + 'metadata_service'] = instance_metadata_service_patch_model instance_patch_model['name'] = 'my-instance' - instance_patch_model['placement_target'] = instance_placement_target_patch_model + instance_patch_model[ + 'placement_target'] = instance_placement_target_patch_model instance_patch_model['profile'] = instance_patch_profile_model - instance_patch_model['reservation_affinity'] = instance_reservation_affinity_patch_model + instance_patch_model[ + 'reservation_affinity'] = instance_reservation_affinity_patch_model instance_patch_model['total_volume_bandwidth'] = 500 # Set up parameter values @@ -10401,7 +11024,7 @@ def test_update_instance_value_error(self): """ # Set up mock url = preprocess_url('/instances/testString') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "confidential_compute_mode": "disabled", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "0717-1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "enable_secure_boot": true, "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "health_reasons": [{"code": "reservation_expired", "message": "The reservation cannot be used because it has expired.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "numa_count": 2, "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-attachment", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "7187-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}]}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -10422,7 +11045,8 @@ def test_update_instance_value_error(self): # Construct a dict representation of a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_patch_model = {} - instance_placement_target_patch_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_patch_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a dict representation of a InstancePatchProfileInstanceProfileIdentityByName model instance_patch_profile_model = {} @@ -10430,21 +11054,30 @@ def test_update_instance_value_error(self): # Construct a dict representation of a ReservationIdentityById model reservation_identity_model = {} - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a dict representation of a InstanceReservationAffinityPatch model instance_reservation_affinity_patch_model = {} instance_reservation_affinity_patch_model['policy'] = 'disabled' - instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_patch_model['pool'] = [ + reservation_identity_model + ] # Construct a dict representation of a InstancePatch model instance_patch_model = {} - instance_patch_model['availability_policy'] = instance_availability_policy_patch_model - instance_patch_model['metadata_service'] = instance_metadata_service_patch_model + instance_patch_model[ + 'availability_policy'] = instance_availability_policy_patch_model + instance_patch_model['confidential_compute_mode'] = 'disabled' + instance_patch_model['enable_secure_boot'] = True + instance_patch_model[ + 'metadata_service'] = instance_metadata_service_patch_model instance_patch_model['name'] = 'my-instance' - instance_patch_model['placement_target'] = instance_placement_target_patch_model + instance_patch_model[ + 'placement_target'] = instance_placement_target_patch_model instance_patch_model['profile'] = instance_patch_profile_model - instance_patch_model['reservation_affinity'] = instance_reservation_affinity_patch_model + instance_patch_model[ + 'reservation_affinity'] = instance_reservation_affinity_patch_model instance_patch_model['total_volume_bandwidth'] = 500 # Set up parameter values @@ -10457,7 +11090,10 @@ def test_update_instance_value_error(self): "instance_patch": instance_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance(**req_copy) @@ -10538,7 +11174,10 @@ def test_get_instance_initialization_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_initialization(**req_copy) @@ -10630,7 +11269,10 @@ def test_create_instance_action_value_error(self): "type": type, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_action(**req_copy) @@ -10722,11 +11364,15 @@ def test_create_instance_console_access_token_value_error(self): "console_type": console_type, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_console_access_token(**req_copy) - def test_create_instance_console_access_token_value_error_with_retries(self): + def test_create_instance_console_access_token_value_error_with_retries( + self): # Enable retries and run test_create_instance_console_access_token_value_error. _service.enable_retries() self.test_create_instance_console_access_token_value_error() @@ -10803,7 +11449,10 @@ def test_list_instance_disks_value_error(self): "instance_id": instance_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_disks(**req_copy) @@ -10888,7 +11537,10 @@ def test_get_instance_disk_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_disk(**req_copy) @@ -10988,7 +11640,10 @@ def test_update_instance_disk_value_error(self): "instance_disk_patch": instance_disk_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_disk(**req_copy) @@ -11069,7 +11724,10 @@ def test_list_instance_network_attachments_value_error(self): "instance_id": instance_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_network_attachments(**req_copy) @@ -11112,9 +11770,12 @@ def test_create_instance_network_attachment_all_params(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.7' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.7' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -11122,7 +11783,8 @@ def test_create_instance_network_attachment_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -11130,15 +11792,26 @@ def test_create_instance_network_attachment_all_params(self): # Construct a dict representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model instance_network_attachment_prototype_virtual_network_interface_model = {} - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Set up parameter values instance_id = 'testString' @@ -11158,7 +11831,8 @@ def test_create_instance_network_attachment_all_params(self): assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body['virtual_network_interface'] == instance_network_attachment_prototype_virtual_network_interface_model + assert req_body[ + 'virtual_network_interface'] == instance_network_attachment_prototype_virtual_network_interface_model assert req_body['name'] == 'testString' def test_create_instance_network_attachment_all_params_with_retries(self): @@ -11194,9 +11868,12 @@ def test_create_instance_network_attachment_value_error(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.7' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.7' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -11204,7 +11881,8 @@ def test_create_instance_network_attachment_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -11212,15 +11890,26 @@ def test_create_instance_network_attachment_value_error(self): # Construct a dict representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model instance_network_attachment_prototype_virtual_network_interface_model = {} - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Set up parameter values instance_id = 'testString' @@ -11233,7 +11922,10 @@ def test_create_instance_network_attachment_value_error(self): "virtual_network_interface": virtual_network_interface, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_network_attachment(**req_copy) @@ -11258,7 +11950,8 @@ def test_delete_instance_network_attachment_all_params(self): delete_instance_network_attachment() """ # Set up mock - url = preprocess_url('/instances/testString/network_attachments/testString') + url = preprocess_url( + '/instances/testString/network_attachments/testString') responses.add( responses.DELETE, url, @@ -11295,7 +11988,8 @@ def test_delete_instance_network_attachment_value_error(self): test_delete_instance_network_attachment_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_attachments/testString') + url = preprocess_url( + '/instances/testString/network_attachments/testString') responses.add( responses.DELETE, url, @@ -11312,7 +12006,10 @@ def test_delete_instance_network_attachment_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_network_attachment(**req_copy) @@ -11337,7 +12034,8 @@ def test_get_instance_network_attachment_all_params(self): get_instance_network_attachment() """ # Set up mock - url = preprocess_url('/instances/testString/network_attachments/testString') + url = preprocess_url( + '/instances/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}' responses.add( responses.GET, @@ -11377,7 +12075,8 @@ def test_get_instance_network_attachment_value_error(self): test_get_instance_network_attachment_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_attachments/testString') + url = preprocess_url( + '/instances/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}' responses.add( responses.GET, @@ -11397,7 +12096,10 @@ def test_get_instance_network_attachment_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_network_attachment(**req_copy) @@ -11422,7 +12124,8 @@ def test_update_instance_network_attachment_all_params(self): update_instance_network_attachment() """ # Set up mock - url = preprocess_url('/instances/testString/network_attachments/testString') + url = preprocess_url( + '/instances/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}' responses.add( responses.PATCH, @@ -11434,7 +12137,8 @@ def test_update_instance_network_attachment_all_params(self): # Construct a dict representation of a InstanceNetworkAttachmentPatch model instance_network_attachment_patch_model = {} - instance_network_attachment_patch_model['name'] = 'my-instance-network-attachment-updated' + instance_network_attachment_patch_model[ + 'name'] = 'my-instance-network-attachment-updated' # Set up parameter values instance_id = 'testString' @@ -11471,7 +12175,8 @@ def test_update_instance_network_attachment_value_error(self): test_update_instance_network_attachment_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_attachments/testString') + url = preprocess_url( + '/instances/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "lifecycle_state": "stable", "name": "my-instance-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "instance_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}' responses.add( responses.PATCH, @@ -11483,7 +12188,8 @@ def test_update_instance_network_attachment_value_error(self): # Construct a dict representation of a InstanceNetworkAttachmentPatch model instance_network_attachment_patch_model = {} - instance_network_attachment_patch_model['name'] = 'my-instance-network-attachment-updated' + instance_network_attachment_patch_model[ + 'name'] = 'my-instance-network-attachment-updated' # Set up parameter values instance_id = 'testString' @@ -11492,12 +12198,18 @@ def test_update_instance_network_attachment_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "instance_id": instance_id, - "id": id, - "instance_network_attachment_patch": instance_network_attachment_patch, + "instance_id": + instance_id, + "id": + id, + "instance_network_attachment_patch": + instance_network_attachment_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_network_attachment(**req_copy) @@ -11578,7 +12290,10 @@ def test_list_instance_network_interfaces_value_error(self): "instance_id": instance_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_network_interfaces(**req_copy) @@ -11625,7 +12340,8 @@ def test_create_instance_network_interface_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values instance_id = 'testString' @@ -11694,7 +12410,8 @@ def test_create_instance_network_interface_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values instance_id = 'testString' @@ -11710,7 +12427,10 @@ def test_create_instance_network_interface_value_error(self): "subnet": subnet, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_network_interface(**req_copy) @@ -11735,7 +12455,8 @@ def test_delete_instance_network_interface_all_params(self): delete_instance_network_interface() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString') responses.add( responses.DELETE, url, @@ -11772,7 +12493,8 @@ def test_delete_instance_network_interface_value_error(self): test_delete_instance_network_interface_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString') responses.add( responses.DELETE, url, @@ -11789,7 +12511,10 @@ def test_delete_instance_network_interface_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_network_interface(**req_copy) @@ -11814,7 +12539,8 @@ def test_get_instance_network_interface_all_params(self): get_instance_network_interface() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}' responses.add( responses.GET, @@ -11854,7 +12580,8 @@ def test_get_instance_network_interface_value_error(self): test_get_instance_network_interface_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}' responses.add( responses.GET, @@ -11874,7 +12601,10 @@ def test_get_instance_network_interface_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_network_interface(**req_copy) @@ -11899,7 +12629,8 @@ def test_update_instance_network_interface_all_params(self): update_instance_network_interface() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}' responses.add( responses.PATCH, @@ -11949,7 +12680,8 @@ def test_update_instance_network_interface_value_error(self): test_update_instance_network_interface_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}' responses.add( responses.PATCH, @@ -11976,7 +12708,10 @@ def test_update_instance_network_interface_value_error(self): "network_interface_patch": network_interface_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_network_interface(**req_copy) @@ -12001,7 +12736,8 @@ def test_list_instance_network_interface_floating_ips_all_params(self): list_instance_network_interface_floating_ips() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips') mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, @@ -12026,7 +12762,8 @@ def test_list_instance_network_interface_floating_ips_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_instance_network_interface_floating_ips_all_params_with_retries(self): + def test_list_instance_network_interface_floating_ips_all_params_with_retries( + self): # Enable retries and run test_list_instance_network_interface_floating_ips_all_params. _service.enable_retries() self.test_list_instance_network_interface_floating_ips_all_params() @@ -12041,7 +12778,8 @@ def test_list_instance_network_interface_floating_ips_value_error(self): test_list_instance_network_interface_floating_ips_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips') mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, @@ -12061,11 +12799,16 @@ def test_list_instance_network_interface_floating_ips_value_error(self): "network_interface_id": network_interface_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.list_instance_network_interface_floating_ips(**req_copy) + _service.list_instance_network_interface_floating_ips( + **req_copy) - def test_list_instance_network_interface_floating_ips_value_error_with_retries(self): + def test_list_instance_network_interface_floating_ips_value_error_with_retries( + self): # Enable retries and run test_list_instance_network_interface_floating_ips_value_error. _service.enable_retries() self.test_list_instance_network_interface_floating_ips_value_error() @@ -12086,7 +12829,9 @@ def test_remove_instance_network_interface_floating_ip_all_params(self): remove_instance_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips/testString' + ) responses.add( responses.DELETE, url, @@ -12110,7 +12855,8 @@ def test_remove_instance_network_interface_floating_ip_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 204 - def test_remove_instance_network_interface_floating_ip_all_params_with_retries(self): + def test_remove_instance_network_interface_floating_ip_all_params_with_retries( + self): # Enable retries and run test_remove_instance_network_interface_floating_ip_all_params. _service.enable_retries() self.test_remove_instance_network_interface_floating_ip_all_params() @@ -12125,7 +12871,9 @@ def test_remove_instance_network_interface_floating_ip_value_error(self): test_remove_instance_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips/testString' + ) responses.add( responses.DELETE, url, @@ -12144,11 +12892,16 @@ def test_remove_instance_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.remove_instance_network_interface_floating_ip(**req_copy) + _service.remove_instance_network_interface_floating_ip( + **req_copy) - def test_remove_instance_network_interface_floating_ip_value_error_with_retries(self): + def test_remove_instance_network_interface_floating_ip_value_error_with_retries( + self): # Enable retries and run test_remove_instance_network_interface_floating_ip_value_error. _service.enable_retries() self.test_remove_instance_network_interface_floating_ip_value_error() @@ -12169,7 +12922,9 @@ def test_get_instance_network_interface_floating_ip_all_params(self): get_instance_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, @@ -12196,7 +12951,8 @@ def test_get_instance_network_interface_floating_ip_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_get_instance_network_interface_floating_ip_all_params_with_retries(self): + def test_get_instance_network_interface_floating_ip_all_params_with_retries( + self): # Enable retries and run test_get_instance_network_interface_floating_ip_all_params. _service.enable_retries() self.test_get_instance_network_interface_floating_ip_all_params() @@ -12211,7 +12967,9 @@ def test_get_instance_network_interface_floating_ip_value_error(self): test_get_instance_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, @@ -12233,11 +12991,15 @@ def test_get_instance_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_network_interface_floating_ip(**req_copy) - def test_get_instance_network_interface_floating_ip_value_error_with_retries(self): + def test_get_instance_network_interface_floating_ip_value_error_with_retries( + self): # Enable retries and run test_get_instance_network_interface_floating_ip_value_error. _service.enable_retries() self.test_get_instance_network_interface_floating_ip_value_error() @@ -12258,7 +13020,9 @@ def test_add_instance_network_interface_floating_ip_all_params(self): add_instance_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PUT, @@ -12285,7 +13049,8 @@ def test_add_instance_network_interface_floating_ip_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 201 - def test_add_instance_network_interface_floating_ip_all_params_with_retries(self): + def test_add_instance_network_interface_floating_ip_all_params_with_retries( + self): # Enable retries and run test_add_instance_network_interface_floating_ip_all_params. _service.enable_retries() self.test_add_instance_network_interface_floating_ip_all_params() @@ -12300,7 +13065,9 @@ def test_add_instance_network_interface_floating_ip_value_error(self): test_add_instance_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PUT, @@ -12322,11 +13089,15 @@ def test_add_instance_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.add_instance_network_interface_floating_ip(**req_copy) - def test_add_instance_network_interface_floating_ip_value_error_with_retries(self): + def test_add_instance_network_interface_floating_ip_value_error_with_retries( + self): # Enable retries and run test_add_instance_network_interface_floating_ip_value_error. _service.enable_retries() self.test_add_instance_network_interface_floating_ip_value_error() @@ -12347,7 +13118,8 @@ def test_list_instance_network_interface_ips_all_params(self): list_instance_network_interface_ips() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/ips') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -12396,7 +13168,8 @@ def test_list_instance_network_interface_ips_required_params(self): test_list_instance_network_interface_ips_required_params() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/ips') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -12421,7 +13194,8 @@ def test_list_instance_network_interface_ips_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_instance_network_interface_ips_required_params_with_retries(self): + def test_list_instance_network_interface_ips_required_params_with_retries( + self): # Enable retries and run test_list_instance_network_interface_ips_required_params. _service.enable_retries() self.test_list_instance_network_interface_ips_required_params() @@ -12436,7 +13210,8 @@ def test_list_instance_network_interface_ips_value_error(self): test_list_instance_network_interface_ips_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/ips') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -12456,7 +13231,10 @@ def test_list_instance_network_interface_ips_value_error(self): "network_interface_id": network_interface_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_network_interface_ips(**req_copy) @@ -12475,7 +13253,8 @@ def test_list_instance_network_interface_ips_with_pager_get_next(self): test_list_instance_network_interface_ips_with_pager_get_next() """ # Set up a two-page mock response - url = preprocess_url('/instances/testString/network_interfaces/testString/ips') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/ips') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' mock_response2 = '{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' responses.add( @@ -12513,7 +13292,8 @@ def test_list_instance_network_interface_ips_with_pager_get_all(self): test_list_instance_network_interface_ips_with_pager_get_all() """ # Set up a two-page mock response - url = preprocess_url('/instances/testString/network_interfaces/testString/ips') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/ips') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' mock_response2 = '{"total_count":2,"limit":1,"ips":[{"address":"192.168.3.4","auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' responses.add( @@ -12554,7 +13334,9 @@ def test_get_instance_network_interface_ip_all_params(self): get_instance_network_interface_ip() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/ips/testString' + ) mock_response = '{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, @@ -12596,7 +13378,9 @@ def test_get_instance_network_interface_ip_value_error(self): test_get_instance_network_interface_ip_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/network_interfaces/testString/ips/testString') + url = preprocess_url( + '/instances/testString/network_interfaces/testString/ips/testString' + ) mock_response = '{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, @@ -12618,7 +13402,10 @@ def test_get_instance_network_interface_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_network_interface_ip(**req_copy) @@ -12699,7 +13486,10 @@ def test_list_instance_volume_attachments_value_error(self): "instance_id": instance_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_volume_attachments(**req_copy) @@ -12736,7 +13526,8 @@ def test_create_instance_volume_attachment_all_params(self): # Construct a dict representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model volume_attachment_prototype_volume_model = {} - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Set up parameter values instance_id = 'testString' @@ -12789,7 +13580,8 @@ def test_create_instance_volume_attachment_value_error(self): # Construct a dict representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model volume_attachment_prototype_volume_model = {} - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Set up parameter values instance_id = 'testString' @@ -12803,7 +13595,10 @@ def test_create_instance_volume_attachment_value_error(self): "volume": volume, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_volume_attachment(**req_copy) @@ -12828,7 +13623,8 @@ def test_delete_instance_volume_attachment_all_params(self): delete_instance_volume_attachment() """ # Set up mock - url = preprocess_url('/instances/testString/volume_attachments/testString') + url = preprocess_url( + '/instances/testString/volume_attachments/testString') responses.add( responses.DELETE, url, @@ -12865,7 +13661,8 @@ def test_delete_instance_volume_attachment_value_error(self): test_delete_instance_volume_attachment_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/volume_attachments/testString') + url = preprocess_url( + '/instances/testString/volume_attachments/testString') responses.add( responses.DELETE, url, @@ -12882,7 +13679,10 @@ def test_delete_instance_volume_attachment_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_volume_attachment(**req_copy) @@ -12907,7 +13707,8 @@ def test_get_instance_volume_attachment_all_params(self): get_instance_volume_attachment() """ # Set up mock - url = preprocess_url('/instances/testString/volume_attachments/testString') + url = preprocess_url( + '/instances/testString/volume_attachments/testString') mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}' responses.add( responses.GET, @@ -12947,7 +13748,8 @@ def test_get_instance_volume_attachment_value_error(self): test_get_instance_volume_attachment_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/volume_attachments/testString') + url = preprocess_url( + '/instances/testString/volume_attachments/testString') mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}' responses.add( responses.GET, @@ -12967,7 +13769,10 @@ def test_get_instance_volume_attachment_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_volume_attachment(**req_copy) @@ -12992,7 +13797,8 @@ def test_update_instance_volume_attachment_all_params(self): update_instance_volume_attachment() """ # Set up mock - url = preprocess_url('/instances/testString/volume_attachments/testString') + url = preprocess_url( + '/instances/testString/volume_attachments/testString') mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}' responses.add( responses.PATCH, @@ -13042,7 +13848,8 @@ def test_update_instance_volume_attachment_value_error(self): test_update_instance_volume_attachment_value_error() """ # Set up mock - url = preprocess_url('/instances/testString/volume_attachments/testString') + url = preprocess_url( + '/instances/testString/volume_attachments/testString') mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "resource_type": "volume"}}' responses.add( responses.PATCH, @@ -13069,7 +13876,10 @@ def test_update_instance_volume_attachment_value_error(self): "volume_attachment_patch": volume_attachment_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_volume_attachment(**req_copy) @@ -13127,7 +13937,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -13135,9 +13949,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListInstanceGroups: @@ -13239,10 +14051,12 @@ def test_list_instance_groups_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_groups(**req_copy) @@ -13348,19 +14162,23 @@ def test_create_instance_group_all_params(self): # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a LoadBalancerIdentityById model load_balancer_identity_model = {} - load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_model[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_pool_identity_model = {} - load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -13398,7 +14216,8 @@ def test_create_instance_group_all_params(self): assert req_body['subnets'] == [subnet_identity_model] assert req_body['application_port'] == 22 assert req_body['load_balancer'] == load_balancer_identity_model - assert req_body['load_balancer_pool'] == load_balancer_pool_identity_model + assert req_body[ + 'load_balancer_pool'] == load_balancer_pool_identity_model assert req_body['membership_count'] == 10 assert req_body['name'] == 'my-instance-group' assert req_body['resource_group'] == resource_group_identity_model @@ -13430,19 +14249,23 @@ def test_create_instance_group_value_error(self): # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a LoadBalancerIdentityById model load_balancer_identity_model = {} - load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_model[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_pool_identity_model = {} - load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -13464,7 +14287,10 @@ def test_create_instance_group_value_error(self): "subnets": subnets, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_group(**req_copy) @@ -13539,7 +14365,10 @@ def test_delete_instance_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_group(**req_copy) @@ -13620,7 +14449,10 @@ def test_get_instance_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_group(**req_copy) @@ -13657,26 +14489,33 @@ def test_update_instance_group_all_params(self): # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a LoadBalancerIdentityById model load_balancer_identity_model = {} - load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_model[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_pool_identity_model = {} - load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a InstanceGroupPatch model instance_group_patch_model = {} instance_group_patch_model['application_port'] = 22 - instance_group_patch_model['instance_template'] = instance_template_identity_model - instance_group_patch_model['load_balancer'] = load_balancer_identity_model - instance_group_patch_model['load_balancer_pool'] = load_balancer_pool_identity_model + instance_group_patch_model[ + 'instance_template'] = instance_template_identity_model + instance_group_patch_model[ + 'load_balancer'] = load_balancer_identity_model + instance_group_patch_model[ + 'load_balancer_pool'] = load_balancer_pool_identity_model instance_group_patch_model['membership_count'] = 10 instance_group_patch_model['name'] = 'my-instance-group' instance_group_patch_model['subnets'] = [subnet_identity_model] @@ -13726,26 +14565,33 @@ def test_update_instance_group_value_error(self): # Construct a dict representation of a InstanceTemplateIdentityById model instance_template_identity_model = {} - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a dict representation of a LoadBalancerIdentityById model load_balancer_identity_model = {} - load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_model[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_pool_identity_model = {} - load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a InstanceGroupPatch model instance_group_patch_model = {} instance_group_patch_model['application_port'] = 22 - instance_group_patch_model['instance_template'] = instance_template_identity_model - instance_group_patch_model['load_balancer'] = load_balancer_identity_model - instance_group_patch_model['load_balancer_pool'] = load_balancer_pool_identity_model + instance_group_patch_model[ + 'instance_template'] = instance_template_identity_model + instance_group_patch_model[ + 'load_balancer'] = load_balancer_identity_model + instance_group_patch_model[ + 'load_balancer_pool'] = load_balancer_pool_identity_model instance_group_patch_model['membership_count'] = 10 instance_group_patch_model['name'] = 'my-instance-group' instance_group_patch_model['subnets'] = [subnet_identity_model] @@ -13760,7 +14606,10 @@ def test_update_instance_group_value_error(self): "instance_group_patch": instance_group_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_group(**req_copy) @@ -13835,7 +14684,10 @@ def test_delete_instance_group_load_balancer_value_error(self): "instance_group_id": instance_group_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_group_load_balancer(**req_copy) @@ -13963,7 +14815,10 @@ def test_list_instance_group_managers_value_error(self): "instance_group_id": instance_group_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_group_managers(**req_copy) @@ -14072,7 +14927,8 @@ def test_create_instance_group_manager_all_params(self): # Construct a dict representation of a InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype model instance_group_manager_prototype_model = {} instance_group_manager_prototype_model['management_enabled'] = True - instance_group_manager_prototype_model['name'] = 'my-instance-group-manager' + instance_group_manager_prototype_model[ + 'name'] = 'my-instance-group-manager' instance_group_manager_prototype_model['aggregation_window'] = 120 instance_group_manager_prototype_model['cooldown'] = 210 instance_group_manager_prototype_model['manager_type'] = 'autoscale' @@ -14125,7 +14981,8 @@ def test_create_instance_group_manager_value_error(self): # Construct a dict representation of a InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype model instance_group_manager_prototype_model = {} instance_group_manager_prototype_model['management_enabled'] = True - instance_group_manager_prototype_model['name'] = 'my-instance-group-manager' + instance_group_manager_prototype_model[ + 'name'] = 'my-instance-group-manager' instance_group_manager_prototype_model['aggregation_window'] = 120 instance_group_manager_prototype_model['cooldown'] = 210 instance_group_manager_prototype_model['manager_type'] = 'autoscale' @@ -14138,11 +14995,16 @@ def test_create_instance_group_manager_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "instance_group_id": instance_group_id, - "instance_group_manager_prototype": instance_group_manager_prototype, + "instance_group_id": + instance_group_id, + "instance_group_manager_prototype": + instance_group_manager_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_group_manager(**req_copy) @@ -14221,7 +15083,10 @@ def test_delete_instance_group_manager_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_group_manager(**req_copy) @@ -14306,7 +15171,10 @@ def test_get_instance_group_manager_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_group_manager(**req_copy) @@ -14416,7 +15284,10 @@ def test_update_instance_group_manager_value_error(self): "instance_group_manager_patch": instance_group_manager_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_group_manager(**req_copy) @@ -14441,7 +15312,8 @@ def test_list_instance_group_manager_actions_all_params(self): list_instance_group_manager_actions() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions') mock_response = '{"actions": [{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -14490,7 +15362,8 @@ def test_list_instance_group_manager_actions_required_params(self): test_list_instance_group_manager_actions_required_params() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions') mock_response = '{"actions": [{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -14515,7 +15388,8 @@ def test_list_instance_group_manager_actions_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_instance_group_manager_actions_required_params_with_retries(self): + def test_list_instance_group_manager_actions_required_params_with_retries( + self): # Enable retries and run test_list_instance_group_manager_actions_required_params. _service.enable_retries() self.test_list_instance_group_manager_actions_required_params() @@ -14530,7 +15404,8 @@ def test_list_instance_group_manager_actions_value_error(self): test_list_instance_group_manager_actions_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions') mock_response = '{"actions": [{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -14550,7 +15425,10 @@ def test_list_instance_group_manager_actions_value_error(self): "instance_group_manager_id": instance_group_manager_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_group_manager_actions(**req_copy) @@ -14569,7 +15447,8 @@ def test_list_instance_group_manager_actions_with_pager_get_next(self): test_list_instance_group_manager_actions_with_pager_get_next() """ # Set up a two-page mock response - url = preprocess_url('/instance_groups/testString/managers/testString/actions') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}' mock_response2 = '{"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}' responses.add( @@ -14607,7 +15486,8 @@ def test_list_instance_group_manager_actions_with_pager_get_all(self): test_list_instance_group_manager_actions_with_pager_get_all() """ # Set up a two-page mock response - url = preprocess_url('/instance_groups/testString/managers/testString/actions') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}' mock_response2 = '{"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}' responses.add( @@ -14648,7 +15528,8 @@ def test_create_instance_group_manager_action_all_params(self): create_instance_group_manager_action() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions') mock_response = '{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}' responses.add( responses.POST, @@ -14660,13 +15541,17 @@ def test_create_instance_group_manager_action_all_params(self): # Construct a dict representation of a InstanceGroupManagerScheduledActionGroupPrototype model instance_group_manager_scheduled_action_group_prototype_model = {} - instance_group_manager_scheduled_action_group_prototype_model['membership_count'] = 10 + instance_group_manager_scheduled_action_group_prototype_model[ + 'membership_count'] = 10 # Construct a dict representation of a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup model instance_group_manager_action_prototype_model = {} - instance_group_manager_action_prototype_model['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_prototype_model['run_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_prototype_model['group'] = instance_group_manager_scheduled_action_group_prototype_model + instance_group_manager_action_prototype_model[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_prototype_model[ + 'run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_prototype_model[ + 'group'] = instance_group_manager_scheduled_action_group_prototype_model # Set up parameter values instance_group_id = 'testString' @@ -14703,7 +15588,8 @@ def test_create_instance_group_manager_action_value_error(self): test_create_instance_group_manager_action_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions') mock_response = '{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}' responses.add( responses.POST, @@ -14715,13 +15601,17 @@ def test_create_instance_group_manager_action_value_error(self): # Construct a dict representation of a InstanceGroupManagerScheduledActionGroupPrototype model instance_group_manager_scheduled_action_group_prototype_model = {} - instance_group_manager_scheduled_action_group_prototype_model['membership_count'] = 10 + instance_group_manager_scheduled_action_group_prototype_model[ + 'membership_count'] = 10 # Construct a dict representation of a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup model instance_group_manager_action_prototype_model = {} - instance_group_manager_action_prototype_model['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_prototype_model['run_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_prototype_model['group'] = instance_group_manager_scheduled_action_group_prototype_model + instance_group_manager_action_prototype_model[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_prototype_model[ + 'run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_prototype_model[ + 'group'] = instance_group_manager_scheduled_action_group_prototype_model # Set up parameter values instance_group_id = 'testString' @@ -14730,16 +15620,23 @@ def test_create_instance_group_manager_action_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "instance_group_id": instance_group_id, - "instance_group_manager_id": instance_group_manager_id, - "instance_group_manager_action_prototype": instance_group_manager_action_prototype, + "instance_group_id": + instance_group_id, + "instance_group_manager_id": + instance_group_manager_id, + "instance_group_manager_action_prototype": + instance_group_manager_action_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_group_manager_action(**req_copy) - def test_create_instance_group_manager_action_value_error_with_retries(self): + def test_create_instance_group_manager_action_value_error_with_retries( + self): # Enable retries and run test_create_instance_group_manager_action_value_error. _service.enable_retries() self.test_create_instance_group_manager_action_value_error() @@ -14760,7 +15657,9 @@ def test_delete_instance_group_manager_action_all_params(self): delete_instance_group_manager_action() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions/testString' + ) responses.add( responses.DELETE, url, @@ -14799,7 +15698,9 @@ def test_delete_instance_group_manager_action_value_error(self): test_delete_instance_group_manager_action_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions/testString' + ) responses.add( responses.DELETE, url, @@ -14818,11 +15719,15 @@ def test_delete_instance_group_manager_action_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_group_manager_action(**req_copy) - def test_delete_instance_group_manager_action_value_error_with_retries(self): + def test_delete_instance_group_manager_action_value_error_with_retries( + self): # Enable retries and run test_delete_instance_group_manager_action_value_error. _service.enable_retries() self.test_delete_instance_group_manager_action_value_error() @@ -14843,7 +15748,9 @@ def test_get_instance_group_manager_action_all_params(self): get_instance_group_manager_action() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions/testString' + ) mock_response = '{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}' responses.add( responses.GET, @@ -14885,7 +15792,9 @@ def test_get_instance_group_manager_action_value_error(self): test_get_instance_group_manager_action_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions/testString' + ) mock_response = '{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}' responses.add( responses.GET, @@ -14907,7 +15816,10 @@ def test_get_instance_group_manager_action_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_group_manager_action(**req_copy) @@ -14932,7 +15844,9 @@ def test_update_instance_group_manager_action_all_params(self): update_instance_group_manager_action() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions/testString' + ) mock_response = '{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}' responses.add( responses.PATCH, @@ -14948,16 +15862,23 @@ def test_update_instance_group_manager_action_all_params(self): # Construct a dict representation of a InstanceGroupManagerActionManagerPatch model instance_group_manager_action_manager_patch_model = {} - instance_group_manager_action_manager_patch_model['max_membership_count'] = 10 - instance_group_manager_action_manager_patch_model['min_membership_count'] = 10 + instance_group_manager_action_manager_patch_model[ + 'max_membership_count'] = 10 + instance_group_manager_action_manager_patch_model[ + 'min_membership_count'] = 10 # Construct a dict representation of a InstanceGroupManagerActionPatch model instance_group_manager_action_patch_model = {} - instance_group_manager_action_patch_model['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_patch_model['group'] = instance_group_manager_action_group_patch_model - instance_group_manager_action_patch_model['manager'] = instance_group_manager_action_manager_patch_model - instance_group_manager_action_patch_model['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_patch_model['run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_patch_model[ + 'cron_spec'] = '30 */2 * * 1-5' + instance_group_manager_action_patch_model[ + 'group'] = instance_group_manager_action_group_patch_model + instance_group_manager_action_patch_model[ + 'manager'] = instance_group_manager_action_manager_patch_model + instance_group_manager_action_patch_model[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_patch_model[ + 'run_at'] = '2019-01-01T12:00:00Z' # Set up parameter values instance_group_id = 'testString' @@ -14996,7 +15917,9 @@ def test_update_instance_group_manager_action_value_error(self): test_update_instance_group_manager_action_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/actions/testString' + ) mock_response = '{"auto_delete": true, "auto_delete_timeout": 24, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-action", "resource_type": "instance_group_manager_action", "status": "active", "updated_at": "2019-01-01T12:00:00.000Z", "action_type": "scheduled", "cron_spec": "30 */2 * * 1-5", "last_applied_at": "2019-01-01T12:00:00.000Z", "next_run_at": "2019-01-01T12:00:00.000Z", "group": {"membership_count": 10}}' responses.add( responses.PATCH, @@ -15012,16 +15935,23 @@ def test_update_instance_group_manager_action_value_error(self): # Construct a dict representation of a InstanceGroupManagerActionManagerPatch model instance_group_manager_action_manager_patch_model = {} - instance_group_manager_action_manager_patch_model['max_membership_count'] = 10 - instance_group_manager_action_manager_patch_model['min_membership_count'] = 10 + instance_group_manager_action_manager_patch_model[ + 'max_membership_count'] = 10 + instance_group_manager_action_manager_patch_model[ + 'min_membership_count'] = 10 # Construct a dict representation of a InstanceGroupManagerActionPatch model instance_group_manager_action_patch_model = {} - instance_group_manager_action_patch_model['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_patch_model['group'] = instance_group_manager_action_group_patch_model - instance_group_manager_action_patch_model['manager'] = instance_group_manager_action_manager_patch_model - instance_group_manager_action_patch_model['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_patch_model['run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_patch_model[ + 'cron_spec'] = '30 */2 * * 1-5' + instance_group_manager_action_patch_model[ + 'group'] = instance_group_manager_action_group_patch_model + instance_group_manager_action_patch_model[ + 'manager'] = instance_group_manager_action_manager_patch_model + instance_group_manager_action_patch_model[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_patch_model[ + 'run_at'] = '2019-01-01T12:00:00Z' # Set up parameter values instance_group_id = 'testString' @@ -15031,17 +15961,25 @@ def test_update_instance_group_manager_action_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "instance_group_id": instance_group_id, - "instance_group_manager_id": instance_group_manager_id, - "id": id, - "instance_group_manager_action_patch": instance_group_manager_action_patch, + "instance_group_id": + instance_group_id, + "instance_group_manager_id": + instance_group_manager_id, + "id": + id, + "instance_group_manager_action_patch": + instance_group_manager_action_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_group_manager_action(**req_copy) - def test_update_instance_group_manager_action_value_error_with_retries(self): + def test_update_instance_group_manager_action_value_error_with_retries( + self): # Enable retries and run test_update_instance_group_manager_action_value_error. _service.enable_retries() self.test_update_instance_group_manager_action_value_error() @@ -15062,7 +16000,8 @@ def test_list_instance_group_manager_policies_all_params(self): list_instance_group_manager_policies() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}], "total_count": 132}' responses.add( responses.GET, @@ -15111,7 +16050,8 @@ def test_list_instance_group_manager_policies_required_params(self): test_list_instance_group_manager_policies_required_params() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}], "total_count": 132}' responses.add( responses.GET, @@ -15136,7 +16076,8 @@ def test_list_instance_group_manager_policies_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_instance_group_manager_policies_required_params_with_retries(self): + def test_list_instance_group_manager_policies_required_params_with_retries( + self): # Enable retries and run test_list_instance_group_manager_policies_required_params. _service.enable_retries() self.test_list_instance_group_manager_policies_required_params() @@ -15151,7 +16092,8 @@ def test_list_instance_group_manager_policies_value_error(self): test_list_instance_group_manager_policies_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}], "total_count": 132}' responses.add( responses.GET, @@ -15171,11 +16113,15 @@ def test_list_instance_group_manager_policies_value_error(self): "instance_group_manager_id": instance_group_manager_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_group_manager_policies(**req_copy) - def test_list_instance_group_manager_policies_value_error_with_retries(self): + def test_list_instance_group_manager_policies_value_error_with_retries( + self): # Enable retries and run test_list_instance_group_manager_policies_value_error. _service.enable_retries() self.test_list_instance_group_manager_policies_value_error() @@ -15190,7 +16136,8 @@ def test_list_instance_group_manager_policies_with_pager_get_next(self): test_list_instance_group_manager_policies_with_pager_get_next() """ # Set up a two-page mock response - url = preprocess_url('/instance_groups/testString/managers/testString/policies') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}' mock_response2 = '{"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}' responses.add( @@ -15228,7 +16175,8 @@ def test_list_instance_group_manager_policies_with_pager_get_all(self): test_list_instance_group_manager_policies_with_pager_get_all() """ # Set up a two-page mock response - url = preprocess_url('/instance_groups/testString/managers/testString/policies') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}' mock_response2 = '{"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}' responses.add( @@ -15269,7 +16217,8 @@ def test_create_instance_group_manager_policy_all_params(self): create_instance_group_manager_policy() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}' responses.add( responses.POST, @@ -15281,7 +16230,8 @@ def test_create_instance_group_manager_policy_all_params(self): # Construct a dict representation of a InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype model instance_group_manager_policy_prototype_model = {} - instance_group_manager_policy_prototype_model['name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_prototype_model[ + 'name'] = 'my-instance-group-manager-policy' instance_group_manager_policy_prototype_model['metric_type'] = 'cpu' instance_group_manager_policy_prototype_model['metric_value'] = 38 instance_group_manager_policy_prototype_model['policy_type'] = 'target' @@ -15321,7 +16271,8 @@ def test_create_instance_group_manager_policy_value_error(self): test_create_instance_group_manager_policy_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}' responses.add( responses.POST, @@ -15333,7 +16284,8 @@ def test_create_instance_group_manager_policy_value_error(self): # Construct a dict representation of a InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype model instance_group_manager_policy_prototype_model = {} - instance_group_manager_policy_prototype_model['name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_prototype_model[ + 'name'] = 'my-instance-group-manager-policy' instance_group_manager_policy_prototype_model['metric_type'] = 'cpu' instance_group_manager_policy_prototype_model['metric_value'] = 38 instance_group_manager_policy_prototype_model['policy_type'] = 'target' @@ -15345,16 +16297,23 @@ def test_create_instance_group_manager_policy_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "instance_group_id": instance_group_id, - "instance_group_manager_id": instance_group_manager_id, - "instance_group_manager_policy_prototype": instance_group_manager_policy_prototype, + "instance_group_id": + instance_group_id, + "instance_group_manager_id": + instance_group_manager_id, + "instance_group_manager_policy_prototype": + instance_group_manager_policy_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_instance_group_manager_policy(**req_copy) - def test_create_instance_group_manager_policy_value_error_with_retries(self): + def test_create_instance_group_manager_policy_value_error_with_retries( + self): # Enable retries and run test_create_instance_group_manager_policy_value_error. _service.enable_retries() self.test_create_instance_group_manager_policy_value_error() @@ -15375,7 +16334,9 @@ def test_delete_instance_group_manager_policy_all_params(self): delete_instance_group_manager_policy() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies/testString' + ) responses.add( responses.DELETE, url, @@ -15414,7 +16375,9 @@ def test_delete_instance_group_manager_policy_value_error(self): test_delete_instance_group_manager_policy_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies/testString' + ) responses.add( responses.DELETE, url, @@ -15433,11 +16396,15 @@ def test_delete_instance_group_manager_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_group_manager_policy(**req_copy) - def test_delete_instance_group_manager_policy_value_error_with_retries(self): + def test_delete_instance_group_manager_policy_value_error_with_retries( + self): # Enable retries and run test_delete_instance_group_manager_policy_value_error. _service.enable_retries() self.test_delete_instance_group_manager_policy_value_error() @@ -15458,7 +16425,9 @@ def test_get_instance_group_manager_policy_all_params(self): get_instance_group_manager_policy() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies/testString' + ) mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}' responses.add( responses.GET, @@ -15500,7 +16469,9 @@ def test_get_instance_group_manager_policy_value_error(self): test_get_instance_group_manager_policy_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies/testString' + ) mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}' responses.add( responses.GET, @@ -15522,7 +16493,10 @@ def test_get_instance_group_manager_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_group_manager_policy(**req_copy) @@ -15547,7 +16521,9 @@ def test_update_instance_group_manager_policy_all_params(self): update_instance_group_manager_policy() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies/testString' + ) mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}' responses.add( responses.PATCH, @@ -15561,7 +16537,8 @@ def test_update_instance_group_manager_policy_all_params(self): instance_group_manager_policy_patch_model = {} instance_group_manager_policy_patch_model['metric_type'] = 'cpu' instance_group_manager_policy_patch_model['metric_value'] = 38 - instance_group_manager_policy_patch_model['name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_patch_model[ + 'name'] = 'my-instance-group-manager-policy' # Set up parameter values instance_group_id = 'testString' @@ -15600,7 +16577,9 @@ def test_update_instance_group_manager_policy_value_error(self): test_update_instance_group_manager_policy_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString') + url = preprocess_url( + '/instance_groups/testString/managers/testString/policies/testString' + ) mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}' responses.add( responses.PATCH, @@ -15614,7 +16593,8 @@ def test_update_instance_group_manager_policy_value_error(self): instance_group_manager_policy_patch_model = {} instance_group_manager_policy_patch_model['metric_type'] = 'cpu' instance_group_manager_policy_patch_model['metric_value'] = 38 - instance_group_manager_policy_patch_model['name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_patch_model[ + 'name'] = 'my-instance-group-manager-policy' # Set up parameter values instance_group_id = 'testString' @@ -15624,17 +16604,25 @@ def test_update_instance_group_manager_policy_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "instance_group_id": instance_group_id, - "instance_group_manager_id": instance_group_manager_id, - "id": id, - "instance_group_manager_policy_patch": instance_group_manager_policy_patch, + "instance_group_id": + instance_group_id, + "instance_group_manager_id": + instance_group_manager_id, + "id": + id, + "instance_group_manager_policy_patch": + instance_group_manager_policy_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_group_manager_policy(**req_copy) - def test_update_instance_group_manager_policy_value_error_with_retries(self): + def test_update_instance_group_manager_policy_value_error_with_retries( + self): # Enable retries and run test_update_instance_group_manager_policy_value_error. _service.enable_retries() self.test_update_instance_group_manager_policy_value_error() @@ -15705,7 +16693,10 @@ def test_delete_instance_group_memberships_value_error(self): "instance_group_id": instance_group_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_group_memberships(**req_copy) @@ -15833,7 +16824,10 @@ def test_list_instance_group_memberships_value_error(self): "instance_group_id": instance_group_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_instance_group_memberships(**req_copy) @@ -15929,7 +16923,8 @@ def test_delete_instance_group_membership_all_params(self): delete_instance_group_membership() """ # Set up mock - url = preprocess_url('/instance_groups/testString/memberships/testString') + url = preprocess_url( + '/instance_groups/testString/memberships/testString') responses.add( responses.DELETE, url, @@ -15966,7 +16961,8 @@ def test_delete_instance_group_membership_value_error(self): test_delete_instance_group_membership_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/memberships/testString') + url = preprocess_url( + '/instance_groups/testString/memberships/testString') responses.add( responses.DELETE, url, @@ -15983,7 +16979,10 @@ def test_delete_instance_group_membership_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_instance_group_membership(**req_copy) @@ -16008,7 +17007,8 @@ def test_get_instance_group_membership_all_params(self): get_instance_group_membership() """ # Set up mock - url = preprocess_url('/instance_groups/testString/memberships/testString') + url = preprocess_url( + '/instance_groups/testString/memberships/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.GET, @@ -16048,7 +17048,8 @@ def test_get_instance_group_membership_value_error(self): test_get_instance_group_membership_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/memberships/testString') + url = preprocess_url( + '/instance_groups/testString/memberships/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.GET, @@ -16068,7 +17069,10 @@ def test_get_instance_group_membership_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_instance_group_membership(**req_copy) @@ -16093,7 +17097,8 @@ def test_update_instance_group_membership_all_params(self): update_instance_group_membership() """ # Set up mock - url = preprocess_url('/instance_groups/testString/memberships/testString') + url = preprocess_url( + '/instance_groups/testString/memberships/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.PATCH, @@ -16105,7 +17110,8 @@ def test_update_instance_group_membership_all_params(self): # Construct a dict representation of a InstanceGroupMembershipPatch model instance_group_membership_patch_model = {} - instance_group_membership_patch_model['name'] = 'my-instance-group-membership' + instance_group_membership_patch_model[ + 'name'] = 'my-instance-group-membership' # Set up parameter values instance_group_id = 'testString' @@ -16142,7 +17148,8 @@ def test_update_instance_group_membership_value_error(self): test_update_instance_group_membership_value_error() """ # Set up mock - url = preprocess_url('/instance_groups/testString/memberships/testString') + url = preprocess_url( + '/instance_groups/testString/memberships/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "delete_instance_on_membership_delete": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.PATCH, @@ -16154,7 +17161,8 @@ def test_update_instance_group_membership_value_error(self): # Construct a dict representation of a InstanceGroupMembershipPatch model instance_group_membership_patch_model = {} - instance_group_membership_patch_model['name'] = 'my-instance-group-membership' + instance_group_membership_patch_model[ + 'name'] = 'my-instance-group-membership' # Set up parameter values instance_group_id = 'testString' @@ -16168,7 +17176,10 @@ def test_update_instance_group_membership_value_error(self): "instance_group_membership_patch": instance_group_membership_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_instance_group_membership(**req_copy) @@ -16226,7 +17237,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -16234,9 +17249,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListReservations: @@ -16347,10 +17360,12 @@ def test_list_reservations_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_reservations(**req_copy) @@ -16466,13 +17481,15 @@ def test_create_reservation_all_params(self): # Construct a dict representation of a ReservationCommittedUsePrototype model reservation_committed_use_prototype_model = {} - reservation_committed_use_prototype_model['expiration_policy'] = 'release' + reservation_committed_use_prototype_model[ + 'expiration_policy'] = 'release' reservation_committed_use_prototype_model['term'] = 'testString' # Construct a dict representation of a ReservationProfilePrototype model reservation_profile_prototype_model = {} reservation_profile_prototype_model['name'] = 'bx2-4x16' - reservation_profile_prototype_model['resource_type'] = 'instance_profile' + reservation_profile_prototype_model[ + 'resource_type'] = 'instance_profile' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -16509,7 +17526,8 @@ def test_create_reservation_all_params(self): # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['capacity'] == reservation_capacity_prototype_model - assert req_body['committed_use'] == reservation_committed_use_prototype_model + assert req_body[ + 'committed_use'] == reservation_committed_use_prototype_model assert req_body['profile'] == reservation_profile_prototype_model assert req_body['zone'] == zone_identity_model assert req_body['affinity_policy'] == 'restricted' @@ -16547,13 +17565,15 @@ def test_create_reservation_value_error(self): # Construct a dict representation of a ReservationCommittedUsePrototype model reservation_committed_use_prototype_model = {} - reservation_committed_use_prototype_model['expiration_policy'] = 'release' + reservation_committed_use_prototype_model[ + 'expiration_policy'] = 'release' reservation_committed_use_prototype_model['term'] = 'testString' # Construct a dict representation of a ReservationProfilePrototype model reservation_profile_prototype_model = {} reservation_profile_prototype_model['name'] = 'bx2-4x16' - reservation_profile_prototype_model['resource_type'] = 'instance_profile' + reservation_profile_prototype_model[ + 'resource_type'] = 'instance_profile' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -16580,7 +17600,10 @@ def test_create_reservation_value_error(self): "zone": zone, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_reservation(**req_copy) @@ -16661,7 +17684,10 @@ def test_delete_reservation_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_reservation(**req_copy) @@ -16742,7 +17768,10 @@ def test_get_reservation_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_reservation(**req_copy) @@ -16794,7 +17823,8 @@ def test_update_reservation_all_params(self): # Construct a dict representation of a ReservationPatch model reservation_patch_model = {} reservation_patch_model['capacity'] = reservation_capacity_patch_model - reservation_patch_model['committed_use'] = reservation_committed_use_patch_model + reservation_patch_model[ + 'committed_use'] = reservation_committed_use_patch_model reservation_patch_model['name'] = 'my-reservation' reservation_patch_model['profile'] = reservation_profile_patch_model @@ -16858,7 +17888,8 @@ def test_update_reservation_value_error(self): # Construct a dict representation of a ReservationPatch model reservation_patch_model = {} reservation_patch_model['capacity'] = reservation_capacity_patch_model - reservation_patch_model['committed_use'] = reservation_committed_use_patch_model + reservation_patch_model[ + 'committed_use'] = reservation_committed_use_patch_model reservation_patch_model['name'] = 'my-reservation' reservation_patch_model['profile'] = reservation_profile_patch_model @@ -16872,7 +17903,10 @@ def test_update_reservation_value_error(self): "reservation_patch": reservation_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_reservation(**req_copy) @@ -16947,7 +17981,10 @@ def test_activate_reservation_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.activate_reservation(**req_copy) @@ -17005,7 +18042,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -17013,9 +18054,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListDedicatedHostGroups: @@ -17126,10 +18165,12 @@ def test_list_dedicated_host_groups_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_dedicated_host_groups(**req_copy) @@ -17322,7 +18363,10 @@ def test_create_dedicated_host_group_value_error(self): "zone": zone, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_dedicated_host_group(**req_copy) @@ -17397,7 +18441,10 @@ def test_delete_dedicated_host_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_dedicated_host_group(**req_copy) @@ -17478,7 +18525,10 @@ def test_get_dedicated_host_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_dedicated_host_group(**req_copy) @@ -17574,7 +18624,10 @@ def test_update_dedicated_host_group_value_error(self): "dedicated_host_group_patch": dedicated_host_group_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_dedicated_host_group(**req_copy) @@ -17687,10 +18740,12 @@ def test_list_dedicated_host_profiles_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_dedicated_host_profiles(**req_copy) @@ -17840,7 +18895,10 @@ def test_get_dedicated_host_profile_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_dedicated_host_profile(**req_copy) @@ -17900,7 +18958,8 @@ def test_list_dedicated_hosts_all_params(self): # Validate query params query_string = responses.calls[0].request.url.split('?', 1)[1] query_string = urllib.parse.unquote_plus(query_string) - assert 'dedicated_host_group.id={}'.format(dedicated_host_group_id) in query_string + assert 'dedicated_host_group.id={}'.format( + dedicated_host_group_id) in query_string assert 'start={}'.format(start) in query_string assert 'limit={}'.format(limit) in query_string assert 'resource_group.id={}'.format(resource_group_id) in query_string @@ -17965,10 +19024,12 @@ def test_list_dedicated_hosts_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_dedicated_hosts(**req_copy) @@ -18090,15 +19151,19 @@ def test_create_dedicated_host_all_params(self): # Construct a dict representation of a DedicatedHostGroupIdentityById model dedicated_host_group_identity_model = {} - dedicated_host_group_identity_model['id'] = '0c8eccb4-271c-4518-956c-32bfce5cf83b' + dedicated_host_group_identity_model[ + 'id'] = '0c8eccb4-271c-4518-956c-32bfce5cf83b' # Construct a dict representation of a DedicatedHostPrototypeDedicatedHostByGroup model dedicated_host_prototype_model = {} dedicated_host_prototype_model['instance_placement_enabled'] = True dedicated_host_prototype_model['name'] = 'my-host' - dedicated_host_prototype_model['profile'] = dedicated_host_profile_identity_model - dedicated_host_prototype_model['resource_group'] = resource_group_identity_model - dedicated_host_prototype_model['group'] = dedicated_host_group_identity_model + dedicated_host_prototype_model[ + 'profile'] = dedicated_host_profile_identity_model + dedicated_host_prototype_model[ + 'resource_group'] = resource_group_identity_model + dedicated_host_prototype_model[ + 'group'] = dedicated_host_group_identity_model # Set up parameter values dedicated_host_prototype = dedicated_host_prototype_model @@ -18151,15 +19216,19 @@ def test_create_dedicated_host_value_error(self): # Construct a dict representation of a DedicatedHostGroupIdentityById model dedicated_host_group_identity_model = {} - dedicated_host_group_identity_model['id'] = '0c8eccb4-271c-4518-956c-32bfce5cf83b' + dedicated_host_group_identity_model[ + 'id'] = '0c8eccb4-271c-4518-956c-32bfce5cf83b' # Construct a dict representation of a DedicatedHostPrototypeDedicatedHostByGroup model dedicated_host_prototype_model = {} dedicated_host_prototype_model['instance_placement_enabled'] = True dedicated_host_prototype_model['name'] = 'my-host' - dedicated_host_prototype_model['profile'] = dedicated_host_profile_identity_model - dedicated_host_prototype_model['resource_group'] = resource_group_identity_model - dedicated_host_prototype_model['group'] = dedicated_host_group_identity_model + dedicated_host_prototype_model[ + 'profile'] = dedicated_host_profile_identity_model + dedicated_host_prototype_model[ + 'resource_group'] = resource_group_identity_model + dedicated_host_prototype_model[ + 'group'] = dedicated_host_group_identity_model # Set up parameter values dedicated_host_prototype = dedicated_host_prototype_model @@ -18169,7 +19238,10 @@ def test_create_dedicated_host_value_error(self): "dedicated_host_prototype": dedicated_host_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_dedicated_host(**req_copy) @@ -18250,7 +19322,10 @@ def test_list_dedicated_host_disks_value_error(self): "dedicated_host_id": dedicated_host_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_dedicated_host_disks(**req_copy) @@ -18335,7 +19410,10 @@ def test_get_dedicated_host_disk_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_dedicated_host_disk(**req_copy) @@ -18435,7 +19513,10 @@ def test_update_dedicated_host_disk_value_error(self): "dedicated_host_disk_patch": dedicated_host_disk_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_dedicated_host_disk(**req_copy) @@ -18510,7 +19591,10 @@ def test_delete_dedicated_host_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_dedicated_host(**req_copy) @@ -18591,7 +19675,10 @@ def test_get_dedicated_host_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_dedicated_host(**req_copy) @@ -18689,7 +19776,10 @@ def test_update_dedicated_host_value_error(self): "dedicated_host_patch": dedicated_host_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_dedicated_host(**req_copy) @@ -18747,7 +19837,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -18755,9 +19849,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListPlacementGroups: @@ -18859,10 +19951,12 @@ def test_list_placement_groups_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_placement_groups(**req_copy) @@ -19031,7 +20125,10 @@ def test_create_placement_group_value_error(self): "strategy": strategy, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_placement_group(**req_copy) @@ -19106,7 +20203,10 @@ def test_delete_placement_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_placement_group(**req_copy) @@ -19187,7 +20287,10 @@ def test_get_placement_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_placement_group(**req_copy) @@ -19283,7 +20386,10 @@ def test_update_placement_group_value_error(self): "placement_group_patch": placement_group_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_placement_group(**req_copy) @@ -19341,7 +20447,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -19349,9 +20459,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListBareMetalServerProfiles: @@ -19366,7 +20474,7 @@ def test_list_bare_metal_server_profiles_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_server/profiles') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}], "total_count": 132}' responses.add( responses.GET, url, @@ -19411,7 +20519,7 @@ def test_list_bare_metal_server_profiles_required_params(self): """ # Set up mock url = preprocess_url('/bare_metal_server/profiles') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}], "total_count": 132}' responses.add( responses.GET, url, @@ -19443,7 +20551,7 @@ def test_list_bare_metal_server_profiles_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_server/profiles') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}], "total_count": 132}' responses.add( responses.GET, url, @@ -19453,10 +20561,12 @@ def test_list_bare_metal_server_profiles_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_bare_metal_server_profiles(**req_copy) @@ -19476,8 +20586,8 @@ def test_list_bare_metal_server_profiles_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/bare_metal_server/profiles') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' - mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"default":"disabled","type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' + mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"default":"disabled","type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' responses.add( responses.GET, url, @@ -19512,8 +20622,8 @@ def test_list_bare_metal_server_profiles_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/bare_metal_server/profiles') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' - mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"default":"disabled","type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' + mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"console_types":{"type":"enum","values":["serial"]},"cpu_architecture":{"default":"amd64","type":"fixed","value":"amd64"},"cpu_core_count":{"type":"fixed","value":80},"cpu_socket_count":{"type":"fixed","value":4},"disks":[{"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":100},"supported_interface_types":{"default":"fcp","type":"enum","values":["fcp"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768","memory":{"type":"fixed","value":16},"name":"bx2-metal-192x768","network_attachment_count":{"max":128,"min":1,"type":"range"},"network_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"default":"disabled","type":"enum","values":["disabled"]},"virtual_network_interfaces_supported":{"type":"fixed","value":false}}]}' responses.add( responses.GET, url, @@ -19551,7 +20661,7 @@ def test_get_bare_metal_server_profile_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_server/profiles/testString') - mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}' + mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}' responses.add( responses.GET, url, @@ -19589,7 +20699,7 @@ def test_get_bare_metal_server_profile_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_server/profiles/testString') - mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}' + mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_attachment_count": {"max": 128, "min": 1, "type": "range"}, "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"default": "disabled", "type": "enum", "values": ["disabled"]}, "virtual_network_interfaces_supported": {"type": "fixed", "value": false}}' responses.add( responses.GET, url, @@ -19606,7 +20716,10 @@ def test_get_bare_metal_server_profile_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_bare_metal_server_profile(**req_copy) @@ -19734,10 +20847,12 @@ def test_list_bare_metal_servers_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_bare_metal_servers(**req_copy) @@ -19782,7 +20897,8 @@ def test_list_bare_metal_servers_with_pager_get_next(self): resource_group_id='testString', name='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', ) while pager.has_next(): @@ -19822,7 +20938,8 @@ def test_list_bare_metal_servers_with_pager_get_all(self): resource_group_id='testString', name='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', ) all_results = pager.get_all() @@ -19861,9 +20978,13 @@ def test_create_bare_metal_server_all_params(self): # Construct a dict representation of a BareMetalServerInitializationPrototype model bare_metal_server_initialization_prototype_model = {} - bare_metal_server_initialization_prototype_model['image'] = image_identity_model - bare_metal_server_initialization_prototype_model['keys'] = [key_identity_model] - bare_metal_server_initialization_prototype_model['user_data'] = 'testString' + bare_metal_server_initialization_prototype_model[ + 'image'] = image_identity_model + bare_metal_server_initialization_prototype_model['keys'] = [ + key_identity_model + ] + bare_metal_server_initialization_prototype_model[ + 'user_data'] = 'testString' # Construct a dict representation of a BareMetalServerProfileIdentityByName model bare_metal_server_profile_identity_model = {} @@ -19875,7 +20996,8 @@ def test_create_bare_metal_server_all_params(self): # Construct a dict representation of a BareMetalServerTrustedPlatformModulePrototype model bare_metal_server_trusted_platform_module_prototype_model = {} - bare_metal_server_trusted_platform_module_prototype_model['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_prototype_model[ + 'mode'] = 'disabled' # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -19893,13 +21015,17 @@ def test_create_bare_metal_server_all_params(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -19907,42 +21033,69 @@ def test_create_bare_metal_server_all_params(self): # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model bare_metal_server_network_attachment_prototype_model = {} - bare_metal_server_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_network_attachment_prototype_model['interface_type'] = 'pci' + bare_metal_server_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_network_attachment_prototype_model[ + 'interface_type'] = 'pci' # Construct a dict representation of a BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype model bare_metal_server_primary_network_attachment_prototype_model = {} - bare_metal_server_primary_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_primary_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_primary_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_primary_network_attachment_prototype_model['interface_type'] = 'pci' + bare_metal_server_primary_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_primary_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_primary_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_primary_network_attachment_prototype_model[ + 'interface_type'] = 'pci' # Construct a dict representation of a BareMetalServerPrototypeBareMetalServerByNetworkAttachment model bare_metal_server_prototype_model = {} + bare_metal_server_prototype_model['bandwidth'] = 20000 bare_metal_server_prototype_model['enable_secure_boot'] = False - bare_metal_server_prototype_model['initialization'] = bare_metal_server_initialization_prototype_model + bare_metal_server_prototype_model[ + 'initialization'] = bare_metal_server_initialization_prototype_model bare_metal_server_prototype_model['name'] = 'my-bare-metal-server' - bare_metal_server_prototype_model['profile'] = bare_metal_server_profile_identity_model - bare_metal_server_prototype_model['resource_group'] = resource_group_identity_model - bare_metal_server_prototype_model['trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model + bare_metal_server_prototype_model[ + 'profile'] = bare_metal_server_profile_identity_model + bare_metal_server_prototype_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_prototype_model[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model bare_metal_server_prototype_model['vpc'] = vpc_identity_model bare_metal_server_prototype_model['zone'] = zone_identity_model - bare_metal_server_prototype_model['network_attachments'] = [bare_metal_server_network_attachment_prototype_model] - bare_metal_server_prototype_model['primary_network_attachment'] = bare_metal_server_primary_network_attachment_prototype_model + bare_metal_server_prototype_model['network_attachments'] = [ + bare_metal_server_network_attachment_prototype_model + ] + bare_metal_server_prototype_model[ + 'primary_network_attachment'] = bare_metal_server_primary_network_attachment_prototype_model # Set up parameter values bare_metal_server_prototype = bare_metal_server_prototype_model @@ -19995,9 +21148,13 @@ def test_create_bare_metal_server_value_error(self): # Construct a dict representation of a BareMetalServerInitializationPrototype model bare_metal_server_initialization_prototype_model = {} - bare_metal_server_initialization_prototype_model['image'] = image_identity_model - bare_metal_server_initialization_prototype_model['keys'] = [key_identity_model] - bare_metal_server_initialization_prototype_model['user_data'] = 'testString' + bare_metal_server_initialization_prototype_model[ + 'image'] = image_identity_model + bare_metal_server_initialization_prototype_model['keys'] = [ + key_identity_model + ] + bare_metal_server_initialization_prototype_model[ + 'user_data'] = 'testString' # Construct a dict representation of a BareMetalServerProfileIdentityByName model bare_metal_server_profile_identity_model = {} @@ -20009,7 +21166,8 @@ def test_create_bare_metal_server_value_error(self): # Construct a dict representation of a BareMetalServerTrustedPlatformModulePrototype model bare_metal_server_trusted_platform_module_prototype_model = {} - bare_metal_server_trusted_platform_module_prototype_model['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_prototype_model[ + 'mode'] = 'disabled' # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -20027,13 +21185,17 @@ def test_create_bare_metal_server_value_error(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -20041,42 +21203,69 @@ def test_create_bare_metal_server_value_error(self): # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model bare_metal_server_network_attachment_prototype_model = {} - bare_metal_server_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_network_attachment_prototype_model['interface_type'] = 'pci' + bare_metal_server_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_network_attachment_prototype_model[ + 'interface_type'] = 'pci' # Construct a dict representation of a BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype model bare_metal_server_primary_network_attachment_prototype_model = {} - bare_metal_server_primary_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_primary_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_primary_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_primary_network_attachment_prototype_model['interface_type'] = 'pci' + bare_metal_server_primary_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_primary_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_primary_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_primary_network_attachment_prototype_model[ + 'interface_type'] = 'pci' # Construct a dict representation of a BareMetalServerPrototypeBareMetalServerByNetworkAttachment model bare_metal_server_prototype_model = {} + bare_metal_server_prototype_model['bandwidth'] = 20000 bare_metal_server_prototype_model['enable_secure_boot'] = False - bare_metal_server_prototype_model['initialization'] = bare_metal_server_initialization_prototype_model + bare_metal_server_prototype_model[ + 'initialization'] = bare_metal_server_initialization_prototype_model bare_metal_server_prototype_model['name'] = 'my-bare-metal-server' - bare_metal_server_prototype_model['profile'] = bare_metal_server_profile_identity_model - bare_metal_server_prototype_model['resource_group'] = resource_group_identity_model - bare_metal_server_prototype_model['trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model + bare_metal_server_prototype_model[ + 'profile'] = bare_metal_server_profile_identity_model + bare_metal_server_prototype_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_prototype_model[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model bare_metal_server_prototype_model['vpc'] = vpc_identity_model bare_metal_server_prototype_model['zone'] = zone_identity_model - bare_metal_server_prototype_model['network_attachments'] = [bare_metal_server_network_attachment_prototype_model] - bare_metal_server_prototype_model['primary_network_attachment'] = bare_metal_server_primary_network_attachment_prototype_model + bare_metal_server_prototype_model['network_attachments'] = [ + bare_metal_server_network_attachment_prototype_model + ] + bare_metal_server_prototype_model[ + 'primary_network_attachment'] = bare_metal_server_primary_network_attachment_prototype_model # Set up parameter values bare_metal_server_prototype = bare_metal_server_prototype_model @@ -20086,7 +21275,10 @@ def test_create_bare_metal_server_value_error(self): "bare_metal_server_prototype": bare_metal_server_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_bare_metal_server(**req_copy) @@ -20111,7 +21303,8 @@ def test_create_bare_metal_server_console_access_token_all_params(self): create_bare_metal_server_console_access_token() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/console_access_token') + url = preprocess_url( + '/bare_metal_servers/testString/console_access_token') mock_response = '{"access_token": "VGhpcyBJcyBhIHRva2Vu", "console_type": "serial", "created_at": "2020-07-27T21:50:14.000Z", "expires_at": "2020-07-27T21:51:14.000Z", "force": false, "href": "wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu"}' responses.add( responses.POST, @@ -20142,7 +21335,8 @@ def test_create_bare_metal_server_console_access_token_all_params(self): assert req_body['console_type'] == 'serial' assert req_body['force'] == False - def test_create_bare_metal_server_console_access_token_all_params_with_retries(self): + def test_create_bare_metal_server_console_access_token_all_params_with_retries( + self): # Enable retries and run test_create_bare_metal_server_console_access_token_all_params. _service.enable_retries() self.test_create_bare_metal_server_console_access_token_all_params() @@ -20157,7 +21351,8 @@ def test_create_bare_metal_server_console_access_token_value_error(self): test_create_bare_metal_server_console_access_token_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/console_access_token') + url = preprocess_url( + '/bare_metal_servers/testString/console_access_token') mock_response = '{"access_token": "VGhpcyBJcyBhIHRva2Vu", "console_type": "serial", "created_at": "2020-07-27T21:50:14.000Z", "expires_at": "2020-07-27T21:51:14.000Z", "force": false, "href": "wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu"}' responses.add( responses.POST, @@ -20178,11 +21373,16 @@ def test_create_bare_metal_server_console_access_token_value_error(self): "console_type": console_type, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.create_bare_metal_server_console_access_token(**req_copy) + _service.create_bare_metal_server_console_access_token( + **req_copy) - def test_create_bare_metal_server_console_access_token_value_error_with_retries(self): + def test_create_bare_metal_server_console_access_token_value_error_with_retries( + self): # Enable retries and run test_create_bare_metal_server_console_access_token_value_error. _service.enable_retries() self.test_create_bare_metal_server_console_access_token_value_error() @@ -20259,7 +21459,10 @@ def test_list_bare_metal_server_disks_value_error(self): "bare_metal_server_id": bare_metal_server_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_bare_metal_server_disks(**req_copy) @@ -20344,7 +21547,10 @@ def test_get_bare_metal_server_disk_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_bare_metal_server_disk(**req_copy) @@ -20381,7 +21587,8 @@ def test_update_bare_metal_server_disk_all_params(self): # Construct a dict representation of a BareMetalServerDiskPatch model bare_metal_server_disk_patch_model = {} - bare_metal_server_disk_patch_model['name'] = 'my-bare-metal-server-disk-updated' + bare_metal_server_disk_patch_model[ + 'name'] = 'my-bare-metal-server-disk-updated' # Set up parameter values bare_metal_server_id = 'testString' @@ -20430,7 +21637,8 @@ def test_update_bare_metal_server_disk_value_error(self): # Construct a dict representation of a BareMetalServerDiskPatch model bare_metal_server_disk_patch_model = {} - bare_metal_server_disk_patch_model['name'] = 'my-bare-metal-server-disk-updated' + bare_metal_server_disk_patch_model[ + 'name'] = 'my-bare-metal-server-disk-updated' # Set up parameter values bare_metal_server_id = 'testString' @@ -20444,7 +21652,10 @@ def test_update_bare_metal_server_disk_value_error(self): "bare_metal_server_disk_patch": bare_metal_server_disk_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_bare_metal_server_disk(**req_copy) @@ -20469,7 +21680,8 @@ def test_list_bare_metal_server_network_attachments_all_params(self): list_bare_metal_server_network_attachments() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20"}, "limit": 20, "network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -20501,7 +21713,8 @@ def test_list_bare_metal_server_network_attachments_all_params(self): assert 'start={}'.format(start) in query_string assert 'limit={}'.format(limit) in query_string - def test_list_bare_metal_server_network_attachments_all_params_with_retries(self): + def test_list_bare_metal_server_network_attachments_all_params_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_attachments_all_params. _service.enable_retries() self.test_list_bare_metal_server_network_attachments_all_params() @@ -20516,7 +21729,8 @@ def test_list_bare_metal_server_network_attachments_required_params(self): test_list_bare_metal_server_network_attachments_required_params() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20"}, "limit": 20, "network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -20539,7 +21753,8 @@ def test_list_bare_metal_server_network_attachments_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_bare_metal_server_network_attachments_required_params_with_retries(self): + def test_list_bare_metal_server_network_attachments_required_params_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_attachments_required_params. _service.enable_retries() self.test_list_bare_metal_server_network_attachments_required_params() @@ -20554,7 +21769,8 @@ def test_list_bare_metal_server_network_attachments_value_error(self): test_list_bare_metal_server_network_attachments_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20"}, "limit": 20, "network_attachments": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -20572,11 +21788,15 @@ def test_list_bare_metal_server_network_attachments_value_error(self): "bare_metal_server_id": bare_metal_server_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_bare_metal_server_network_attachments(**req_copy) - def test_list_bare_metal_server_network_attachments_value_error_with_retries(self): + def test_list_bare_metal_server_network_attachments_value_error_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_attachments_value_error. _service.enable_retries() self.test_list_bare_metal_server_network_attachments_value_error() @@ -20586,12 +21806,14 @@ def test_list_bare_metal_server_network_attachments_value_error_with_retries(sel self.test_list_bare_metal_server_network_attachments_value_error() @responses.activate - def test_list_bare_metal_server_network_attachments_with_pager_get_next(self): + def test_list_bare_metal_server_network_attachments_with_pager_get_next( + self): """ test_list_bare_metal_server_network_attachments_with_pager_get_next() """ # Set up a two-page mock response - url = preprocess_url('/bare_metal_servers/testString/network_attachments') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}' mock_response2 = '{"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}' responses.add( @@ -20623,12 +21845,14 @@ def test_list_bare_metal_server_network_attachments_with_pager_get_next(self): assert len(all_results) == 2 @responses.activate - def test_list_bare_metal_server_network_attachments_with_pager_get_all(self): + def test_list_bare_metal_server_network_attachments_with_pager_get_all( + self): """ test_list_bare_metal_server_network_attachments_with_pager_get_all() """ # Set up a two-page mock response - url = preprocess_url('/bare_metal_servers/testString/network_attachments') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}' mock_response2 = '{"total_count":2,"limit":1,"network_attachments":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","lifecycle_state":"stable","name":"my-bare-metal-server-network-attachment","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"bare_metal_server_network_attachment","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"},"allowed_vlans":[4],"interface_type":"pci"}]}' responses.add( @@ -20668,7 +21892,8 @@ def test_create_bare_metal_server_network_attachment_all_params(self): create_bare_metal_server_network_attachment() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}' responses.add( responses.POST, @@ -20686,9 +21911,12 @@ def test_create_bare_metal_server_network_attachment_all_params(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -20696,7 +21924,8 @@ def test_create_bare_metal_server_network_attachment_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -20704,22 +21933,37 @@ def test_create_bare_metal_server_network_attachment_all_params(self): # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model bare_metal_server_network_attachment_prototype_model = {} - bare_metal_server_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_network_attachment_prototype_model['interface_type'] = 'pci' + bare_metal_server_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_network_attachment_prototype_model[ + 'interface_type'] = 'pci' # Set up parameter values bare_metal_server_id = 'testString' @@ -20739,7 +21983,8 @@ def test_create_bare_metal_server_network_attachment_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body == bare_metal_server_network_attachment_prototype - def test_create_bare_metal_server_network_attachment_all_params_with_retries(self): + def test_create_bare_metal_server_network_attachment_all_params_with_retries( + self): # Enable retries and run test_create_bare_metal_server_network_attachment_all_params. _service.enable_retries() self.test_create_bare_metal_server_network_attachment_all_params() @@ -20754,7 +21999,8 @@ def test_create_bare_metal_server_network_attachment_value_error(self): test_create_bare_metal_server_network_attachment_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}' responses.add( responses.POST, @@ -20772,9 +22018,12 @@ def test_create_bare_metal_server_network_attachment_value_error(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -20782,7 +22031,8 @@ def test_create_bare_metal_server_network_attachment_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -20790,22 +22040,37 @@ def test_create_bare_metal_server_network_attachment_value_error(self): # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model bare_metal_server_network_attachment_prototype_model = {} - bare_metal_server_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_network_attachment_prototype_model['interface_type'] = 'pci' + bare_metal_server_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_network_attachment_prototype_model[ + 'interface_type'] = 'pci' # Set up parameter values bare_metal_server_id = 'testString' @@ -20813,15 +22078,21 @@ def test_create_bare_metal_server_network_attachment_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "bare_metal_server_id": bare_metal_server_id, - "bare_metal_server_network_attachment_prototype": bare_metal_server_network_attachment_prototype, + "bare_metal_server_id": + bare_metal_server_id, + "bare_metal_server_network_attachment_prototype": + bare_metal_server_network_attachment_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_bare_metal_server_network_attachment(**req_copy) - def test_create_bare_metal_server_network_attachment_value_error_with_retries(self): + def test_create_bare_metal_server_network_attachment_value_error_with_retries( + self): # Enable retries and run test_create_bare_metal_server_network_attachment_value_error. _service.enable_retries() self.test_create_bare_metal_server_network_attachment_value_error() @@ -20842,7 +22113,8 @@ def test_delete_bare_metal_server_network_attachment_all_params(self): delete_bare_metal_server_network_attachment() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments/testString') responses.add( responses.DELETE, url, @@ -20864,7 +22136,8 @@ def test_delete_bare_metal_server_network_attachment_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 202 - def test_delete_bare_metal_server_network_attachment_all_params_with_retries(self): + def test_delete_bare_metal_server_network_attachment_all_params_with_retries( + self): # Enable retries and run test_delete_bare_metal_server_network_attachment_all_params. _service.enable_retries() self.test_delete_bare_metal_server_network_attachment_all_params() @@ -20879,7 +22152,8 @@ def test_delete_bare_metal_server_network_attachment_value_error(self): test_delete_bare_metal_server_network_attachment_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments/testString') responses.add( responses.DELETE, url, @@ -20896,11 +22170,15 @@ def test_delete_bare_metal_server_network_attachment_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_bare_metal_server_network_attachment(**req_copy) - def test_delete_bare_metal_server_network_attachment_value_error_with_retries(self): + def test_delete_bare_metal_server_network_attachment_value_error_with_retries( + self): # Enable retries and run test_delete_bare_metal_server_network_attachment_value_error. _service.enable_retries() self.test_delete_bare_metal_server_network_attachment_value_error() @@ -20921,7 +22199,8 @@ def test_get_bare_metal_server_network_attachment_all_params(self): get_bare_metal_server_network_attachment() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}' responses.add( responses.GET, @@ -20946,7 +22225,8 @@ def test_get_bare_metal_server_network_attachment_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_get_bare_metal_server_network_attachment_all_params_with_retries(self): + def test_get_bare_metal_server_network_attachment_all_params_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_attachment_all_params. _service.enable_retries() self.test_get_bare_metal_server_network_attachment_all_params() @@ -20961,7 +22241,8 @@ def test_get_bare_metal_server_network_attachment_value_error(self): test_get_bare_metal_server_network_attachment_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}' responses.add( responses.GET, @@ -20981,11 +22262,15 @@ def test_get_bare_metal_server_network_attachment_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_bare_metal_server_network_attachment(**req_copy) - def test_get_bare_metal_server_network_attachment_value_error_with_retries(self): + def test_get_bare_metal_server_network_attachment_value_error_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_attachment_value_error. _service.enable_retries() self.test_get_bare_metal_server_network_attachment_value_error() @@ -21006,7 +22291,8 @@ def test_update_bare_metal_server_network_attachment_all_params(self): update_bare_metal_server_network_attachment() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}' responses.add( responses.PATCH, @@ -21019,7 +22305,8 @@ def test_update_bare_metal_server_network_attachment_all_params(self): # Construct a dict representation of a BareMetalServerNetworkAttachmentPatch model bare_metal_server_network_attachment_patch_model = {} bare_metal_server_network_attachment_patch_model['allowed_vlans'] = [4] - bare_metal_server_network_attachment_patch_model['name'] = 'my-bare-metal-server-network-attachment-updated' + bare_metal_server_network_attachment_patch_model[ + 'name'] = 'my-bare-metal-server-network-attachment-updated' # Set up parameter values bare_metal_server_id = 'testString' @@ -21041,7 +22328,8 @@ def test_update_bare_metal_server_network_attachment_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body == bare_metal_server_network_attachment_patch - def test_update_bare_metal_server_network_attachment_all_params_with_retries(self): + def test_update_bare_metal_server_network_attachment_all_params_with_retries( + self): # Enable retries and run test_update_bare_metal_server_network_attachment_all_params. _service.enable_retries() self.test_update_bare_metal_server_network_attachment_all_params() @@ -21056,7 +22344,8 @@ def test_update_bare_metal_server_network_attachment_value_error(self): test_update_bare_metal_server_network_attachment_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_attachments/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_attachments/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "lifecycle_state": "stable", "name": "my-bare-metal-server-network-attachment", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "bare_metal_server_network_attachment", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}, "allowed_vlans": [4], "interface_type": "pci"}' responses.add( responses.PATCH, @@ -21069,7 +22358,8 @@ def test_update_bare_metal_server_network_attachment_value_error(self): # Construct a dict representation of a BareMetalServerNetworkAttachmentPatch model bare_metal_server_network_attachment_patch_model = {} bare_metal_server_network_attachment_patch_model['allowed_vlans'] = [4] - bare_metal_server_network_attachment_patch_model['name'] = 'my-bare-metal-server-network-attachment-updated' + bare_metal_server_network_attachment_patch_model[ + 'name'] = 'my-bare-metal-server-network-attachment-updated' # Set up parameter values bare_metal_server_id = 'testString' @@ -21078,16 +22368,23 @@ def test_update_bare_metal_server_network_attachment_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "bare_metal_server_id": bare_metal_server_id, - "id": id, - "bare_metal_server_network_attachment_patch": bare_metal_server_network_attachment_patch, + "bare_metal_server_id": + bare_metal_server_id, + "id": + id, + "bare_metal_server_network_attachment_patch": + bare_metal_server_network_attachment_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_bare_metal_server_network_attachment(**req_copy) - def test_update_bare_metal_server_network_attachment_value_error_with_retries(self): + def test_update_bare_metal_server_network_attachment_value_error_with_retries( + self): # Enable retries and run test_update_bare_metal_server_network_attachment_value_error. _service.enable_retries() self.test_update_bare_metal_server_network_attachment_value_error() @@ -21108,7 +22405,8 @@ def test_list_bare_metal_server_network_interfaces_all_params(self): list_bare_metal_server_network_interfaces() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -21140,7 +22438,8 @@ def test_list_bare_metal_server_network_interfaces_all_params(self): assert 'start={}'.format(start) in query_string assert 'limit={}'.format(limit) in query_string - def test_list_bare_metal_server_network_interfaces_all_params_with_retries(self): + def test_list_bare_metal_server_network_interfaces_all_params_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_interfaces_all_params. _service.enable_retries() self.test_list_bare_metal_server_network_interfaces_all_params() @@ -21155,7 +22454,8 @@ def test_list_bare_metal_server_network_interfaces_required_params(self): test_list_bare_metal_server_network_interfaces_required_params() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -21178,7 +22478,8 @@ def test_list_bare_metal_server_network_interfaces_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_bare_metal_server_network_interfaces_required_params_with_retries(self): + def test_list_bare_metal_server_network_interfaces_required_params_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_interfaces_required_params. _service.enable_retries() self.test_list_bare_metal_server_network_interfaces_required_params() @@ -21193,7 +22494,8 @@ def test_list_bare_metal_server_network_interfaces_value_error(self): test_list_bare_metal_server_network_interfaces_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -21211,11 +22513,15 @@ def test_list_bare_metal_server_network_interfaces_value_error(self): "bare_metal_server_id": bare_metal_server_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_bare_metal_server_network_interfaces(**req_copy) - def test_list_bare_metal_server_network_interfaces_value_error_with_retries(self): + def test_list_bare_metal_server_network_interfaces_value_error_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_interfaces_value_error. _service.enable_retries() self.test_list_bare_metal_server_network_interfaces_value_error() @@ -21225,12 +22531,14 @@ def test_list_bare_metal_server_network_interfaces_value_error_with_retries(self self.test_list_bare_metal_server_network_interfaces_value_error() @responses.activate - def test_list_bare_metal_server_network_interfaces_with_pager_get_next(self): + def test_list_bare_metal_server_network_interfaces_with_pager_get_next( + self): """ test_list_bare_metal_server_network_interfaces_with_pager_get_next() """ # Set up a two-page mock response - url = preprocess_url('/bare_metal_servers/testString/network_interfaces') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}' mock_response2 = '{"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}' responses.add( @@ -21267,7 +22575,8 @@ def test_list_bare_metal_server_network_interfaces_with_pager_get_all(self): test_list_bare_metal_server_network_interfaces_with_pager_get_all() """ # Set up a two-page mock response - url = preprocess_url('/bare_metal_servers/testString/network_interfaces') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}' mock_response2 = '{"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:04:00:C4:6A","name":"my-bare-metal-server-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}' responses.add( @@ -21307,7 +22616,8 @@ def test_create_bare_metal_server_network_interface_all_params(self): create_bare_metal_server_network_interface() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}' responses.add( responses.POST, @@ -21325,7 +22635,8 @@ def test_create_bare_metal_server_network_interface_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -21333,13 +22644,20 @@ def test_create_bare_metal_server_network_interface_all_params(self): # Construct a dict representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype model bare_metal_server_network_interface_prototype_model = {} - bare_metal_server_network_interface_prototype_model['allow_ip_spoofing'] = True - bare_metal_server_network_interface_prototype_model['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_prototype_model['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_interface_prototype_model['subnet'] = subnet_identity_model - bare_metal_server_network_interface_prototype_model['interface_type'] = 'hipersocket' + bare_metal_server_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_prototype_model[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model + bare_metal_server_network_interface_prototype_model[ + 'interface_type'] = 'hipersocket' # Set up parameter values bare_metal_server_id = 'testString' @@ -21359,7 +22677,8 @@ def test_create_bare_metal_server_network_interface_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body == bare_metal_server_network_interface_prototype - def test_create_bare_metal_server_network_interface_all_params_with_retries(self): + def test_create_bare_metal_server_network_interface_all_params_with_retries( + self): # Enable retries and run test_create_bare_metal_server_network_interface_all_params. _service.enable_retries() self.test_create_bare_metal_server_network_interface_all_params() @@ -21374,7 +22693,8 @@ def test_create_bare_metal_server_network_interface_value_error(self): test_create_bare_metal_server_network_interface_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}' responses.add( responses.POST, @@ -21392,7 +22712,8 @@ def test_create_bare_metal_server_network_interface_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -21400,13 +22721,20 @@ def test_create_bare_metal_server_network_interface_value_error(self): # Construct a dict representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype model bare_metal_server_network_interface_prototype_model = {} - bare_metal_server_network_interface_prototype_model['allow_ip_spoofing'] = True - bare_metal_server_network_interface_prototype_model['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_prototype_model['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_interface_prototype_model['subnet'] = subnet_identity_model - bare_metal_server_network_interface_prototype_model['interface_type'] = 'hipersocket' + bare_metal_server_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_prototype_model[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model + bare_metal_server_network_interface_prototype_model[ + 'interface_type'] = 'hipersocket' # Set up parameter values bare_metal_server_id = 'testString' @@ -21414,15 +22742,21 @@ def test_create_bare_metal_server_network_interface_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "bare_metal_server_id": bare_metal_server_id, - "bare_metal_server_network_interface_prototype": bare_metal_server_network_interface_prototype, + "bare_metal_server_id": + bare_metal_server_id, + "bare_metal_server_network_interface_prototype": + bare_metal_server_network_interface_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_bare_metal_server_network_interface(**req_copy) - def test_create_bare_metal_server_network_interface_value_error_with_retries(self): + def test_create_bare_metal_server_network_interface_value_error_with_retries( + self): # Enable retries and run test_create_bare_metal_server_network_interface_value_error. _service.enable_retries() self.test_create_bare_metal_server_network_interface_value_error() @@ -21443,7 +22777,8 @@ def test_delete_bare_metal_server_network_interface_all_params(self): delete_bare_metal_server_network_interface() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString') responses.add( responses.DELETE, url, @@ -21465,7 +22800,8 @@ def test_delete_bare_metal_server_network_interface_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 204 - def test_delete_bare_metal_server_network_interface_all_params_with_retries(self): + def test_delete_bare_metal_server_network_interface_all_params_with_retries( + self): # Enable retries and run test_delete_bare_metal_server_network_interface_all_params. _service.enable_retries() self.test_delete_bare_metal_server_network_interface_all_params() @@ -21480,7 +22816,8 @@ def test_delete_bare_metal_server_network_interface_value_error(self): test_delete_bare_metal_server_network_interface_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString') responses.add( responses.DELETE, url, @@ -21497,11 +22834,15 @@ def test_delete_bare_metal_server_network_interface_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_bare_metal_server_network_interface(**req_copy) - def test_delete_bare_metal_server_network_interface_value_error_with_retries(self): + def test_delete_bare_metal_server_network_interface_value_error_with_retries( + self): # Enable retries and run test_delete_bare_metal_server_network_interface_value_error. _service.enable_retries() self.test_delete_bare_metal_server_network_interface_value_error() @@ -21522,7 +22863,8 @@ def test_get_bare_metal_server_network_interface_all_params(self): get_bare_metal_server_network_interface() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}' responses.add( responses.GET, @@ -21547,7 +22889,8 @@ def test_get_bare_metal_server_network_interface_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_get_bare_metal_server_network_interface_all_params_with_retries(self): + def test_get_bare_metal_server_network_interface_all_params_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_interface_all_params. _service.enable_retries() self.test_get_bare_metal_server_network_interface_all_params() @@ -21562,7 +22905,8 @@ def test_get_bare_metal_server_network_interface_value_error(self): test_get_bare_metal_server_network_interface_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}' responses.add( responses.GET, @@ -21582,11 +22926,15 @@ def test_get_bare_metal_server_network_interface_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_bare_metal_server_network_interface(**req_copy) - def test_get_bare_metal_server_network_interface_value_error_with_retries(self): + def test_get_bare_metal_server_network_interface_value_error_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_interface_value_error. _service.enable_retries() self.test_get_bare_metal_server_network_interface_value_error() @@ -21607,7 +22955,8 @@ def test_update_bare_metal_server_network_interface_all_params(self): update_bare_metal_server_network_interface() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}' responses.add( responses.PATCH, @@ -21619,10 +22968,13 @@ def test_update_bare_metal_server_network_interface_all_params(self): # Construct a dict representation of a BareMetalServerNetworkInterfacePatch model bare_metal_server_network_interface_patch_model = {} - bare_metal_server_network_interface_patch_model['allow_ip_spoofing'] = True + bare_metal_server_network_interface_patch_model[ + 'allow_ip_spoofing'] = True bare_metal_server_network_interface_patch_model['allowed_vlans'] = [4] - bare_metal_server_network_interface_patch_model['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_patch_model['name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_patch_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_patch_model[ + 'name'] = 'my-bare-metal-server-network-interface' # Set up parameter values bare_metal_server_id = 'testString' @@ -21644,7 +22996,8 @@ def test_update_bare_metal_server_network_interface_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body == bare_metal_server_network_interface_patch - def test_update_bare_metal_server_network_interface_all_params_with_retries(self): + def test_update_bare_metal_server_network_interface_all_params_with_retries( + self): # Enable retries and run test_update_bare_metal_server_network_interface_all_params. _service.enable_retries() self.test_update_bare_metal_server_network_interface_all_params() @@ -21659,7 +23012,8 @@ def test_update_bare_metal_server_network_interface_value_error(self): test_update_bare_metal_server_network_interface_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString') mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:04:00:C4:6A", "name": "my-bare-metal-server-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}' responses.add( responses.PATCH, @@ -21671,10 +23025,13 @@ def test_update_bare_metal_server_network_interface_value_error(self): # Construct a dict representation of a BareMetalServerNetworkInterfacePatch model bare_metal_server_network_interface_patch_model = {} - bare_metal_server_network_interface_patch_model['allow_ip_spoofing'] = True + bare_metal_server_network_interface_patch_model[ + 'allow_ip_spoofing'] = True bare_metal_server_network_interface_patch_model['allowed_vlans'] = [4] - bare_metal_server_network_interface_patch_model['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_patch_model['name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_patch_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_patch_model[ + 'name'] = 'my-bare-metal-server-network-interface' # Set up parameter values bare_metal_server_id = 'testString' @@ -21683,16 +23040,23 @@ def test_update_bare_metal_server_network_interface_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "bare_metal_server_id": bare_metal_server_id, - "id": id, - "bare_metal_server_network_interface_patch": bare_metal_server_network_interface_patch, + "bare_metal_server_id": + bare_metal_server_id, + "id": + id, + "bare_metal_server_network_interface_patch": + bare_metal_server_network_interface_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_bare_metal_server_network_interface(**req_copy) - def test_update_bare_metal_server_network_interface_value_error_with_retries(self): + def test_update_bare_metal_server_network_interface_value_error_with_retries( + self): # Enable retries and run test_update_bare_metal_server_network_interface_value_error. _service.enable_retries() self.test_update_bare_metal_server_network_interface_value_error() @@ -21708,12 +23072,15 @@ class TestListBareMetalServerNetworkInterfaceFloatingIps: """ @responses.activate - def test_list_bare_metal_server_network_interface_floating_ips_all_params(self): + def test_list_bare_metal_server_network_interface_floating_ips_all_params( + self): """ list_bare_metal_server_network_interface_floating_ips() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips' + ) mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, @@ -21738,22 +23105,28 @@ def test_list_bare_metal_server_network_interface_floating_ips_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_bare_metal_server_network_interface_floating_ips_all_params_with_retries(self): + def test_list_bare_metal_server_network_interface_floating_ips_all_params_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_interface_floating_ips_all_params. _service.enable_retries() - self.test_list_bare_metal_server_network_interface_floating_ips_all_params() + self.test_list_bare_metal_server_network_interface_floating_ips_all_params( + ) # Disable retries and run test_list_bare_metal_server_network_interface_floating_ips_all_params. _service.disable_retries() - self.test_list_bare_metal_server_network_interface_floating_ips_all_params() + self.test_list_bare_metal_server_network_interface_floating_ips_all_params( + ) @responses.activate - def test_list_bare_metal_server_network_interface_floating_ips_value_error(self): + def test_list_bare_metal_server_network_interface_floating_ips_value_error( + self): """ test_list_bare_metal_server_network_interface_floating_ips_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips' + ) mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, @@ -21773,18 +23146,25 @@ def test_list_bare_metal_server_network_interface_floating_ips_value_error(self) "network_interface_id": network_interface_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.list_bare_metal_server_network_interface_floating_ips(**req_copy) + _service.list_bare_metal_server_network_interface_floating_ips( + **req_copy) - def test_list_bare_metal_server_network_interface_floating_ips_value_error_with_retries(self): + def test_list_bare_metal_server_network_interface_floating_ips_value_error_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_interface_floating_ips_value_error. _service.enable_retries() - self.test_list_bare_metal_server_network_interface_floating_ips_value_error() + self.test_list_bare_metal_server_network_interface_floating_ips_value_error( + ) # Disable retries and run test_list_bare_metal_server_network_interface_floating_ips_value_error. _service.disable_retries() - self.test_list_bare_metal_server_network_interface_floating_ips_value_error() + self.test_list_bare_metal_server_network_interface_floating_ips_value_error( + ) class TestRemoveBareMetalServerNetworkInterfaceFloatingIp: @@ -21793,12 +23173,15 @@ class TestRemoveBareMetalServerNetworkInterfaceFloatingIp: """ @responses.activate - def test_remove_bare_metal_server_network_interface_floating_ip_all_params(self): + def test_remove_bare_metal_server_network_interface_floating_ip_all_params( + self): """ remove_bare_metal_server_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString' + ) responses.add( responses.DELETE, url, @@ -21822,22 +23205,28 @@ def test_remove_bare_metal_server_network_interface_floating_ip_all_params(self) assert len(responses.calls) == 1 assert response.status_code == 204 - def test_remove_bare_metal_server_network_interface_floating_ip_all_params_with_retries(self): + def test_remove_bare_metal_server_network_interface_floating_ip_all_params_with_retries( + self): # Enable retries and run test_remove_bare_metal_server_network_interface_floating_ip_all_params. _service.enable_retries() - self.test_remove_bare_metal_server_network_interface_floating_ip_all_params() + self.test_remove_bare_metal_server_network_interface_floating_ip_all_params( + ) # Disable retries and run test_remove_bare_metal_server_network_interface_floating_ip_all_params. _service.disable_retries() - self.test_remove_bare_metal_server_network_interface_floating_ip_all_params() + self.test_remove_bare_metal_server_network_interface_floating_ip_all_params( + ) @responses.activate - def test_remove_bare_metal_server_network_interface_floating_ip_value_error(self): + def test_remove_bare_metal_server_network_interface_floating_ip_value_error( + self): """ test_remove_bare_metal_server_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString' + ) responses.add( responses.DELETE, url, @@ -21856,18 +23245,25 @@ def test_remove_bare_metal_server_network_interface_floating_ip_value_error(self "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.remove_bare_metal_server_network_interface_floating_ip(**req_copy) + _service.remove_bare_metal_server_network_interface_floating_ip( + **req_copy) - def test_remove_bare_metal_server_network_interface_floating_ip_value_error_with_retries(self): + def test_remove_bare_metal_server_network_interface_floating_ip_value_error_with_retries( + self): # Enable retries and run test_remove_bare_metal_server_network_interface_floating_ip_value_error. _service.enable_retries() - self.test_remove_bare_metal_server_network_interface_floating_ip_value_error() + self.test_remove_bare_metal_server_network_interface_floating_ip_value_error( + ) # Disable retries and run test_remove_bare_metal_server_network_interface_floating_ip_value_error. _service.disable_retries() - self.test_remove_bare_metal_server_network_interface_floating_ip_value_error() + self.test_remove_bare_metal_server_network_interface_floating_ip_value_error( + ) class TestGetBareMetalServerNetworkInterfaceFloatingIp: @@ -21876,12 +23272,15 @@ class TestGetBareMetalServerNetworkInterfaceFloatingIp: """ @responses.activate - def test_get_bare_metal_server_network_interface_floating_ip_all_params(self): + def test_get_bare_metal_server_network_interface_floating_ip_all_params( + self): """ get_bare_metal_server_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, @@ -21908,22 +23307,28 @@ def test_get_bare_metal_server_network_interface_floating_ip_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_get_bare_metal_server_network_interface_floating_ip_all_params_with_retries(self): + def test_get_bare_metal_server_network_interface_floating_ip_all_params_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_interface_floating_ip_all_params. _service.enable_retries() - self.test_get_bare_metal_server_network_interface_floating_ip_all_params() + self.test_get_bare_metal_server_network_interface_floating_ip_all_params( + ) # Disable retries and run test_get_bare_metal_server_network_interface_floating_ip_all_params. _service.disable_retries() - self.test_get_bare_metal_server_network_interface_floating_ip_all_params() + self.test_get_bare_metal_server_network_interface_floating_ip_all_params( + ) @responses.activate - def test_get_bare_metal_server_network_interface_floating_ip_value_error(self): + def test_get_bare_metal_server_network_interface_floating_ip_value_error( + self): """ test_get_bare_metal_server_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, @@ -21945,18 +23350,25 @@ def test_get_bare_metal_server_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.get_bare_metal_server_network_interface_floating_ip(**req_copy) + _service.get_bare_metal_server_network_interface_floating_ip( + **req_copy) - def test_get_bare_metal_server_network_interface_floating_ip_value_error_with_retries(self): + def test_get_bare_metal_server_network_interface_floating_ip_value_error_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_interface_floating_ip_value_error. _service.enable_retries() - self.test_get_bare_metal_server_network_interface_floating_ip_value_error() + self.test_get_bare_metal_server_network_interface_floating_ip_value_error( + ) # Disable retries and run test_get_bare_metal_server_network_interface_floating_ip_value_error. _service.disable_retries() - self.test_get_bare_metal_server_network_interface_floating_ip_value_error() + self.test_get_bare_metal_server_network_interface_floating_ip_value_error( + ) class TestAddBareMetalServerNetworkInterfaceFloatingIp: @@ -21965,12 +23377,15 @@ class TestAddBareMetalServerNetworkInterfaceFloatingIp: """ @responses.activate - def test_add_bare_metal_server_network_interface_floating_ip_all_params(self): + def test_add_bare_metal_server_network_interface_floating_ip_all_params( + self): """ add_bare_metal_server_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PUT, @@ -21997,22 +23412,28 @@ def test_add_bare_metal_server_network_interface_floating_ip_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 201 - def test_add_bare_metal_server_network_interface_floating_ip_all_params_with_retries(self): + def test_add_bare_metal_server_network_interface_floating_ip_all_params_with_retries( + self): # Enable retries and run test_add_bare_metal_server_network_interface_floating_ip_all_params. _service.enable_retries() - self.test_add_bare_metal_server_network_interface_floating_ip_all_params() + self.test_add_bare_metal_server_network_interface_floating_ip_all_params( + ) # Disable retries and run test_add_bare_metal_server_network_interface_floating_ip_all_params. _service.disable_retries() - self.test_add_bare_metal_server_network_interface_floating_ip_all_params() + self.test_add_bare_metal_server_network_interface_floating_ip_all_params( + ) @responses.activate - def test_add_bare_metal_server_network_interface_floating_ip_value_error(self): + def test_add_bare_metal_server_network_interface_floating_ip_value_error( + self): """ test_add_bare_metal_server_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString' + ) mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "0717-10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PUT, @@ -22034,18 +23455,25 @@ def test_add_bare_metal_server_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.add_bare_metal_server_network_interface_floating_ip(**req_copy) + _service.add_bare_metal_server_network_interface_floating_ip( + **req_copy) - def test_add_bare_metal_server_network_interface_floating_ip_value_error_with_retries(self): + def test_add_bare_metal_server_network_interface_floating_ip_value_error_with_retries( + self): # Enable retries and run test_add_bare_metal_server_network_interface_floating_ip_value_error. _service.enable_retries() - self.test_add_bare_metal_server_network_interface_floating_ip_value_error() + self.test_add_bare_metal_server_network_interface_floating_ip_value_error( + ) # Disable retries and run test_add_bare_metal_server_network_interface_floating_ip_value_error. _service.disable_retries() - self.test_add_bare_metal_server_network_interface_floating_ip_value_error() + self.test_add_bare_metal_server_network_interface_floating_ip_value_error( + ) class TestListBareMetalServerNetworkInterfaceIps: @@ -22059,7 +23487,8 @@ def test_list_bare_metal_server_network_interface_ips_all_params(self): list_bare_metal_server_network_interface_ips() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/ips') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -22084,7 +23513,8 @@ def test_list_bare_metal_server_network_interface_ips_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_bare_metal_server_network_interface_ips_all_params_with_retries(self): + def test_list_bare_metal_server_network_interface_ips_all_params_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_interface_ips_all_params. _service.enable_retries() self.test_list_bare_metal_server_network_interface_ips_all_params() @@ -22099,7 +23529,8 @@ def test_list_bare_metal_server_network_interface_ips_value_error(self): test_list_bare_metal_server_network_interface_ips_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/ips') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -22119,11 +23550,16 @@ def test_list_bare_metal_server_network_interface_ips_value_error(self): "network_interface_id": network_interface_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): - _service.list_bare_metal_server_network_interface_ips(**req_copy) + _service.list_bare_metal_server_network_interface_ips( + **req_copy) - def test_list_bare_metal_server_network_interface_ips_value_error_with_retries(self): + def test_list_bare_metal_server_network_interface_ips_value_error_with_retries( + self): # Enable retries and run test_list_bare_metal_server_network_interface_ips_value_error. _service.enable_retries() self.test_list_bare_metal_server_network_interface_ips_value_error() @@ -22144,7 +23580,9 @@ def test_get_bare_metal_server_network_interface_ip_all_params(self): get_bare_metal_server_network_interface_ip() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/ips/testString' + ) mock_response = '{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, @@ -22171,7 +23609,8 @@ def test_get_bare_metal_server_network_interface_ip_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_get_bare_metal_server_network_interface_ip_all_params_with_retries(self): + def test_get_bare_metal_server_network_interface_ip_all_params_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_interface_ip_all_params. _service.enable_retries() self.test_get_bare_metal_server_network_interface_ip_all_params() @@ -22186,7 +23625,9 @@ def test_get_bare_metal_server_network_interface_ip_value_error(self): test_get_bare_metal_server_network_interface_ip_value_error() """ # Set up mock - url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/ips/testString') + url = preprocess_url( + '/bare_metal_servers/testString/network_interfaces/testString/ips/testString' + ) mock_response = '{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, @@ -22208,11 +23649,15 @@ def test_get_bare_metal_server_network_interface_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_bare_metal_server_network_interface_ip(**req_copy) - def test_get_bare_metal_server_network_interface_ip_value_error_with_retries(self): + def test_get_bare_metal_server_network_interface_ip_value_error_with_retries( + self): # Enable retries and run test_get_bare_metal_server_network_interface_ip_value_error. _service.enable_retries() self.test_get_bare_metal_server_network_interface_ip_value_error() @@ -22283,7 +23728,10 @@ def test_delete_bare_metal_server_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_bare_metal_server(**req_copy) @@ -22364,7 +23812,10 @@ def test_get_bare_metal_server_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_bare_metal_server(**req_copy) @@ -22401,13 +23852,16 @@ def test_update_bare_metal_server_all_params(self): # Construct a dict representation of a BareMetalServerTrustedPlatformModulePatch model bare_metal_server_trusted_platform_module_patch_model = {} - bare_metal_server_trusted_platform_module_patch_model['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_patch_model[ + 'mode'] = 'disabled' # Construct a dict representation of a BareMetalServerPatch model bare_metal_server_patch_model = {} + bare_metal_server_patch_model['bandwidth'] = 20000 bare_metal_server_patch_model['enable_secure_boot'] = False bare_metal_server_patch_model['name'] = 'my-bare-metal-server' - bare_metal_server_patch_model['trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model + bare_metal_server_patch_model[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model # Set up parameter values id = 'testString' @@ -22454,13 +23908,16 @@ def test_update_bare_metal_server_value_error(self): # Construct a dict representation of a BareMetalServerTrustedPlatformModulePatch model bare_metal_server_trusted_platform_module_patch_model = {} - bare_metal_server_trusted_platform_module_patch_model['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_patch_model[ + 'mode'] = 'disabled' # Construct a dict representation of a BareMetalServerPatch model bare_metal_server_patch_model = {} + bare_metal_server_patch_model['bandwidth'] = 20000 bare_metal_server_patch_model['enable_secure_boot'] = False bare_metal_server_patch_model['name'] = 'my-bare-metal-server' - bare_metal_server_patch_model['trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model + bare_metal_server_patch_model[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model # Set up parameter values id = 'testString' @@ -22472,7 +23929,10 @@ def test_update_bare_metal_server_value_error(self): "bare_metal_server_patch": bare_metal_server_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_bare_metal_server(**req_copy) @@ -22553,11 +24013,15 @@ def test_get_bare_metal_server_initialization_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_bare_metal_server_initialization(**req_copy) - def test_get_bare_metal_server_initialization_value_error_with_retries(self): + def test_get_bare_metal_server_initialization_value_error_with_retries( + self): # Enable retries and run test_get_bare_metal_server_initialization_value_error. _service.enable_retries() self.test_get_bare_metal_server_initialization_value_error() @@ -22628,7 +24092,10 @@ def test_restart_bare_metal_server_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.restart_bare_metal_server(**req_copy) @@ -22703,7 +24170,10 @@ def test_start_bare_metal_server_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.start_bare_metal_server(**req_copy) @@ -22785,7 +24255,10 @@ def test_stop_bare_metal_server_value_error(self): "type": type, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.stop_bare_metal_server(**req_copy) @@ -22843,7 +24316,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -22851,9 +24328,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListVolumeProfiles: @@ -22955,10 +24430,12 @@ def test_list_volume_profiles_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_volume_profiles(**req_copy) @@ -23108,7 +24585,10 @@ def test_get_volume_profile_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_volume_profile(**req_copy) @@ -23134,7 +24614,7 @@ def test_list_volumes_all_params(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, url, @@ -23179,8 +24659,10 @@ def test_list_volumes_all_params(self): assert 'name={}'.format(name) in query_string assert 'attachment_state={}'.format(attachment_state) in query_string assert 'encryption={}'.format(encryption) in query_string - assert 'operating_system.family={}'.format(operating_system_family) in query_string - assert 'operating_system.architecture={}'.format(operating_system_architecture) in query_string + assert 'operating_system.family={}'.format( + operating_system_family) in query_string + assert 'operating_system.architecture={}'.format( + operating_system_architecture) in query_string assert 'zone.name={}'.format(zone_name) in query_string assert 'tag={}'.format(tag) in query_string @@ -23200,7 +24682,7 @@ def test_list_volumes_required_params(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, url, @@ -23232,7 +24714,7 @@ def test_list_volumes_value_error(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, url, @@ -23242,10 +24724,12 @@ def test_list_volumes_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_volumes(**req_copy) @@ -23265,8 +24749,8 @@ def test_list_volumes_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/volumes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' responses.add( responses.GET, url, @@ -23308,8 +24792,8 @@ def test_list_volumes_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/volumes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"health_reasons":[{"code":"initializing_from_snapshot","message":"Performance will be degraded while this volume is being initialized from its snapshot","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"volume","source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a","id":"0717_1e09281b-f177-46f2-b1f1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}' responses.add( responses.GET, url, @@ -23354,7 +24838,7 @@ def test_create_volume_all_params(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -23377,7 +24861,8 @@ def test_create_volume_all_params(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a VolumePrototypeVolumeByCapacity model volume_prototype_model = {} @@ -23422,7 +24907,7 @@ def test_create_volume_value_error(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -23445,7 +24930,8 @@ def test_create_volume_value_error(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a VolumePrototypeVolumeByCapacity model volume_prototype_model = {} @@ -23466,7 +24952,10 @@ def test_create_volume_value_error(self): "volume_prototype": volume_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_volume(**req_copy) @@ -23578,7 +25067,10 @@ def test_delete_volume_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_volume(**req_copy) @@ -23604,7 +25096,7 @@ def test_get_volume_all_params(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -23642,7 +25134,7 @@ def test_get_volume_value_error(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -23659,7 +25151,10 @@ def test_get_volume_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_volume(**req_copy) @@ -23685,7 +25180,7 @@ def test_update_volume_all_params(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -23742,7 +25237,7 @@ def test_update_volume_required_params(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -23797,7 +25292,7 @@ def test_update_volume_value_error(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "health_reasons": [{"code": "initializing_from_snapshot", "message": "Performance will be degraded while this volume is being initialized from its snapshot", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "volume", "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -23828,7 +25323,10 @@ def test_update_volume_value_error(self): "volume_patch": volume_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_volume(**req_copy) @@ -23886,7 +25384,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -23894,9 +25396,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListSnapshotConsistencyGroups: @@ -23950,7 +25450,8 @@ def test_list_snapshot_consistency_groups_all_params(self): assert 'resource_group.id={}'.format(resource_group_id) in query_string assert 'name={}'.format(name) in query_string assert 'sort={}'.format(sort) in query_string - assert 'backup_policy_plan.id={}'.format(backup_policy_plan_id) in query_string + assert 'backup_policy_plan.id={}'.format( + backup_policy_plan_id) in query_string def test_list_snapshot_consistency_groups_all_params_with_retries(self): # Enable retries and run test_list_snapshot_consistency_groups_all_params. @@ -23984,7 +25485,8 @@ def test_list_snapshot_consistency_groups_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_snapshot_consistency_groups_required_params_with_retries(self): + def test_list_snapshot_consistency_groups_required_params_with_retries( + self): # Enable retries and run test_list_snapshot_consistency_groups_required_params. _service.enable_retries() self.test_list_snapshot_consistency_groups_required_params() @@ -24010,10 +25512,12 @@ def test_list_snapshot_consistency_groups_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_snapshot_consistency_groups(**req_copy) @@ -24131,20 +25635,29 @@ def test_create_snapshot_consistency_group_all_params(self): # Construct a dict representation of a VolumeIdentityById model volume_identity_model = {} - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a dict representation of a SnapshotPrototypeSnapshotConsistencyGroupContext model snapshot_prototype_snapshot_consistency_group_context_model = {} - snapshot_prototype_snapshot_consistency_group_context_model['name'] = 'my-snapshot' - snapshot_prototype_snapshot_consistency_group_context_model['source_volume'] = volume_identity_model - snapshot_prototype_snapshot_consistency_group_context_model['user_tags'] = ['testString'] + snapshot_prototype_snapshot_consistency_group_context_model[ + 'name'] = 'my-snapshot' + snapshot_prototype_snapshot_consistency_group_context_model[ + 'source_volume'] = volume_identity_model + snapshot_prototype_snapshot_consistency_group_context_model[ + 'user_tags'] = ['testString'] # Construct a dict representation of a SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots model snapshot_consistency_group_prototype_model = {} - snapshot_consistency_group_prototype_model['delete_snapshots_on_delete'] = True - snapshot_consistency_group_prototype_model['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_prototype_model['resource_group'] = resource_group_identity_model - snapshot_consistency_group_prototype_model['snapshots'] = [snapshot_prototype_snapshot_consistency_group_context_model] + snapshot_consistency_group_prototype_model[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_prototype_model[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_prototype_model[ + 'resource_group'] = resource_group_identity_model + snapshot_consistency_group_prototype_model['snapshots'] = [ + snapshot_prototype_snapshot_consistency_group_context_model + ] # Set up parameter values snapshot_consistency_group_prototype = snapshot_consistency_group_prototype_model @@ -24193,30 +25706,43 @@ def test_create_snapshot_consistency_group_value_error(self): # Construct a dict representation of a VolumeIdentityById model volume_identity_model = {} - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a dict representation of a SnapshotPrototypeSnapshotConsistencyGroupContext model snapshot_prototype_snapshot_consistency_group_context_model = {} - snapshot_prototype_snapshot_consistency_group_context_model['name'] = 'my-snapshot' - snapshot_prototype_snapshot_consistency_group_context_model['source_volume'] = volume_identity_model - snapshot_prototype_snapshot_consistency_group_context_model['user_tags'] = ['testString'] + snapshot_prototype_snapshot_consistency_group_context_model[ + 'name'] = 'my-snapshot' + snapshot_prototype_snapshot_consistency_group_context_model[ + 'source_volume'] = volume_identity_model + snapshot_prototype_snapshot_consistency_group_context_model[ + 'user_tags'] = ['testString'] # Construct a dict representation of a SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots model snapshot_consistency_group_prototype_model = {} - snapshot_consistency_group_prototype_model['delete_snapshots_on_delete'] = True - snapshot_consistency_group_prototype_model['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_prototype_model['resource_group'] = resource_group_identity_model - snapshot_consistency_group_prototype_model['snapshots'] = [snapshot_prototype_snapshot_consistency_group_context_model] + snapshot_consistency_group_prototype_model[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_prototype_model[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_prototype_model[ + 'resource_group'] = resource_group_identity_model + snapshot_consistency_group_prototype_model['snapshots'] = [ + snapshot_prototype_snapshot_consistency_group_context_model + ] # Set up parameter values snapshot_consistency_group_prototype = snapshot_consistency_group_prototype_model # Pass in all but one required param and check for a ValueError req_param_dict = { - "snapshot_consistency_group_prototype": snapshot_consistency_group_prototype, + "snapshot_consistency_group_prototype": + snapshot_consistency_group_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_snapshot_consistency_group(**req_copy) @@ -24297,7 +25823,10 @@ def test_delete_snapshot_consistency_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_snapshot_consistency_group(**req_copy) @@ -24378,7 +25907,10 @@ def test_get_snapshot_consistency_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_snapshot_consistency_group(**req_copy) @@ -24415,8 +25947,10 @@ def test_update_snapshot_consistency_group_all_params(self): # Construct a dict representation of a SnapshotConsistencyGroupPatch model snapshot_consistency_group_patch_model = {} - snapshot_consistency_group_patch_model['delete_snapshots_on_delete'] = True - snapshot_consistency_group_patch_model['name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_patch_model[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_patch_model[ + 'name'] = 'my-snapshot-consistency-group' # Set up parameter values id = 'testString' @@ -24465,8 +25999,10 @@ def test_update_snapshot_consistency_group_required_params(self): # Construct a dict representation of a SnapshotConsistencyGroupPatch model snapshot_consistency_group_patch_model = {} - snapshot_consistency_group_patch_model['delete_snapshots_on_delete'] = True - snapshot_consistency_group_patch_model['name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_patch_model[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_patch_model[ + 'name'] = 'my-snapshot-consistency-group' # Set up parameter values id = 'testString' @@ -24486,7 +26022,8 @@ def test_update_snapshot_consistency_group_required_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body == snapshot_consistency_group_patch - def test_update_snapshot_consistency_group_required_params_with_retries(self): + def test_update_snapshot_consistency_group_required_params_with_retries( + self): # Enable retries and run test_update_snapshot_consistency_group_required_params. _service.enable_retries() self.test_update_snapshot_consistency_group_required_params() @@ -24513,8 +26050,10 @@ def test_update_snapshot_consistency_group_value_error(self): # Construct a dict representation of a SnapshotConsistencyGroupPatch model snapshot_consistency_group_patch_model = {} - snapshot_consistency_group_patch_model['delete_snapshots_on_delete'] = True - snapshot_consistency_group_patch_model['name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_patch_model[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_patch_model[ + 'name'] = 'my-snapshot-consistency-group' # Set up parameter values id = 'testString' @@ -24522,11 +26061,16 @@ def test_update_snapshot_consistency_group_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "id": id, - "snapshot_consistency_group_patch": snapshot_consistency_group_patch, + "id": + id, + "snapshot_consistency_group_patch": + snapshot_consistency_group_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_snapshot_consistency_group(**req_copy) @@ -24555,7 +26099,7 @@ def test_delete_snapshots_all_params(self): responses.add( responses.DELETE, url, - status=204, + status=202, ) # Set up parameter values @@ -24569,7 +26113,7 @@ def test_delete_snapshots_all_params(self): # Check for correct operation assert len(responses.calls) == 1 - assert response.status_code == 204 + assert response.status_code == 202 # Validate query params query_string = responses.calls[0].request.url.split('?', 1)[1] query_string = urllib.parse.unquote_plus(query_string) @@ -24594,7 +26138,7 @@ def test_delete_snapshots_value_error(self): responses.add( responses.DELETE, url, - status=204, + status=202, ) # Set up parameter values @@ -24605,7 +26149,10 @@ def test_delete_snapshots_value_error(self): "source_volume_id": source_volume_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_snapshots(**req_copy) @@ -24631,7 +26178,7 @@ def test_list_snapshots_all_params(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}], "total_count": 132}' responses.add( responses.GET, url, @@ -24682,7 +26229,8 @@ def test_list_snapshots_all_params(self): copies_crn=copies_crn, copies_remote_region_name=copies_remote_region_name, source_snapshot_id=source_snapshot_id, - source_snapshot_remote_region_name=source_snapshot_remote_region_name, + source_snapshot_remote_region_name= + source_snapshot_remote_region_name, source_volume_remote_region_name=source_volume_remote_region_name, source_image_remote_region_name=source_image_remote_region_name, clones_zone_name=clones_zone_name, @@ -24707,18 +26255,26 @@ def test_list_snapshots_all_params(self): assert 'source_image.id={}'.format(source_image_id) in query_string assert 'source_image.crn={}'.format(source_image_crn) in query_string assert 'sort={}'.format(sort) in query_string - assert 'backup_policy_plan.id={}'.format(backup_policy_plan_id) in query_string + assert 'backup_policy_plan.id={}'.format( + backup_policy_plan_id) in query_string assert 'copies[].id={}'.format(copies_id) in query_string assert 'copies[].name={}'.format(copies_name) in query_string assert 'copies[].crn={}'.format(copies_crn) in query_string - assert 'copies[].remote.region.name={}'.format(copies_remote_region_name) in query_string - assert 'source_snapshot.id={}'.format(source_snapshot_id) in query_string - assert 'source_snapshot.remote.region.name={}'.format(source_snapshot_remote_region_name) in query_string - assert 'source_volume.remote.region.name={}'.format(source_volume_remote_region_name) in query_string - assert 'source_image.remote.region.name={}'.format(source_image_remote_region_name) in query_string + assert 'copies[].remote.region.name={}'.format( + copies_remote_region_name) in query_string + assert 'source_snapshot.id={}'.format( + source_snapshot_id) in query_string + assert 'source_snapshot.remote.region.name={}'.format( + source_snapshot_remote_region_name) in query_string + assert 'source_volume.remote.region.name={}'.format( + source_volume_remote_region_name) in query_string + assert 'source_image.remote.region.name={}'.format( + source_image_remote_region_name) in query_string assert 'clones[].zone.name={}'.format(clones_zone_name) in query_string - assert 'snapshot_consistency_group.id={}'.format(snapshot_consistency_group_id) in query_string - assert 'snapshot_consistency_group.crn={}'.format(snapshot_consistency_group_crn) in query_string + assert 'snapshot_consistency_group.id={}'.format( + snapshot_consistency_group_id) in query_string + assert 'snapshot_consistency_group.crn={}'.format( + snapshot_consistency_group_crn) in query_string def test_list_snapshots_all_params_with_retries(self): # Enable retries and run test_list_snapshots_all_params. @@ -24736,7 +26292,7 @@ def test_list_snapshots_required_params(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}], "total_count": 132}' responses.add( responses.GET, url, @@ -24768,7 +26324,7 @@ def test_list_snapshots_value_error(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}], "total_count": 132}' responses.add( responses.GET, url, @@ -24778,10 +26334,12 @@ def test_list_snapshots_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_snapshots(**req_copy) @@ -24801,8 +26359,8 @@ def test_list_snapshots_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/snapshots') - mock_response1 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' - mock_response2 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"total_count":2,"limit":1}' + mock_response1 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' + mock_response2 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -24827,9 +26385,11 @@ def test_list_snapshots_with_pager_get_next(self): resource_group_id='testString', name='testString', source_volume_id='testString', - source_volume_crn='crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5', + source_volume_crn= + 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5', source_image_id='testString', - source_image_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8', + source_image_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8', sort='name', backup_policy_plan_id='testString', copies_id='testString', @@ -24842,7 +26402,8 @@ def test_list_snapshots_with_pager_get_next(self): source_image_remote_region_name='us-south', clones_zone_name='us-south-1', snapshot_consistency_group_id='testString', - snapshot_consistency_group_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263', + snapshot_consistency_group_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263', ) while pager.has_next(): next_page = pager.get_next() @@ -24857,8 +26418,8 @@ def test_list_snapshots_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/snapshots') - mock_response1 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' - mock_response2 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"total_count":2,"limit":1}' + mock_response1 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' + mock_response2 = '{"snapshots":[{"backup_policy_plan":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178","name":"my-policy-plan","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","catalog_offering":{"plan":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"}},"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"copies":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"allow_user_image_creation":true,"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"snapshot_consistency_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263","id":"r134-fa329f6b-0e36-433f-a3bb-0df632e79263","name":"my-snapshot-consistency-group","resource_type":"snapshot_consistency_group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","name":"my-snapshot","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"volume"},"user_tags":["user_tags"]}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -24882,9 +26443,11 @@ def test_list_snapshots_with_pager_get_all(self): resource_group_id='testString', name='testString', source_volume_id='testString', - source_volume_crn='crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5', + source_volume_crn= + 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5', source_image_id='testString', - source_image_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8', + source_image_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8', sort='name', backup_policy_plan_id='testString', copies_id='testString', @@ -24897,7 +26460,8 @@ def test_list_snapshots_with_pager_get_all(self): source_image_remote_region_name='us-south', clones_zone_name='us-south-1', snapshot_consistency_group_id='testString', - snapshot_consistency_group_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263', + snapshot_consistency_group_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263', ) all_results = pager.get_all() assert all_results is not None @@ -24916,7 +26480,7 @@ def test_create_snapshot_all_params(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' + mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' responses.add( responses.POST, url, @@ -24939,13 +26503,15 @@ def test_create_snapshot_all_params(self): # Construct a dict representation of a VolumeIdentityById model volume_identity_model = {} - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a dict representation of a SnapshotPrototypeSnapshotBySourceVolume model snapshot_prototype_model = {} snapshot_prototype_model['clones'] = [snapshot_clone_prototype_model] snapshot_prototype_model['name'] = 'my-snapshot' - snapshot_prototype_model['resource_group'] = resource_group_identity_model + snapshot_prototype_model[ + 'resource_group'] = resource_group_identity_model snapshot_prototype_model['user_tags'] = [] snapshot_prototype_model['source_volume'] = volume_identity_model @@ -24981,7 +26547,7 @@ def test_create_snapshot_value_error(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' + mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' responses.add( responses.POST, url, @@ -25004,13 +26570,15 @@ def test_create_snapshot_value_error(self): # Construct a dict representation of a VolumeIdentityById model volume_identity_model = {} - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a dict representation of a SnapshotPrototypeSnapshotBySourceVolume model snapshot_prototype_model = {} snapshot_prototype_model['clones'] = [snapshot_clone_prototype_model] snapshot_prototype_model['name'] = 'my-snapshot' - snapshot_prototype_model['resource_group'] = resource_group_identity_model + snapshot_prototype_model[ + 'resource_group'] = resource_group_identity_model snapshot_prototype_model['user_tags'] = [] snapshot_prototype_model['source_volume'] = volume_identity_model @@ -25022,7 +26590,10 @@ def test_create_snapshot_value_error(self): "snapshot_prototype": snapshot_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_snapshot(**req_copy) @@ -25051,7 +26622,7 @@ def test_delete_snapshot_all_params(self): responses.add( responses.DELETE, url, - status=204, + status=202, ) # Set up parameter values @@ -25067,7 +26638,7 @@ def test_delete_snapshot_all_params(self): # Check for correct operation assert len(responses.calls) == 1 - assert response.status_code == 204 + assert response.status_code == 202 def test_delete_snapshot_all_params_with_retries(self): # Enable retries and run test_delete_snapshot_all_params. @@ -25088,7 +26659,7 @@ def test_delete_snapshot_required_params(self): responses.add( responses.DELETE, url, - status=204, + status=202, ) # Set up parameter values @@ -25102,7 +26673,7 @@ def test_delete_snapshot_required_params(self): # Check for correct operation assert len(responses.calls) == 1 - assert response.status_code == 204 + assert response.status_code == 202 def test_delete_snapshot_required_params_with_retries(self): # Enable retries and run test_delete_snapshot_required_params. @@ -25123,7 +26694,7 @@ def test_delete_snapshot_value_error(self): responses.add( responses.DELETE, url, - status=204, + status=202, ) # Set up parameter values @@ -25134,7 +26705,10 @@ def test_delete_snapshot_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_snapshot(**req_copy) @@ -25160,7 +26734,7 @@ def test_get_snapshot_all_params(self): """ # Set up mock url = preprocess_url('/snapshots/testString') - mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' + mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' responses.add( responses.GET, url, @@ -25198,7 +26772,7 @@ def test_get_snapshot_value_error(self): """ # Set up mock url = preprocess_url('/snapshots/testString') - mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' + mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' responses.add( responses.GET, url, @@ -25215,7 +26789,10 @@ def test_get_snapshot_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_snapshot(**req_copy) @@ -25241,7 +26818,7 @@ def test_update_snapshot_all_params(self): """ # Set up mock url = preprocess_url('/snapshots/testString') - mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' + mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' responses.add( responses.PATCH, url, @@ -25291,7 +26868,7 @@ def test_update_snapshot_required_params(self): """ # Set up mock url = preprocess_url('/snapshots/testString') - mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' + mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' responses.add( responses.PATCH, url, @@ -25339,7 +26916,7 @@ def test_update_snapshot_value_error(self): """ # Set up mock url = preprocess_url('/snapshots/testString') - mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' + mock_response = '{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "catalog_offering": {"plan": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}}, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "copies": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"allow_user_image_creation": true, "architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "snapshot_consistency_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "id": "r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot-consistency-group", "resource_type": "snapshot_consistency_group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "name": "my-snapshot", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "volume"}, "user_tags": ["user_tags"]}' responses.add( responses.PATCH, url, @@ -25363,7 +26940,10 @@ def test_update_snapshot_value_error(self): "snapshot_patch": snapshot_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_snapshot(**req_copy) @@ -25444,7 +27024,10 @@ def test_list_snapshot_clones_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_snapshot_clones(**req_copy) @@ -25523,7 +27106,10 @@ def test_delete_snapshot_clone_value_error(self): "zone_name": zone_name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_snapshot_clone(**req_copy) @@ -25608,7 +27194,10 @@ def test_get_snapshot_clone_value_error(self): "zone_name": zone_name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_snapshot_clone(**req_copy) @@ -25693,7 +27282,10 @@ def test_create_snapshot_clone_value_error(self): "zone_name": zone_name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_snapshot_clone(**req_copy) @@ -25751,7 +27343,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -25759,9 +27355,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListShareProfiles: @@ -25866,10 +27460,12 @@ def test_list_share_profiles_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_share_profiles(**req_copy) @@ -26021,7 +27617,10 @@ def test_get_share_profile_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_share_profile(**req_copy) @@ -26047,7 +27646,7 @@ def test_list_shares_all_params(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -26104,7 +27703,7 @@ def test_list_shares_required_params(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -26136,7 +27735,7 @@ def test_list_shares_value_error(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -26146,10 +27745,12 @@ def test_list_shares_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_shares(**req_copy) @@ -26169,8 +27770,8 @@ def test_list_shares_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/shares') - mock_response1 = '{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' - mock_response2 = '{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"shares":[{"access_control_mode":"security_group","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","resource_type":"share_accessor_binding"}],"allowed_transit_encryption_modes":["none"],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_reasons":[{"code":"origin_share_access_revoked","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","origin_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' + mock_response2 = '{"shares":[{"access_control_mode":"security_group","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","resource_type":"share_accessor_binding"}],"allowed_transit_encryption_modes":["none"],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_reasons":[{"code":"origin_share_access_revoked","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","origin_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -26209,8 +27810,8 @@ def test_list_shares_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/shares') - mock_response1 = '{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' - mock_response2 = '{"shares":[{"access_control_mode":"security_group","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"shares":[{"access_control_mode":"security_group","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","resource_type":"share_accessor_binding"}],"allowed_transit_encryption_modes":["none"],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_reasons":[{"code":"origin_share_access_revoked","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","origin_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' + mock_response2 = '{"shares":[{"access_control_mode":"security_group","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","resource_type":"share_accessor_binding"}],"allowed_transit_encryption_modes":["none"],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","iops":100,"latest_job":{"status":"cancelled","status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"type":"replication_failover"},"latest_sync":{"completed_at":"2019-01-01T12:00:00.000Z","data_transferred":0,"started_at":"2019-01-01T12:00:00.000Z"},"lifecycle_reasons":[{"code":"origin_share_access_revoked","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","mount_targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"}],"name":"my-share","origin_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops","name":"tier-3iops","resource_type":"share_profile"},"replica_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"replication_cron_spec":"0 */5 * * *","replication_role":"none","replication_status":"active","replication_status_reasons":[{"code":"cannot_reach_source_share","message":"The replication failover failed because the source share cannot be reached.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share","size":200,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"user_tags":["user_tags"],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -26252,7 +27853,7 @@ def test_create_share_all_params(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -26269,9 +27870,12 @@ def test_create_share_all_params(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -26279,7 +27883,8 @@ def test_create_share_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -26287,21 +27892,34 @@ def test_create_share_all_params(self): # Construct a dict representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model share_mount_target_virtual_network_interface_prototype_model = {} - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model share_mount_target_prototype_model = {} share_mount_target_prototype_model['name'] = 'my-share-mount-target' share_mount_target_prototype_model['transit_encryption'] = 'none' - share_mount_target_prototype_model['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model # Construct a dict representation of a ShareProfileIdentityByName model share_profile_identity_model = {} @@ -26313,18 +27931,26 @@ def test_create_share_all_params(self): # Construct a dict representation of a SharePrototypeShareContext model share_prototype_share_context_model = {} + share_prototype_share_context_model[ + 'allowed_transit_encryption_modes'] = ['none'] share_prototype_share_context_model['iops'] = 100 - share_prototype_share_context_model['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_context_model['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_share_context_model['name'] = 'my-share' - share_prototype_share_context_model['profile'] = share_profile_identity_model - share_prototype_share_context_model['replication_cron_spec'] = '0 */5 * * *' - share_prototype_share_context_model['resource_group'] = resource_group_identity_model + share_prototype_share_context_model[ + 'profile'] = share_profile_identity_model + share_prototype_share_context_model[ + 'replication_cron_spec'] = '0 */5 * * *' + share_prototype_share_context_model[ + 'resource_group'] = resource_group_identity_model share_prototype_share_context_model['user_tags'] = [] share_prototype_share_context_model['zone'] = zone_identity_model # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a ShareInitialOwner model share_initial_owner_model = {} @@ -26333,18 +27959,22 @@ def test_create_share_all_params(self): # Construct a dict representation of a SharePrototypeShareBySize model share_prototype_model = {} - share_prototype_model['iops'] = 100 - share_prototype_model['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_model['allowed_transit_encryption_modes'] = ['none'] + share_prototype_model['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_model['name'] = 'my-share' - share_prototype_model['profile'] = share_profile_identity_model - share_prototype_model['replica_share'] = share_prototype_share_context_model + share_prototype_model[ + 'replica_share'] = share_prototype_share_context_model share_prototype_model['user_tags'] = [] - share_prototype_model['zone'] = zone_identity_model share_prototype_model['access_control_mode'] = 'security_group' share_prototype_model['encryption_key'] = encryption_key_identity_model share_prototype_model['initial_owner'] = share_initial_owner_model + share_prototype_model['iops'] = 100 + share_prototype_model['profile'] = share_profile_identity_model share_prototype_model['resource_group'] = resource_group_identity_model share_prototype_model['size'] = 200 + share_prototype_model['zone'] = zone_identity_model # Set up parameter values share_prototype = share_prototype_model @@ -26378,7 +28008,7 @@ def test_create_share_value_error(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -26395,9 +28025,12 @@ def test_create_share_value_error(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -26405,7 +28038,8 @@ def test_create_share_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -26413,21 +28047,34 @@ def test_create_share_value_error(self): # Construct a dict representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model share_mount_target_virtual_network_interface_prototype_model = {} - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model share_mount_target_prototype_model = {} share_mount_target_prototype_model['name'] = 'my-share-mount-target' share_mount_target_prototype_model['transit_encryption'] = 'none' - share_mount_target_prototype_model['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model # Construct a dict representation of a ShareProfileIdentityByName model share_profile_identity_model = {} @@ -26439,18 +28086,26 @@ def test_create_share_value_error(self): # Construct a dict representation of a SharePrototypeShareContext model share_prototype_share_context_model = {} + share_prototype_share_context_model[ + 'allowed_transit_encryption_modes'] = ['none'] share_prototype_share_context_model['iops'] = 100 - share_prototype_share_context_model['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_context_model['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_share_context_model['name'] = 'my-share' - share_prototype_share_context_model['profile'] = share_profile_identity_model - share_prototype_share_context_model['replication_cron_spec'] = '0 */5 * * *' - share_prototype_share_context_model['resource_group'] = resource_group_identity_model + share_prototype_share_context_model[ + 'profile'] = share_profile_identity_model + share_prototype_share_context_model[ + 'replication_cron_spec'] = '0 */5 * * *' + share_prototype_share_context_model[ + 'resource_group'] = resource_group_identity_model share_prototype_share_context_model['user_tags'] = [] share_prototype_share_context_model['zone'] = zone_identity_model # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a ShareInitialOwner model share_initial_owner_model = {} @@ -26459,18 +28114,22 @@ def test_create_share_value_error(self): # Construct a dict representation of a SharePrototypeShareBySize model share_prototype_model = {} - share_prototype_model['iops'] = 100 - share_prototype_model['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_model['allowed_transit_encryption_modes'] = ['none'] + share_prototype_model['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_model['name'] = 'my-share' - share_prototype_model['profile'] = share_profile_identity_model - share_prototype_model['replica_share'] = share_prototype_share_context_model + share_prototype_model[ + 'replica_share'] = share_prototype_share_context_model share_prototype_model['user_tags'] = [] - share_prototype_model['zone'] = zone_identity_model share_prototype_model['access_control_mode'] = 'security_group' share_prototype_model['encryption_key'] = encryption_key_identity_model share_prototype_model['initial_owner'] = share_initial_owner_model + share_prototype_model['iops'] = 100 + share_prototype_model['profile'] = share_profile_identity_model share_prototype_model['resource_group'] = resource_group_identity_model share_prototype_model['size'] = 200 + share_prototype_model['zone'] = zone_identity_model # Set up parameter values share_prototype = share_prototype_model @@ -26480,7 +28139,10 @@ def test_create_share_value_error(self): "share_prototype": share_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_share(**req_copy) @@ -26506,7 +28168,7 @@ def test_delete_share_all_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.DELETE, url, @@ -26546,7 +28208,7 @@ def test_delete_share_required_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.DELETE, url, @@ -26584,7 +28246,7 @@ def test_delete_share_value_error(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.DELETE, url, @@ -26601,7 +28263,10 @@ def test_delete_share_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_share(**req_copy) @@ -26627,7 +28292,7 @@ def test_get_share_all_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -26665,7 +28330,7 @@ def test_get_share_value_error(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -26682,7 +28347,10 @@ def test_get_share_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_share(**req_copy) @@ -26708,7 +28376,7 @@ def test_update_share_all_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -26724,6 +28392,7 @@ def test_update_share_all_params(self): # Construct a dict representation of a SharePatch model share_patch_model = {} share_patch_model['access_control_mode'] = 'security_group' + share_patch_model['allowed_transit_encryption_modes'] = ['none'] share_patch_model['iops'] = 100 share_patch_model['name'] = 'my-share' share_patch_model['profile'] = share_profile_identity_model @@ -26767,7 +28436,7 @@ def test_update_share_required_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -26783,6 +28452,7 @@ def test_update_share_required_params(self): # Construct a dict representation of a SharePatch model share_patch_model = {} share_patch_model['access_control_mode'] = 'security_group' + share_patch_model['allowed_transit_encryption_modes'] = ['none'] share_patch_model['iops'] = 100 share_patch_model['name'] = 'my-share' share_patch_model['profile'] = share_profile_identity_model @@ -26824,7 +28494,7 @@ def test_update_share_value_error(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "resource_type": "share_accessor_binding"}], "allowed_transit_encryption_modes": ["none"], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "iops": 100, "latest_job": {"status": "cancelled", "status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "type": "replication_failover"}, "latest_sync": {"completed_at": "2019-01-01T12:00:00.000Z", "data_transferred": 0, "started_at": "2019-01-01T12:00:00.000Z"}, "lifecycle_reasons": [{"code": "origin_share_access_revoked", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "mount_targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}], "name": "my-share", "origin_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops", "name": "tier-3iops", "resource_type": "share_profile"}, "replica_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "replication_cron_spec": "0 */5 * * *", "replication_role": "none", "replication_status": "active", "replication_status_reasons": [{"code": "cannot_reach_source_share", "message": "The replication failover failed because the source share cannot be reached.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share", "size": 200, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "user_tags": ["user_tags"], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -26840,6 +28510,7 @@ def test_update_share_value_error(self): # Construct a dict representation of a SharePatch model share_patch_model = {} share_patch_model['access_control_mode'] = 'security_group' + share_patch_model['allowed_transit_encryption_modes'] = ['none'] share_patch_model['iops'] = 100 share_patch_model['name'] = 'my-share' share_patch_model['profile'] = share_profile_identity_model @@ -26857,7 +28528,10 @@ def test_update_share_value_error(self): "share_patch": share_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_share(**req_copy) @@ -26871,6 +28545,378 @@ def test_update_share_value_error_with_retries(self): self.test_update_share_value_error() +class TestListShareAccessorBindings: + """ + Test Class for list_share_accessor_bindings + """ + + @responses.activate + def test_list_share_accessor_bindings_all_params(self): + """ + list_share_accessor_bindings() + """ + # Set up mock + url = preprocess_url('/shares/testString/accessor_bindings') + mock_response = '{"accessor_bindings": [{"accessor": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "share_accessor_binding"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + id = 'testString' + start = 'testString' + limit = 50 + + # Invoke method + response = _service.list_share_accessor_bindings( + id, + start=start, + limit=limit, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + # Validate query params + query_string = responses.calls[0].request.url.split('?', 1)[1] + query_string = urllib.parse.unquote_plus(query_string) + assert 'start={}'.format(start) in query_string + assert 'limit={}'.format(limit) in query_string + + def test_list_share_accessor_bindings_all_params_with_retries(self): + # Enable retries and run test_list_share_accessor_bindings_all_params. + _service.enable_retries() + self.test_list_share_accessor_bindings_all_params() + + # Disable retries and run test_list_share_accessor_bindings_all_params. + _service.disable_retries() + self.test_list_share_accessor_bindings_all_params() + + @responses.activate + def test_list_share_accessor_bindings_required_params(self): + """ + test_list_share_accessor_bindings_required_params() + """ + # Set up mock + url = preprocess_url('/shares/testString/accessor_bindings') + mock_response = '{"accessor_bindings": [{"accessor": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "share_accessor_binding"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + id = 'testString' + + # Invoke method + response = _service.list_share_accessor_bindings( + id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_list_share_accessor_bindings_required_params_with_retries(self): + # Enable retries and run test_list_share_accessor_bindings_required_params. + _service.enable_retries() + self.test_list_share_accessor_bindings_required_params() + + # Disable retries and run test_list_share_accessor_bindings_required_params. + _service.disable_retries() + self.test_list_share_accessor_bindings_required_params() + + @responses.activate + def test_list_share_accessor_bindings_value_error(self): + """ + test_list_share_accessor_bindings_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/accessor_bindings') + mock_response = '{"accessor_bindings": [{"accessor": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "share_accessor_binding"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + id = 'testString' + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "id": id, + } + for param in req_param_dict.keys(): + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } + with pytest.raises(ValueError): + _service.list_share_accessor_bindings(**req_copy) + + def test_list_share_accessor_bindings_value_error_with_retries(self): + # Enable retries and run test_list_share_accessor_bindings_value_error. + _service.enable_retries() + self.test_list_share_accessor_bindings_value_error() + + # Disable retries and run test_list_share_accessor_bindings_value_error. + _service.disable_retries() + self.test_list_share_accessor_bindings_value_error() + + @responses.activate + def test_list_share_accessor_bindings_with_pager_get_next(self): + """ + test_list_share_accessor_bindings_with_pager_get_next() + """ + # Set up a two-page mock response + url = preprocess_url('/shares/testString/accessor_bindings') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"accessor_bindings":[{"accessor":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"share_accessor_binding"}],"total_count":2,"limit":1}' + mock_response2 = '{"accessor_bindings":[{"accessor":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"share_accessor_binding"}],"total_count":2,"limit":1}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + all_results = [] + pager = ShareAccessorBindingsPager( + client=_service, + id='testString', + limit=10, + ) + while pager.has_next(): + next_page = pager.get_next() + assert next_page is not None + all_results.extend(next_page) + assert len(all_results) == 2 + + @responses.activate + def test_list_share_accessor_bindings_with_pager_get_all(self): + """ + test_list_share_accessor_bindings_with_pager_get_all() + """ + # Set up a two-page mock response + url = preprocess_url('/shares/testString/accessor_bindings') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"accessor_bindings":[{"accessor":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"share_accessor_binding"}],"total_count":2,"limit":1}' + mock_response2 = '{"accessor_bindings":[{"accessor":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58","id":"0fe9e5d8-0a4d-4818-96ec-e99708644a58","name":"my-share","remote":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"share"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"share_accessor_binding"}],"total_count":2,"limit":1}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + pager = ShareAccessorBindingsPager( + client=_service, + id='testString', + limit=10, + ) + all_results = pager.get_all() + assert all_results is not None + assert len(all_results) == 2 + + +class TestDeleteShareAccessorBinding: + """ + Test Class for delete_share_accessor_binding + """ + + @responses.activate + def test_delete_share_accessor_binding_all_params(self): + """ + delete_share_accessor_binding() + """ + # Set up mock + url = preprocess_url('/shares/testString/accessor_bindings/testString') + responses.add( + responses.DELETE, + url, + status=204, + ) + + # Set up parameter values + share_id = 'testString' + id = 'testString' + + # Invoke method + response = _service.delete_share_accessor_binding( + share_id, + id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 204 + + def test_delete_share_accessor_binding_all_params_with_retries(self): + # Enable retries and run test_delete_share_accessor_binding_all_params. + _service.enable_retries() + self.test_delete_share_accessor_binding_all_params() + + # Disable retries and run test_delete_share_accessor_binding_all_params. + _service.disable_retries() + self.test_delete_share_accessor_binding_all_params() + + @responses.activate + def test_delete_share_accessor_binding_value_error(self): + """ + test_delete_share_accessor_binding_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/accessor_bindings/testString') + responses.add( + responses.DELETE, + url, + status=204, + ) + + # Set up parameter values + share_id = 'testString' + id = 'testString' + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "share_id": share_id, + "id": id, + } + for param in req_param_dict.keys(): + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } + with pytest.raises(ValueError): + _service.delete_share_accessor_binding(**req_copy) + + def test_delete_share_accessor_binding_value_error_with_retries(self): + # Enable retries and run test_delete_share_accessor_binding_value_error. + _service.enable_retries() + self.test_delete_share_accessor_binding_value_error() + + # Disable retries and run test_delete_share_accessor_binding_value_error. + _service.disable_retries() + self.test_delete_share_accessor_binding_value_error() + + +class TestGetShareAccessorBinding: + """ + Test Class for get_share_accessor_binding + """ + + @responses.activate + def test_get_share_accessor_binding_all_params(self): + """ + get_share_accessor_binding() + """ + # Set up mock + url = preprocess_url('/shares/testString/accessor_bindings/testString') + mock_response = '{"accessor": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "share_accessor_binding"}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + share_id = 'testString' + id = 'testString' + + # Invoke method + response = _service.get_share_accessor_binding( + share_id, + id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_get_share_accessor_binding_all_params_with_retries(self): + # Enable retries and run test_get_share_accessor_binding_all_params. + _service.enable_retries() + self.test_get_share_accessor_binding_all_params() + + # Disable retries and run test_get_share_accessor_binding_all_params. + _service.disable_retries() + self.test_get_share_accessor_binding_all_params() + + @responses.activate + def test_get_share_accessor_binding_value_error(self): + """ + test_get_share_accessor_binding_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/accessor_bindings/testString') + mock_response = '{"accessor": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "share_accessor_binding"}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + share_id = 'testString' + id = 'testString' + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "share_id": share_id, + "id": id, + } + for param in req_param_dict.keys(): + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } + with pytest.raises(ValueError): + _service.get_share_accessor_binding(**req_copy) + + def test_get_share_accessor_binding_value_error_with_retries(self): + # Enable retries and run test_get_share_accessor_binding_value_error. + _service.enable_retries() + self.test_get_share_accessor_binding_value_error() + + # Disable retries and run test_get_share_accessor_binding_value_error. + _service.disable_retries() + self.test_get_share_accessor_binding_value_error() + + class TestFailoverShare: """ Test Class for failover_share @@ -26975,7 +29021,10 @@ def test_failover_share_value_error(self): "share_id": share_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.failover_share(**req_copy) @@ -27106,7 +29155,10 @@ def test_list_share_mount_targets_value_error(self): "share_id": share_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_share_mount_targets(**req_copy) @@ -27222,9 +29274,12 @@ def test_create_share_mount_target_all_params(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -27232,7 +29287,8 @@ def test_create_share_mount_target_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -27240,21 +29296,34 @@ def test_create_share_mount_target_all_params(self): # Construct a dict representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model share_mount_target_virtual_network_interface_prototype_model = {} - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model share_mount_target_prototype_model = {} share_mount_target_prototype_model['name'] = 'my-share-mount-target' share_mount_target_prototype_model['transit_encryption'] = 'none' - share_mount_target_prototype_model['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model # Set up parameter values share_id = 'testString' @@ -27307,9 +29376,12 @@ def test_create_share_mount_target_value_error(self): # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -27317,7 +29389,8 @@ def test_create_share_mount_target_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -27325,21 +29398,34 @@ def test_create_share_mount_target_value_error(self): # Construct a dict representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model share_mount_target_virtual_network_interface_prototype_model = {} - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model # Construct a dict representation of a ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model share_mount_target_prototype_model = {} share_mount_target_prototype_model['name'] = 'my-share-mount-target' share_mount_target_prototype_model['transit_encryption'] = 'none' - share_mount_target_prototype_model['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model # Set up parameter values share_id = 'testString' @@ -27351,7 +29437,10 @@ def test_create_share_mount_target_value_error(self): "share_mount_target_prototype": share_mount_target_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_share_mount_target(**req_copy) @@ -27436,7 +29525,10 @@ def test_delete_share_mount_target_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_share_mount_target(**req_copy) @@ -27521,7 +29613,10 @@ def test_get_share_mount_target_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_share_mount_target(**req_copy) @@ -27621,7 +29716,10 @@ def test_update_share_mount_target_value_error(self): "share_mount_target_patch": share_mount_target_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_share_mount_target(**req_copy) @@ -27696,7 +29794,10 @@ def test_delete_share_source_value_error(self): "share_id": share_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_share_source(**req_copy) @@ -27722,7 +29823,7 @@ def test_get_share_source_all_params(self): """ # Set up mock url = preprocess_url('/shares/testString/source') - mock_response = '{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}' + mock_response = '{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}' responses.add( responses.GET, url, @@ -27760,7 +29861,7 @@ def test_get_share_source_value_error(self): """ # Set up mock url = preprocess_url('/shares/testString/source') - mock_response = '{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}' + mock_response = '{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58", "id": "0fe9e5d8-0a4d-4818-96ec-e99708644a58", "name": "my-share", "remote": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "share"}' responses.add( responses.GET, url, @@ -27777,7 +29878,10 @@ def test_get_share_source_value_error(self): "share_id": share_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_share_source(**req_copy) @@ -27835,7 +29939,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -27843,9 +29951,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListBackupPolicies: @@ -27956,10 +30062,12 @@ def test_list_backup_policies_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_backup_policies(**req_copy) @@ -28076,16 +30184,20 @@ def test_create_backup_policy_all_params(self): # Construct a dict representation of a BackupPolicyPlanClonePolicyPrototype model backup_policy_plan_clone_policy_prototype_model = {} backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model['zones'] = [ + zone_identity_model + ] # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPrototype model backup_policy_plan_deletion_trigger_prototype_model = {} backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model[ + 'delete_over_count'] = 20 # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a RegionIdentityByName model region_identity_model = {} @@ -28093,20 +30205,29 @@ def test_create_backup_policy_all_params(self): # Construct a dict representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model = {} - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Construct a dict representation of a BackupPolicyPlanPrototype model backup_policy_plan_prototype_model = {} backup_policy_plan_prototype_model['active'] = True - backup_policy_plan_prototype_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_prototype_model['clone_policy'] = backup_policy_plan_clone_policy_prototype_model + backup_policy_plan_prototype_model['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_prototype_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_prototype_model backup_policy_plan_prototype_model['copy_user_tags'] = True backup_policy_plan_prototype_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_prototype_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model + backup_policy_plan_prototype_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model backup_policy_plan_prototype_model['name'] = 'my-policy-plan' - backup_policy_plan_prototype_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_prototype_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -28114,15 +30235,22 @@ def test_create_backup_policy_all_params(self): # Construct a dict representation of a BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backup_policy_scope_prototype_model = {} - backup_policy_scope_prototype_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_prototype_model[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' # Construct a dict representation of a BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backup_policy_prototype_model = {} - backup_policy_prototype_model['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_prototype_model['match_user_tags'] = [ + 'my-daily-backup-policy' + ] backup_policy_prototype_model['name'] = 'my-backup-policy' - backup_policy_prototype_model['plans'] = [backup_policy_plan_prototype_model] - backup_policy_prototype_model['resource_group'] = resource_group_identity_model - backup_policy_prototype_model['scope'] = backup_policy_scope_prototype_model + backup_policy_prototype_model['plans'] = [ + backup_policy_plan_prototype_model + ] + backup_policy_prototype_model[ + 'resource_group'] = resource_group_identity_model + backup_policy_prototype_model[ + 'scope'] = backup_policy_scope_prototype_model backup_policy_prototype_model['match_resource_type'] = 'volume' # Set up parameter values @@ -28173,16 +30301,20 @@ def test_create_backup_policy_value_error(self): # Construct a dict representation of a BackupPolicyPlanClonePolicyPrototype model backup_policy_plan_clone_policy_prototype_model = {} backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model['zones'] = [ + zone_identity_model + ] # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPrototype model backup_policy_plan_deletion_trigger_prototype_model = {} backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model[ + 'delete_over_count'] = 20 # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a RegionIdentityByName model region_identity_model = {} @@ -28190,20 +30322,29 @@ def test_create_backup_policy_value_error(self): # Construct a dict representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model = {} - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Construct a dict representation of a BackupPolicyPlanPrototype model backup_policy_plan_prototype_model = {} backup_policy_plan_prototype_model['active'] = True - backup_policy_plan_prototype_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_prototype_model['clone_policy'] = backup_policy_plan_clone_policy_prototype_model + backup_policy_plan_prototype_model['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_prototype_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_prototype_model backup_policy_plan_prototype_model['copy_user_tags'] = True backup_policy_plan_prototype_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_prototype_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model + backup_policy_plan_prototype_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model backup_policy_plan_prototype_model['name'] = 'my-policy-plan' - backup_policy_plan_prototype_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_prototype_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -28211,15 +30352,22 @@ def test_create_backup_policy_value_error(self): # Construct a dict representation of a BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backup_policy_scope_prototype_model = {} - backup_policy_scope_prototype_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_prototype_model[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' # Construct a dict representation of a BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backup_policy_prototype_model = {} - backup_policy_prototype_model['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_prototype_model['match_user_tags'] = [ + 'my-daily-backup-policy' + ] backup_policy_prototype_model['name'] = 'my-backup-policy' - backup_policy_prototype_model['plans'] = [backup_policy_plan_prototype_model] - backup_policy_prototype_model['resource_group'] = resource_group_identity_model - backup_policy_prototype_model['scope'] = backup_policy_scope_prototype_model + backup_policy_prototype_model['plans'] = [ + backup_policy_plan_prototype_model + ] + backup_policy_prototype_model[ + 'resource_group'] = resource_group_identity_model + backup_policy_prototype_model[ + 'scope'] = backup_policy_scope_prototype_model backup_policy_prototype_model['match_resource_type'] = 'volume' # Set up parameter values @@ -28230,7 +30378,10 @@ def test_create_backup_policy_value_error(self): "backup_policy_prototype": backup_policy_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_backup_policy(**req_copy) @@ -28297,13 +30448,16 @@ def test_list_backup_policy_jobs_all_params(self): query_string = responses.calls[0].request.url.split('?', 1)[1] query_string = urllib.parse.unquote_plus(query_string) assert 'status={}'.format(status) in query_string - assert 'backup_policy_plan.id={}'.format(backup_policy_plan_id) in query_string + assert 'backup_policy_plan.id={}'.format( + backup_policy_plan_id) in query_string assert 'start={}'.format(start) in query_string assert 'limit={}'.format(limit) in query_string assert 'sort={}'.format(sort) in query_string assert 'source.id={}'.format(source_id) in query_string - assert 'target_snapshots[].id={}'.format(target_snapshots_id) in query_string - assert 'target_snapshots[].crn={}'.format(target_snapshots_crn) in query_string + assert 'target_snapshots[].id={}'.format( + target_snapshots_id) in query_string + assert 'target_snapshots[].crn={}'.format( + target_snapshots_crn) in query_string def test_list_backup_policy_jobs_all_params_with_retries(self): # Enable retries and run test_list_backup_policy_jobs_all_params. @@ -28376,7 +30530,10 @@ def test_list_backup_policy_jobs_value_error(self): "backup_policy_id": backup_policy_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_backup_policy_jobs(**req_copy) @@ -28424,7 +30581,8 @@ def test_list_backup_policy_jobs_with_pager_get_next(self): sort='name', source_id='testString', target_snapshots_id='testString', - target_snapshots_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263', + target_snapshots_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263', ) while pager.has_next(): next_page = pager.get_next() @@ -28466,7 +30624,8 @@ def test_list_backup_policy_jobs_with_pager_get_all(self): sort='name', source_id='testString', target_snapshots_id='testString', - target_snapshots_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263', + target_snapshots_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263', ) all_results = pager.get_all() assert all_results is not None @@ -28544,7 +30703,10 @@ def test_get_backup_policy_job_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_backup_policy_job(**req_copy) @@ -28669,7 +30831,10 @@ def test_list_backup_policy_plans_value_error(self): "backup_policy_id": backup_policy_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_backup_policy_plans(**req_copy) @@ -28711,16 +30876,20 @@ def test_create_backup_policy_plan_all_params(self): # Construct a dict representation of a BackupPolicyPlanClonePolicyPrototype model backup_policy_plan_clone_policy_prototype_model = {} backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model['zones'] = [ + zone_identity_model + ] # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPrototype model backup_policy_plan_deletion_trigger_prototype_model = {} backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model[ + 'delete_over_count'] = 20 # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a RegionIdentityByName model region_identity_model = {} @@ -28728,9 +30897,12 @@ def test_create_backup_policy_plan_all_params(self): # Construct a dict representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model = {} - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Set up parameter values backup_policy_id = 'testString' @@ -28741,7 +30913,9 @@ def test_create_backup_policy_plan_all_params(self): copy_user_tags = True deletion_trigger = backup_policy_plan_deletion_trigger_prototype_model name = 'my-policy-plan' - remote_region_policies = [backup_policy_plan_remote_region_policy_prototype_model] + remote_region_policies = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Invoke method response = _service.create_backup_policy_plan( @@ -28765,11 +30939,15 @@ def test_create_backup_policy_plan_all_params(self): assert req_body['cron_spec'] == '30 */2 * * 1-5' assert req_body['active'] == True assert req_body['attach_user_tags'] == ['my-daily-backup-plan'] - assert req_body['clone_policy'] == backup_policy_plan_clone_policy_prototype_model + assert req_body[ + 'clone_policy'] == backup_policy_plan_clone_policy_prototype_model assert req_body['copy_user_tags'] == True - assert req_body['deletion_trigger'] == backup_policy_plan_deletion_trigger_prototype_model + assert req_body[ + 'deletion_trigger'] == backup_policy_plan_deletion_trigger_prototype_model assert req_body['name'] == 'my-policy-plan' - assert req_body['remote_region_policies'] == [backup_policy_plan_remote_region_policy_prototype_model] + assert req_body['remote_region_policies'] == [ + backup_policy_plan_remote_region_policy_prototype_model + ] def test_create_backup_policy_plan_all_params_with_retries(self): # Enable retries and run test_create_backup_policy_plan_all_params. @@ -28803,16 +30981,20 @@ def test_create_backup_policy_plan_value_error(self): # Construct a dict representation of a BackupPolicyPlanClonePolicyPrototype model backup_policy_plan_clone_policy_prototype_model = {} backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model['zones'] = [ + zone_identity_model + ] # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPrototype model backup_policy_plan_deletion_trigger_prototype_model = {} backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model[ + 'delete_over_count'] = 20 # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a RegionIdentityByName model region_identity_model = {} @@ -28820,9 +31002,12 @@ def test_create_backup_policy_plan_value_error(self): # Construct a dict representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model = {} - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Set up parameter values backup_policy_id = 'testString' @@ -28833,7 +31018,9 @@ def test_create_backup_policy_plan_value_error(self): copy_user_tags = True deletion_trigger = backup_policy_plan_deletion_trigger_prototype_model name = 'my-policy-plan' - remote_region_policies = [backup_policy_plan_remote_region_policy_prototype_model] + remote_region_policies = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -28841,7 +31028,10 @@ def test_create_backup_policy_plan_value_error(self): "cron_spec": cron_spec, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_backup_policy_plan(**req_copy) @@ -28968,7 +31158,10 @@ def test_delete_backup_policy_plan_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_backup_policy_plan(**req_copy) @@ -29053,7 +31246,10 @@ def test_get_backup_policy_plan_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_backup_policy_plan(**req_copy) @@ -29095,7 +31291,9 @@ def test_update_backup_policy_plan_all_params(self): # Construct a dict representation of a BackupPolicyPlanClonePolicyPatch model backup_policy_plan_clone_policy_patch_model = {} backup_policy_plan_clone_policy_patch_model['max_snapshots'] = 1 - backup_policy_plan_clone_policy_patch_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_patch_model['zones'] = [ + zone_identity_model + ] # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPatch model backup_policy_plan_deletion_trigger_patch_model = {} @@ -29104,7 +31302,8 @@ def test_update_backup_policy_plan_all_params(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a RegionIdentityByName model region_identity_model = {} @@ -29112,20 +31311,29 @@ def test_update_backup_policy_plan_all_params(self): # Construct a dict representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model = {} - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Construct a dict representation of a BackupPolicyPlanPatch model backup_policy_plan_patch_model = {} backup_policy_plan_patch_model['active'] = True - backup_policy_plan_patch_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_patch_model['clone_policy'] = backup_policy_plan_clone_policy_patch_model + backup_policy_plan_patch_model['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_patch_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_patch_model backup_policy_plan_patch_model['copy_user_tags'] = True backup_policy_plan_patch_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_patch_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model + backup_policy_plan_patch_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model backup_policy_plan_patch_model['name'] = 'my-policy-plan' - backup_policy_plan_patch_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_patch_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Set up parameter values backup_policy_id = 'testString' @@ -29181,7 +31389,9 @@ def test_update_backup_policy_plan_required_params(self): # Construct a dict representation of a BackupPolicyPlanClonePolicyPatch model backup_policy_plan_clone_policy_patch_model = {} backup_policy_plan_clone_policy_patch_model['max_snapshots'] = 1 - backup_policy_plan_clone_policy_patch_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_patch_model['zones'] = [ + zone_identity_model + ] # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPatch model backup_policy_plan_deletion_trigger_patch_model = {} @@ -29190,7 +31400,8 @@ def test_update_backup_policy_plan_required_params(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a RegionIdentityByName model region_identity_model = {} @@ -29198,20 +31409,29 @@ def test_update_backup_policy_plan_required_params(self): # Construct a dict representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model = {} - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Construct a dict representation of a BackupPolicyPlanPatch model backup_policy_plan_patch_model = {} backup_policy_plan_patch_model['active'] = True - backup_policy_plan_patch_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_patch_model['clone_policy'] = backup_policy_plan_clone_policy_patch_model + backup_policy_plan_patch_model['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_patch_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_patch_model backup_policy_plan_patch_model['copy_user_tags'] = True backup_policy_plan_patch_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_patch_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model + backup_policy_plan_patch_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model backup_policy_plan_patch_model['name'] = 'my-policy-plan' - backup_policy_plan_patch_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_patch_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Set up parameter values backup_policy_id = 'testString' @@ -29265,7 +31485,9 @@ def test_update_backup_policy_plan_value_error(self): # Construct a dict representation of a BackupPolicyPlanClonePolicyPatch model backup_policy_plan_clone_policy_patch_model = {} backup_policy_plan_clone_policy_patch_model['max_snapshots'] = 1 - backup_policy_plan_clone_policy_patch_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_patch_model['zones'] = [ + zone_identity_model + ] # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPatch model backup_policy_plan_deletion_trigger_patch_model = {} @@ -29274,7 +31496,8 @@ def test_update_backup_policy_plan_value_error(self): # Construct a dict representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_model = {} - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a dict representation of a RegionIdentityByName model region_identity_model = {} @@ -29282,20 +31505,29 @@ def test_update_backup_policy_plan_value_error(self): # Construct a dict representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model = {} - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Construct a dict representation of a BackupPolicyPlanPatch model backup_policy_plan_patch_model = {} backup_policy_plan_patch_model['active'] = True - backup_policy_plan_patch_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_patch_model['clone_policy'] = backup_policy_plan_clone_policy_patch_model + backup_policy_plan_patch_model['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_patch_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_patch_model backup_policy_plan_patch_model['copy_user_tags'] = True backup_policy_plan_patch_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_patch_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model + backup_policy_plan_patch_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model backup_policy_plan_patch_model['name'] = 'my-policy-plan' - backup_policy_plan_patch_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_patch_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Set up parameter values backup_policy_id = 'testString' @@ -29309,7 +31541,10 @@ def test_update_backup_policy_plan_value_error(self): "backup_policy_plan_patch": backup_policy_plan_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_backup_policy_plan(**req_copy) @@ -29430,7 +31665,10 @@ def test_delete_backup_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_backup_policy(**req_copy) @@ -29511,7 +31749,10 @@ def test_get_backup_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_backup_policy(**req_copy) @@ -29549,7 +31790,9 @@ def test_update_backup_policy_all_params(self): # Construct a dict representation of a BackupPolicyPatch model backup_policy_patch_model = {} backup_policy_patch_model['included_content'] = ['data_volumes'] - backup_policy_patch_model['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_patch_model['match_user_tags'] = [ + 'my-daily-backup-policy' + ] backup_policy_patch_model['name'] = 'my-backup-policy' # Set up parameter values @@ -29600,7 +31843,9 @@ def test_update_backup_policy_required_params(self): # Construct a dict representation of a BackupPolicyPatch model backup_policy_patch_model = {} backup_policy_patch_model['included_content'] = ['data_volumes'] - backup_policy_patch_model['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_patch_model['match_user_tags'] = [ + 'my-daily-backup-policy' + ] backup_policy_patch_model['name'] = 'my-backup-policy' # Set up parameter values @@ -29649,7 +31894,9 @@ def test_update_backup_policy_value_error(self): # Construct a dict representation of a BackupPolicyPatch model backup_policy_patch_model = {} backup_policy_patch_model['included_content'] = ['data_volumes'] - backup_policy_patch_model['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_patch_model['match_user_tags'] = [ + 'my-daily-backup-policy' + ] backup_policy_patch_model['name'] = 'my-backup-policy' # Set up parameter values @@ -29662,7 +31909,10 @@ def test_update_backup_policy_value_error(self): "backup_policy_patch": backup_policy_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_backup_policy(**req_copy) @@ -29720,7 +31970,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -29728,9 +31982,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListRegions: @@ -29787,10 +32039,12 @@ def test_list_regions_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_regions(**req_copy) @@ -29871,7 +32125,10 @@ def test_get_region_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_region(**req_copy) @@ -29952,7 +32209,10 @@ def test_list_region_zones_value_error(self): "region_name": region_name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_region_zones(**req_copy) @@ -30037,7 +32297,10 @@ def test_get_region_zone_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_region_zone(**req_copy) @@ -30095,7 +32358,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -30103,9 +32370,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListVirtualNetworkInterfaces: @@ -30120,7 +32385,7 @@ def test_list_virtual_network_interfaces_all_params(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, url, @@ -30168,7 +32433,7 @@ def test_list_virtual_network_interfaces_required_params(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, url, @@ -30200,7 +32465,7 @@ def test_list_virtual_network_interfaces_value_error(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132, "virtual_network_interfaces": [{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}' responses.add( responses.GET, url, @@ -30210,10 +32475,12 @@ def test_list_virtual_network_interfaces_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_virtual_network_interfaces(**req_copy) @@ -30233,8 +32500,8 @@ def test_list_virtual_network_interfaces_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/virtual_network_interfaces') - mock_response1 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' - mock_response2 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"protocol_state_filtering_mode":"auto","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' + mock_response2 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"protocol_state_filtering_mode":"auto","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -30270,8 +32537,8 @@ def test_list_virtual_network_interfaces_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/virtual_network_interfaces') - mock_response1 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' - mock_response2 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' + mock_response1 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"protocol_state_filtering_mode":"auto","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1}' + mock_response2 = '{"virtual_network_interfaces":[{"allow_ip_spoofing":true,"auto_delete":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","enable_infrastructure_nat":true,"href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","id":"0767-fa41aecb-4f21-423d-8082-630bfba1e1d9","ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"lifecycle_state":"stable","mac_address":"02:00:4D:45:45:4D","name":"my-virtual-network-interface","primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"protocol_state_filtering_mode":"auto","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"virtual_network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","name":"my-share-mount-target","resource_type":"share_mount_target"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"r006-4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -30310,7 +32577,7 @@ def test_create_virtual_network_interface_all_params(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces') - mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -30321,11 +32588,13 @@ def test_create_virtual_network_interface_all_params(self): # Construct a dict representation of a VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById model virtual_network_interface_ip_prototype_model = {} - virtual_network_interface_ip_prototype_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_ip_prototype_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_primary_ip_prototype_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -30333,7 +32602,8 @@ def test_create_virtual_network_interface_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -30346,6 +32616,7 @@ def test_create_virtual_network_interface_all_params(self): ips = [virtual_network_interface_ip_prototype_model] name = 'my-virtual-network-interface' primary_ip = virtual_network_interface_primary_ip_prototype_model + protocol_state_filtering_mode = 'auto' resource_group = resource_group_identity_model security_groups = [security_group_identity_model] subnet = subnet_identity_model @@ -30358,6 +32629,7 @@ def test_create_virtual_network_interface_all_params(self): ips=ips, name=name, primary_ip=primary_ip, + protocol_state_filtering_mode=protocol_state_filtering_mode, resource_group=resource_group, security_groups=security_groups, subnet=subnet, @@ -30374,7 +32646,9 @@ def test_create_virtual_network_interface_all_params(self): assert req_body['enable_infrastructure_nat'] == True assert req_body['ips'] == [virtual_network_interface_ip_prototype_model] assert req_body['name'] == 'my-virtual-network-interface' - assert req_body['primary_ip'] == virtual_network_interface_primary_ip_prototype_model + assert req_body[ + 'primary_ip'] == virtual_network_interface_primary_ip_prototype_model + assert req_body['protocol_state_filtering_mode'] == 'auto' assert req_body['resource_group'] == resource_group_identity_model assert req_body['security_groups'] == [security_group_identity_model] assert req_body['subnet'] == subnet_identity_model @@ -30395,7 +32669,7 @@ def test_create_virtual_network_interface_value_error(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces') - mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.POST, url, @@ -30406,11 +32680,13 @@ def test_create_virtual_network_interface_value_error(self): # Construct a dict representation of a VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById model virtual_network_interface_ip_prototype_model = {} - virtual_network_interface_ip_prototype_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_ip_prototype_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a dict representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById model virtual_network_interface_primary_ip_prototype_model = {} - virtual_network_interface_primary_ip_prototype_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_primary_ip_prototype_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -30418,7 +32694,8 @@ def test_create_virtual_network_interface_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -30431,15 +32708,18 @@ def test_create_virtual_network_interface_value_error(self): ips = [virtual_network_interface_ip_prototype_model] name = 'my-virtual-network-interface' primary_ip = virtual_network_interface_primary_ip_prototype_model + protocol_state_filtering_mode = 'auto' resource_group = resource_group_identity_model security_groups = [security_group_identity_model] subnet = subnet_identity_model # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_virtual_network_interface(**req_copy) @@ -30514,7 +32794,10 @@ def test_delete_virtual_network_interfaces_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_virtual_network_interfaces(**req_copy) @@ -30540,7 +32823,7 @@ def test_get_virtual_network_interface_all_params(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces/testString') - mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -30578,7 +32861,7 @@ def test_get_virtual_network_interface_value_error(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces/testString') - mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.GET, url, @@ -30595,7 +32878,10 @@ def test_get_virtual_network_interface_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_virtual_network_interface(**req_copy) @@ -30621,7 +32907,7 @@ def test_update_virtual_network_interface_all_params(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces/testString') - mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -30634,8 +32920,12 @@ def test_update_virtual_network_interface_all_params(self): virtual_network_interface_patch_model = {} virtual_network_interface_patch_model['allow_ip_spoofing'] = True virtual_network_interface_patch_model['auto_delete'] = False - virtual_network_interface_patch_model['enable_infrastructure_nat'] = True - virtual_network_interface_patch_model['name'] = 'my-virtual-network-interface' + virtual_network_interface_patch_model[ + 'enable_infrastructure_nat'] = True + virtual_network_interface_patch_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_patch_model[ + 'protocol_state_filtering_mode'] = 'auto' # Set up parameter values id = 'testString' @@ -30671,7 +32961,7 @@ def test_update_virtual_network_interface_value_error(self): """ # Set up mock url = preprocess_url('/virtual_network_interfaces/testString') - mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"allow_ip_spoofing": true, "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "enable_infrastructure_nat": true, "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "id": "0767-fa41aecb-4f21-423d-8082-630bfba1e1d9", "ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "lifecycle_state": "stable", "mac_address": "02:00:4D:45:45:4D", "name": "my-virtual-network-interface", "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "protocol_state_filtering_mode": "auto", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "virtual_network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "name": "my-share-mount-target", "resource_type": "share_mount_target"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' responses.add( responses.PATCH, url, @@ -30684,8 +32974,12 @@ def test_update_virtual_network_interface_value_error(self): virtual_network_interface_patch_model = {} virtual_network_interface_patch_model['allow_ip_spoofing'] = True virtual_network_interface_patch_model['auto_delete'] = False - virtual_network_interface_patch_model['enable_infrastructure_nat'] = True - virtual_network_interface_patch_model['name'] = 'my-virtual-network-interface' + virtual_network_interface_patch_model[ + 'enable_infrastructure_nat'] = True + virtual_network_interface_patch_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_patch_model[ + 'protocol_state_filtering_mode'] = 'auto' # Set up parameter values id = 'testString' @@ -30697,7 +32991,10 @@ def test_update_virtual_network_interface_value_error(self): "virtual_network_interface_patch": virtual_network_interface_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_virtual_network_interface(**req_copy) @@ -30722,7 +33019,8 @@ def test_list_network_interface_floating_ips_all_params(self): list_network_interface_floating_ips() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -30772,7 +33070,8 @@ def test_list_network_interface_floating_ips_required_params(self): test_list_network_interface_floating_ips_required_params() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -30795,7 +33094,8 @@ def test_list_network_interface_floating_ips_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_network_interface_floating_ips_required_params_with_retries(self): + def test_list_network_interface_floating_ips_required_params_with_retries( + self): # Enable retries and run test_list_network_interface_floating_ips_required_params. _service.enable_retries() self.test_list_network_interface_floating_ips_required_params() @@ -30810,7 +33110,8 @@ def test_list_network_interface_floating_ips_value_error(self): test_list_network_interface_floating_ips_value_error() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips') mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}' responses.add( responses.GET, @@ -30828,7 +33129,10 @@ def test_list_network_interface_floating_ips_value_error(self): "virtual_network_interface_id": virtual_network_interface_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_network_interface_floating_ips(**req_copy) @@ -30847,7 +33151,8 @@ def test_list_network_interface_floating_ips_with_pager_get_next(self): test_list_network_interface_floating_ips_with_pager_get_next() """ # Set up a two-page mock response - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}' mock_response2 = '{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}' responses.add( @@ -30885,7 +33190,8 @@ def test_list_network_interface_floating_ips_with_pager_get_all(self): test_list_network_interface_floating_ips_with_pager_get_all() """ # Set up a two-page mock response - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips') mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}' mock_response2 = '{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}]}' responses.add( @@ -30926,7 +33232,8 @@ def test_remove_network_interface_floating_ip_all_params(self): remove_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips/testString') responses.add( responses.DELETE, url, @@ -30963,7 +33270,8 @@ def test_remove_network_interface_floating_ip_value_error(self): test_remove_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips/testString') responses.add( responses.DELETE, url, @@ -30980,11 +33288,15 @@ def test_remove_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.remove_network_interface_floating_ip(**req_copy) - def test_remove_network_interface_floating_ip_value_error_with_retries(self): + def test_remove_network_interface_floating_ip_value_error_with_retries( + self): # Enable retries and run test_remove_network_interface_floating_ip_value_error. _service.enable_retries() self.test_remove_network_interface_floating_ip_value_error() @@ -31005,7 +33317,8 @@ def test_get_network_interface_floating_ip_all_params(self): get_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips/testString') mock_response = '{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}' responses.add( responses.GET, @@ -31045,7 +33358,8 @@ def test_get_network_interface_floating_ip_value_error(self): test_get_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips/testString') mock_response = '{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}' responses.add( responses.GET, @@ -31065,7 +33379,10 @@ def test_get_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_network_interface_floating_ip(**req_copy) @@ -31090,7 +33407,8 @@ def test_add_network_interface_floating_ip_all_params(self): add_network_interface_floating_ip() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips/testString') mock_response = '{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}' responses.add( responses.PUT, @@ -31130,7 +33448,8 @@ def test_add_network_interface_floating_ip_value_error(self): test_add_network_interface_floating_ip_value_error() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/floating_ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/floating_ips/testString') mock_response = '{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}' responses.add( responses.PUT, @@ -31150,7 +33469,10 @@ def test_add_network_interface_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.add_network_interface_floating_ip(**req_copy) @@ -31248,7 +33570,8 @@ def test_list_virtual_network_interface_ips_required_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_virtual_network_interface_ips_required_params_with_retries(self): + def test_list_virtual_network_interface_ips_required_params_with_retries( + self): # Enable retries and run test_list_virtual_network_interface_ips_required_params. _service.enable_retries() self.test_list_virtual_network_interface_ips_required_params() @@ -31281,7 +33604,10 @@ def test_list_virtual_network_interface_ips_value_error(self): "virtual_network_interface_id": virtual_network_interface_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_virtual_network_interface_ips(**req_copy) @@ -31379,7 +33705,8 @@ def test_remove_virtual_network_interface_ip_all_params(self): remove_virtual_network_interface_ip() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/ips/testString') responses.add( responses.DELETE, url, @@ -31416,7 +33743,8 @@ def test_remove_virtual_network_interface_ip_value_error(self): test_remove_virtual_network_interface_ip_value_error() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/ips/testString') responses.add( responses.DELETE, url, @@ -31433,7 +33761,10 @@ def test_remove_virtual_network_interface_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.remove_virtual_network_interface_ip(**req_copy) @@ -31458,7 +33789,8 @@ def test_get_virtual_network_interface_ip_all_params(self): get_virtual_network_interface_ip() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/ips/testString') mock_response = '{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}' responses.add( responses.GET, @@ -31498,7 +33830,8 @@ def test_get_virtual_network_interface_ip_value_error(self): test_get_virtual_network_interface_ip_value_error() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/ips/testString') mock_response = '{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}' responses.add( responses.GET, @@ -31518,7 +33851,10 @@ def test_get_virtual_network_interface_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_virtual_network_interface_ip(**req_copy) @@ -31543,7 +33879,8 @@ def test_add_virtual_network_interface_ip_all_params(self): add_virtual_network_interface_ip() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/ips/testString') mock_response = '{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}' responses.add( responses.PUT, @@ -31583,7 +33920,8 @@ def test_add_virtual_network_interface_ip_value_error(self): test_add_virtual_network_interface_ip_value_error() """ # Set up mock - url = preprocess_url('/virtual_network_interfaces/testString/ips/testString') + url = preprocess_url( + '/virtual_network_interfaces/testString/ips/testString') mock_response = '{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}' responses.add( responses.PUT, @@ -31603,7 +33941,10 @@ def test_add_virtual_network_interface_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.add_virtual_network_interface_ip(**req_copy) @@ -31661,7 +34002,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -31669,9 +34014,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListPublicGateways: @@ -31776,10 +34119,12 @@ def test_list_public_gateways_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_public_gateways(**req_copy) @@ -31895,7 +34240,8 @@ def test_create_public_gateway_all_params(self): # Construct a dict representation of a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById model public_gateway_floating_ip_prototype_model = {} - public_gateway_floating_ip_prototype_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_prototype_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -31925,7 +34271,8 @@ def test_create_public_gateway_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['vpc'] == vpc_identity_model assert req_body['zone'] == zone_identity_model - assert req_body['floating_ip'] == public_gateway_floating_ip_prototype_model + assert req_body[ + 'floating_ip'] == public_gateway_floating_ip_prototype_model assert req_body['name'] == 'my-public-gateway' assert req_body['resource_group'] == resource_group_identity_model @@ -31964,7 +34311,8 @@ def test_create_public_gateway_value_error(self): # Construct a dict representation of a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById model public_gateway_floating_ip_prototype_model = {} - public_gateway_floating_ip_prototype_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_prototype_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -31983,7 +34331,10 @@ def test_create_public_gateway_value_error(self): "zone": zone, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_public_gateway(**req_copy) @@ -32058,7 +34409,10 @@ def test_delete_public_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_public_gateway(**req_copy) @@ -32139,7 +34493,10 @@ def test_get_public_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_public_gateway(**req_copy) @@ -32235,7 +34592,10 @@ def test_update_public_gateway_value_error(self): "public_gateway_patch": public_gateway_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_public_gateway(**req_copy) @@ -32293,7 +34653,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -32301,9 +34665,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListFloatingIps: @@ -32363,7 +34725,8 @@ def test_list_floating_ips_all_params(self): assert 'target.id={}'.format(target_id) in query_string assert 'target.crn={}'.format(target_crn) in query_string assert 'target.name={}'.format(target_name) in query_string - assert 'target.resource_type={}'.format(target_resource_type) in query_string + assert 'target.resource_type={}'.format( + target_resource_type) in query_string def test_list_floating_ips_all_params_with_retries(self): # Enable retries and run test_list_floating_ips_all_params. @@ -32423,10 +34786,12 @@ def test_list_floating_ips_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_floating_ips(**req_copy) @@ -32471,7 +34836,8 @@ def test_list_floating_ips_with_pager_get_next(self): resource_group_id='testString', sort='name', target_id='testString', - target_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', + target_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -32512,7 +34878,8 @@ def test_list_floating_ips_with_pager_get_all(self): resource_group_id='testString', sort='name', target_id='testString', - target_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', + target_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -32553,7 +34920,8 @@ def test_create_floating_ip_all_params(self): # Construct a dict representation of a FloatingIPPrototypeFloatingIPByZone model floating_ip_prototype_model = {} floating_ip_prototype_model['name'] = 'my-floating-ip' - floating_ip_prototype_model['resource_group'] = resource_group_identity_model + floating_ip_prototype_model[ + 'resource_group'] = resource_group_identity_model floating_ip_prototype_model['zone'] = zone_identity_model # Set up parameter values @@ -32608,7 +34976,8 @@ def test_create_floating_ip_value_error(self): # Construct a dict representation of a FloatingIPPrototypeFloatingIPByZone model floating_ip_prototype_model = {} floating_ip_prototype_model['name'] = 'my-floating-ip' - floating_ip_prototype_model['resource_group'] = resource_group_identity_model + floating_ip_prototype_model[ + 'resource_group'] = resource_group_identity_model floating_ip_prototype_model['zone'] = zone_identity_model # Set up parameter values @@ -32619,7 +34988,10 @@ def test_create_floating_ip_value_error(self): "floating_ip_prototype": floating_ip_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_floating_ip(**req_copy) @@ -32694,7 +35066,10 @@ def test_delete_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_floating_ip(**req_copy) @@ -32775,7 +35150,10 @@ def test_get_floating_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_floating_ip(**req_copy) @@ -32812,7 +35190,8 @@ def test_update_floating_ip_all_params(self): # Construct a dict representation of a FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model floating_ip_target_patch_model = {} - floating_ip_target_patch_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_patch_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a dict representation of a FloatingIPPatch model floating_ip_patch_model = {} @@ -32864,7 +35243,8 @@ def test_update_floating_ip_value_error(self): # Construct a dict representation of a FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model floating_ip_target_patch_model = {} - floating_ip_target_patch_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_patch_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a dict representation of a FloatingIPPatch model floating_ip_patch_model = {} @@ -32881,7 +35261,10 @@ def test_update_floating_ip_value_error(self): "floating_ip_patch": floating_ip_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_floating_ip(**req_copy) @@ -32939,7 +35322,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -32947,9 +35334,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListNetworkAcls: @@ -33054,10 +35439,12 @@ def test_list_network_acls_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_network_acls(**req_copy) @@ -33174,23 +35561,35 @@ def test_create_network_acl_all_params(self): # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_network_acl_context_model = {} network_acl_rule_prototype_network_acl_context_model['action'] = 'allow' - network_acl_rule_prototype_network_acl_context_model['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_model['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_context_model['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_context_model['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_context_model['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_model['destination_port_max'] = 22 - network_acl_rule_prototype_network_acl_context_model['destination_port_min'] = 22 + network_acl_rule_prototype_network_acl_context_model[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_model[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_context_model[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_context_model[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_context_model[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_model[ + 'destination_port_max'] = 22 + network_acl_rule_prototype_network_acl_context_model[ + 'destination_port_min'] = 22 network_acl_rule_prototype_network_acl_context_model['protocol'] = 'udp' - network_acl_rule_prototype_network_acl_context_model['source_port_max'] = 65535 - network_acl_rule_prototype_network_acl_context_model['source_port_min'] = 49152 + network_acl_rule_prototype_network_acl_context_model[ + 'source_port_max'] = 65535 + network_acl_rule_prototype_network_acl_context_model[ + 'source_port_min'] = 49152 # Construct a dict representation of a NetworkACLPrototypeNetworkACLByRules model network_acl_prototype_model = {} network_acl_prototype_model['name'] = 'my-network-acl' - network_acl_prototype_model['resource_group'] = resource_group_identity_model + network_acl_prototype_model[ + 'resource_group'] = resource_group_identity_model network_acl_prototype_model['vpc'] = vpc_identity_model - network_acl_prototype_model['rules'] = [network_acl_rule_prototype_network_acl_context_model] + network_acl_prototype_model['rules'] = [ + network_acl_rule_prototype_network_acl_context_model + ] # Set up parameter values network_acl_prototype = network_acl_prototype_model @@ -33244,23 +35643,35 @@ def test_create_network_acl_value_error(self): # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_network_acl_context_model = {} network_acl_rule_prototype_network_acl_context_model['action'] = 'allow' - network_acl_rule_prototype_network_acl_context_model['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_model['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_context_model['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_context_model['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_context_model['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_model['destination_port_max'] = 22 - network_acl_rule_prototype_network_acl_context_model['destination_port_min'] = 22 + network_acl_rule_prototype_network_acl_context_model[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_model[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_context_model[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_context_model[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_context_model[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_model[ + 'destination_port_max'] = 22 + network_acl_rule_prototype_network_acl_context_model[ + 'destination_port_min'] = 22 network_acl_rule_prototype_network_acl_context_model['protocol'] = 'udp' - network_acl_rule_prototype_network_acl_context_model['source_port_max'] = 65535 - network_acl_rule_prototype_network_acl_context_model['source_port_min'] = 49152 + network_acl_rule_prototype_network_acl_context_model[ + 'source_port_max'] = 65535 + network_acl_rule_prototype_network_acl_context_model[ + 'source_port_min'] = 49152 # Construct a dict representation of a NetworkACLPrototypeNetworkACLByRules model network_acl_prototype_model = {} network_acl_prototype_model['name'] = 'my-network-acl' - network_acl_prototype_model['resource_group'] = resource_group_identity_model + network_acl_prototype_model[ + 'resource_group'] = resource_group_identity_model network_acl_prototype_model['vpc'] = vpc_identity_model - network_acl_prototype_model['rules'] = [network_acl_rule_prototype_network_acl_context_model] + network_acl_prototype_model['rules'] = [ + network_acl_rule_prototype_network_acl_context_model + ] # Set up parameter values network_acl_prototype = network_acl_prototype_model @@ -33270,7 +35681,10 @@ def test_create_network_acl_value_error(self): "network_acl_prototype": network_acl_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_network_acl(**req_copy) @@ -33345,7 +35759,10 @@ def test_delete_network_acl_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_network_acl(**req_copy) @@ -33426,7 +35843,10 @@ def test_get_network_acl_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_network_acl(**req_copy) @@ -33522,7 +35942,10 @@ def test_update_network_acl_value_error(self): "network_acl_patch": network_acl_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_network_acl(**req_copy) @@ -33653,7 +36076,10 @@ def test_list_network_acl_rules_value_error(self): "network_acl_id": network_acl_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_network_acl_rules(**req_copy) @@ -33763,12 +36189,14 @@ def test_create_network_acl_rule_all_params(self): # Construct a dict representation of a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById model network_acl_rule_before_prototype_model = {} - network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_prototype_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_model = {} network_acl_rule_prototype_model['action'] = 'allow' - network_acl_rule_prototype_model['before'] = network_acl_rule_before_prototype_model + network_acl_rule_prototype_model[ + 'before'] = network_acl_rule_before_prototype_model network_acl_rule_prototype_model['destination'] = '192.168.3.2/32' network_acl_rule_prototype_model['direction'] = 'inbound' network_acl_rule_prototype_model['ip_version'] = 'ipv4' @@ -33825,12 +36253,14 @@ def test_create_network_acl_rule_value_error(self): # Construct a dict representation of a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById model network_acl_rule_before_prototype_model = {} - network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_prototype_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_model = {} network_acl_rule_prototype_model['action'] = 'allow' - network_acl_rule_prototype_model['before'] = network_acl_rule_before_prototype_model + network_acl_rule_prototype_model[ + 'before'] = network_acl_rule_before_prototype_model network_acl_rule_prototype_model['destination'] = '192.168.3.2/32' network_acl_rule_prototype_model['direction'] = 'inbound' network_acl_rule_prototype_model['ip_version'] = 'ipv4' @@ -33852,7 +36282,10 @@ def test_create_network_acl_rule_value_error(self): "network_acl_rule_prototype": network_acl_rule_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_network_acl_rule(**req_copy) @@ -33931,7 +36364,10 @@ def test_delete_network_acl_rule_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_network_acl_rule(**req_copy) @@ -34016,7 +36452,10 @@ def test_get_network_acl_rule_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_network_acl_rule(**req_copy) @@ -34053,12 +36492,14 @@ def test_update_network_acl_rule_all_params(self): # Construct a dict representation of a NetworkACLRuleBeforePatchNetworkACLRuleIdentityById model network_acl_rule_before_patch_model = {} - network_acl_rule_before_patch_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_patch_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePatch model network_acl_rule_patch_model = {} network_acl_rule_patch_model['action'] = 'allow' - network_acl_rule_patch_model['before'] = network_acl_rule_before_patch_model + network_acl_rule_patch_model[ + 'before'] = network_acl_rule_before_patch_model network_acl_rule_patch_model['code'] = 0 network_acl_rule_patch_model['destination'] = '192.168.3.2/32' network_acl_rule_patch_model['destination_port_max'] = 22 @@ -34118,12 +36559,14 @@ def test_update_network_acl_rule_value_error(self): # Construct a dict representation of a NetworkACLRuleBeforePatchNetworkACLRuleIdentityById model network_acl_rule_before_patch_model = {} - network_acl_rule_before_patch_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_patch_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePatch model network_acl_rule_patch_model = {} network_acl_rule_patch_model['action'] = 'allow' - network_acl_rule_patch_model['before'] = network_acl_rule_before_patch_model + network_acl_rule_patch_model[ + 'before'] = network_acl_rule_before_patch_model network_acl_rule_patch_model['code'] = 0 network_acl_rule_patch_model['destination'] = '192.168.3.2/32' network_acl_rule_patch_model['destination_port_max'] = 22 @@ -34148,7 +36591,10 @@ def test_update_network_acl_rule_value_error(self): "network_acl_rule_patch": network_acl_rule_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_network_acl_rule(**req_copy) @@ -34206,7 +36652,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -34214,9 +36664,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListSecurityGroups: @@ -34330,10 +36778,12 @@ def test_list_security_groups_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_security_groups(**req_copy) @@ -34377,7 +36827,8 @@ def test_list_security_groups_with_pager_get_next(self): limit=10, resource_group_id='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', ) while pager.has_next(): @@ -34416,7 +36867,8 @@ def test_list_security_groups_with_pager_get_all(self): limit=10, resource_group_id='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', ) all_results = pager.get_all() @@ -34465,9 +36917,11 @@ def test_create_security_group_all_params(self): security_group_rule_prototype_model = {} security_group_rule_prototype_model['direction'] = 'inbound' security_group_rule_prototype_model['ip_version'] = 'ipv4' - security_group_rule_prototype_model['local'] = security_group_rule_local_prototype_model + security_group_rule_prototype_model[ + 'local'] = security_group_rule_local_prototype_model security_group_rule_prototype_model['protocol'] = 'all' - security_group_rule_prototype_model['remote'] = security_group_rule_remote_prototype_model + security_group_rule_prototype_model[ + 'remote'] = security_group_rule_remote_prototype_model # Set up parameter values vpc = vpc_identity_model @@ -34539,9 +36993,11 @@ def test_create_security_group_value_error(self): security_group_rule_prototype_model = {} security_group_rule_prototype_model['direction'] = 'inbound' security_group_rule_prototype_model['ip_version'] = 'ipv4' - security_group_rule_prototype_model['local'] = security_group_rule_local_prototype_model + security_group_rule_prototype_model[ + 'local'] = security_group_rule_local_prototype_model security_group_rule_prototype_model['protocol'] = 'all' - security_group_rule_prototype_model['remote'] = security_group_rule_remote_prototype_model + security_group_rule_prototype_model[ + 'remote'] = security_group_rule_remote_prototype_model # Set up parameter values vpc = vpc_identity_model @@ -34554,7 +37010,10 @@ def test_create_security_group_value_error(self): "vpc": vpc, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_security_group(**req_copy) @@ -34629,7 +37088,10 @@ def test_delete_security_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_security_group(**req_copy) @@ -34710,7 +37172,10 @@ def test_get_security_group_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_security_group(**req_copy) @@ -34806,7 +37271,10 @@ def test_update_security_group_value_error(self): "security_group_patch": security_group_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_security_group(**req_copy) @@ -34887,7 +37355,10 @@ def test_list_security_group_rules_value_error(self): "security_group_id": security_group_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_security_group_rules(**req_copy) @@ -34934,9 +37405,11 @@ def test_create_security_group_rule_all_params(self): security_group_rule_prototype_model = {} security_group_rule_prototype_model['direction'] = 'inbound' security_group_rule_prototype_model['ip_version'] = 'ipv4' - security_group_rule_prototype_model['local'] = security_group_rule_local_prototype_model + security_group_rule_prototype_model[ + 'local'] = security_group_rule_local_prototype_model security_group_rule_prototype_model['protocol'] = 'all' - security_group_rule_prototype_model['remote'] = security_group_rule_remote_prototype_model + security_group_rule_prototype_model[ + 'remote'] = security_group_rule_remote_prototype_model # Set up parameter values security_group_id = 'testString' @@ -34993,9 +37466,11 @@ def test_create_security_group_rule_value_error(self): security_group_rule_prototype_model = {} security_group_rule_prototype_model['direction'] = 'inbound' security_group_rule_prototype_model['ip_version'] = 'ipv4' - security_group_rule_prototype_model['local'] = security_group_rule_local_prototype_model + security_group_rule_prototype_model[ + 'local'] = security_group_rule_local_prototype_model security_group_rule_prototype_model['protocol'] = 'all' - security_group_rule_prototype_model['remote'] = security_group_rule_remote_prototype_model + security_group_rule_prototype_model[ + 'remote'] = security_group_rule_remote_prototype_model # Set up parameter values security_group_id = 'testString' @@ -35007,7 +37482,10 @@ def test_create_security_group_rule_value_error(self): "security_group_rule_prototype": security_group_rule_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_security_group_rule(**req_copy) @@ -35086,7 +37564,10 @@ def test_delete_security_group_rule_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_security_group_rule(**req_copy) @@ -35171,7 +37652,10 @@ def test_get_security_group_rule_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_security_group_rule(**req_copy) @@ -35219,10 +37703,12 @@ def test_update_security_group_rule_all_params(self): security_group_rule_patch_model['code'] = 0 security_group_rule_patch_model['direction'] = 'inbound' security_group_rule_patch_model['ip_version'] = 'ipv4' - security_group_rule_patch_model['local'] = security_group_rule_local_patch_model + security_group_rule_patch_model[ + 'local'] = security_group_rule_local_patch_model security_group_rule_patch_model['port_max'] = 22 security_group_rule_patch_model['port_min'] = 22 - security_group_rule_patch_model['remote'] = security_group_rule_remote_patch_model + security_group_rule_patch_model[ + 'remote'] = security_group_rule_remote_patch_model security_group_rule_patch_model['type'] = 8 # Set up parameter values @@ -35283,10 +37769,12 @@ def test_update_security_group_rule_value_error(self): security_group_rule_patch_model['code'] = 0 security_group_rule_patch_model['direction'] = 'inbound' security_group_rule_patch_model['ip_version'] = 'ipv4' - security_group_rule_patch_model['local'] = security_group_rule_local_patch_model + security_group_rule_patch_model[ + 'local'] = security_group_rule_local_patch_model security_group_rule_patch_model['port_max'] = 22 security_group_rule_patch_model['port_min'] = 22 - security_group_rule_patch_model['remote'] = security_group_rule_remote_patch_model + security_group_rule_patch_model[ + 'remote'] = security_group_rule_remote_patch_model security_group_rule_patch_model['type'] = 8 # Set up parameter values @@ -35301,7 +37789,10 @@ def test_update_security_group_rule_value_error(self): "security_group_rule_patch": security_group_rule_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_security_group_rule(**req_copy) @@ -35429,7 +37920,10 @@ def test_list_security_group_targets_value_error(self): "security_group_id": security_group_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_security_group_targets(**req_copy) @@ -35579,11 +38073,15 @@ def test_delete_security_group_target_binding_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_security_group_target_binding(**req_copy) - def test_delete_security_group_target_binding_value_error_with_retries(self): + def test_delete_security_group_target_binding_value_error_with_retries( + self): # Enable retries and run test_delete_security_group_target_binding_value_error. _service.enable_retries() self.test_delete_security_group_target_binding_value_error() @@ -35664,7 +38162,10 @@ def test_get_security_group_target_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_security_group_target(**req_copy) @@ -35749,11 +38250,15 @@ def test_create_security_group_target_binding_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_security_group_target_binding(**req_copy) - def test_create_security_group_target_binding_value_error_with_retries(self): + def test_create_security_group_target_binding_value_error_with_retries( + self): # Enable retries and run test_create_security_group_target_binding_value_error. _service.enable_retries() self.test_create_security_group_target_binding_value_error() @@ -35807,7 +38312,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -35815,9 +38324,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListIkePolicies: @@ -35919,10 +38426,12 @@ def test_list_ike_policies_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_ike_policies(**req_copy) @@ -36110,7 +38619,10 @@ def test_create_ike_policy_value_error(self): "ike_version": ike_version, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_ike_policy(**req_copy) @@ -36185,7 +38697,10 @@ def test_delete_ike_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_ike_policy(**req_copy) @@ -36266,7 +38781,10 @@ def test_get_ike_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_ike_policy(**req_copy) @@ -36372,7 +38890,10 @@ def test_update_ike_policy_value_error(self): "ike_policy_patch": ike_policy_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_ike_policy(**req_copy) @@ -36398,7 +38919,7 @@ def test_list_ike_policy_connections_all_params(self): """ # Set up mock url = preprocess_url('/ike_policies/testString/connections') - mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?start=c6d339ad873241c4acc936dfcff3f6d2&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -36409,16 +38930,25 @@ def test_list_ike_policy_connections_all_params(self): # Set up parameter values id = 'testString' + start = 'testString' + limit = 50 # Invoke method response = _service.list_ike_policy_connections( id, + start=start, + limit=limit, headers={}, ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 + # Validate query params + query_string = responses.calls[0].request.url.split('?', 1)[1] + query_string = urllib.parse.unquote_plus(query_string) + assert 'start={}'.format(start) in query_string + assert 'limit={}'.format(limit) in query_string def test_list_ike_policy_connections_all_params_with_retries(self): # Enable retries and run test_list_ike_policy_connections_all_params. @@ -36429,6 +38959,44 @@ def test_list_ike_policy_connections_all_params_with_retries(self): _service.disable_retries() self.test_list_ike_policy_connections_all_params() + @responses.activate + def test_list_ike_policy_connections_required_params(self): + """ + test_list_ike_policy_connections_required_params() + """ + # Set up mock + url = preprocess_url('/ike_policies/testString/connections') + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?start=c6d339ad873241c4acc936dfcff3f6d2&limit=20"}, "total_count": 132}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + id = 'testString' + + # Invoke method + response = _service.list_ike_policy_connections( + id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_list_ike_policy_connections_required_params_with_retries(self): + # Enable retries and run test_list_ike_policy_connections_required_params. + _service.enable_retries() + self.test_list_ike_policy_connections_required_params() + + # Disable retries and run test_list_ike_policy_connections_required_params. + _service.disable_retries() + self.test_list_ike_policy_connections_required_params() + @responses.activate def test_list_ike_policy_connections_value_error(self): """ @@ -36436,7 +39004,7 @@ def test_list_ike_policy_connections_value_error(self): """ # Set up mock url = preprocess_url('/ike_policies/testString/connections') - mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?start=c6d339ad873241c4acc936dfcff3f6d2&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -36453,7 +39021,10 @@ def test_list_ike_policy_connections_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_ike_policy_connections(**req_copy) @@ -36466,6 +39037,77 @@ def test_list_ike_policy_connections_value_error_with_retries(self): _service.disable_retries() self.test_list_ike_policy_connections_value_error() + @responses.activate + def test_list_ike_policy_connections_with_pager_get_next(self): + """ + test_list_ike_policy_connections_with_pager_get_next() + """ + # Set up a two-page mock response + url = preprocess_url('/ike_policies/testString/connections') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + all_results = [] + pager = IkePolicyConnectionsPager( + client=_service, + id='testString', + limit=10, + ) + while pager.has_next(): + next_page = pager.get_next() + assert next_page is not None + all_results.extend(next_page) + assert len(all_results) == 2 + + @responses.activate + def test_list_ike_policy_connections_with_pager_get_all(self): + """ + test_list_ike_policy_connections_with_pager_get_all() + """ + # Set up a two-page mock response + url = preprocess_url('/ike_policies/testString/connections') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + pager = IkePolicyConnectionsPager( + client=_service, + id='testString', + limit=10, + ) + all_results = pager.get_all() + assert all_results is not None + assert len(all_results) == 2 + class TestListIpsecPolicies: """ @@ -36566,10 +39208,12 @@ def test_list_ipsec_policies_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_ipsec_policies(**req_copy) @@ -36752,7 +39396,10 @@ def test_create_ipsec_policy_value_error(self): "pfs": pfs, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_ipsec_policy(**req_copy) @@ -36827,7 +39474,10 @@ def test_delete_ipsec_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_ipsec_policy(**req_copy) @@ -36908,7 +39558,10 @@ def test_get_ipsec_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_ipsec_policy(**req_copy) @@ -37012,7 +39665,10 @@ def test_update_ipsec_policy_value_error(self): "i_psec_policy_patch": i_psec_policy_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_ipsec_policy(**req_copy) @@ -37038,7 +39694,7 @@ def test_list_ipsec_policy_connections_all_params(self): """ # Set up mock url = preprocess_url('/ipsec_policies/testString/connections') - mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?start=250337b8fa72455c962e-c23e5706d452&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37049,16 +39705,25 @@ def test_list_ipsec_policy_connections_all_params(self): # Set up parameter values id = 'testString' + start = 'testString' + limit = 50 # Invoke method response = _service.list_ipsec_policy_connections( id, + start=start, + limit=limit, headers={}, ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 + # Validate query params + query_string = responses.calls[0].request.url.split('?', 1)[1] + query_string = urllib.parse.unquote_plus(query_string) + assert 'start={}'.format(start) in query_string + assert 'limit={}'.format(limit) in query_string def test_list_ipsec_policy_connections_all_params_with_retries(self): # Enable retries and run test_list_ipsec_policy_connections_all_params. @@ -37069,6 +39734,44 @@ def test_list_ipsec_policy_connections_all_params_with_retries(self): _service.disable_retries() self.test_list_ipsec_policy_connections_all_params() + @responses.activate + def test_list_ipsec_policy_connections_required_params(self): + """ + test_list_ipsec_policy_connections_required_params() + """ + # Set up mock + url = preprocess_url('/ipsec_policies/testString/connections') + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?start=250337b8fa72455c962e-c23e5706d452&limit=20"}, "total_count": 132}' + responses.add( + responses.GET, + url, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + id = 'testString' + + # Invoke method + response = _service.list_ipsec_policy_connections( + id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_list_ipsec_policy_connections_required_params_with_retries(self): + # Enable retries and run test_list_ipsec_policy_connections_required_params. + _service.enable_retries() + self.test_list_ipsec_policy_connections_required_params() + + # Disable retries and run test_list_ipsec_policy_connections_required_params. + _service.disable_retries() + self.test_list_ipsec_policy_connections_required_params() + @responses.activate def test_list_ipsec_policy_connections_value_error(self): """ @@ -37076,7 +39779,7 @@ def test_list_ipsec_policy_connections_value_error(self): """ # Set up mock url = preprocess_url('/ipsec_policies/testString/connections') - mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?start=250337b8fa72455c962e-c23e5706d452&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37093,7 +39796,10 @@ def test_list_ipsec_policy_connections_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_ipsec_policy_connections(**req_copy) @@ -37106,6 +39812,77 @@ def test_list_ipsec_policy_connections_value_error_with_retries(self): _service.disable_retries() self.test_list_ipsec_policy_connections_value_error() + @responses.activate + def test_list_ipsec_policy_connections_with_pager_get_next(self): + """ + test_list_ipsec_policy_connections_with_pager_get_next() + """ + # Set up a two-page mock response + url = preprocess_url('/ipsec_policies/testString/connections') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + all_results = [] + pager = IpsecPolicyConnectionsPager( + client=_service, + id='testString', + limit=10, + ) + while pager.has_next(): + next_page = pager.get_next() + assert next_page is not None + all_results.extend(next_page) + assert len(all_results) == 2 + + @responses.activate + def test_list_ipsec_policy_connections_with_pager_get_all(self): + """ + test_list_ipsec_policy_connections_with_pager_get_all() + """ + # Set up a two-page mock response + url = preprocess_url('/ipsec_policies/testString/connections') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + pager = IpsecPolicyConnectionsPager( + client=_service, + id='testString', + limit=10, + ) + all_results = pager.get_all() + assert all_results is not None + assert len(all_results) == 2 + class TestListVpnGateways: """ @@ -37215,10 +39992,12 @@ def test_list_vpn_gateways_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpn_gateways(**req_copy) @@ -37334,12 +40113,14 @@ def test_create_vpn_gateway_all_params(self): # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpn_gateway_prototype_model = {} vpn_gateway_prototype_model['name'] = 'my-vpn-gateway' - vpn_gateway_prototype_model['resource_group'] = resource_group_identity_model + vpn_gateway_prototype_model[ + 'resource_group'] = resource_group_identity_model vpn_gateway_prototype_model['subnet'] = subnet_identity_model vpn_gateway_prototype_model['mode'] = 'route' @@ -37390,12 +40171,14 @@ def test_create_vpn_gateway_value_error(self): # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpn_gateway_prototype_model = {} vpn_gateway_prototype_model['name'] = 'my-vpn-gateway' - vpn_gateway_prototype_model['resource_group'] = resource_group_identity_model + vpn_gateway_prototype_model[ + 'resource_group'] = resource_group_identity_model vpn_gateway_prototype_model['subnet'] = subnet_identity_model vpn_gateway_prototype_model['mode'] = 'route' @@ -37407,7 +40190,10 @@ def test_create_vpn_gateway_value_error(self): "vpn_gateway_prototype": vpn_gateway_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpn_gateway(**req_copy) @@ -37482,7 +40268,10 @@ def test_delete_vpn_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpn_gateway(**req_copy) @@ -37563,7 +40352,10 @@ def test_get_vpn_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpn_gateway(**req_copy) @@ -37659,7 +40451,10 @@ def test_update_vpn_gateway_value_error(self): "vpn_gateway_patch": vpn_gateway_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpn_gateway(**req_copy) @@ -37685,7 +40480,7 @@ def test_list_vpn_gateway_connections_all_params(self): """ # Set up mock url = preprocess_url('/vpn_gateways/testString/connections') - mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?start=b67efb2c-bd17-457d-be8e-7b46404062dc&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37696,11 +40491,15 @@ def test_list_vpn_gateway_connections_all_params(self): # Set up parameter values vpn_gateway_id = 'testString' + start = 'testString' + limit = 50 status = 'down' # Invoke method response = _service.list_vpn_gateway_connections( vpn_gateway_id, + start=start, + limit=limit, status=status, headers={}, ) @@ -37711,6 +40510,8 @@ def test_list_vpn_gateway_connections_all_params(self): # Validate query params query_string = responses.calls[0].request.url.split('?', 1)[1] query_string = urllib.parse.unquote_plus(query_string) + assert 'start={}'.format(start) in query_string + assert 'limit={}'.format(limit) in query_string assert 'status={}'.format(status) in query_string def test_list_vpn_gateway_connections_all_params_with_retries(self): @@ -37729,7 +40530,7 @@ def test_list_vpn_gateway_connections_required_params(self): """ # Set up mock url = preprocess_url('/vpn_gateways/testString/connections') - mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?start=b67efb2c-bd17-457d-be8e-7b46404062dc&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37767,7 +40568,7 @@ def test_list_vpn_gateway_connections_value_error(self): """ # Set up mock url = preprocess_url('/vpn_gateways/testString/connections') - mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "establish_mode": "bidirectional", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}], "local": {"ike_identities": [{"type": "fqdn", "value": "my-service.example.com"}]}, "peer": {"ike_identity": {"type": "fqdn", "value": "my-service.example.com"}, "type": "address", "address": "169.21.50.5"}, "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down", "status_reasons": [{"code": "cannot_authenticate_connection", "message": "Failed to authenticate a connection because of mismatched IKE ID and PSK.", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?start=b67efb2c-bd17-457d-be8e-7b46404062dc&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37784,7 +40585,10 @@ def test_list_vpn_gateway_connections_value_error(self): "vpn_gateway_id": vpn_gateway_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpn_gateway_connections(**req_copy) @@ -37797,6 +40601,79 @@ def test_list_vpn_gateway_connections_value_error_with_retries(self): _service.disable_retries() self.test_list_vpn_gateway_connections_value_error() + @responses.activate + def test_list_vpn_gateway_connections_with_pager_get_next(self): + """ + test_list_vpn_gateway_connections_with_pager_get_next() + """ + # Set up a two-page mock response + url = preprocess_url('/vpn_gateways/testString/connections') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + all_results = [] + pager = VpnGatewayConnectionsPager( + client=_service, + vpn_gateway_id='testString', + limit=10, + status='down', + ) + while pager.has_next(): + next_page = pager.get_next() + assert next_page is not None + all_results.extend(next_page) + assert len(all_results) == 2 + + @responses.activate + def test_list_vpn_gateway_connections_with_pager_get_all(self): + """ + test_list_vpn_gateway_connections_with_pager_get_all() + """ + # Set up a two-page mock response + url = preprocess_url('/vpn_gateways/testString/connections') + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"connections":[{"admin_state_up":true,"authentication_mode":"psk","created_at":"2019-01-01T12:00:00.000Z","dead_peer_detection":{"action":"restart","interval":30,"timeout":120},"establish_mode":"bidirectional","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","ike_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ike-policy","resource_type":"ike_policy"},"ipsec_policy":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-ipsec-policy","resource_type":"ipsec_policy"},"mode":"route","name":"my-vpn-connection","psk":"lkj14b1oi0alcniejkso","resource_type":"vpn_gateway_connection","status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}],"local":{"ike_identities":[{"type":"fqdn","value":"my-service.example.com"}]},"peer":{"ike_identity":{"type":"fqdn","value":"my-service.example.com"},"type":"address","address":"169.21.50.5"},"routing_protocol":"none","tunnels":[{"public_ip":{"address":"192.168.3.4"},"status":"down","status_reasons":[{"code":"cannot_authenticate_connection","message":"Failed to authenticate a connection because of mismatched IKE ID and PSK.","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health"}]}]}]}' + responses.add( + responses.GET, + url, + body=mock_response1, + content_type='application/json', + status=200, + ) + responses.add( + responses.GET, + url, + body=mock_response2, + content_type='application/json', + status=200, + ) + + # Exercise the pager class for this operation + pager = VpnGatewayConnectionsPager( + client=_service, + vpn_gateway_id='testString', + limit=10, + status='down', + ) + all_results = pager.get_all() + assert all_results is not None + assert len(all_results) == 2 + class TestCreateVpnGatewayConnection: """ @@ -37827,37 +40704,51 @@ def test_create_vpn_gateway_connection_all_params(self): # Construct a dict representation of a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById model vpn_gateway_connection_ike_policy_prototype_model = {} - vpn_gateway_connection_ike_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById model vpn_gateway_connection_i_psec_policy_prototype_model = {} - vpn_gateway_connection_i_psec_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN model vpn_gateway_connection_ike_identity_prototype_model = {} vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a dict representation of a VPNGatewayConnectionStaticRouteModeLocalPrototype model vpn_gateway_connection_static_route_mode_local_prototype_model = {} - vpn_gateway_connection_static_route_mode_local_prototype_model['ike_identities'] = [vpn_gateway_connection_ike_identity_prototype_model] + vpn_gateway_connection_static_route_mode_local_prototype_model[ + 'ike_identities'] = [ + vpn_gateway_connection_ike_identity_prototype_model + ] # Construct a dict representation of a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model vpn_gateway_connection_static_route_mode_peer_prototype_model = {} - vpn_gateway_connection_static_route_mode_peer_prototype_model['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_static_route_mode_peer_prototype_model['address'] = '169.21.50.5' + vpn_gateway_connection_static_route_mode_peer_prototype_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_static_route_mode_peer_prototype_model[ + 'address'] = '169.21.50.5' # Construct a dict representation of a VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpn_gateway_connection_prototype_model = {} vpn_gateway_connection_prototype_model['admin_state_up'] = True - vpn_gateway_connection_prototype_model['dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model - vpn_gateway_connection_prototype_model['establish_mode'] = 'bidirectional' - vpn_gateway_connection_prototype_model['ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model - vpn_gateway_connection_prototype_model['ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model + vpn_gateway_connection_prototype_model[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model + vpn_gateway_connection_prototype_model[ + 'establish_mode'] = 'bidirectional' + vpn_gateway_connection_prototype_model[ + 'ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model + vpn_gateway_connection_prototype_model[ + 'ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model vpn_gateway_connection_prototype_model['name'] = 'my-vpn-connection' vpn_gateway_connection_prototype_model['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_prototype_model['local'] = vpn_gateway_connection_static_route_mode_local_prototype_model - vpn_gateway_connection_prototype_model['peer'] = vpn_gateway_connection_static_route_mode_peer_prototype_model + vpn_gateway_connection_prototype_model[ + 'local'] = vpn_gateway_connection_static_route_mode_local_prototype_model + vpn_gateway_connection_prototype_model[ + 'peer'] = vpn_gateway_connection_static_route_mode_peer_prototype_model vpn_gateway_connection_prototype_model['routing_protocol'] = 'none' # Set up parameter values @@ -37911,37 +40802,51 @@ def test_create_vpn_gateway_connection_value_error(self): # Construct a dict representation of a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById model vpn_gateway_connection_ike_policy_prototype_model = {} - vpn_gateway_connection_ike_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById model vpn_gateway_connection_i_psec_policy_prototype_model = {} - vpn_gateway_connection_i_psec_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN model vpn_gateway_connection_ike_identity_prototype_model = {} vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a dict representation of a VPNGatewayConnectionStaticRouteModeLocalPrototype model vpn_gateway_connection_static_route_mode_local_prototype_model = {} - vpn_gateway_connection_static_route_mode_local_prototype_model['ike_identities'] = [vpn_gateway_connection_ike_identity_prototype_model] + vpn_gateway_connection_static_route_mode_local_prototype_model[ + 'ike_identities'] = [ + vpn_gateway_connection_ike_identity_prototype_model + ] # Construct a dict representation of a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model vpn_gateway_connection_static_route_mode_peer_prototype_model = {} - vpn_gateway_connection_static_route_mode_peer_prototype_model['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_static_route_mode_peer_prototype_model['address'] = '169.21.50.5' + vpn_gateway_connection_static_route_mode_peer_prototype_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_static_route_mode_peer_prototype_model[ + 'address'] = '169.21.50.5' # Construct a dict representation of a VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpn_gateway_connection_prototype_model = {} vpn_gateway_connection_prototype_model['admin_state_up'] = True - vpn_gateway_connection_prototype_model['dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model - vpn_gateway_connection_prototype_model['establish_mode'] = 'bidirectional' - vpn_gateway_connection_prototype_model['ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model - vpn_gateway_connection_prototype_model['ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model + vpn_gateway_connection_prototype_model[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model + vpn_gateway_connection_prototype_model[ + 'establish_mode'] = 'bidirectional' + vpn_gateway_connection_prototype_model[ + 'ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model + vpn_gateway_connection_prototype_model[ + 'ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model vpn_gateway_connection_prototype_model['name'] = 'my-vpn-connection' vpn_gateway_connection_prototype_model['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_prototype_model['local'] = vpn_gateway_connection_static_route_mode_local_prototype_model - vpn_gateway_connection_prototype_model['peer'] = vpn_gateway_connection_static_route_mode_peer_prototype_model + vpn_gateway_connection_prototype_model[ + 'local'] = vpn_gateway_connection_static_route_mode_local_prototype_model + vpn_gateway_connection_prototype_model[ + 'peer'] = vpn_gateway_connection_static_route_mode_peer_prototype_model vpn_gateway_connection_prototype_model['routing_protocol'] = 'none' # Set up parameter values @@ -37950,11 +40855,16 @@ def test_create_vpn_gateway_connection_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "vpn_gateway_id": vpn_gateway_id, - "vpn_gateway_connection_prototype": vpn_gateway_connection_prototype, + "vpn_gateway_id": + vpn_gateway_id, + "vpn_gateway_connection_prototype": + vpn_gateway_connection_prototype, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpn_gateway_connection(**req_copy) @@ -38033,7 +40943,10 @@ def test_delete_vpn_gateway_connection_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpn_gateway_connection(**req_copy) @@ -38118,7 +41031,10 @@ def test_get_vpn_gateway_connection_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpn_gateway_connection(**req_copy) @@ -38161,11 +41077,13 @@ def test_update_vpn_gateway_connection_all_params(self): # Construct a dict representation of a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById model vpn_gateway_connection_ike_policy_patch_model = {} - vpn_gateway_connection_ike_policy_patch_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_patch_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById model vpn_gateway_connection_i_psec_policy_patch_model = {} - vpn_gateway_connection_i_psec_policy_patch_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_patch_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model vpn_gateway_connection_peer_patch_model = {} @@ -38174,14 +41092,17 @@ def test_update_vpn_gateway_connection_all_params(self): # Construct a dict representation of a VPNGatewayConnectionPatch model vpn_gateway_connection_patch_model = {} vpn_gateway_connection_patch_model['admin_state_up'] = True - vpn_gateway_connection_patch_model['dead_peer_detection'] = vpn_gateway_connection_dpd_patch_model + vpn_gateway_connection_patch_model[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_patch_model vpn_gateway_connection_patch_model['establish_mode'] = 'bidirectional' - vpn_gateway_connection_patch_model['ike_policy'] = vpn_gateway_connection_ike_policy_patch_model - vpn_gateway_connection_patch_model['ipsec_policy'] = vpn_gateway_connection_i_psec_policy_patch_model + vpn_gateway_connection_patch_model[ + 'ike_policy'] = vpn_gateway_connection_ike_policy_patch_model + vpn_gateway_connection_patch_model[ + 'ipsec_policy'] = vpn_gateway_connection_i_psec_policy_patch_model vpn_gateway_connection_patch_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_patch_model['peer'] = vpn_gateway_connection_peer_patch_model + vpn_gateway_connection_patch_model[ + 'peer'] = vpn_gateway_connection_peer_patch_model vpn_gateway_connection_patch_model['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_patch_model['routing_protocol'] = 'none' # Set up parameter values vpn_gateway_id = 'testString' @@ -38236,11 +41157,13 @@ def test_update_vpn_gateway_connection_value_error(self): # Construct a dict representation of a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById model vpn_gateway_connection_ike_policy_patch_model = {} - vpn_gateway_connection_ike_policy_patch_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_patch_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById model vpn_gateway_connection_i_psec_policy_patch_model = {} - vpn_gateway_connection_i_psec_policy_patch_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_patch_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a dict representation of a VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model vpn_gateway_connection_peer_patch_model = {} @@ -38249,14 +41172,17 @@ def test_update_vpn_gateway_connection_value_error(self): # Construct a dict representation of a VPNGatewayConnectionPatch model vpn_gateway_connection_patch_model = {} vpn_gateway_connection_patch_model['admin_state_up'] = True - vpn_gateway_connection_patch_model['dead_peer_detection'] = vpn_gateway_connection_dpd_patch_model + vpn_gateway_connection_patch_model[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_patch_model vpn_gateway_connection_patch_model['establish_mode'] = 'bidirectional' - vpn_gateway_connection_patch_model['ike_policy'] = vpn_gateway_connection_ike_policy_patch_model - vpn_gateway_connection_patch_model['ipsec_policy'] = vpn_gateway_connection_i_psec_policy_patch_model + vpn_gateway_connection_patch_model[ + 'ike_policy'] = vpn_gateway_connection_ike_policy_patch_model + vpn_gateway_connection_patch_model[ + 'ipsec_policy'] = vpn_gateway_connection_i_psec_policy_patch_model vpn_gateway_connection_patch_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_patch_model['peer'] = vpn_gateway_connection_peer_patch_model + vpn_gateway_connection_patch_model[ + 'peer'] = vpn_gateway_connection_peer_patch_model vpn_gateway_connection_patch_model['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_patch_model['routing_protocol'] = 'none' # Set up parameter values vpn_gateway_id = 'testString' @@ -38270,7 +41196,10 @@ def test_update_vpn_gateway_connection_value_error(self): "vpn_gateway_connection_patch": vpn_gateway_connection_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpn_gateway_connection(**req_copy) @@ -38295,8 +41224,9 @@ def test_list_vpn_gateway_connections_local_cidrs_all_params(self): list_vpn_gateway_connections_local_cidrs() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs') - mock_response = '{"cidrs": ["cidrs"]}' + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs') + mock_response = '{"cidrs": ["192.168.1.0/24"]}' responses.add( responses.GET, url, @@ -38320,7 +41250,8 @@ def test_list_vpn_gateway_connections_local_cidrs_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_vpn_gateway_connections_local_cidrs_all_params_with_retries(self): + def test_list_vpn_gateway_connections_local_cidrs_all_params_with_retries( + self): # Enable retries and run test_list_vpn_gateway_connections_local_cidrs_all_params. _service.enable_retries() self.test_list_vpn_gateway_connections_local_cidrs_all_params() @@ -38335,8 +41266,9 @@ def test_list_vpn_gateway_connections_local_cidrs_value_error(self): test_list_vpn_gateway_connections_local_cidrs_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs') - mock_response = '{"cidrs": ["cidrs"]}' + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs') + mock_response = '{"cidrs": ["192.168.1.0/24"]}' responses.add( responses.GET, url, @@ -38355,11 +41287,15 @@ def test_list_vpn_gateway_connections_local_cidrs_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpn_gateway_connections_local_cidrs(**req_copy) - def test_list_vpn_gateway_connections_local_cidrs_value_error_with_retries(self): + def test_list_vpn_gateway_connections_local_cidrs_value_error_with_retries( + self): # Enable retries and run test_list_vpn_gateway_connections_local_cidrs_value_error. _service.enable_retries() self.test_list_vpn_gateway_connections_local_cidrs_value_error() @@ -38380,7 +41316,9 @@ def test_remove_vpn_gateway_connections_local_cidr_all_params(self): remove_vpn_gateway_connections_local_cidr() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24' + ) responses.add( responses.DELETE, url, @@ -38390,7 +41328,7 @@ def test_remove_vpn_gateway_connections_local_cidr_all_params(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Invoke method response = _service.remove_vpn_gateway_connections_local_cidr( @@ -38404,7 +41342,8 @@ def test_remove_vpn_gateway_connections_local_cidr_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 204 - def test_remove_vpn_gateway_connections_local_cidr_all_params_with_retries(self): + def test_remove_vpn_gateway_connections_local_cidr_all_params_with_retries( + self): # Enable retries and run test_remove_vpn_gateway_connections_local_cidr_all_params. _service.enable_retries() self.test_remove_vpn_gateway_connections_local_cidr_all_params() @@ -38419,7 +41358,9 @@ def test_remove_vpn_gateway_connections_local_cidr_value_error(self): test_remove_vpn_gateway_connections_local_cidr_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24' + ) responses.add( responses.DELETE, url, @@ -38429,7 +41370,7 @@ def test_remove_vpn_gateway_connections_local_cidr_value_error(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -38438,11 +41379,15 @@ def test_remove_vpn_gateway_connections_local_cidr_value_error(self): "cidr": cidr, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.remove_vpn_gateway_connections_local_cidr(**req_copy) - def test_remove_vpn_gateway_connections_local_cidr_value_error_with_retries(self): + def test_remove_vpn_gateway_connections_local_cidr_value_error_with_retries( + self): # Enable retries and run test_remove_vpn_gateway_connections_local_cidr_value_error. _service.enable_retries() self.test_remove_vpn_gateway_connections_local_cidr_value_error() @@ -38463,7 +41408,9 @@ def test_check_vpn_gateway_connections_local_cidr_all_params(self): check_vpn_gateway_connections_local_cidr() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24' + ) responses.add( responses.GET, url, @@ -38473,7 +41420,7 @@ def test_check_vpn_gateway_connections_local_cidr_all_params(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Invoke method response = _service.check_vpn_gateway_connections_local_cidr( @@ -38487,7 +41434,8 @@ def test_check_vpn_gateway_connections_local_cidr_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 204 - def test_check_vpn_gateway_connections_local_cidr_all_params_with_retries(self): + def test_check_vpn_gateway_connections_local_cidr_all_params_with_retries( + self): # Enable retries and run test_check_vpn_gateway_connections_local_cidr_all_params. _service.enable_retries() self.test_check_vpn_gateway_connections_local_cidr_all_params() @@ -38502,7 +41450,9 @@ def test_check_vpn_gateway_connections_local_cidr_value_error(self): test_check_vpn_gateway_connections_local_cidr_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24' + ) responses.add( responses.GET, url, @@ -38512,7 +41462,7 @@ def test_check_vpn_gateway_connections_local_cidr_value_error(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -38521,11 +41471,15 @@ def test_check_vpn_gateway_connections_local_cidr_value_error(self): "cidr": cidr, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.check_vpn_gateway_connections_local_cidr(**req_copy) - def test_check_vpn_gateway_connections_local_cidr_value_error_with_retries(self): + def test_check_vpn_gateway_connections_local_cidr_value_error_with_retries( + self): # Enable retries and run test_check_vpn_gateway_connections_local_cidr_value_error. _service.enable_retries() self.test_check_vpn_gateway_connections_local_cidr_value_error() @@ -38546,7 +41500,9 @@ def test_add_vpn_gateway_connections_local_cidr_all_params(self): add_vpn_gateway_connections_local_cidr() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24' + ) responses.add( responses.PUT, url, @@ -38556,7 +41512,7 @@ def test_add_vpn_gateway_connections_local_cidr_all_params(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Invoke method response = _service.add_vpn_gateway_connections_local_cidr( @@ -38570,7 +41526,8 @@ def test_add_vpn_gateway_connections_local_cidr_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 201 - def test_add_vpn_gateway_connections_local_cidr_all_params_with_retries(self): + def test_add_vpn_gateway_connections_local_cidr_all_params_with_retries( + self): # Enable retries and run test_add_vpn_gateway_connections_local_cidr_all_params. _service.enable_retries() self.test_add_vpn_gateway_connections_local_cidr_all_params() @@ -38585,7 +41542,9 @@ def test_add_vpn_gateway_connections_local_cidr_value_error(self): test_add_vpn_gateway_connections_local_cidr_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/local/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/local/cidrs/192.168.1.0%2F24' + ) responses.add( responses.PUT, url, @@ -38595,7 +41554,7 @@ def test_add_vpn_gateway_connections_local_cidr_value_error(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -38604,11 +41563,15 @@ def test_add_vpn_gateway_connections_local_cidr_value_error(self): "cidr": cidr, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.add_vpn_gateway_connections_local_cidr(**req_copy) - def test_add_vpn_gateway_connections_local_cidr_value_error_with_retries(self): + def test_add_vpn_gateway_connections_local_cidr_value_error_with_retries( + self): # Enable retries and run test_add_vpn_gateway_connections_local_cidr_value_error. _service.enable_retries() self.test_add_vpn_gateway_connections_local_cidr_value_error() @@ -38629,8 +41592,9 @@ def test_list_vpn_gateway_connections_peer_cidrs_all_params(self): list_vpn_gateway_connections_peer_cidrs() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs') - mock_response = '{"cidrs": ["cidrs"]}' + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs') + mock_response = '{"cidrs": ["192.168.1.0/24"]}' responses.add( responses.GET, url, @@ -38654,7 +41618,8 @@ def test_list_vpn_gateway_connections_peer_cidrs_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_vpn_gateway_connections_peer_cidrs_all_params_with_retries(self): + def test_list_vpn_gateway_connections_peer_cidrs_all_params_with_retries( + self): # Enable retries and run test_list_vpn_gateway_connections_peer_cidrs_all_params. _service.enable_retries() self.test_list_vpn_gateway_connections_peer_cidrs_all_params() @@ -38669,8 +41634,9 @@ def test_list_vpn_gateway_connections_peer_cidrs_value_error(self): test_list_vpn_gateway_connections_peer_cidrs_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs') - mock_response = '{"cidrs": ["cidrs"]}' + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs') + mock_response = '{"cidrs": ["192.168.1.0/24"]}' responses.add( responses.GET, url, @@ -38689,11 +41655,15 @@ def test_list_vpn_gateway_connections_peer_cidrs_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpn_gateway_connections_peer_cidrs(**req_copy) - def test_list_vpn_gateway_connections_peer_cidrs_value_error_with_retries(self): + def test_list_vpn_gateway_connections_peer_cidrs_value_error_with_retries( + self): # Enable retries and run test_list_vpn_gateway_connections_peer_cidrs_value_error. _service.enable_retries() self.test_list_vpn_gateway_connections_peer_cidrs_value_error() @@ -38714,7 +41684,9 @@ def test_remove_vpn_gateway_connections_peer_cidr_all_params(self): remove_vpn_gateway_connections_peer_cidr() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24' + ) responses.add( responses.DELETE, url, @@ -38724,7 +41696,7 @@ def test_remove_vpn_gateway_connections_peer_cidr_all_params(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Invoke method response = _service.remove_vpn_gateway_connections_peer_cidr( @@ -38738,7 +41710,8 @@ def test_remove_vpn_gateway_connections_peer_cidr_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 204 - def test_remove_vpn_gateway_connections_peer_cidr_all_params_with_retries(self): + def test_remove_vpn_gateway_connections_peer_cidr_all_params_with_retries( + self): # Enable retries and run test_remove_vpn_gateway_connections_peer_cidr_all_params. _service.enable_retries() self.test_remove_vpn_gateway_connections_peer_cidr_all_params() @@ -38753,7 +41726,9 @@ def test_remove_vpn_gateway_connections_peer_cidr_value_error(self): test_remove_vpn_gateway_connections_peer_cidr_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24' + ) responses.add( responses.DELETE, url, @@ -38763,7 +41738,7 @@ def test_remove_vpn_gateway_connections_peer_cidr_value_error(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -38772,11 +41747,15 @@ def test_remove_vpn_gateway_connections_peer_cidr_value_error(self): "cidr": cidr, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.remove_vpn_gateway_connections_peer_cidr(**req_copy) - def test_remove_vpn_gateway_connections_peer_cidr_value_error_with_retries(self): + def test_remove_vpn_gateway_connections_peer_cidr_value_error_with_retries( + self): # Enable retries and run test_remove_vpn_gateway_connections_peer_cidr_value_error. _service.enable_retries() self.test_remove_vpn_gateway_connections_peer_cidr_value_error() @@ -38797,7 +41776,9 @@ def test_check_vpn_gateway_connections_peer_cidr_all_params(self): check_vpn_gateway_connections_peer_cidr() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24' + ) responses.add( responses.GET, url, @@ -38807,7 +41788,7 @@ def test_check_vpn_gateway_connections_peer_cidr_all_params(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Invoke method response = _service.check_vpn_gateway_connections_peer_cidr( @@ -38821,7 +41802,8 @@ def test_check_vpn_gateway_connections_peer_cidr_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 204 - def test_check_vpn_gateway_connections_peer_cidr_all_params_with_retries(self): + def test_check_vpn_gateway_connections_peer_cidr_all_params_with_retries( + self): # Enable retries and run test_check_vpn_gateway_connections_peer_cidr_all_params. _service.enable_retries() self.test_check_vpn_gateway_connections_peer_cidr_all_params() @@ -38836,7 +41818,9 @@ def test_check_vpn_gateway_connections_peer_cidr_value_error(self): test_check_vpn_gateway_connections_peer_cidr_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24' + ) responses.add( responses.GET, url, @@ -38846,7 +41830,7 @@ def test_check_vpn_gateway_connections_peer_cidr_value_error(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -38855,11 +41839,15 @@ def test_check_vpn_gateway_connections_peer_cidr_value_error(self): "cidr": cidr, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.check_vpn_gateway_connections_peer_cidr(**req_copy) - def test_check_vpn_gateway_connections_peer_cidr_value_error_with_retries(self): + def test_check_vpn_gateway_connections_peer_cidr_value_error_with_retries( + self): # Enable retries and run test_check_vpn_gateway_connections_peer_cidr_value_error. _service.enable_retries() self.test_check_vpn_gateway_connections_peer_cidr_value_error() @@ -38880,7 +41868,9 @@ def test_add_vpn_gateway_connections_peer_cidr_all_params(self): add_vpn_gateway_connections_peer_cidr() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24' + ) responses.add( responses.PUT, url, @@ -38890,7 +41880,7 @@ def test_add_vpn_gateway_connections_peer_cidr_all_params(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Invoke method response = _service.add_vpn_gateway_connections_peer_cidr( @@ -38904,7 +41894,8 @@ def test_add_vpn_gateway_connections_peer_cidr_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 201 - def test_add_vpn_gateway_connections_peer_cidr_all_params_with_retries(self): + def test_add_vpn_gateway_connections_peer_cidr_all_params_with_retries( + self): # Enable retries and run test_add_vpn_gateway_connections_peer_cidr_all_params. _service.enable_retries() self.test_add_vpn_gateway_connections_peer_cidr_all_params() @@ -38919,7 +41910,9 @@ def test_add_vpn_gateway_connections_peer_cidr_value_error(self): test_add_vpn_gateway_connections_peer_cidr_value_error() """ # Set up mock - url = preprocess_url('/vpn_gateways/testString/connections/testString/peer/cidrs/testString') + url = preprocess_url( + '/vpn_gateways/testString/connections/testString/peer/cidrs/192.168.1.0%2F24' + ) responses.add( responses.PUT, url, @@ -38929,7 +41922,7 @@ def test_add_vpn_gateway_connections_peer_cidr_value_error(self): # Set up parameter values vpn_gateway_id = 'testString' id = 'testString' - cidr = 'testString' + cidr = '192.168.1.0/24' # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -38938,11 +41931,15 @@ def test_add_vpn_gateway_connections_peer_cidr_value_error(self): "cidr": cidr, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.add_vpn_gateway_connections_peer_cidr(**req_copy) - def test_add_vpn_gateway_connections_peer_cidr_value_error_with_retries(self): + def test_add_vpn_gateway_connections_peer_cidr_value_error_with_retries( + self): # Enable retries and run test_add_vpn_gateway_connections_peer_cidr_value_error. _service.enable_retries() self.test_add_vpn_gateway_connections_peer_cidr_value_error() @@ -38996,7 +41993,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -39004,9 +42005,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListVpnServers: @@ -39117,10 +42116,12 @@ def test_list_vpn_servers_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpn_servers(**req_copy) @@ -39232,20 +42233,24 @@ def test_create_vpn_server_all_params(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a VPNServerAuthenticationByUsernameIdProviderByIAM model vpn_server_authentication_by_username_id_provider_model = {} - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' # Construct a dict representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model vpn_server_authentication_prototype_model = {} vpn_server_authentication_prototype_model['method'] = 'username' - vpn_server_authentication_prototype_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_prototype_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a IP model ip_model = {} @@ -39257,7 +42262,8 @@ def test_create_vpn_server_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values certificate = certificate_instance_identity_model @@ -39296,7 +42302,9 @@ def test_create_vpn_server_all_params(self): # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['certificate'] == certificate_instance_identity_model - assert req_body['client_authentication'] == [vpn_server_authentication_prototype_model] + assert req_body['client_authentication'] == [ + vpn_server_authentication_prototype_model + ] assert req_body['client_ip_pool'] == '172.16.0.0/16' assert req_body['subnets'] == [subnet_identity_model] assert req_body['client_dns_server_ips'] == [ip_model] @@ -39335,20 +42343,24 @@ def test_create_vpn_server_value_error(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a VPNServerAuthenticationByUsernameIdProviderByIAM model vpn_server_authentication_by_username_id_provider_model = {} - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' # Construct a dict representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model vpn_server_authentication_prototype_model = {} vpn_server_authentication_prototype_model['method'] = 'username' - vpn_server_authentication_prototype_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_prototype_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a IP model ip_model = {} @@ -39360,7 +42372,8 @@ def test_create_vpn_server_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values certificate = certificate_instance_identity_model @@ -39384,7 +42397,10 @@ def test_create_vpn_server_value_error(self): "subnets": subnets, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpn_server(**req_copy) @@ -39496,7 +42512,10 @@ def test_delete_vpn_server_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpn_server(**req_copy) @@ -39577,7 +42596,10 @@ def test_get_vpn_server_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpn_server(**req_copy) @@ -39614,16 +42636,19 @@ def test_update_vpn_server_all_params(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a VPNServerAuthenticationByUsernameIdProviderByIAM model vpn_server_authentication_by_username_id_provider_model = {} - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' # Construct a dict representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model vpn_server_authentication_prototype_model = {} vpn_server_authentication_prototype_model['method'] = 'username' - vpn_server_authentication_prototype_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_prototype_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model # Construct a dict representation of a IP model ip_model = {} @@ -39631,12 +42656,16 @@ def test_update_vpn_server_all_params(self): # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a VPNServerPatch model vpn_server_patch_model = {} - vpn_server_patch_model['certificate'] = certificate_instance_identity_model - vpn_server_patch_model['client_authentication'] = [vpn_server_authentication_prototype_model] + vpn_server_patch_model[ + 'certificate'] = certificate_instance_identity_model + vpn_server_patch_model['client_authentication'] = [ + vpn_server_authentication_prototype_model + ] vpn_server_patch_model['client_dns_server_ips'] = [ip_model] vpn_server_patch_model['client_idle_timeout'] = 600 vpn_server_patch_model['client_ip_pool'] = '172.16.0.0/16' @@ -39693,16 +42722,19 @@ def test_update_vpn_server_required_params(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a VPNServerAuthenticationByUsernameIdProviderByIAM model vpn_server_authentication_by_username_id_provider_model = {} - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' # Construct a dict representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model vpn_server_authentication_prototype_model = {} vpn_server_authentication_prototype_model['method'] = 'username' - vpn_server_authentication_prototype_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_prototype_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model # Construct a dict representation of a IP model ip_model = {} @@ -39710,12 +42742,16 @@ def test_update_vpn_server_required_params(self): # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a VPNServerPatch model vpn_server_patch_model = {} - vpn_server_patch_model['certificate'] = certificate_instance_identity_model - vpn_server_patch_model['client_authentication'] = [vpn_server_authentication_prototype_model] + vpn_server_patch_model[ + 'certificate'] = certificate_instance_identity_model + vpn_server_patch_model['client_authentication'] = [ + vpn_server_authentication_prototype_model + ] vpn_server_patch_model['client_dns_server_ips'] = [ip_model] vpn_server_patch_model['client_idle_timeout'] = 600 vpn_server_patch_model['client_ip_pool'] = '172.16.0.0/16' @@ -39770,16 +42806,19 @@ def test_update_vpn_server_value_error(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a VPNServerAuthenticationByUsernameIdProviderByIAM model vpn_server_authentication_by_username_id_provider_model = {} - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' # Construct a dict representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model vpn_server_authentication_prototype_model = {} vpn_server_authentication_prototype_model['method'] = 'username' - vpn_server_authentication_prototype_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_prototype_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model # Construct a dict representation of a IP model ip_model = {} @@ -39787,12 +42826,16 @@ def test_update_vpn_server_value_error(self): # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a VPNServerPatch model vpn_server_patch_model = {} - vpn_server_patch_model['certificate'] = certificate_instance_identity_model - vpn_server_patch_model['client_authentication'] = [vpn_server_authentication_prototype_model] + vpn_server_patch_model[ + 'certificate'] = certificate_instance_identity_model + vpn_server_patch_model['client_authentication'] = [ + vpn_server_authentication_prototype_model + ] vpn_server_patch_model['client_dns_server_ips'] = [ip_model] vpn_server_patch_model['client_idle_timeout'] = 600 vpn_server_patch_model['client_ip_pool'] = '172.16.0.0/16' @@ -39812,7 +42855,10 @@ def test_update_vpn_server_value_error(self): "vpn_server_patch": vpn_server_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpn_server(**req_copy) @@ -39893,7 +42939,10 @@ def test_get_vpn_server_client_configuration_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpn_server_client_configuration(**req_copy) @@ -40024,7 +43073,10 @@ def test_list_vpn_server_clients_value_error(self): "vpn_server_id": vpn_server_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpn_server_clients(**req_copy) @@ -40176,7 +43228,10 @@ def test_delete_vpn_server_client_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpn_server_client(**req_copy) @@ -40261,7 +43316,10 @@ def test_get_vpn_server_client_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpn_server_client(**req_copy) @@ -40286,7 +43344,8 @@ def test_disconnect_vpn_client_all_params(self): disconnect_vpn_client() """ # Set up mock - url = preprocess_url('/vpn_servers/testString/clients/testString/disconnect') + url = preprocess_url( + '/vpn_servers/testString/clients/testString/disconnect') responses.add( responses.POST, url, @@ -40323,7 +43382,8 @@ def test_disconnect_vpn_client_value_error(self): test_disconnect_vpn_client_value_error() """ # Set up mock - url = preprocess_url('/vpn_servers/testString/clients/testString/disconnect') + url = preprocess_url( + '/vpn_servers/testString/clients/testString/disconnect') responses.add( responses.POST, url, @@ -40340,7 +43400,10 @@ def test_disconnect_vpn_client_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.disconnect_vpn_client(**req_copy) @@ -40366,7 +43429,7 @@ def test_list_vpn_server_routes_all_params(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}' responses.add( responses.GET, url, @@ -40416,7 +43479,7 @@ def test_list_vpn_server_routes_required_params(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}' responses.add( responses.GET, url, @@ -40454,7 +43517,7 @@ def test_list_vpn_server_routes_value_error(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}' responses.add( responses.GET, url, @@ -40471,7 +43534,10 @@ def test_list_vpn_server_routes_value_error(self): "vpn_server_id": vpn_server_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_vpn_server_routes(**req_copy) @@ -40491,8 +43557,8 @@ def test_list_vpn_server_routes_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/vpn_servers/testString/routes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"destination","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' - mock_response2 = '{"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"destination","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' + mock_response2 = '{"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -40529,8 +43595,8 @@ def test_list_vpn_server_routes_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/vpn_servers/testString/routes') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"destination","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' - mock_response2 = '{"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"destination","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' + mock_response2 = '{"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","health_reasons":[{"code":"internal_error","message":"Internal error (contact IBM support).","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -40570,7 +43636,7 @@ def test_create_vpn_server_route_all_params(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes') - mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' + mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' responses.add( responses.POST, url, @@ -40619,7 +43685,7 @@ def test_create_vpn_server_route_value_error(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes') - mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' + mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' responses.add( responses.POST, url, @@ -40640,7 +43706,10 @@ def test_create_vpn_server_route_value_error(self): "destination": destination, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_vpn_server_route(**req_copy) @@ -40719,7 +43788,10 @@ def test_delete_vpn_server_route_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_vpn_server_route(**req_copy) @@ -40745,7 +43817,7 @@ def test_get_vpn_server_route_all_params(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes/testString') - mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' + mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' responses.add( responses.GET, url, @@ -40785,7 +43857,7 @@ def test_get_vpn_server_route_value_error(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes/testString') - mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' + mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' responses.add( responses.GET, url, @@ -40804,7 +43876,10 @@ def test_get_vpn_server_route_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_vpn_server_route(**req_copy) @@ -40830,7 +43905,7 @@ def test_update_vpn_server_route_all_params(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes/testString') - mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' + mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' responses.add( responses.PATCH, url, @@ -40879,7 +43954,7 @@ def test_update_vpn_server_route_value_error(self): """ # Set up mock url = preprocess_url('/vpn_servers/testString/routes/testString') - mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "destination", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' + mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "health_reasons": [{"code": "internal_error", "message": "Internal error (contact IBM support).", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}' responses.add( responses.PATCH, url, @@ -40904,7 +43979,10 @@ def test_update_vpn_server_route_value_error(self): "vpn_server_route_patch": vpn_server_route_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_vpn_server_route(**req_copy) @@ -40962,7 +44040,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -40970,9 +44052,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListLoadBalancerProfiles: @@ -41074,10 +44154,12 @@ def test_list_load_balancer_profiles_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_load_balancer_profiles(**req_copy) @@ -41227,7 +44309,10 @@ def test_get_load_balancer_profile_value_error(self): "name": name, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer_profile(**req_copy) @@ -41253,7 +44338,7 @@ def test_list_load_balancers_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -41298,7 +44383,7 @@ def test_list_load_balancers_required_params(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -41330,7 +44415,7 @@ def test_list_load_balancers_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' + mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}' responses.add( responses.GET, url, @@ -41340,10 +44425,12 @@ def test_list_load_balancers_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_load_balancers(**req_copy) @@ -41363,8 +44450,8 @@ def test_list_load_balancers_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/load_balancers') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' - mock_response2 = '{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' + mock_response2 = '{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' responses.add( responses.GET, url, @@ -41399,8 +44486,8 @@ def test_list_load_balancers_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/load_balancers') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' - mock_response2 = '{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' + mock_response2 = '{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":false,"is_public":true,"listeners":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"}],"logging":{"datapath":{"active":true}},"name":"my-load-balancer","operating_status":"offline","pools":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"}],"private_ips":[{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"profile":{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","name":"network-fixed"},"provisioning_status":"active","public_ips":[{"address":"192.168.3.4"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"load_balancer","route_mode":true,"security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}' responses.add( responses.GET, url, @@ -41438,7 +44525,7 @@ def test_create_load_balancer_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' responses.add( responses.POST, url, @@ -41449,11 +44536,13 @@ def test_create_load_balancer_all_params(self): # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a DNSInstanceIdentityByCRN model dns_instance_identity_model = {} - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' # Construct a dict representation of a DNSZoneIdentityById model dns_zone_identity_model = {} @@ -41461,39 +44550,56 @@ def test_create_load_balancer_all_params(self): # Construct a dict representation of a LoadBalancerDNSPrototype model load_balancer_dns_prototype_model = {} - load_balancer_dns_prototype_model['instance'] = dns_instance_identity_model + load_balancer_dns_prototype_model[ + 'instance'] = dns_instance_identity_model load_balancer_dns_prototype_model['zone'] = dns_zone_identity_model # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a LoadBalancerPoolIdentityByName model load_balancer_pool_identity_by_name_model = {} - load_balancer_pool_identity_by_name_model['name'] = 'my-load-balancer-pool' + load_balancer_pool_identity_by_name_model[ + 'name'] = 'my-load-balancer-pool' # Construct a dict representation of a LoadBalancerListenerIdentityById model load_balancer_listener_identity_model = {} - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} - load_balancer_listener_https_redirect_prototype_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_prototype_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_prototype_model['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_prototype_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_prototype_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_prototype_model[ + 'uri'] = '/example?doc=get' # Construct a dict representation of a LoadBalancerListenerPrototypeLoadBalancerContext model load_balancer_listener_prototype_load_balancer_context_model = {} - load_balancer_listener_prototype_load_balancer_context_model['accept_proxy_protocol'] = True - load_balancer_listener_prototype_load_balancer_context_model['certificate_instance'] = certificate_instance_identity_model - load_balancer_listener_prototype_load_balancer_context_model['connection_limit'] = 2000 - load_balancer_listener_prototype_load_balancer_context_model['default_pool'] = load_balancer_pool_identity_by_name_model - load_balancer_listener_prototype_load_balancer_context_model['https_redirect'] = load_balancer_listener_https_redirect_prototype_model - load_balancer_listener_prototype_load_balancer_context_model['idle_connection_timeout'] = 100 - load_balancer_listener_prototype_load_balancer_context_model['port'] = 443 - load_balancer_listener_prototype_load_balancer_context_model['port_max'] = 499 - load_balancer_listener_prototype_load_balancer_context_model['port_min'] = 443 - load_balancer_listener_prototype_load_balancer_context_model['protocol'] = 'http' + load_balancer_listener_prototype_load_balancer_context_model[ + 'accept_proxy_protocol'] = True + load_balancer_listener_prototype_load_balancer_context_model[ + 'certificate_instance'] = certificate_instance_identity_model + load_balancer_listener_prototype_load_balancer_context_model[ + 'connection_limit'] = 2000 + load_balancer_listener_prototype_load_balancer_context_model[ + 'default_pool'] = load_balancer_pool_identity_by_name_model + load_balancer_listener_prototype_load_balancer_context_model[ + 'https_redirect'] = load_balancer_listener_https_redirect_prototype_model + load_balancer_listener_prototype_load_balancer_context_model[ + 'idle_connection_timeout'] = 100 + load_balancer_listener_prototype_load_balancer_context_model[ + 'port'] = 443 + load_balancer_listener_prototype_load_balancer_context_model[ + 'port_max'] = 499 + load_balancer_listener_prototype_load_balancer_context_model[ + 'port_min'] = 443 + load_balancer_listener_prototype_load_balancer_context_model[ + 'protocol'] = 'http' # Construct a dict representation of a LoadBalancerLoggingDatapathPrototype model load_balancer_logging_datapath_prototype_model = {} @@ -41501,7 +44607,8 @@ def test_create_load_balancer_all_params(self): # Construct a dict representation of a LoadBalancerLoggingPrototype model load_balancer_logging_prototype_model = {} - load_balancer_logging_prototype_model['datapath'] = load_balancer_logging_datapath_prototype_model + load_balancer_logging_prototype_model[ + 'datapath'] = load_balancer_logging_datapath_prototype_model # Construct a dict representation of a LoadBalancerPoolHealthMonitorPrototype model load_balancer_pool_health_monitor_prototype_model = {} @@ -41514,28 +44621,36 @@ def test_create_load_balancer_all_params(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPrototype model load_balancer_pool_member_prototype_model = {} load_balancer_pool_member_prototype_model['port'] = 80 - load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model['weight'] = 50 # Construct a dict representation of a LoadBalancerPoolSessionPersistencePrototype model load_balancer_pool_session_persistence_prototype_model = {} - load_balancer_pool_session_persistence_prototype_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_prototype_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_prototype_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_prototype_model[ + 'type'] = 'app_cookie' # Construct a dict representation of a LoadBalancerPoolPrototype model load_balancer_pool_prototype_model = {} load_balancer_pool_prototype_model['algorithm'] = 'least_connections' - load_balancer_pool_prototype_model['health_monitor'] = load_balancer_pool_health_monitor_prototype_model - load_balancer_pool_prototype_model['members'] = [load_balancer_pool_member_prototype_model] + load_balancer_pool_prototype_model[ + 'health_monitor'] = load_balancer_pool_health_monitor_prototype_model + load_balancer_pool_prototype_model['members'] = [ + load_balancer_pool_member_prototype_model + ] load_balancer_pool_prototype_model['name'] = 'my-load-balancer-pool' load_balancer_pool_prototype_model['protocol'] = 'http' load_balancer_pool_prototype_model['proxy_protocol'] = 'disabled' - load_balancer_pool_prototype_model['session_persistence'] = load_balancer_pool_session_persistence_prototype_model + load_balancer_pool_prototype_model[ + 'session_persistence'] = load_balancer_pool_session_persistence_prototype_model # Construct a dict representation of a LoadBalancerProfileIdentityByName model load_balancer_profile_identity_model = {} @@ -41547,13 +44662,16 @@ def test_create_load_balancer_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values is_public = True subnets = [subnet_identity_model] dns = load_balancer_dns_prototype_model - listeners = [load_balancer_listener_prototype_load_balancer_context_model] + listeners = [ + load_balancer_listener_prototype_load_balancer_context_model + ] logging = load_balancer_logging_prototype_model name = 'my-load-balancer' pools = [load_balancer_pool_prototype_model] @@ -41586,7 +44704,9 @@ def test_create_load_balancer_all_params(self): assert req_body['is_public'] == True assert req_body['subnets'] == [subnet_identity_model] assert req_body['dns'] == load_balancer_dns_prototype_model - assert req_body['listeners'] == [load_balancer_listener_prototype_load_balancer_context_model] + assert req_body['listeners'] == [ + load_balancer_listener_prototype_load_balancer_context_model + ] assert req_body['logging'] == load_balancer_logging_prototype_model assert req_body['name'] == 'my-load-balancer' assert req_body['pools'] == [load_balancer_pool_prototype_model] @@ -41611,7 +44731,7 @@ def test_create_load_balancer_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' responses.add( responses.POST, url, @@ -41622,11 +44742,13 @@ def test_create_load_balancer_value_error(self): # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a DNSInstanceIdentityByCRN model dns_instance_identity_model = {} - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' # Construct a dict representation of a DNSZoneIdentityById model dns_zone_identity_model = {} @@ -41634,39 +44756,56 @@ def test_create_load_balancer_value_error(self): # Construct a dict representation of a LoadBalancerDNSPrototype model load_balancer_dns_prototype_model = {} - load_balancer_dns_prototype_model['instance'] = dns_instance_identity_model + load_balancer_dns_prototype_model[ + 'instance'] = dns_instance_identity_model load_balancer_dns_prototype_model['zone'] = dns_zone_identity_model # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a LoadBalancerPoolIdentityByName model load_balancer_pool_identity_by_name_model = {} - load_balancer_pool_identity_by_name_model['name'] = 'my-load-balancer-pool' + load_balancer_pool_identity_by_name_model[ + 'name'] = 'my-load-balancer-pool' # Construct a dict representation of a LoadBalancerListenerIdentityById model load_balancer_listener_identity_model = {} - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} - load_balancer_listener_https_redirect_prototype_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_prototype_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_prototype_model['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_prototype_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_prototype_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_prototype_model[ + 'uri'] = '/example?doc=get' # Construct a dict representation of a LoadBalancerListenerPrototypeLoadBalancerContext model load_balancer_listener_prototype_load_balancer_context_model = {} - load_balancer_listener_prototype_load_balancer_context_model['accept_proxy_protocol'] = True - load_balancer_listener_prototype_load_balancer_context_model['certificate_instance'] = certificate_instance_identity_model - load_balancer_listener_prototype_load_balancer_context_model['connection_limit'] = 2000 - load_balancer_listener_prototype_load_balancer_context_model['default_pool'] = load_balancer_pool_identity_by_name_model - load_balancer_listener_prototype_load_balancer_context_model['https_redirect'] = load_balancer_listener_https_redirect_prototype_model - load_balancer_listener_prototype_load_balancer_context_model['idle_connection_timeout'] = 100 - load_balancer_listener_prototype_load_balancer_context_model['port'] = 443 - load_balancer_listener_prototype_load_balancer_context_model['port_max'] = 499 - load_balancer_listener_prototype_load_balancer_context_model['port_min'] = 443 - load_balancer_listener_prototype_load_balancer_context_model['protocol'] = 'http' + load_balancer_listener_prototype_load_balancer_context_model[ + 'accept_proxy_protocol'] = True + load_balancer_listener_prototype_load_balancer_context_model[ + 'certificate_instance'] = certificate_instance_identity_model + load_balancer_listener_prototype_load_balancer_context_model[ + 'connection_limit'] = 2000 + load_balancer_listener_prototype_load_balancer_context_model[ + 'default_pool'] = load_balancer_pool_identity_by_name_model + load_balancer_listener_prototype_load_balancer_context_model[ + 'https_redirect'] = load_balancer_listener_https_redirect_prototype_model + load_balancer_listener_prototype_load_balancer_context_model[ + 'idle_connection_timeout'] = 100 + load_balancer_listener_prototype_load_balancer_context_model[ + 'port'] = 443 + load_balancer_listener_prototype_load_balancer_context_model[ + 'port_max'] = 499 + load_balancer_listener_prototype_load_balancer_context_model[ + 'port_min'] = 443 + load_balancer_listener_prototype_load_balancer_context_model[ + 'protocol'] = 'http' # Construct a dict representation of a LoadBalancerLoggingDatapathPrototype model load_balancer_logging_datapath_prototype_model = {} @@ -41674,7 +44813,8 @@ def test_create_load_balancer_value_error(self): # Construct a dict representation of a LoadBalancerLoggingPrototype model load_balancer_logging_prototype_model = {} - load_balancer_logging_prototype_model['datapath'] = load_balancer_logging_datapath_prototype_model + load_balancer_logging_prototype_model[ + 'datapath'] = load_balancer_logging_datapath_prototype_model # Construct a dict representation of a LoadBalancerPoolHealthMonitorPrototype model load_balancer_pool_health_monitor_prototype_model = {} @@ -41687,28 +44827,36 @@ def test_create_load_balancer_value_error(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPrototype model load_balancer_pool_member_prototype_model = {} load_balancer_pool_member_prototype_model['port'] = 80 - load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model['weight'] = 50 # Construct a dict representation of a LoadBalancerPoolSessionPersistencePrototype model load_balancer_pool_session_persistence_prototype_model = {} - load_balancer_pool_session_persistence_prototype_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_prototype_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_prototype_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_prototype_model[ + 'type'] = 'app_cookie' # Construct a dict representation of a LoadBalancerPoolPrototype model load_balancer_pool_prototype_model = {} load_balancer_pool_prototype_model['algorithm'] = 'least_connections' - load_balancer_pool_prototype_model['health_monitor'] = load_balancer_pool_health_monitor_prototype_model - load_balancer_pool_prototype_model['members'] = [load_balancer_pool_member_prototype_model] + load_balancer_pool_prototype_model[ + 'health_monitor'] = load_balancer_pool_health_monitor_prototype_model + load_balancer_pool_prototype_model['members'] = [ + load_balancer_pool_member_prototype_model + ] load_balancer_pool_prototype_model['name'] = 'my-load-balancer-pool' load_balancer_pool_prototype_model['protocol'] = 'http' load_balancer_pool_prototype_model['proxy_protocol'] = 'disabled' - load_balancer_pool_prototype_model['session_persistence'] = load_balancer_pool_session_persistence_prototype_model + load_balancer_pool_prototype_model[ + 'session_persistence'] = load_balancer_pool_session_persistence_prototype_model # Construct a dict representation of a LoadBalancerProfileIdentityByName model load_balancer_profile_identity_model = {} @@ -41720,13 +44868,16 @@ def test_create_load_balancer_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values is_public = True subnets = [subnet_identity_model] dns = load_balancer_dns_prototype_model - listeners = [load_balancer_listener_prototype_load_balancer_context_model] + listeners = [ + load_balancer_listener_prototype_load_balancer_context_model + ] logging = load_balancer_logging_prototype_model name = 'my-load-balancer' pools = [load_balancer_pool_prototype_model] @@ -41741,7 +44892,10 @@ def test_create_load_balancer_value_error(self): "subnets": subnets, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_load_balancer(**req_copy) @@ -41853,7 +45007,10 @@ def test_delete_load_balancer_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_load_balancer(**req_copy) @@ -41879,7 +45036,7 @@ def test_get_load_balancer_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' responses.add( responses.GET, url, @@ -41917,7 +45074,7 @@ def test_get_load_balancer_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' responses.add( responses.GET, url, @@ -41934,7 +45091,10 @@ def test_get_load_balancer_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer(**req_copy) @@ -41960,7 +45120,7 @@ def test_update_load_balancer_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' responses.add( responses.PATCH, url, @@ -41971,7 +45131,8 @@ def test_update_load_balancer_all_params(self): # Construct a dict representation of a DNSInstanceIdentityByCRN model dns_instance_identity_model = {} - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' # Construct a dict representation of a DNSZoneIdentityById model dns_zone_identity_model = {} @@ -41988,11 +45149,13 @@ def test_update_load_balancer_all_params(self): # Construct a dict representation of a LoadBalancerLoggingPatch model load_balancer_logging_patch_model = {} - load_balancer_logging_patch_model['datapath'] = load_balancer_logging_datapath_patch_model + load_balancer_logging_patch_model[ + 'datapath'] = load_balancer_logging_datapath_patch_model # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a LoadBalancerPatch model load_balancer_patch_model = {} @@ -42037,7 +45200,7 @@ def test_update_load_balancer_required_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' responses.add( responses.PATCH, url, @@ -42048,7 +45211,8 @@ def test_update_load_balancer_required_params(self): # Construct a dict representation of a DNSInstanceIdentityByCRN model dns_instance_identity_model = {} - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' # Construct a dict representation of a DNSZoneIdentityById model dns_zone_identity_model = {} @@ -42065,11 +45229,13 @@ def test_update_load_balancer_required_params(self): # Construct a dict representation of a LoadBalancerLoggingPatch model load_balancer_logging_patch_model = {} - load_balancer_logging_patch_model['datapath'] = load_balancer_logging_datapath_patch_model + load_balancer_logging_patch_model[ + 'datapath'] = load_balancer_logging_datapath_patch_model # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a LoadBalancerPatch model load_balancer_patch_model = {} @@ -42112,7 +45278,7 @@ def test_update_load_balancer_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": false, "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "load_balancer", "route_mode": true, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}' responses.add( responses.PATCH, url, @@ -42123,7 +45289,8 @@ def test_update_load_balancer_value_error(self): # Construct a dict representation of a DNSInstanceIdentityByCRN model dns_instance_identity_model = {} - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' # Construct a dict representation of a DNSZoneIdentityById model dns_zone_identity_model = {} @@ -42140,11 +45307,13 @@ def test_update_load_balancer_value_error(self): # Construct a dict representation of a LoadBalancerLoggingPatch model load_balancer_logging_patch_model = {} - load_balancer_logging_patch_model['datapath'] = load_balancer_logging_datapath_patch_model + load_balancer_logging_patch_model[ + 'datapath'] = load_balancer_logging_datapath_patch_model # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a dict representation of a LoadBalancerPatch model load_balancer_patch_model = {} @@ -42163,7 +45332,10 @@ def test_update_load_balancer_value_error(self): "load_balancer_patch": load_balancer_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_load_balancer(**req_copy) @@ -42244,7 +45416,10 @@ def test_get_load_balancer_statistics_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer_statistics(**req_copy) @@ -42325,7 +45500,10 @@ def test_list_load_balancer_listeners_value_error(self): "load_balancer_id": load_balancer_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_load_balancer_listeners(**req_copy) @@ -42362,40 +45540,53 @@ def test_create_load_balancer_listener_all_params(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_pool_identity_model = {} - load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerIdentityById model load_balancer_listener_identity_model = {} - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} - load_balancer_listener_https_redirect_prototype_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_prototype_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_prototype_model['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_prototype_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_prototype_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_prototype_model[ + 'uri'] = '/example?doc=get' # Construct a dict representation of a LoadBalancerListenerPolicyRulePrototype model load_balancer_listener_policy_rule_prototype_model = {} - load_balancer_listener_policy_rule_prototype_model['condition'] = 'contains' - load_balancer_listener_policy_rule_prototype_model['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_prototype_model[ + 'condition'] = 'contains' + load_balancer_listener_policy_rule_prototype_model[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_prototype_model['type'] = 'body' - load_balancer_listener_policy_rule_prototype_model['value'] = 'testString' + load_balancer_listener_policy_rule_prototype_model[ + 'value'] = 'testString' # Construct a dict representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_prototype_model = {} - load_balancer_listener_policy_target_prototype_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_prototype_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerPolicyPrototype model load_balancer_listener_policy_prototype_model = {} load_balancer_listener_policy_prototype_model['action'] = 'forward' load_balancer_listener_policy_prototype_model['name'] = 'my-policy' load_balancer_listener_policy_prototype_model['priority'] = 5 - load_balancer_listener_policy_prototype_model['rules'] = [load_balancer_listener_policy_rule_prototype_model] - load_balancer_listener_policy_prototype_model['target'] = load_balancer_listener_policy_target_prototype_model + load_balancer_listener_policy_prototype_model['rules'] = [ + load_balancer_listener_policy_rule_prototype_model + ] + load_balancer_listener_policy_prototype_model[ + 'target'] = load_balancer_listener_policy_target_prototype_model # Set up parameter values load_balancer_id = 'testString' @@ -42435,12 +45626,16 @@ def test_create_load_balancer_listener_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['protocol'] == 'http' assert req_body['accept_proxy_protocol'] == True - assert req_body['certificate_instance'] == certificate_instance_identity_model + assert req_body[ + 'certificate_instance'] == certificate_instance_identity_model assert req_body['connection_limit'] == 2000 assert req_body['default_pool'] == load_balancer_pool_identity_model - assert req_body['https_redirect'] == load_balancer_listener_https_redirect_prototype_model + assert req_body[ + 'https_redirect'] == load_balancer_listener_https_redirect_prototype_model assert req_body['idle_connection_timeout'] == 100 - assert req_body['policies'] == [load_balancer_listener_policy_prototype_model] + assert req_body['policies'] == [ + load_balancer_listener_policy_prototype_model + ] assert req_body['port'] == 443 assert req_body['port_max'] == 499 assert req_body['port_min'] == 443 @@ -42472,40 +45667,53 @@ def test_create_load_balancer_listener_value_error(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_pool_identity_model = {} - load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerIdentityById model load_balancer_listener_identity_model = {} - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} - load_balancer_listener_https_redirect_prototype_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_prototype_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_prototype_model['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_prototype_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_prototype_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_prototype_model[ + 'uri'] = '/example?doc=get' # Construct a dict representation of a LoadBalancerListenerPolicyRulePrototype model load_balancer_listener_policy_rule_prototype_model = {} - load_balancer_listener_policy_rule_prototype_model['condition'] = 'contains' - load_balancer_listener_policy_rule_prototype_model['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_prototype_model[ + 'condition'] = 'contains' + load_balancer_listener_policy_rule_prototype_model[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_prototype_model['type'] = 'body' - load_balancer_listener_policy_rule_prototype_model['value'] = 'testString' + load_balancer_listener_policy_rule_prototype_model[ + 'value'] = 'testString' # Construct a dict representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_prototype_model = {} - load_balancer_listener_policy_target_prototype_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_prototype_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerPolicyPrototype model load_balancer_listener_policy_prototype_model = {} load_balancer_listener_policy_prototype_model['action'] = 'forward' load_balancer_listener_policy_prototype_model['name'] = 'my-policy' load_balancer_listener_policy_prototype_model['priority'] = 5 - load_balancer_listener_policy_prototype_model['rules'] = [load_balancer_listener_policy_rule_prototype_model] - load_balancer_listener_policy_prototype_model['target'] = load_balancer_listener_policy_target_prototype_model + load_balancer_listener_policy_prototype_model['rules'] = [ + load_balancer_listener_policy_rule_prototype_model + ] + load_balancer_listener_policy_prototype_model[ + 'target'] = load_balancer_listener_policy_target_prototype_model # Set up parameter values load_balancer_id = 'testString' @@ -42527,7 +45735,10 @@ def test_create_load_balancer_listener_value_error(self): "protocol": protocol, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_load_balancer_listener(**req_copy) @@ -42606,7 +45817,10 @@ def test_delete_load_balancer_listener_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_load_balancer_listener(**req_copy) @@ -42691,7 +45905,10 @@ def test_get_load_balancer_listener_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer_listener(**req_copy) @@ -42728,29 +45945,38 @@ def test_update_load_balancer_listener_all_params(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById model load_balancer_listener_default_pool_patch_model = {} - load_balancer_listener_default_pool_patch_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_default_pool_patch_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerIdentityById model load_balancer_listener_identity_model = {} - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPatch model load_balancer_listener_https_redirect_patch_model = {} - load_balancer_listener_https_redirect_patch_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_patch_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_patch_model['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_patch_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_patch_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_patch_model[ + 'uri'] = '/example?doc=get' # Construct a dict representation of a LoadBalancerListenerPatch model load_balancer_listener_patch_model = {} load_balancer_listener_patch_model['accept_proxy_protocol'] = True - load_balancer_listener_patch_model['certificate_instance'] = certificate_instance_identity_model + load_balancer_listener_patch_model[ + 'certificate_instance'] = certificate_instance_identity_model load_balancer_listener_patch_model['connection_limit'] = 2000 - load_balancer_listener_patch_model['default_pool'] = load_balancer_listener_default_pool_patch_model - load_balancer_listener_patch_model['https_redirect'] = load_balancer_listener_https_redirect_patch_model + load_balancer_listener_patch_model[ + 'default_pool'] = load_balancer_listener_default_pool_patch_model + load_balancer_listener_patch_model[ + 'https_redirect'] = load_balancer_listener_https_redirect_patch_model load_balancer_listener_patch_model['idle_connection_timeout'] = 100 load_balancer_listener_patch_model['port'] = 443 load_balancer_listener_patch_model['port_max'] = 499 @@ -42804,29 +46030,38 @@ def test_update_load_balancer_listener_value_error(self): # Construct a dict representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_model = {} - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a dict representation of a LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById model load_balancer_listener_default_pool_patch_model = {} - load_balancer_listener_default_pool_patch_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_default_pool_patch_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerIdentityById model load_balancer_listener_identity_model = {} - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPatch model load_balancer_listener_https_redirect_patch_model = {} - load_balancer_listener_https_redirect_patch_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_patch_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_patch_model['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_patch_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_patch_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_patch_model[ + 'uri'] = '/example?doc=get' # Construct a dict representation of a LoadBalancerListenerPatch model load_balancer_listener_patch_model = {} load_balancer_listener_patch_model['accept_proxy_protocol'] = True - load_balancer_listener_patch_model['certificate_instance'] = certificate_instance_identity_model + load_balancer_listener_patch_model[ + 'certificate_instance'] = certificate_instance_identity_model load_balancer_listener_patch_model['connection_limit'] = 2000 - load_balancer_listener_patch_model['default_pool'] = load_balancer_listener_default_pool_patch_model - load_balancer_listener_patch_model['https_redirect'] = load_balancer_listener_https_redirect_patch_model + load_balancer_listener_patch_model[ + 'default_pool'] = load_balancer_listener_default_pool_patch_model + load_balancer_listener_patch_model[ + 'https_redirect'] = load_balancer_listener_https_redirect_patch_model load_balancer_listener_patch_model['idle_connection_timeout'] = 100 load_balancer_listener_patch_model['port'] = 443 load_balancer_listener_patch_model['port_max'] = 499 @@ -42845,7 +46080,10 @@ def test_update_load_balancer_listener_value_error(self): "load_balancer_listener_patch": load_balancer_listener_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_load_balancer_listener(**req_copy) @@ -42870,7 +46108,8 @@ def test_list_load_balancer_listener_policies_all_params(self): list_load_balancer_listener_policies() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies') mock_response = '{"policies": [{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}]}' responses.add( responses.GET, @@ -42910,7 +46149,8 @@ def test_list_load_balancer_listener_policies_value_error(self): test_list_load_balancer_listener_policies_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies') mock_response = '{"policies": [{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}]}' responses.add( responses.GET, @@ -42930,11 +46170,15 @@ def test_list_load_balancer_listener_policies_value_error(self): "listener_id": listener_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_load_balancer_listener_policies(**req_copy) - def test_list_load_balancer_listener_policies_value_error_with_retries(self): + def test_list_load_balancer_listener_policies_value_error_with_retries( + self): # Enable retries and run test_list_load_balancer_listener_policies_value_error. _service.enable_retries() self.test_list_load_balancer_listener_policies_value_error() @@ -42955,7 +46199,8 @@ def test_create_load_balancer_listener_policy_all_params(self): create_load_balancer_listener_policy() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies') mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.POST, @@ -42967,14 +46212,18 @@ def test_create_load_balancer_listener_policy_all_params(self): # Construct a dict representation of a LoadBalancerListenerPolicyRulePrototype model load_balancer_listener_policy_rule_prototype_model = {} - load_balancer_listener_policy_rule_prototype_model['condition'] = 'contains' - load_balancer_listener_policy_rule_prototype_model['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_prototype_model[ + 'condition'] = 'contains' + load_balancer_listener_policy_rule_prototype_model[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_prototype_model['type'] = 'body' - load_balancer_listener_policy_rule_prototype_model['value'] = 'testString' + load_balancer_listener_policy_rule_prototype_model[ + 'value'] = 'testString' # Construct a dict representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_prototype_model = {} - load_balancer_listener_policy_target_prototype_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_prototype_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Set up parameter values load_balancer_id = 'testString' @@ -43005,8 +46254,11 @@ def test_create_load_balancer_listener_policy_all_params(self): assert req_body['action'] == 'forward' assert req_body['priority'] == 5 assert req_body['name'] == 'my-policy' - assert req_body['rules'] == [load_balancer_listener_policy_rule_prototype_model] - assert req_body['target'] == load_balancer_listener_policy_target_prototype_model + assert req_body['rules'] == [ + load_balancer_listener_policy_rule_prototype_model + ] + assert req_body[ + 'target'] == load_balancer_listener_policy_target_prototype_model def test_create_load_balancer_listener_policy_all_params_with_retries(self): # Enable retries and run test_create_load_balancer_listener_policy_all_params. @@ -43023,7 +46275,8 @@ def test_create_load_balancer_listener_policy_value_error(self): test_create_load_balancer_listener_policy_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies') mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.POST, @@ -43035,14 +46288,18 @@ def test_create_load_balancer_listener_policy_value_error(self): # Construct a dict representation of a LoadBalancerListenerPolicyRulePrototype model load_balancer_listener_policy_rule_prototype_model = {} - load_balancer_listener_policy_rule_prototype_model['condition'] = 'contains' - load_balancer_listener_policy_rule_prototype_model['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_prototype_model[ + 'condition'] = 'contains' + load_balancer_listener_policy_rule_prototype_model[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_prototype_model['type'] = 'body' - load_balancer_listener_policy_rule_prototype_model['value'] = 'testString' + load_balancer_listener_policy_rule_prototype_model[ + 'value'] = 'testString' # Construct a dict representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_prototype_model = {} - load_balancer_listener_policy_target_prototype_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_prototype_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Set up parameter values load_balancer_id = 'testString' @@ -43061,11 +46318,15 @@ def test_create_load_balancer_listener_policy_value_error(self): "priority": priority, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_load_balancer_listener_policy(**req_copy) - def test_create_load_balancer_listener_policy_value_error_with_retries(self): + def test_create_load_balancer_listener_policy_value_error_with_retries( + self): # Enable retries and run test_create_load_balancer_listener_policy_value_error. _service.enable_retries() self.test_create_load_balancer_listener_policy_value_error() @@ -43086,7 +46347,9 @@ def test_delete_load_balancer_listener_policy_all_params(self): delete_load_balancer_listener_policy() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString' + ) responses.add( responses.DELETE, url, @@ -43125,7 +46388,9 @@ def test_delete_load_balancer_listener_policy_value_error(self): test_delete_load_balancer_listener_policy_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString' + ) responses.add( responses.DELETE, url, @@ -43144,11 +46409,15 @@ def test_delete_load_balancer_listener_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_load_balancer_listener_policy(**req_copy) - def test_delete_load_balancer_listener_policy_value_error_with_retries(self): + def test_delete_load_balancer_listener_policy_value_error_with_retries( + self): # Enable retries and run test_delete_load_balancer_listener_policy_value_error. _service.enable_retries() self.test_delete_load_balancer_listener_policy_value_error() @@ -43169,7 +46438,9 @@ def test_get_load_balancer_listener_policy_all_params(self): get_load_balancer_listener_policy() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString' + ) mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.GET, @@ -43211,7 +46482,9 @@ def test_get_load_balancer_listener_policy_value_error(self): test_get_load_balancer_listener_policy_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString' + ) mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.GET, @@ -43233,7 +46506,10 @@ def test_get_load_balancer_listener_policy_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer_listener_policy(**req_copy) @@ -43258,7 +46534,9 @@ def test_update_load_balancer_listener_policy_all_params(self): update_load_balancer_listener_policy() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString' + ) mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.PATCH, @@ -43270,13 +46548,15 @@ def test_update_load_balancer_listener_policy_all_params(self): # Construct a dict representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_patch_model = {} - load_balancer_listener_policy_target_patch_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_patch_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerPolicyPatch model load_balancer_listener_policy_patch_model = {} load_balancer_listener_policy_patch_model['name'] = 'my-policy' load_balancer_listener_policy_patch_model['priority'] = 5 - load_balancer_listener_policy_patch_model['target'] = load_balancer_listener_policy_target_patch_model + load_balancer_listener_policy_patch_model[ + 'target'] = load_balancer_listener_policy_target_patch_model # Set up parameter values load_balancer_id = 'testString' @@ -43315,7 +46595,9 @@ def test_update_load_balancer_listener_policy_value_error(self): test_update_load_balancer_listener_policy_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString' + ) mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy", "priority": 5, "provisioning_status": "active", "rules": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.PATCH, @@ -43327,13 +46609,15 @@ def test_update_load_balancer_listener_policy_value_error(self): # Construct a dict representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_patch_model = {} - load_balancer_listener_policy_target_patch_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_patch_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a LoadBalancerListenerPolicyPatch model load_balancer_listener_policy_patch_model = {} load_balancer_listener_policy_patch_model['name'] = 'my-policy' load_balancer_listener_policy_patch_model['priority'] = 5 - load_balancer_listener_policy_patch_model['target'] = load_balancer_listener_policy_target_patch_model + load_balancer_listener_policy_patch_model[ + 'target'] = load_balancer_listener_policy_target_patch_model # Set up parameter values load_balancer_id = 'testString' @@ -43343,17 +46627,25 @@ def test_update_load_balancer_listener_policy_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "load_balancer_id": load_balancer_id, - "listener_id": listener_id, - "id": id, - "load_balancer_listener_policy_patch": load_balancer_listener_policy_patch, + "load_balancer_id": + load_balancer_id, + "listener_id": + listener_id, + "id": + id, + "load_balancer_listener_policy_patch": + load_balancer_listener_policy_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_load_balancer_listener_policy(**req_copy) - def test_update_load_balancer_listener_policy_value_error_with_retries(self): + def test_update_load_balancer_listener_policy_value_error_with_retries( + self): # Enable retries and run test_update_load_balancer_listener_policy_value_error. _service.enable_retries() self.test_update_load_balancer_listener_policy_value_error() @@ -43374,7 +46666,9 @@ def test_list_load_balancer_listener_policy_rules_all_params(self): list_load_balancer_listener_policy_rules() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules' + ) mock_response = '{"rules": [{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}]}' responses.add( responses.GET, @@ -43401,7 +46695,8 @@ def test_list_load_balancer_listener_policy_rules_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_list_load_balancer_listener_policy_rules_all_params_with_retries(self): + def test_list_load_balancer_listener_policy_rules_all_params_with_retries( + self): # Enable retries and run test_list_load_balancer_listener_policy_rules_all_params. _service.enable_retries() self.test_list_load_balancer_listener_policy_rules_all_params() @@ -43416,7 +46711,9 @@ def test_list_load_balancer_listener_policy_rules_value_error(self): test_list_load_balancer_listener_policy_rules_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules' + ) mock_response = '{"rules": [{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}]}' responses.add( responses.GET, @@ -43438,11 +46735,15 @@ def test_list_load_balancer_listener_policy_rules_value_error(self): "policy_id": policy_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_load_balancer_listener_policy_rules(**req_copy) - def test_list_load_balancer_listener_policy_rules_value_error_with_retries(self): + def test_list_load_balancer_listener_policy_rules_value_error_with_retries( + self): # Enable retries and run test_list_load_balancer_listener_policy_rules_value_error. _service.enable_retries() self.test_list_load_balancer_listener_policy_rules_value_error() @@ -43463,7 +46764,9 @@ def test_create_load_balancer_listener_policy_rule_all_params(self): create_load_balancer_listener_policy_rule() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules' + ) mock_response = '{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.POST, @@ -43504,7 +46807,8 @@ def test_create_load_balancer_listener_policy_rule_all_params(self): assert req_body['value'] == 'testString' assert req_body['field'] == 'MY-APP-HEADER' - def test_create_load_balancer_listener_policy_rule_all_params_with_retries(self): + def test_create_load_balancer_listener_policy_rule_all_params_with_retries( + self): # Enable retries and run test_create_load_balancer_listener_policy_rule_all_params. _service.enable_retries() self.test_create_load_balancer_listener_policy_rule_all_params() @@ -43519,7 +46823,9 @@ def test_create_load_balancer_listener_policy_rule_value_error(self): test_create_load_balancer_listener_policy_rule_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules' + ) mock_response = '{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.POST, @@ -43548,11 +46854,15 @@ def test_create_load_balancer_listener_policy_rule_value_error(self): "value": value, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_load_balancer_listener_policy_rule(**req_copy) - def test_create_load_balancer_listener_policy_rule_value_error_with_retries(self): + def test_create_load_balancer_listener_policy_rule_value_error_with_retries( + self): # Enable retries and run test_create_load_balancer_listener_policy_rule_value_error. _service.enable_retries() self.test_create_load_balancer_listener_policy_rule_value_error() @@ -43573,7 +46883,9 @@ def test_delete_load_balancer_listener_policy_rule_all_params(self): delete_load_balancer_listener_policy_rule() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules/testString' + ) responses.add( responses.DELETE, url, @@ -43599,7 +46911,8 @@ def test_delete_load_balancer_listener_policy_rule_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 202 - def test_delete_load_balancer_listener_policy_rule_all_params_with_retries(self): + def test_delete_load_balancer_listener_policy_rule_all_params_with_retries( + self): # Enable retries and run test_delete_load_balancer_listener_policy_rule_all_params. _service.enable_retries() self.test_delete_load_balancer_listener_policy_rule_all_params() @@ -43614,7 +46927,9 @@ def test_delete_load_balancer_listener_policy_rule_value_error(self): test_delete_load_balancer_listener_policy_rule_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules/testString' + ) responses.add( responses.DELETE, url, @@ -43635,11 +46950,15 @@ def test_delete_load_balancer_listener_policy_rule_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_load_balancer_listener_policy_rule(**req_copy) - def test_delete_load_balancer_listener_policy_rule_value_error_with_retries(self): + def test_delete_load_balancer_listener_policy_rule_value_error_with_retries( + self): # Enable retries and run test_delete_load_balancer_listener_policy_rule_value_error. _service.enable_retries() self.test_delete_load_balancer_listener_policy_rule_value_error() @@ -43660,7 +46979,9 @@ def test_get_load_balancer_listener_policy_rule_all_params(self): get_load_balancer_listener_policy_rule() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules/testString' + ) mock_response = '{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.GET, @@ -43689,7 +47010,8 @@ def test_get_load_balancer_listener_policy_rule_all_params(self): assert len(responses.calls) == 1 assert response.status_code == 200 - def test_get_load_balancer_listener_policy_rule_all_params_with_retries(self): + def test_get_load_balancer_listener_policy_rule_all_params_with_retries( + self): # Enable retries and run test_get_load_balancer_listener_policy_rule_all_params. _service.enable_retries() self.test_get_load_balancer_listener_policy_rule_all_params() @@ -43704,7 +47026,9 @@ def test_get_load_balancer_listener_policy_rule_value_error(self): test_get_load_balancer_listener_policy_rule_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules/testString' + ) mock_response = '{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.GET, @@ -43728,11 +47052,15 @@ def test_get_load_balancer_listener_policy_rule_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer_listener_policy_rule(**req_copy) - def test_get_load_balancer_listener_policy_rule_value_error_with_retries(self): + def test_get_load_balancer_listener_policy_rule_value_error_with_retries( + self): # Enable retries and run test_get_load_balancer_listener_policy_rule_value_error. _service.enable_retries() self.test_get_load_balancer_listener_policy_rule_value_error() @@ -43753,7 +47081,9 @@ def test_update_load_balancer_listener_policy_rule_all_params(self): update_load_balancer_listener_policy_rule() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules/testString' + ) mock_response = '{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.PATCH, @@ -43766,7 +47096,8 @@ def test_update_load_balancer_listener_policy_rule_all_params(self): # Construct a dict representation of a LoadBalancerListenerPolicyRulePatch model load_balancer_listener_policy_rule_patch_model = {} load_balancer_listener_policy_rule_patch_model['condition'] = 'contains' - load_balancer_listener_policy_rule_patch_model['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_patch_model[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_patch_model['type'] = 'body' load_balancer_listener_policy_rule_patch_model['value'] = 'testString' @@ -43794,7 +47125,8 @@ def test_update_load_balancer_listener_policy_rule_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body == load_balancer_listener_policy_rule_patch - def test_update_load_balancer_listener_policy_rule_all_params_with_retries(self): + def test_update_load_balancer_listener_policy_rule_all_params_with_retries( + self): # Enable retries and run test_update_load_balancer_listener_policy_rule_all_params. _service.enable_retries() self.test_update_load_balancer_listener_policy_rule_all_params() @@ -43809,7 +47141,9 @@ def test_update_load_balancer_listener_policy_rule_value_error(self): test_update_load_balancer_listener_policy_rule_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString') + url = preprocess_url( + '/load_balancers/testString/listeners/testString/policies/testString/rules/testString' + ) mock_response = '{"condition": "contains", "created_at": "2019-01-01T12:00:00.000Z", "field": "MY-APP-HEADER", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.PATCH, @@ -43822,7 +47156,8 @@ def test_update_load_balancer_listener_policy_rule_value_error(self): # Construct a dict representation of a LoadBalancerListenerPolicyRulePatch model load_balancer_listener_policy_rule_patch_model = {} load_balancer_listener_policy_rule_patch_model['condition'] = 'contains' - load_balancer_listener_policy_rule_patch_model['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_patch_model[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_patch_model['type'] = 'body' load_balancer_listener_policy_rule_patch_model['value'] = 'testString' @@ -43835,18 +47170,27 @@ def test_update_load_balancer_listener_policy_rule_value_error(self): # Pass in all but one required param and check for a ValueError req_param_dict = { - "load_balancer_id": load_balancer_id, - "listener_id": listener_id, - "policy_id": policy_id, - "id": id, - "load_balancer_listener_policy_rule_patch": load_balancer_listener_policy_rule_patch, + "load_balancer_id": + load_balancer_id, + "listener_id": + listener_id, + "policy_id": + policy_id, + "id": + id, + "load_balancer_listener_policy_rule_patch": + load_balancer_listener_policy_rule_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_load_balancer_listener_policy_rule(**req_copy) - def test_update_load_balancer_listener_policy_rule_value_error_with_retries(self): + def test_update_load_balancer_listener_policy_rule_value_error_with_retries( + self): # Enable retries and run test_update_load_balancer_listener_policy_rule_value_error. _service.enable_retries() self.test_update_load_balancer_listener_policy_rule_value_error() @@ -43923,7 +47267,10 @@ def test_list_load_balancer_pools_value_error(self): "load_balancer_id": load_balancer_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_load_balancer_pools(**req_copy) @@ -43969,18 +47316,22 @@ def test_create_load_balancer_pool_all_params(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPrototype model load_balancer_pool_member_prototype_model = {} load_balancer_pool_member_prototype_model['port'] = 80 - load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model['weight'] = 50 # Construct a dict representation of a LoadBalancerPoolSessionPersistencePrototype model load_balancer_pool_session_persistence_prototype_model = {} - load_balancer_pool_session_persistence_prototype_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_prototype_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_prototype_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_prototype_model[ + 'type'] = 'app_cookie' # Set up parameter values load_balancer_id = 'testString' @@ -44011,12 +47362,16 @@ def test_create_load_balancer_pool_all_params(self): # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['algorithm'] == 'least_connections' - assert req_body['health_monitor'] == load_balancer_pool_health_monitor_prototype_model + assert req_body[ + 'health_monitor'] == load_balancer_pool_health_monitor_prototype_model assert req_body['protocol'] == 'http' - assert req_body['members'] == [load_balancer_pool_member_prototype_model] + assert req_body['members'] == [ + load_balancer_pool_member_prototype_model + ] assert req_body['name'] == 'my-load-balancer-pool' assert req_body['proxy_protocol'] == 'disabled' - assert req_body['session_persistence'] == load_balancer_pool_session_persistence_prototype_model + assert req_body[ + 'session_persistence'] == load_balancer_pool_session_persistence_prototype_model def test_create_load_balancer_pool_all_params_with_retries(self): # Enable retries and run test_create_load_balancer_pool_all_params. @@ -44054,18 +47409,22 @@ def test_create_load_balancer_pool_value_error(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPrototype model load_balancer_pool_member_prototype_model = {} load_balancer_pool_member_prototype_model['port'] = 80 - load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model['weight'] = 50 # Construct a dict representation of a LoadBalancerPoolSessionPersistencePrototype model load_balancer_pool_session_persistence_prototype_model = {} - load_balancer_pool_session_persistence_prototype_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_prototype_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_prototype_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_prototype_model[ + 'type'] = 'app_cookie' # Set up parameter values load_balancer_id = 'testString' @@ -44085,7 +47444,10 @@ def test_create_load_balancer_pool_value_error(self): "protocol": protocol, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_load_balancer_pool(**req_copy) @@ -44164,7 +47526,10 @@ def test_delete_load_balancer_pool_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_load_balancer_pool(**req_copy) @@ -44249,7 +47614,10 @@ def test_get_load_balancer_pool_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer_pool(**req_copy) @@ -44295,17 +47663,21 @@ def test_update_load_balancer_pool_all_params(self): # Construct a dict representation of a LoadBalancerPoolSessionPersistencePatch model load_balancer_pool_session_persistence_patch_model = {} - load_balancer_pool_session_persistence_patch_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_patch_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_patch_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_patch_model[ + 'type'] = 'app_cookie' # Construct a dict representation of a LoadBalancerPoolPatch model load_balancer_pool_patch_model = {} load_balancer_pool_patch_model['algorithm'] = 'least_connections' - load_balancer_pool_patch_model['health_monitor'] = load_balancer_pool_health_monitor_patch_model + load_balancer_pool_patch_model[ + 'health_monitor'] = load_balancer_pool_health_monitor_patch_model load_balancer_pool_patch_model['name'] = 'my-load-balancer-pool' load_balancer_pool_patch_model['protocol'] = 'http' load_balancer_pool_patch_model['proxy_protocol'] = 'disabled' - load_balancer_pool_patch_model['session_persistence'] = load_balancer_pool_session_persistence_patch_model + load_balancer_pool_patch_model[ + 'session_persistence'] = load_balancer_pool_session_persistence_patch_model # Set up parameter values load_balancer_id = 'testString' @@ -44363,17 +47735,21 @@ def test_update_load_balancer_pool_value_error(self): # Construct a dict representation of a LoadBalancerPoolSessionPersistencePatch model load_balancer_pool_session_persistence_patch_model = {} - load_balancer_pool_session_persistence_patch_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_patch_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_patch_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_patch_model[ + 'type'] = 'app_cookie' # Construct a dict representation of a LoadBalancerPoolPatch model load_balancer_pool_patch_model = {} load_balancer_pool_patch_model['algorithm'] = 'least_connections' - load_balancer_pool_patch_model['health_monitor'] = load_balancer_pool_health_monitor_patch_model + load_balancer_pool_patch_model[ + 'health_monitor'] = load_balancer_pool_health_monitor_patch_model load_balancer_pool_patch_model['name'] = 'my-load-balancer-pool' load_balancer_pool_patch_model['protocol'] = 'http' load_balancer_pool_patch_model['proxy_protocol'] = 'disabled' - load_balancer_pool_patch_model['session_persistence'] = load_balancer_pool_session_persistence_patch_model + load_balancer_pool_patch_model[ + 'session_persistence'] = load_balancer_pool_session_persistence_patch_model # Set up parameter values load_balancer_id = 'testString' @@ -44387,7 +47763,10 @@ def test_update_load_balancer_pool_value_error(self): "load_balancer_pool_patch": load_balancer_pool_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_load_balancer_pool(**req_copy) @@ -44412,7 +47791,8 @@ def test_list_load_balancer_pool_members_all_params(self): list_load_balancer_pool_members() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members') mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.GET, @@ -44452,7 +47832,8 @@ def test_list_load_balancer_pool_members_value_error(self): test_list_load_balancer_pool_members_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members') mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.GET, @@ -44472,7 +47853,10 @@ def test_list_load_balancer_pool_members_value_error(self): "pool_id": pool_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_load_balancer_pool_members(**req_copy) @@ -44497,7 +47881,8 @@ def test_create_load_balancer_pool_member_all_params(self): create_load_balancer_pool_member() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}' responses.add( responses.POST, @@ -44509,7 +47894,8 @@ def test_create_load_balancer_pool_member_all_params(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Set up parameter values load_balancer_id = 'testString' @@ -44534,7 +47920,8 @@ def test_create_load_balancer_pool_member_all_params(self): # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['port'] == 80 - assert req_body['target'] == load_balancer_pool_member_target_prototype_model + assert req_body[ + 'target'] == load_balancer_pool_member_target_prototype_model assert req_body['weight'] == 50 def test_create_load_balancer_pool_member_all_params_with_retries(self): @@ -44552,7 +47939,8 @@ def test_create_load_balancer_pool_member_value_error(self): test_create_load_balancer_pool_member_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}' responses.add( responses.POST, @@ -44564,7 +47952,8 @@ def test_create_load_balancer_pool_member_value_error(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Set up parameter values load_balancer_id = 'testString' @@ -44581,7 +47970,10 @@ def test_create_load_balancer_pool_member_value_error(self): "target": target, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_load_balancer_pool_member(**req_copy) @@ -44606,7 +47998,8 @@ def test_replace_load_balancer_pool_members_all_params(self): replace_load_balancer_pool_members() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members') mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.PUT, @@ -44618,12 +48011,14 @@ def test_replace_load_balancer_pool_members_all_params(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPrototype model load_balancer_pool_member_prototype_model = {} load_balancer_pool_member_prototype_model['port'] = 80 - load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model['weight'] = 50 # Set up parameter values @@ -44644,7 +48039,9 @@ def test_replace_load_balancer_pool_members_all_params(self): assert response.status_code == 202 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body['members'] == [load_balancer_pool_member_prototype_model] + assert req_body['members'] == [ + load_balancer_pool_member_prototype_model + ] def test_replace_load_balancer_pool_members_all_params_with_retries(self): # Enable retries and run test_replace_load_balancer_pool_members_all_params. @@ -44661,7 +48058,8 @@ def test_replace_load_balancer_pool_members_value_error(self): test_replace_load_balancer_pool_members_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members') mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.PUT, @@ -44673,12 +48071,14 @@ def test_replace_load_balancer_pool_members_value_error(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPrototype model load_balancer_pool_member_prototype_model = {} load_balancer_pool_member_prototype_model['port'] = 80 - load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model['weight'] = 50 # Set up parameter values @@ -44693,7 +48093,10 @@ def test_replace_load_balancer_pool_members_value_error(self): "members": members, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.replace_load_balancer_pool_members(**req_copy) @@ -44718,7 +48121,8 @@ def test_delete_load_balancer_pool_member_all_params(self): delete_load_balancer_pool_member() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members/testString') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members/testString') responses.add( responses.DELETE, url, @@ -44757,7 +48161,8 @@ def test_delete_load_balancer_pool_member_value_error(self): test_delete_load_balancer_pool_member_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members/testString') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members/testString') responses.add( responses.DELETE, url, @@ -44776,7 +48181,10 @@ def test_delete_load_balancer_pool_member_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_load_balancer_pool_member(**req_copy) @@ -44801,7 +48209,8 @@ def test_get_load_balancer_pool_member_all_params(self): get_load_balancer_pool_member() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members/testString') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}' responses.add( responses.GET, @@ -44843,7 +48252,8 @@ def test_get_load_balancer_pool_member_value_error(self): test_get_load_balancer_pool_member_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members/testString') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}' responses.add( responses.GET, @@ -44865,7 +48275,10 @@ def test_get_load_balancer_pool_member_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_load_balancer_pool_member(**req_copy) @@ -44890,7 +48303,8 @@ def test_update_load_balancer_pool_member_all_params(self): update_load_balancer_pool_member() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members/testString') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}' responses.add( responses.PATCH, @@ -44902,12 +48316,14 @@ def test_update_load_balancer_pool_member_all_params(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPatch model load_balancer_pool_member_patch_model = {} load_balancer_pool_member_patch_model['port'] = 80 - load_balancer_pool_member_patch_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_patch_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_patch_model['weight'] = 50 # Set up parameter values @@ -44947,7 +48363,8 @@ def test_update_load_balancer_pool_member_value_error(self): test_update_load_balancer_pool_member_value_error() """ # Set up mock - url = preprocess_url('/load_balancers/testString/pools/testString/members/testString') + url = preprocess_url( + '/load_balancers/testString/pools/testString/members/testString') mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a", "id": "0717_1e09281b-f177-46f2-b1f1-bc152b2e391a", "name": "my-instance"}, "weight": 50}' responses.add( responses.PATCH, @@ -44959,12 +48376,14 @@ def test_update_load_balancer_pool_member_value_error(self): # Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_model = {} - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a dict representation of a LoadBalancerPoolMemberPatch model load_balancer_pool_member_patch_model = {} load_balancer_pool_member_patch_model['port'] = 80 - load_balancer_pool_member_patch_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_patch_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_patch_model['weight'] = 50 # Set up parameter values @@ -44981,7 +48400,10 @@ def test_update_load_balancer_pool_member_value_error(self): "load_balancer_pool_member_patch": load_balancer_pool_member_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_load_balancer_pool_member(**req_copy) @@ -45039,7 +48461,11 @@ def test_new_instance_without_required_params(self): """ new_instance_without_required_params() """ - with pytest.raises(TypeError, match='new_instance\\(\\) missing \\d required positional arguments?: \'.*\''): + with pytest.raises( + TypeError, + match= + 'new_instance\\(\\) missing \\d required positional arguments?: \'.*\'' + ): service = VpcV1.new_instance() def test_new_instance_required_param_none(self): @@ -45047,9 +48473,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListEndpointGateways: @@ -45109,7 +48533,8 @@ def test_list_endpoint_gateways_all_params(self): assert 'vpc.id={}'.format(vpc_id) in query_string assert 'vpc.crn={}'.format(vpc_crn) in query_string assert 'vpc.name={}'.format(vpc_name) in query_string - assert 'allow_dns_resolution_binding={}'.format('true' if allow_dns_resolution_binding else 'false') in query_string + assert 'allow_dns_resolution_binding={}'.format( + 'true' if allow_dns_resolution_binding else 'false') in query_string def test_list_endpoint_gateways_all_params_with_retries(self): # Enable retries and run test_list_endpoint_gateways_all_params. @@ -45169,10 +48594,12 @@ def test_list_endpoint_gateways_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_endpoint_gateways(**req_copy) @@ -45217,7 +48644,8 @@ def test_list_endpoint_gateways_with_pager_get_next(self): limit=10, resource_group_id='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', allow_dns_resolution_binding=True, ) @@ -45258,7 +48686,8 @@ def test_list_endpoint_gateways_with_pager_get_all(self): limit=10, resource_group_id='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', allow_dns_resolution_binding=True, ) @@ -45290,8 +48719,10 @@ def test_create_endpoint_gateway_all_params(self): # Construct a dict representation of a EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN model endpoint_gateway_target_prototype_model = {} - endpoint_gateway_target_prototype_model['resource_type'] = 'provider_infrastructure_service' - endpoint_gateway_target_prototype_model['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' + endpoint_gateway_target_prototype_model[ + 'resource_type'] = 'provider_infrastructure_service' + endpoint_gateway_target_prototype_model[ + 'crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -45299,7 +48730,8 @@ def test_create_endpoint_gateway_all_params(self): # Construct a dict representation of a EndpointGatewayReservedIPReservedIPIdentityById model endpoint_gateway_reserved_ip_model = {} - endpoint_gateway_reserved_ip_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + endpoint_gateway_reserved_ip_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -45307,7 +48739,8 @@ def test_create_endpoint_gateway_all_params(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values target = endpoint_gateway_target_prototype_model @@ -45370,8 +48803,10 @@ def test_create_endpoint_gateway_value_error(self): # Construct a dict representation of a EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN model endpoint_gateway_target_prototype_model = {} - endpoint_gateway_target_prototype_model['resource_type'] = 'provider_infrastructure_service' - endpoint_gateway_target_prototype_model['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' + endpoint_gateway_target_prototype_model[ + 'resource_type'] = 'provider_infrastructure_service' + endpoint_gateway_target_prototype_model[ + 'crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} @@ -45379,7 +48814,8 @@ def test_create_endpoint_gateway_value_error(self): # Construct a dict representation of a EndpointGatewayReservedIPReservedIPIdentityById model endpoint_gateway_reserved_ip_model = {} - endpoint_gateway_reserved_ip_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + endpoint_gateway_reserved_ip_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -45387,7 +48823,8 @@ def test_create_endpoint_gateway_value_error(self): # Construct a dict representation of a SecurityGroupIdentityById model security_group_identity_model = {} - security_group_identity_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Set up parameter values target = endpoint_gateway_target_prototype_model @@ -45404,7 +48841,10 @@ def test_create_endpoint_gateway_value_error(self): "vpc": vpc, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_endpoint_gateway(**req_copy) @@ -45535,7 +48975,10 @@ def test_list_endpoint_gateway_ips_value_error(self): "endpoint_gateway_id": endpoint_gateway_id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_endpoint_gateway_ips(**req_copy) @@ -45687,7 +49130,10 @@ def test_remove_endpoint_gateway_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.remove_endpoint_gateway_ip(**req_copy) @@ -45772,7 +49218,10 @@ def test_get_endpoint_gateway_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_endpoint_gateway_ip(**req_copy) @@ -45857,7 +49306,10 @@ def test_add_endpoint_gateway_ip_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.add_endpoint_gateway_ip(**req_copy) @@ -45932,7 +49384,10 @@ def test_delete_endpoint_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_endpoint_gateway(**req_copy) @@ -46013,7 +49468,10 @@ def test_get_endpoint_gateway_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_endpoint_gateway(**req_copy) @@ -46111,7 +49569,10 @@ def test_update_endpoint_gateway_value_error(self): "endpoint_gateway_patch": endpoint_gateway_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_endpoint_gateway(**req_copy) @@ -46170,9 +49631,7 @@ def test_new_instance_required_param_none(self): new_instance_required_param_none() """ with pytest.raises(ValueError, match='version must be provided'): - service = VpcV1.new_instance( - version=None, - ) + service = VpcV1.new_instance(version=None,) class TestListFlowLogCollectors: @@ -46235,7 +49694,8 @@ def test_list_flow_log_collectors_all_params(self): assert 'vpc.crn={}'.format(vpc_crn) in query_string assert 'vpc.name={}'.format(vpc_name) in query_string assert 'target.id={}'.format(target_id) in query_string - assert 'target.resource_type={}'.format(target_resource_type) in query_string + assert 'target.resource_type={}'.format( + target_resource_type) in query_string def test_list_flow_log_collectors_all_params_with_retries(self): # Enable retries and run test_list_flow_log_collectors_all_params. @@ -46295,10 +49755,12 @@ def test_list_flow_log_collectors_value_error(self): ) # Pass in all but one required param and check for a ValueError - req_param_dict = { - } + req_param_dict = {} for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.list_flow_log_collectors(**req_copy) @@ -46343,7 +49805,8 @@ def test_list_flow_log_collectors_with_pager_get_next(self): resource_group_id='testString', name='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', target_id='testString', target_resource_type='testString', @@ -46385,7 +49848,8 @@ def test_list_flow_log_collectors_with_pager_get_all(self): resource_group_id='testString', name='testString', vpc_id='testString', - vpc_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', + vpc_crn= + 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b', vpc_name='my-vpc', target_id='testString', target_resource_type='testString', @@ -46418,11 +49882,13 @@ def test_create_flow_log_collector_all_params(self): # Construct a dict representation of a LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model legacy_cloud_object_storage_bucket_identity_model = {} - legacy_cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue' + legacy_cloud_object_storage_bucket_identity_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Construct a dict representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model flow_log_collector_target_prototype_model = {} - flow_log_collector_target_prototype_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_prototype_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -46450,7 +49916,8 @@ def test_create_flow_log_collector_all_params(self): assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body['storage_bucket'] == legacy_cloud_object_storage_bucket_identity_model + assert req_body[ + 'storage_bucket'] == legacy_cloud_object_storage_bucket_identity_model assert req_body['target'] == flow_log_collector_target_prototype_model assert req_body['active'] == False assert req_body['name'] == 'my-flow-log-collector' @@ -46483,11 +49950,13 @@ def test_create_flow_log_collector_value_error(self): # Construct a dict representation of a LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model legacy_cloud_object_storage_bucket_identity_model = {} - legacy_cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue' + legacy_cloud_object_storage_bucket_identity_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Construct a dict representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model flow_log_collector_target_prototype_model = {} - flow_log_collector_target_prototype_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_prototype_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -46506,7 +49975,10 @@ def test_create_flow_log_collector_value_error(self): "target": target, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.create_flow_log_collector(**req_copy) @@ -46581,7 +50053,10 @@ def test_delete_flow_log_collector_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.delete_flow_log_collector(**req_copy) @@ -46662,7 +50137,10 @@ def test_get_flow_log_collector_value_error(self): "id": id, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.get_flow_log_collector(**req_copy) @@ -46760,7 +50238,10 @@ def test_update_flow_log_collector_value_error(self): "flow_log_collector_patch": flow_log_collector_patch, } for param in req_param_dict.keys(): - req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()} + req_copy = { + key: val if key is not param else None + for (key, val) in req_param_dict.items() + } with pytest.raises(ValueError): _service.update_flow_log_collector(**req_copy) @@ -46779,7 +50260,6 @@ def test_update_flow_log_collector_value_error_with_retries(self): # End of Service: FlowLogCollectors ############################################################################## - ############################################################################## # Start of Model Tests ############################################################################## @@ -46802,12 +50282,15 @@ def test_account_reference_serialization(self): account_reference_model_json['resource_type'] = 'account' # Construct a model instance of AccountReference by calling from_dict on the json representation - account_reference_model = AccountReference.from_dict(account_reference_model_json) + account_reference_model = AccountReference.from_dict( + account_reference_model_json) assert account_reference_model != False # Construct a model instance of AccountReference by calling from_dict on the json representation - account_reference_model_dict = AccountReference.from_dict(account_reference_model_json).__dict__ - account_reference_model2 = AccountReference(**account_reference_model_dict) + account_reference_model_dict = AccountReference.from_dict( + account_reference_model_json).__dict__ + account_reference_model2 = AccountReference( + **account_reference_model_dict) # Verify the model instances are equivalent assert account_reference_model == account_reference_model2 @@ -46830,7 +50313,8 @@ def test_address_prefix_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a AddressPrefix model @@ -46838,18 +50322,21 @@ def test_address_prefix_serialization(self): address_prefix_model_json['cidr'] = '192.168.3.0/24' address_prefix_model_json['created_at'] = '2019-01-01T12:00:00Z' address_prefix_model_json['has_subnets'] = True - address_prefix_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + address_prefix_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531' address_prefix_model_json['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' address_prefix_model_json['is_default'] = False address_prefix_model_json['name'] = 'my-address-prefix-1' address_prefix_model_json['zone'] = zone_reference_model # Construct a model instance of AddressPrefix by calling from_dict on the json representation - address_prefix_model = AddressPrefix.from_dict(address_prefix_model_json) + address_prefix_model = AddressPrefix.from_dict( + address_prefix_model_json) assert address_prefix_model != False # Construct a model instance of AddressPrefix by calling from_dict on the json representation - address_prefix_model_dict = AddressPrefix.from_dict(address_prefix_model_json).__dict__ + address_prefix_model_dict = AddressPrefix.from_dict( + address_prefix_model_json).__dict__ address_prefix_model2 = AddressPrefix(**address_prefix_model_dict) # Verify the model instances are equivalent @@ -46873,46 +50360,59 @@ def test_address_prefix_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' address_prefix_model = {} # AddressPrefix address_prefix_model['cidr'] = '192.168.3.0/24' address_prefix_model['created_at'] = '2019-01-01T12:00:00Z' address_prefix_model['has_subnets'] = True - address_prefix_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + address_prefix_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531' address_prefix_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' address_prefix_model['is_default'] = False address_prefix_model['name'] = 'my-address-prefix-1' address_prefix_model['zone'] = zone_reference_model - address_prefix_collection_first_model = {} # AddressPrefixCollectionFirst - address_prefix_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20' + address_prefix_collection_first_model = { + } # AddressPrefixCollectionFirst + address_prefix_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20' address_prefix_collection_next_model = {} # AddressPrefixCollectionNext - address_prefix_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + address_prefix_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a AddressPrefixCollection model address_prefix_collection_model_json = {} - address_prefix_collection_model_json['address_prefixes'] = [address_prefix_model] - address_prefix_collection_model_json['first'] = address_prefix_collection_first_model + address_prefix_collection_model_json['address_prefixes'] = [ + address_prefix_model + ] + address_prefix_collection_model_json[ + 'first'] = address_prefix_collection_first_model address_prefix_collection_model_json['limit'] = 20 - address_prefix_collection_model_json['next'] = address_prefix_collection_next_model + address_prefix_collection_model_json[ + 'next'] = address_prefix_collection_next_model address_prefix_collection_model_json['total_count'] = 132 # Construct a model instance of AddressPrefixCollection by calling from_dict on the json representation - address_prefix_collection_model = AddressPrefixCollection.from_dict(address_prefix_collection_model_json) + address_prefix_collection_model = AddressPrefixCollection.from_dict( + address_prefix_collection_model_json) assert address_prefix_collection_model != False # Construct a model instance of AddressPrefixCollection by calling from_dict on the json representation - address_prefix_collection_model_dict = AddressPrefixCollection.from_dict(address_prefix_collection_model_json).__dict__ - address_prefix_collection_model2 = AddressPrefixCollection(**address_prefix_collection_model_dict) + address_prefix_collection_model_dict = AddressPrefixCollection.from_dict( + address_prefix_collection_model_json).__dict__ + address_prefix_collection_model2 = AddressPrefixCollection( + **address_prefix_collection_model_dict) # Verify the model instances are equivalent assert address_prefix_collection_model == address_prefix_collection_model2 # Convert model instance back to dict and verify no loss of data - address_prefix_collection_model_json2 = address_prefix_collection_model.to_dict() + address_prefix_collection_model_json2 = address_prefix_collection_model.to_dict( + ) assert address_prefix_collection_model_json2 == address_prefix_collection_model_json @@ -46928,21 +50428,26 @@ def test_address_prefix_collection_first_serialization(self): # Construct a json representation of a AddressPrefixCollectionFirst model address_prefix_collection_first_model_json = {} - address_prefix_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20' + address_prefix_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20' # Construct a model instance of AddressPrefixCollectionFirst by calling from_dict on the json representation - address_prefix_collection_first_model = AddressPrefixCollectionFirst.from_dict(address_prefix_collection_first_model_json) + address_prefix_collection_first_model = AddressPrefixCollectionFirst.from_dict( + address_prefix_collection_first_model_json) assert address_prefix_collection_first_model != False # Construct a model instance of AddressPrefixCollectionFirst by calling from_dict on the json representation - address_prefix_collection_first_model_dict = AddressPrefixCollectionFirst.from_dict(address_prefix_collection_first_model_json).__dict__ - address_prefix_collection_first_model2 = AddressPrefixCollectionFirst(**address_prefix_collection_first_model_dict) + address_prefix_collection_first_model_dict = AddressPrefixCollectionFirst.from_dict( + address_prefix_collection_first_model_json).__dict__ + address_prefix_collection_first_model2 = AddressPrefixCollectionFirst( + **address_prefix_collection_first_model_dict) # Verify the model instances are equivalent assert address_prefix_collection_first_model == address_prefix_collection_first_model2 # Convert model instance back to dict and verify no loss of data - address_prefix_collection_first_model_json2 = address_prefix_collection_first_model.to_dict() + address_prefix_collection_first_model_json2 = address_prefix_collection_first_model.to_dict( + ) assert address_prefix_collection_first_model_json2 == address_prefix_collection_first_model_json @@ -46958,21 +50463,26 @@ def test_address_prefix_collection_next_serialization(self): # Construct a json representation of a AddressPrefixCollectionNext model address_prefix_collection_next_model_json = {} - address_prefix_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + address_prefix_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of AddressPrefixCollectionNext by calling from_dict on the json representation - address_prefix_collection_next_model = AddressPrefixCollectionNext.from_dict(address_prefix_collection_next_model_json) + address_prefix_collection_next_model = AddressPrefixCollectionNext.from_dict( + address_prefix_collection_next_model_json) assert address_prefix_collection_next_model != False # Construct a model instance of AddressPrefixCollectionNext by calling from_dict on the json representation - address_prefix_collection_next_model_dict = AddressPrefixCollectionNext.from_dict(address_prefix_collection_next_model_json).__dict__ - address_prefix_collection_next_model2 = AddressPrefixCollectionNext(**address_prefix_collection_next_model_dict) + address_prefix_collection_next_model_dict = AddressPrefixCollectionNext.from_dict( + address_prefix_collection_next_model_json).__dict__ + address_prefix_collection_next_model2 = AddressPrefixCollectionNext( + **address_prefix_collection_next_model_dict) # Verify the model instances are equivalent assert address_prefix_collection_next_model == address_prefix_collection_next_model2 # Convert model instance back to dict and verify no loss of data - address_prefix_collection_next_model_json2 = address_prefix_collection_next_model.to_dict() + address_prefix_collection_next_model_json2 = address_prefix_collection_next_model.to_dict( + ) assert address_prefix_collection_next_model_json2 == address_prefix_collection_next_model_json @@ -46992,12 +50502,15 @@ def test_address_prefix_patch_serialization(self): address_prefix_patch_model_json['name'] = 'my-address-prefix-1' # Construct a model instance of AddressPrefixPatch by calling from_dict on the json representation - address_prefix_patch_model = AddressPrefixPatch.from_dict(address_prefix_patch_model_json) + address_prefix_patch_model = AddressPrefixPatch.from_dict( + address_prefix_patch_model_json) assert address_prefix_patch_model != False # Construct a model instance of AddressPrefixPatch by calling from_dict on the json representation - address_prefix_patch_model_dict = AddressPrefixPatch.from_dict(address_prefix_patch_model_json).__dict__ - address_prefix_patch_model2 = AddressPrefixPatch(**address_prefix_patch_model_dict) + address_prefix_patch_model_dict = AddressPrefixPatch.from_dict( + address_prefix_patch_model_json).__dict__ + address_prefix_patch_model2 = AddressPrefixPatch( + **address_prefix_patch_model_dict) # Verify the model instances are equivalent assert address_prefix_patch_model == address_prefix_patch_model2 @@ -47020,44 +50533,62 @@ def test_backup_policy_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. backup_policy_health_reason_model = {} # BackupPolicyHealthReason - backup_policy_health_reason_model['code'] = 'missing_service_authorization_policies' - backup_policy_health_reason_model['message'] = 'One or more accounts are missing service authorization policies' - backup_policy_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' - - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_health_reason_model[ + 'code'] = 'missing_service_authorization_policies' + backup_policy_health_reason_model[ + 'message'] = 'One or more accounts are missing service authorization policies' + backup_policy_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' + + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' backup_policy_scope_model = {} # BackupPolicyScopeEnterpriseReference - backup_policy_scope_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_model[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' backup_policy_scope_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' backup_policy_scope_model['resource_type'] = 'enterprise' backup_policy_model = {} # BackupPolicyMatchResourceTypeInstance backup_policy_model['created_at'] = '2019-01-01T12:00:00Z' - backup_policy_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6' - backup_policy_model['health_reasons'] = [backup_policy_health_reason_model] + backup_policy_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_model['health_reasons'] = [ + backup_policy_health_reason_model + ] backup_policy_model['health_state'] = 'ok' - backup_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6' backup_policy_model['id'] = 'r134-076191ba-49c2-4763-94fd-c70de73ee2e6' backup_policy_model['last_job_completed_at'] = '2019-01-01T12:00:00Z' backup_policy_model['lifecycle_state'] = 'stable' @@ -47071,32 +50602,42 @@ def test_backup_policy_collection_serialization(self): backup_policy_model['match_resource_type'] = 'instance' backup_policy_collection_first_model = {} # BackupPolicyCollectionFirst - backup_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20' + backup_policy_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20' backup_policy_collection_next_model = {} # BackupPolicyCollectionNext - backup_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + backup_policy_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a BackupPolicyCollection model backup_policy_collection_model_json = {} - backup_policy_collection_model_json['backup_policies'] = [backup_policy_model] - backup_policy_collection_model_json['first'] = backup_policy_collection_first_model + backup_policy_collection_model_json['backup_policies'] = [ + backup_policy_model + ] + backup_policy_collection_model_json[ + 'first'] = backup_policy_collection_first_model backup_policy_collection_model_json['limit'] = 20 - backup_policy_collection_model_json['next'] = backup_policy_collection_next_model + backup_policy_collection_model_json[ + 'next'] = backup_policy_collection_next_model backup_policy_collection_model_json['total_count'] = 132 # Construct a model instance of BackupPolicyCollection by calling from_dict on the json representation - backup_policy_collection_model = BackupPolicyCollection.from_dict(backup_policy_collection_model_json) + backup_policy_collection_model = BackupPolicyCollection.from_dict( + backup_policy_collection_model_json) assert backup_policy_collection_model != False # Construct a model instance of BackupPolicyCollection by calling from_dict on the json representation - backup_policy_collection_model_dict = BackupPolicyCollection.from_dict(backup_policy_collection_model_json).__dict__ - backup_policy_collection_model2 = BackupPolicyCollection(**backup_policy_collection_model_dict) + backup_policy_collection_model_dict = BackupPolicyCollection.from_dict( + backup_policy_collection_model_json).__dict__ + backup_policy_collection_model2 = BackupPolicyCollection( + **backup_policy_collection_model_dict) # Verify the model instances are equivalent assert backup_policy_collection_model == backup_policy_collection_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_collection_model_json2 = backup_policy_collection_model.to_dict() + backup_policy_collection_model_json2 = backup_policy_collection_model.to_dict( + ) assert backup_policy_collection_model_json2 == backup_policy_collection_model_json @@ -47112,21 +50653,26 @@ def test_backup_policy_collection_first_serialization(self): # Construct a json representation of a BackupPolicyCollectionFirst model backup_policy_collection_first_model_json = {} - backup_policy_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20' + backup_policy_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20' # Construct a model instance of BackupPolicyCollectionFirst by calling from_dict on the json representation - backup_policy_collection_first_model = BackupPolicyCollectionFirst.from_dict(backup_policy_collection_first_model_json) + backup_policy_collection_first_model = BackupPolicyCollectionFirst.from_dict( + backup_policy_collection_first_model_json) assert backup_policy_collection_first_model != False # Construct a model instance of BackupPolicyCollectionFirst by calling from_dict on the json representation - backup_policy_collection_first_model_dict = BackupPolicyCollectionFirst.from_dict(backup_policy_collection_first_model_json).__dict__ - backup_policy_collection_first_model2 = BackupPolicyCollectionFirst(**backup_policy_collection_first_model_dict) + backup_policy_collection_first_model_dict = BackupPolicyCollectionFirst.from_dict( + backup_policy_collection_first_model_json).__dict__ + backup_policy_collection_first_model2 = BackupPolicyCollectionFirst( + **backup_policy_collection_first_model_dict) # Verify the model instances are equivalent assert backup_policy_collection_first_model == backup_policy_collection_first_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_collection_first_model_json2 = backup_policy_collection_first_model.to_dict() + backup_policy_collection_first_model_json2 = backup_policy_collection_first_model.to_dict( + ) assert backup_policy_collection_first_model_json2 == backup_policy_collection_first_model_json @@ -47142,21 +50688,26 @@ def test_backup_policy_collection_next_serialization(self): # Construct a json representation of a BackupPolicyCollectionNext model backup_policy_collection_next_model_json = {} - backup_policy_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + backup_policy_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of BackupPolicyCollectionNext by calling from_dict on the json representation - backup_policy_collection_next_model = BackupPolicyCollectionNext.from_dict(backup_policy_collection_next_model_json) + backup_policy_collection_next_model = BackupPolicyCollectionNext.from_dict( + backup_policy_collection_next_model_json) assert backup_policy_collection_next_model != False # Construct a model instance of BackupPolicyCollectionNext by calling from_dict on the json representation - backup_policy_collection_next_model_dict = BackupPolicyCollectionNext.from_dict(backup_policy_collection_next_model_json).__dict__ - backup_policy_collection_next_model2 = BackupPolicyCollectionNext(**backup_policy_collection_next_model_dict) + backup_policy_collection_next_model_dict = BackupPolicyCollectionNext.from_dict( + backup_policy_collection_next_model_json).__dict__ + backup_policy_collection_next_model2 = BackupPolicyCollectionNext( + **backup_policy_collection_next_model_dict) # Verify the model instances are equivalent assert backup_policy_collection_next_model == backup_policy_collection_next_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_collection_next_model_json2 = backup_policy_collection_next_model.to_dict() + backup_policy_collection_next_model_json2 = backup_policy_collection_next_model.to_dict( + ) assert backup_policy_collection_next_model_json2 == backup_policy_collection_next_model_json @@ -47172,23 +50723,30 @@ def test_backup_policy_health_reason_serialization(self): # Construct a json representation of a BackupPolicyHealthReason model backup_policy_health_reason_model_json = {} - backup_policy_health_reason_model_json['code'] = 'missing_service_authorization_policies' - backup_policy_health_reason_model_json['message'] = 'One or more accounts are missing service authorization policies' - backup_policy_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' + backup_policy_health_reason_model_json[ + 'code'] = 'missing_service_authorization_policies' + backup_policy_health_reason_model_json[ + 'message'] = 'One or more accounts are missing service authorization policies' + backup_policy_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' # Construct a model instance of BackupPolicyHealthReason by calling from_dict on the json representation - backup_policy_health_reason_model = BackupPolicyHealthReason.from_dict(backup_policy_health_reason_model_json) + backup_policy_health_reason_model = BackupPolicyHealthReason.from_dict( + backup_policy_health_reason_model_json) assert backup_policy_health_reason_model != False # Construct a model instance of BackupPolicyHealthReason by calling from_dict on the json representation - backup_policy_health_reason_model_dict = BackupPolicyHealthReason.from_dict(backup_policy_health_reason_model_json).__dict__ - backup_policy_health_reason_model2 = BackupPolicyHealthReason(**backup_policy_health_reason_model_dict) + backup_policy_health_reason_model_dict = BackupPolicyHealthReason.from_dict( + backup_policy_health_reason_model_json).__dict__ + backup_policy_health_reason_model2 = BackupPolicyHealthReason( + **backup_policy_health_reason_model_dict) # Verify the model instances are equivalent assert backup_policy_health_reason_model == backup_policy_health_reason_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_health_reason_model_json2 = backup_policy_health_reason_model.to_dict() + backup_policy_health_reason_model_json2 = backup_policy_health_reason_model.to_dict( + ) assert backup_policy_health_reason_model_json2 == backup_policy_health_reason_model_json @@ -47204,55 +50762,75 @@ def test_backup_policy_job_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_remote_model = {} # VolumeRemote volume_remote_model['region'] = region_reference_model - backup_policy_job_source_model = {} # BackupPolicyJobSourceVolumeReference - backup_policy_job_source_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - backup_policy_job_source_model['deleted'] = volume_reference_deleted_model - backup_policy_job_source_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - backup_policy_job_source_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_model = { + } # BackupPolicyJobSourceVolumeReference + backup_policy_job_source_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_model[ + 'deleted'] = volume_reference_deleted_model + backup_policy_job_source_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' backup_policy_job_source_model['name'] = 'my-volume' backup_policy_job_source_model['remote'] = volume_remote_model backup_policy_job_source_model['resource_type'] = 'volume' - backup_policy_job_status_reason_model = {} # BackupPolicyJobStatusReason + backup_policy_job_status_reason_model = { + } # BackupPolicyJobStatusReason backup_policy_job_status_reason_model['code'] = 'source_volume_busy' backup_policy_job_status_reason_model['message'] = 'testString' - backup_policy_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot' + backup_policy_job_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot' snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_reference_model = {} # SnapshotReference - snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['deleted'] = snapshot_reference_deleted_model - snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['name'] = 'my-snapshot' snapshot_reference_model['remote'] = snapshot_remote_model snapshot_reference_model['resource_type'] = 'snapshot' @@ -47261,25 +50839,35 @@ def test_backup_policy_job_serialization(self): backup_policy_job_model_json = {} backup_policy_job_model_json['auto_delete'] = True backup_policy_job_model_json['auto_delete_after'] = 90 - backup_policy_job_model_json['backup_policy_plan'] = backup_policy_plan_reference_model + backup_policy_job_model_json[ + 'backup_policy_plan'] = backup_policy_plan_reference_model backup_policy_job_model_json['completed_at'] = '2019-01-01T12:00:00Z' backup_policy_job_model_json['created_at'] = '2019-01-01T12:00:00Z' - backup_policy_job_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c' - backup_policy_job_model_json['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + backup_policy_job_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c' + backup_policy_job_model_json[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' backup_policy_job_model_json['job_type'] = 'creation' backup_policy_job_model_json['resource_type'] = 'backup_policy_job' backup_policy_job_model_json['source'] = backup_policy_job_source_model backup_policy_job_model_json['status'] = 'failed' - backup_policy_job_model_json['status_reasons'] = [backup_policy_job_status_reason_model] - backup_policy_job_model_json['target_snapshots'] = [snapshot_reference_model] + backup_policy_job_model_json['status_reasons'] = [ + backup_policy_job_status_reason_model + ] + backup_policy_job_model_json['target_snapshots'] = [ + snapshot_reference_model + ] # Construct a model instance of BackupPolicyJob by calling from_dict on the json representation - backup_policy_job_model = BackupPolicyJob.from_dict(backup_policy_job_model_json) + backup_policy_job_model = BackupPolicyJob.from_dict( + backup_policy_job_model_json) assert backup_policy_job_model != False # Construct a model instance of BackupPolicyJob by calling from_dict on the json representation - backup_policy_job_model_dict = BackupPolicyJob.from_dict(backup_policy_job_model_json).__dict__ - backup_policy_job_model2 = BackupPolicyJob(**backup_policy_job_model_dict) + backup_policy_job_model_dict = BackupPolicyJob.from_dict( + backup_policy_job_model_json).__dict__ + backup_policy_job_model2 = BackupPolicyJob( + **backup_policy_job_model_dict) # Verify the model instances are equivalent assert backup_policy_job_model == backup_policy_job_model2 @@ -47301,58 +50889,80 @@ def test_backup_policy_job_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - backup_policy_job_collection_first_model = {} # BackupPolicyJobCollectionFirst - backup_policy_job_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20' + backup_policy_job_collection_first_model = { + } # BackupPolicyJobCollectionFirst + backup_policy_job_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20' - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_remote_model = {} # VolumeRemote volume_remote_model['region'] = region_reference_model - backup_policy_job_source_model = {} # BackupPolicyJobSourceVolumeReference - backup_policy_job_source_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - backup_policy_job_source_model['deleted'] = volume_reference_deleted_model - backup_policy_job_source_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - backup_policy_job_source_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_model = { + } # BackupPolicyJobSourceVolumeReference + backup_policy_job_source_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_model[ + 'deleted'] = volume_reference_deleted_model + backup_policy_job_source_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' backup_policy_job_source_model['name'] = 'my-volume' backup_policy_job_source_model['remote'] = volume_remote_model backup_policy_job_source_model['resource_type'] = 'volume' - backup_policy_job_status_reason_model = {} # BackupPolicyJobStatusReason + backup_policy_job_status_reason_model = { + } # BackupPolicyJobStatusReason backup_policy_job_status_reason_model['code'] = 'source_volume_busy' backup_policy_job_status_reason_model['message'] = 'testString' - backup_policy_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot' + backup_policy_job_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot' snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_reference_model = {} # SnapshotReference - snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['deleted'] = snapshot_reference_deleted_model - snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['name'] = 'my-snapshot' snapshot_reference_model['remote'] = snapshot_remote_model snapshot_reference_model['resource_type'] = 'snapshot' @@ -47360,42 +50970,56 @@ def test_backup_policy_job_collection_serialization(self): backup_policy_job_model = {} # BackupPolicyJob backup_policy_job_model['auto_delete'] = True backup_policy_job_model['auto_delete_after'] = 90 - backup_policy_job_model['backup_policy_plan'] = backup_policy_plan_reference_model + backup_policy_job_model[ + 'backup_policy_plan'] = backup_policy_plan_reference_model backup_policy_job_model['completed_at'] = '2019-01-01T12:00:00Z' backup_policy_job_model['created_at'] = '2019-01-01T12:00:00Z' - backup_policy_job_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c' + backup_policy_job_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c' backup_policy_job_model['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' backup_policy_job_model['job_type'] = 'creation' backup_policy_job_model['resource_type'] = 'backup_policy_job' backup_policy_job_model['source'] = backup_policy_job_source_model backup_policy_job_model['status'] = 'failed' - backup_policy_job_model['status_reasons'] = [backup_policy_job_status_reason_model] + backup_policy_job_model['status_reasons'] = [ + backup_policy_job_status_reason_model + ] backup_policy_job_model['target_snapshots'] = [snapshot_reference_model] - backup_policy_job_collection_next_model = {} # BackupPolicyJobCollectionNext - backup_policy_job_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + backup_policy_job_collection_next_model = { + } # BackupPolicyJobCollectionNext + backup_policy_job_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a BackupPolicyJobCollection model backup_policy_job_collection_model_json = {} - backup_policy_job_collection_model_json['first'] = backup_policy_job_collection_first_model - backup_policy_job_collection_model_json['jobs'] = [backup_policy_job_model] + backup_policy_job_collection_model_json[ + 'first'] = backup_policy_job_collection_first_model + backup_policy_job_collection_model_json['jobs'] = [ + backup_policy_job_model + ] backup_policy_job_collection_model_json['limit'] = 20 - backup_policy_job_collection_model_json['next'] = backup_policy_job_collection_next_model + backup_policy_job_collection_model_json[ + 'next'] = backup_policy_job_collection_next_model backup_policy_job_collection_model_json['total_count'] = 132 # Construct a model instance of BackupPolicyJobCollection by calling from_dict on the json representation - backup_policy_job_collection_model = BackupPolicyJobCollection.from_dict(backup_policy_job_collection_model_json) + backup_policy_job_collection_model = BackupPolicyJobCollection.from_dict( + backup_policy_job_collection_model_json) assert backup_policy_job_collection_model != False # Construct a model instance of BackupPolicyJobCollection by calling from_dict on the json representation - backup_policy_job_collection_model_dict = BackupPolicyJobCollection.from_dict(backup_policy_job_collection_model_json).__dict__ - backup_policy_job_collection_model2 = BackupPolicyJobCollection(**backup_policy_job_collection_model_dict) + backup_policy_job_collection_model_dict = BackupPolicyJobCollection.from_dict( + backup_policy_job_collection_model_json).__dict__ + backup_policy_job_collection_model2 = BackupPolicyJobCollection( + **backup_policy_job_collection_model_dict) # Verify the model instances are equivalent assert backup_policy_job_collection_model == backup_policy_job_collection_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_job_collection_model_json2 = backup_policy_job_collection_model.to_dict() + backup_policy_job_collection_model_json2 = backup_policy_job_collection_model.to_dict( + ) assert backup_policy_job_collection_model_json2 == backup_policy_job_collection_model_json @@ -47411,21 +51035,26 @@ def test_backup_policy_job_collection_first_serialization(self): # Construct a json representation of a BackupPolicyJobCollectionFirst model backup_policy_job_collection_first_model_json = {} - backup_policy_job_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20' + backup_policy_job_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20' # Construct a model instance of BackupPolicyJobCollectionFirst by calling from_dict on the json representation - backup_policy_job_collection_first_model = BackupPolicyJobCollectionFirst.from_dict(backup_policy_job_collection_first_model_json) + backup_policy_job_collection_first_model = BackupPolicyJobCollectionFirst.from_dict( + backup_policy_job_collection_first_model_json) assert backup_policy_job_collection_first_model != False # Construct a model instance of BackupPolicyJobCollectionFirst by calling from_dict on the json representation - backup_policy_job_collection_first_model_dict = BackupPolicyJobCollectionFirst.from_dict(backup_policy_job_collection_first_model_json).__dict__ - backup_policy_job_collection_first_model2 = BackupPolicyJobCollectionFirst(**backup_policy_job_collection_first_model_dict) + backup_policy_job_collection_first_model_dict = BackupPolicyJobCollectionFirst.from_dict( + backup_policy_job_collection_first_model_json).__dict__ + backup_policy_job_collection_first_model2 = BackupPolicyJobCollectionFirst( + **backup_policy_job_collection_first_model_dict) # Verify the model instances are equivalent assert backup_policy_job_collection_first_model == backup_policy_job_collection_first_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_job_collection_first_model_json2 = backup_policy_job_collection_first_model.to_dict() + backup_policy_job_collection_first_model_json2 = backup_policy_job_collection_first_model.to_dict( + ) assert backup_policy_job_collection_first_model_json2 == backup_policy_job_collection_first_model_json @@ -47441,21 +51070,26 @@ def test_backup_policy_job_collection_next_serialization(self): # Construct a json representation of a BackupPolicyJobCollectionNext model backup_policy_job_collection_next_model_json = {} - backup_policy_job_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + backup_policy_job_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of BackupPolicyJobCollectionNext by calling from_dict on the json representation - backup_policy_job_collection_next_model = BackupPolicyJobCollectionNext.from_dict(backup_policy_job_collection_next_model_json) + backup_policy_job_collection_next_model = BackupPolicyJobCollectionNext.from_dict( + backup_policy_job_collection_next_model_json) assert backup_policy_job_collection_next_model != False # Construct a model instance of BackupPolicyJobCollectionNext by calling from_dict on the json representation - backup_policy_job_collection_next_model_dict = BackupPolicyJobCollectionNext.from_dict(backup_policy_job_collection_next_model_json).__dict__ - backup_policy_job_collection_next_model2 = BackupPolicyJobCollectionNext(**backup_policy_job_collection_next_model_dict) + backup_policy_job_collection_next_model_dict = BackupPolicyJobCollectionNext.from_dict( + backup_policy_job_collection_next_model_json).__dict__ + backup_policy_job_collection_next_model2 = BackupPolicyJobCollectionNext( + **backup_policy_job_collection_next_model_dict) # Verify the model instances are equivalent assert backup_policy_job_collection_next_model == backup_policy_job_collection_next_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_job_collection_next_model_json2 = backup_policy_job_collection_next_model.to_dict() + backup_policy_job_collection_next_model_json2 = backup_policy_job_collection_next_model.to_dict( + ) assert backup_policy_job_collection_next_model_json2 == backup_policy_job_collection_next_model_json @@ -47471,23 +51105,29 @@ def test_backup_policy_job_status_reason_serialization(self): # Construct a json representation of a BackupPolicyJobStatusReason model backup_policy_job_status_reason_model_json = {} - backup_policy_job_status_reason_model_json['code'] = 'source_volume_busy' + backup_policy_job_status_reason_model_json[ + 'code'] = 'source_volume_busy' backup_policy_job_status_reason_model_json['message'] = 'testString' - backup_policy_job_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot' + backup_policy_job_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot' # Construct a model instance of BackupPolicyJobStatusReason by calling from_dict on the json representation - backup_policy_job_status_reason_model = BackupPolicyJobStatusReason.from_dict(backup_policy_job_status_reason_model_json) + backup_policy_job_status_reason_model = BackupPolicyJobStatusReason.from_dict( + backup_policy_job_status_reason_model_json) assert backup_policy_job_status_reason_model != False # Construct a model instance of BackupPolicyJobStatusReason by calling from_dict on the json representation - backup_policy_job_status_reason_model_dict = BackupPolicyJobStatusReason.from_dict(backup_policy_job_status_reason_model_json).__dict__ - backup_policy_job_status_reason_model2 = BackupPolicyJobStatusReason(**backup_policy_job_status_reason_model_dict) + backup_policy_job_status_reason_model_dict = BackupPolicyJobStatusReason.from_dict( + backup_policy_job_status_reason_model_json).__dict__ + backup_policy_job_status_reason_model2 = BackupPolicyJobStatusReason( + **backup_policy_job_status_reason_model_dict) # Verify the model instances are equivalent assert backup_policy_job_status_reason_model == backup_policy_job_status_reason_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_job_status_reason_model_json2 = backup_policy_job_status_reason_model.to_dict() + backup_policy_job_status_reason_model_json2 = backup_policy_job_status_reason_model.to_dict( + ) assert backup_policy_job_status_reason_model_json2 == backup_policy_job_status_reason_model_json @@ -47504,16 +51144,21 @@ def test_backup_policy_patch_serialization(self): # Construct a json representation of a BackupPolicyPatch model backup_policy_patch_model_json = {} backup_policy_patch_model_json['included_content'] = ['data_volumes'] - backup_policy_patch_model_json['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_patch_model_json['match_user_tags'] = [ + 'my-daily-backup-policy' + ] backup_policy_patch_model_json['name'] = 'my-backup-policy' # Construct a model instance of BackupPolicyPatch by calling from_dict on the json representation - backup_policy_patch_model = BackupPolicyPatch.from_dict(backup_policy_patch_model_json) + backup_policy_patch_model = BackupPolicyPatch.from_dict( + backup_policy_patch_model_json) assert backup_policy_patch_model != False # Construct a model instance of BackupPolicyPatch by calling from_dict on the json representation - backup_policy_patch_model_dict = BackupPolicyPatch.from_dict(backup_policy_patch_model_json).__dict__ - backup_policy_patch_model2 = BackupPolicyPatch(**backup_policy_patch_model_dict) + backup_policy_patch_model_dict = BackupPolicyPatch.from_dict( + backup_policy_patch_model_json).__dict__ + backup_policy_patch_model2 = BackupPolicyPatch( + **backup_policy_patch_model_dict) # Verify the model instances are equivalent assert backup_policy_patch_model == backup_policy_patch_model2 @@ -47536,52 +51181,71 @@ def test_backup_policy_plan_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' - backup_policy_plan_clone_policy_model = {} # BackupPolicyPlanClonePolicy + backup_policy_plan_clone_policy_model = { + } # BackupPolicyPlanClonePolicy backup_policy_plan_clone_policy_model['max_snapshots'] = 1 backup_policy_plan_clone_policy_model['zones'] = [zone_reference_model] - backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger + backup_policy_plan_deletion_trigger_model = { + } # BackupPolicyPlanDeletionTrigger backup_policy_plan_deletion_trigger_model['delete_after'] = 20 backup_policy_plan_deletion_trigger_model['delete_over_count'] = 20 encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' - backup_policy_plan_remote_region_policy_model = {} # BackupPolicyPlanRemoteRegionPolicy + backup_policy_plan_remote_region_policy_model = { + } # BackupPolicyPlanRemoteRegionPolicy backup_policy_plan_remote_region_policy_model['delete_over_count'] = 1 - backup_policy_plan_remote_region_policy_model['encryption_key'] = encryption_key_reference_model - backup_policy_plan_remote_region_policy_model['region'] = region_reference_model + backup_policy_plan_remote_region_policy_model[ + 'encryption_key'] = encryption_key_reference_model + backup_policy_plan_remote_region_policy_model[ + 'region'] = region_reference_model # Construct a json representation of a BackupPolicyPlan model backup_policy_plan_model_json = {} backup_policy_plan_model_json['active'] = True - backup_policy_plan_model_json['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_model_json['clone_policy'] = backup_policy_plan_clone_policy_model + backup_policy_plan_model_json['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_model_json[ + 'clone_policy'] = backup_policy_plan_clone_policy_model backup_policy_plan_model_json['copy_user_tags'] = True backup_policy_plan_model_json['created_at'] = '2019-01-01T12:00:00Z' backup_policy_plan_model_json['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_model_json['deletion_trigger'] = backup_policy_plan_deletion_trigger_model - backup_policy_plan_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_model_json['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_model_json[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_model + backup_policy_plan_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_model_json[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_model_json['lifecycle_state'] = 'stable' backup_policy_plan_model_json['name'] = 'my-policy-plan' - backup_policy_plan_model_json['remote_region_policies'] = [backup_policy_plan_remote_region_policy_model] + backup_policy_plan_model_json['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_model + ] backup_policy_plan_model_json['resource_type'] = 'backup_policy_plan' # Construct a model instance of BackupPolicyPlan by calling from_dict on the json representation - backup_policy_plan_model = BackupPolicyPlan.from_dict(backup_policy_plan_model_json) + backup_policy_plan_model = BackupPolicyPlan.from_dict( + backup_policy_plan_model_json) assert backup_policy_plan_model != False # Construct a model instance of BackupPolicyPlan by calling from_dict on the json representation - backup_policy_plan_model_dict = BackupPolicyPlan.from_dict(backup_policy_plan_model_json).__dict__ - backup_policy_plan_model2 = BackupPolicyPlan(**backup_policy_plan_model_dict) + backup_policy_plan_model_dict = BackupPolicyPlan.from_dict( + backup_policy_plan_model_json).__dict__ + backup_policy_plan_model2 = BackupPolicyPlan( + **backup_policy_plan_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_model == backup_policy_plan_model2 @@ -47604,27 +51268,34 @@ def test_backup_policy_plan_clone_policy_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a BackupPolicyPlanClonePolicy model backup_policy_plan_clone_policy_model_json = {} backup_policy_plan_clone_policy_model_json['max_snapshots'] = 1 - backup_policy_plan_clone_policy_model_json['zones'] = [zone_reference_model] + backup_policy_plan_clone_policy_model_json['zones'] = [ + zone_reference_model + ] # Construct a model instance of BackupPolicyPlanClonePolicy by calling from_dict on the json representation - backup_policy_plan_clone_policy_model = BackupPolicyPlanClonePolicy.from_dict(backup_policy_plan_clone_policy_model_json) + backup_policy_plan_clone_policy_model = BackupPolicyPlanClonePolicy.from_dict( + backup_policy_plan_clone_policy_model_json) assert backup_policy_plan_clone_policy_model != False # Construct a model instance of BackupPolicyPlanClonePolicy by calling from_dict on the json representation - backup_policy_plan_clone_policy_model_dict = BackupPolicyPlanClonePolicy.from_dict(backup_policy_plan_clone_policy_model_json).__dict__ - backup_policy_plan_clone_policy_model2 = BackupPolicyPlanClonePolicy(**backup_policy_plan_clone_policy_model_dict) + backup_policy_plan_clone_policy_model_dict = BackupPolicyPlanClonePolicy.from_dict( + backup_policy_plan_clone_policy_model_json).__dict__ + backup_policy_plan_clone_policy_model2 = BackupPolicyPlanClonePolicy( + **backup_policy_plan_clone_policy_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_clone_policy_model == backup_policy_plan_clone_policy_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_clone_policy_model_json2 = backup_policy_plan_clone_policy_model.to_dict() + backup_policy_plan_clone_policy_model_json2 = backup_policy_plan_clone_policy_model.to_dict( + ) assert backup_policy_plan_clone_policy_model_json2 == backup_policy_plan_clone_policy_model_json @@ -47646,21 +51317,27 @@ def test_backup_policy_plan_clone_policy_patch_serialization(self): # Construct a json representation of a BackupPolicyPlanClonePolicyPatch model backup_policy_plan_clone_policy_patch_model_json = {} backup_policy_plan_clone_policy_patch_model_json['max_snapshots'] = 1 - backup_policy_plan_clone_policy_patch_model_json['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_patch_model_json['zones'] = [ + zone_identity_model + ] # Construct a model instance of BackupPolicyPlanClonePolicyPatch by calling from_dict on the json representation - backup_policy_plan_clone_policy_patch_model = BackupPolicyPlanClonePolicyPatch.from_dict(backup_policy_plan_clone_policy_patch_model_json) + backup_policy_plan_clone_policy_patch_model = BackupPolicyPlanClonePolicyPatch.from_dict( + backup_policy_plan_clone_policy_patch_model_json) assert backup_policy_plan_clone_policy_patch_model != False # Construct a model instance of BackupPolicyPlanClonePolicyPatch by calling from_dict on the json representation - backup_policy_plan_clone_policy_patch_model_dict = BackupPolicyPlanClonePolicyPatch.from_dict(backup_policy_plan_clone_policy_patch_model_json).__dict__ - backup_policy_plan_clone_policy_patch_model2 = BackupPolicyPlanClonePolicyPatch(**backup_policy_plan_clone_policy_patch_model_dict) + backup_policy_plan_clone_policy_patch_model_dict = BackupPolicyPlanClonePolicyPatch.from_dict( + backup_policy_plan_clone_policy_patch_model_json).__dict__ + backup_policy_plan_clone_policy_patch_model2 = BackupPolicyPlanClonePolicyPatch( + **backup_policy_plan_clone_policy_patch_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_clone_policy_patch_model == backup_policy_plan_clone_policy_patch_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_clone_policy_patch_model_json2 = backup_policy_plan_clone_policy_patch_model.to_dict() + backup_policy_plan_clone_policy_patch_model_json2 = backup_policy_plan_clone_policy_patch_model.to_dict( + ) assert backup_policy_plan_clone_policy_patch_model_json2 == backup_policy_plan_clone_policy_patch_model_json @@ -47681,22 +51358,29 @@ def test_backup_policy_plan_clone_policy_prototype_serialization(self): # Construct a json representation of a BackupPolicyPlanClonePolicyPrototype model backup_policy_plan_clone_policy_prototype_model_json = {} - backup_policy_plan_clone_policy_prototype_model_json['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model_json['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model_json[ + 'max_snapshots'] = 5 + backup_policy_plan_clone_policy_prototype_model_json['zones'] = [ + zone_identity_model + ] # Construct a model instance of BackupPolicyPlanClonePolicyPrototype by calling from_dict on the json representation - backup_policy_plan_clone_policy_prototype_model = BackupPolicyPlanClonePolicyPrototype.from_dict(backup_policy_plan_clone_policy_prototype_model_json) + backup_policy_plan_clone_policy_prototype_model = BackupPolicyPlanClonePolicyPrototype.from_dict( + backup_policy_plan_clone_policy_prototype_model_json) assert backup_policy_plan_clone_policy_prototype_model != False # Construct a model instance of BackupPolicyPlanClonePolicyPrototype by calling from_dict on the json representation - backup_policy_plan_clone_policy_prototype_model_dict = BackupPolicyPlanClonePolicyPrototype.from_dict(backup_policy_plan_clone_policy_prototype_model_json).__dict__ - backup_policy_plan_clone_policy_prototype_model2 = BackupPolicyPlanClonePolicyPrototype(**backup_policy_plan_clone_policy_prototype_model_dict) + backup_policy_plan_clone_policy_prototype_model_dict = BackupPolicyPlanClonePolicyPrototype.from_dict( + backup_policy_plan_clone_policy_prototype_model_json).__dict__ + backup_policy_plan_clone_policy_prototype_model2 = BackupPolicyPlanClonePolicyPrototype( + **backup_policy_plan_clone_policy_prototype_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_clone_policy_prototype_model == backup_policy_plan_clone_policy_prototype_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_clone_policy_prototype_model_json2 = backup_policy_plan_clone_policy_prototype_model.to_dict() + backup_policy_plan_clone_policy_prototype_model_json2 = backup_policy_plan_clone_policy_prototype_model.to_dict( + ) assert backup_policy_plan_clone_policy_prototype_model_json2 == backup_policy_plan_clone_policy_prototype_model_json @@ -47712,72 +51396,98 @@ def test_backup_policy_plan_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - backup_policy_plan_collection_first_model = {} # BackupPolicyPlanCollectionFirst - backup_policy_plan_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20' + backup_policy_plan_collection_first_model = { + } # BackupPolicyPlanCollectionFirst + backup_policy_plan_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20' - backup_policy_plan_collection_next_model = {} # BackupPolicyPlanCollectionNext - backup_policy_plan_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + backup_policy_plan_collection_next_model = { + } # BackupPolicyPlanCollectionNext + backup_policy_plan_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' - backup_policy_plan_clone_policy_model = {} # BackupPolicyPlanClonePolicy + backup_policy_plan_clone_policy_model = { + } # BackupPolicyPlanClonePolicy backup_policy_plan_clone_policy_model['max_snapshots'] = 1 backup_policy_plan_clone_policy_model['zones'] = [zone_reference_model] - backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger + backup_policy_plan_deletion_trigger_model = { + } # BackupPolicyPlanDeletionTrigger backup_policy_plan_deletion_trigger_model['delete_after'] = 20 backup_policy_plan_deletion_trigger_model['delete_over_count'] = 20 encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' - backup_policy_plan_remote_region_policy_model = {} # BackupPolicyPlanRemoteRegionPolicy + backup_policy_plan_remote_region_policy_model = { + } # BackupPolicyPlanRemoteRegionPolicy backup_policy_plan_remote_region_policy_model['delete_over_count'] = 1 - backup_policy_plan_remote_region_policy_model['encryption_key'] = encryption_key_reference_model - backup_policy_plan_remote_region_policy_model['region'] = region_reference_model + backup_policy_plan_remote_region_policy_model[ + 'encryption_key'] = encryption_key_reference_model + backup_policy_plan_remote_region_policy_model[ + 'region'] = region_reference_model backup_policy_plan_model = {} # BackupPolicyPlan backup_policy_plan_model['active'] = True backup_policy_plan_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_model['clone_policy'] = backup_policy_plan_clone_policy_model + backup_policy_plan_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_model backup_policy_plan_model['copy_user_tags'] = True backup_policy_plan_model['created_at'] = '2019-01-01T12:00:00Z' backup_policy_plan_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_model - backup_policy_plan_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_model + backup_policy_plan_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_model['lifecycle_state'] = 'stable' backup_policy_plan_model['name'] = 'my-policy-plan' - backup_policy_plan_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_model] + backup_policy_plan_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_model + ] backup_policy_plan_model['resource_type'] = 'backup_policy_plan' # Construct a json representation of a BackupPolicyPlanCollection model backup_policy_plan_collection_model_json = {} - backup_policy_plan_collection_model_json['first'] = backup_policy_plan_collection_first_model + backup_policy_plan_collection_model_json[ + 'first'] = backup_policy_plan_collection_first_model backup_policy_plan_collection_model_json['limit'] = 20 - backup_policy_plan_collection_model_json['next'] = backup_policy_plan_collection_next_model - backup_policy_plan_collection_model_json['plans'] = [backup_policy_plan_model] + backup_policy_plan_collection_model_json[ + 'next'] = backup_policy_plan_collection_next_model + backup_policy_plan_collection_model_json['plans'] = [ + backup_policy_plan_model + ] backup_policy_plan_collection_model_json['total_count'] = 132 # Construct a model instance of BackupPolicyPlanCollection by calling from_dict on the json representation - backup_policy_plan_collection_model = BackupPolicyPlanCollection.from_dict(backup_policy_plan_collection_model_json) + backup_policy_plan_collection_model = BackupPolicyPlanCollection.from_dict( + backup_policy_plan_collection_model_json) assert backup_policy_plan_collection_model != False # Construct a model instance of BackupPolicyPlanCollection by calling from_dict on the json representation - backup_policy_plan_collection_model_dict = BackupPolicyPlanCollection.from_dict(backup_policy_plan_collection_model_json).__dict__ - backup_policy_plan_collection_model2 = BackupPolicyPlanCollection(**backup_policy_plan_collection_model_dict) + backup_policy_plan_collection_model_dict = BackupPolicyPlanCollection.from_dict( + backup_policy_plan_collection_model_json).__dict__ + backup_policy_plan_collection_model2 = BackupPolicyPlanCollection( + **backup_policy_plan_collection_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_collection_model == backup_policy_plan_collection_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_collection_model_json2 = backup_policy_plan_collection_model.to_dict() + backup_policy_plan_collection_model_json2 = backup_policy_plan_collection_model.to_dict( + ) assert backup_policy_plan_collection_model_json2 == backup_policy_plan_collection_model_json @@ -47793,21 +51503,26 @@ def test_backup_policy_plan_collection_first_serialization(self): # Construct a json representation of a BackupPolicyPlanCollectionFirst model backup_policy_plan_collection_first_model_json = {} - backup_policy_plan_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20' + backup_policy_plan_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20' # Construct a model instance of BackupPolicyPlanCollectionFirst by calling from_dict on the json representation - backup_policy_plan_collection_first_model = BackupPolicyPlanCollectionFirst.from_dict(backup_policy_plan_collection_first_model_json) + backup_policy_plan_collection_first_model = BackupPolicyPlanCollectionFirst.from_dict( + backup_policy_plan_collection_first_model_json) assert backup_policy_plan_collection_first_model != False # Construct a model instance of BackupPolicyPlanCollectionFirst by calling from_dict on the json representation - backup_policy_plan_collection_first_model_dict = BackupPolicyPlanCollectionFirst.from_dict(backup_policy_plan_collection_first_model_json).__dict__ - backup_policy_plan_collection_first_model2 = BackupPolicyPlanCollectionFirst(**backup_policy_plan_collection_first_model_dict) + backup_policy_plan_collection_first_model_dict = BackupPolicyPlanCollectionFirst.from_dict( + backup_policy_plan_collection_first_model_json).__dict__ + backup_policy_plan_collection_first_model2 = BackupPolicyPlanCollectionFirst( + **backup_policy_plan_collection_first_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_collection_first_model == backup_policy_plan_collection_first_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_collection_first_model_json2 = backup_policy_plan_collection_first_model.to_dict() + backup_policy_plan_collection_first_model_json2 = backup_policy_plan_collection_first_model.to_dict( + ) assert backup_policy_plan_collection_first_model_json2 == backup_policy_plan_collection_first_model_json @@ -47823,21 +51538,26 @@ def test_backup_policy_plan_collection_next_serialization(self): # Construct a json representation of a BackupPolicyPlanCollectionNext model backup_policy_plan_collection_next_model_json = {} - backup_policy_plan_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + backup_policy_plan_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of BackupPolicyPlanCollectionNext by calling from_dict on the json representation - backup_policy_plan_collection_next_model = BackupPolicyPlanCollectionNext.from_dict(backup_policy_plan_collection_next_model_json) + backup_policy_plan_collection_next_model = BackupPolicyPlanCollectionNext.from_dict( + backup_policy_plan_collection_next_model_json) assert backup_policy_plan_collection_next_model != False # Construct a model instance of BackupPolicyPlanCollectionNext by calling from_dict on the json representation - backup_policy_plan_collection_next_model_dict = BackupPolicyPlanCollectionNext.from_dict(backup_policy_plan_collection_next_model_json).__dict__ - backup_policy_plan_collection_next_model2 = BackupPolicyPlanCollectionNext(**backup_policy_plan_collection_next_model_dict) + backup_policy_plan_collection_next_model_dict = BackupPolicyPlanCollectionNext.from_dict( + backup_policy_plan_collection_next_model_json).__dict__ + backup_policy_plan_collection_next_model2 = BackupPolicyPlanCollectionNext( + **backup_policy_plan_collection_next_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_collection_next_model == backup_policy_plan_collection_next_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_collection_next_model_json2 = backup_policy_plan_collection_next_model.to_dict() + backup_policy_plan_collection_next_model_json2 = backup_policy_plan_collection_next_model.to_dict( + ) assert backup_policy_plan_collection_next_model_json2 == backup_policy_plan_collection_next_model_json @@ -47857,18 +51577,22 @@ def test_backup_policy_plan_deletion_trigger_serialization(self): backup_policy_plan_deletion_trigger_model_json['delete_over_count'] = 20 # Construct a model instance of BackupPolicyPlanDeletionTrigger by calling from_dict on the json representation - backup_policy_plan_deletion_trigger_model = BackupPolicyPlanDeletionTrigger.from_dict(backup_policy_plan_deletion_trigger_model_json) + backup_policy_plan_deletion_trigger_model = BackupPolicyPlanDeletionTrigger.from_dict( + backup_policy_plan_deletion_trigger_model_json) assert backup_policy_plan_deletion_trigger_model != False # Construct a model instance of BackupPolicyPlanDeletionTrigger by calling from_dict on the json representation - backup_policy_plan_deletion_trigger_model_dict = BackupPolicyPlanDeletionTrigger.from_dict(backup_policy_plan_deletion_trigger_model_json).__dict__ - backup_policy_plan_deletion_trigger_model2 = BackupPolicyPlanDeletionTrigger(**backup_policy_plan_deletion_trigger_model_dict) + backup_policy_plan_deletion_trigger_model_dict = BackupPolicyPlanDeletionTrigger.from_dict( + backup_policy_plan_deletion_trigger_model_json).__dict__ + backup_policy_plan_deletion_trigger_model2 = BackupPolicyPlanDeletionTrigger( + **backup_policy_plan_deletion_trigger_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_deletion_trigger_model == backup_policy_plan_deletion_trigger_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_deletion_trigger_model_json2 = backup_policy_plan_deletion_trigger_model.to_dict() + backup_policy_plan_deletion_trigger_model_json2 = backup_policy_plan_deletion_trigger_model.to_dict( + ) assert backup_policy_plan_deletion_trigger_model_json2 == backup_policy_plan_deletion_trigger_model_json @@ -47884,22 +51608,28 @@ def test_backup_policy_plan_deletion_trigger_patch_serialization(self): # Construct a json representation of a BackupPolicyPlanDeletionTriggerPatch model backup_policy_plan_deletion_trigger_patch_model_json = {} - backup_policy_plan_deletion_trigger_patch_model_json['delete_after'] = 20 - backup_policy_plan_deletion_trigger_patch_model_json['delete_over_count'] = 1 + backup_policy_plan_deletion_trigger_patch_model_json[ + 'delete_after'] = 20 + backup_policy_plan_deletion_trigger_patch_model_json[ + 'delete_over_count'] = 1 # Construct a model instance of BackupPolicyPlanDeletionTriggerPatch by calling from_dict on the json representation - backup_policy_plan_deletion_trigger_patch_model = BackupPolicyPlanDeletionTriggerPatch.from_dict(backup_policy_plan_deletion_trigger_patch_model_json) + backup_policy_plan_deletion_trigger_patch_model = BackupPolicyPlanDeletionTriggerPatch.from_dict( + backup_policy_plan_deletion_trigger_patch_model_json) assert backup_policy_plan_deletion_trigger_patch_model != False # Construct a model instance of BackupPolicyPlanDeletionTriggerPatch by calling from_dict on the json representation - backup_policy_plan_deletion_trigger_patch_model_dict = BackupPolicyPlanDeletionTriggerPatch.from_dict(backup_policy_plan_deletion_trigger_patch_model_json).__dict__ - backup_policy_plan_deletion_trigger_patch_model2 = BackupPolicyPlanDeletionTriggerPatch(**backup_policy_plan_deletion_trigger_patch_model_dict) + backup_policy_plan_deletion_trigger_patch_model_dict = BackupPolicyPlanDeletionTriggerPatch.from_dict( + backup_policy_plan_deletion_trigger_patch_model_json).__dict__ + backup_policy_plan_deletion_trigger_patch_model2 = BackupPolicyPlanDeletionTriggerPatch( + **backup_policy_plan_deletion_trigger_patch_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_deletion_trigger_patch_model == backup_policy_plan_deletion_trigger_patch_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_deletion_trigger_patch_model_json2 = backup_policy_plan_deletion_trigger_patch_model.to_dict() + backup_policy_plan_deletion_trigger_patch_model_json2 = backup_policy_plan_deletion_trigger_patch_model.to_dict( + ) assert backup_policy_plan_deletion_trigger_patch_model_json2 == backup_policy_plan_deletion_trigger_patch_model_json @@ -47915,22 +51645,28 @@ def test_backup_policy_plan_deletion_trigger_prototype_serialization(self): # Construct a json representation of a BackupPolicyPlanDeletionTriggerPrototype model backup_policy_plan_deletion_trigger_prototype_model_json = {} - backup_policy_plan_deletion_trigger_prototype_model_json['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model_json['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model_json[ + 'delete_after'] = 20 + backup_policy_plan_deletion_trigger_prototype_model_json[ + 'delete_over_count'] = 20 # Construct a model instance of BackupPolicyPlanDeletionTriggerPrototype by calling from_dict on the json representation - backup_policy_plan_deletion_trigger_prototype_model = BackupPolicyPlanDeletionTriggerPrototype.from_dict(backup_policy_plan_deletion_trigger_prototype_model_json) + backup_policy_plan_deletion_trigger_prototype_model = BackupPolicyPlanDeletionTriggerPrototype.from_dict( + backup_policy_plan_deletion_trigger_prototype_model_json) assert backup_policy_plan_deletion_trigger_prototype_model != False # Construct a model instance of BackupPolicyPlanDeletionTriggerPrototype by calling from_dict on the json representation - backup_policy_plan_deletion_trigger_prototype_model_dict = BackupPolicyPlanDeletionTriggerPrototype.from_dict(backup_policy_plan_deletion_trigger_prototype_model_json).__dict__ - backup_policy_plan_deletion_trigger_prototype_model2 = BackupPolicyPlanDeletionTriggerPrototype(**backup_policy_plan_deletion_trigger_prototype_model_dict) + backup_policy_plan_deletion_trigger_prototype_model_dict = BackupPolicyPlanDeletionTriggerPrototype.from_dict( + backup_policy_plan_deletion_trigger_prototype_model_json).__dict__ + backup_policy_plan_deletion_trigger_prototype_model2 = BackupPolicyPlanDeletionTriggerPrototype( + **backup_policy_plan_deletion_trigger_prototype_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_deletion_trigger_prototype_model == backup_policy_plan_deletion_trigger_prototype_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_deletion_trigger_prototype_model_json2 = backup_policy_plan_deletion_trigger_prototype_model.to_dict() + backup_policy_plan_deletion_trigger_prototype_model_json2 = backup_policy_plan_deletion_trigger_prototype_model.to_dict( + ) assert backup_policy_plan_deletion_trigger_prototype_model_json2 == backup_policy_plan_deletion_trigger_prototype_model_json @@ -47949,49 +51685,68 @@ def test_backup_policy_plan_patch_serialization(self): zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - backup_policy_plan_clone_policy_patch_model = {} # BackupPolicyPlanClonePolicyPatch + backup_policy_plan_clone_policy_patch_model = { + } # BackupPolicyPlanClonePolicyPatch backup_policy_plan_clone_policy_patch_model['max_snapshots'] = 1 - backup_policy_plan_clone_policy_patch_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_patch_model['zones'] = [ + zone_identity_model + ] - backup_policy_plan_deletion_trigger_patch_model = {} # BackupPolicyPlanDeletionTriggerPatch + backup_policy_plan_deletion_trigger_patch_model = { + } # BackupPolicyPlanDeletionTriggerPatch backup_policy_plan_deletion_trigger_patch_model['delete_after'] = 20 backup_policy_plan_deletion_trigger_patch_model['delete_over_count'] = 1 encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_identity_model = {} # RegionIdentityByName region_identity_model['name'] = 'us-south' - backup_policy_plan_remote_region_policy_prototype_model = {} # BackupPolicyPlanRemoteRegionPolicyPrototype - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model = { + } # BackupPolicyPlanRemoteRegionPolicyPrototype + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Construct a json representation of a BackupPolicyPlanPatch model backup_policy_plan_patch_model_json = {} backup_policy_plan_patch_model_json['active'] = True - backup_policy_plan_patch_model_json['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_patch_model_json['clone_policy'] = backup_policy_plan_clone_policy_patch_model + backup_policy_plan_patch_model_json['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_patch_model_json[ + 'clone_policy'] = backup_policy_plan_clone_policy_patch_model backup_policy_plan_patch_model_json['copy_user_tags'] = True backup_policy_plan_patch_model_json['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_patch_model_json['deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model + backup_policy_plan_patch_model_json[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_patch_model backup_policy_plan_patch_model_json['name'] = 'my-policy-plan' - backup_policy_plan_patch_model_json['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_patch_model_json['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Construct a model instance of BackupPolicyPlanPatch by calling from_dict on the json representation - backup_policy_plan_patch_model = BackupPolicyPlanPatch.from_dict(backup_policy_plan_patch_model_json) + backup_policy_plan_patch_model = BackupPolicyPlanPatch.from_dict( + backup_policy_plan_patch_model_json) assert backup_policy_plan_patch_model != False # Construct a model instance of BackupPolicyPlanPatch by calling from_dict on the json representation - backup_policy_plan_patch_model_dict = BackupPolicyPlanPatch.from_dict(backup_policy_plan_patch_model_json).__dict__ - backup_policy_plan_patch_model2 = BackupPolicyPlanPatch(**backup_policy_plan_patch_model_dict) + backup_policy_plan_patch_model_dict = BackupPolicyPlanPatch.from_dict( + backup_policy_plan_patch_model_json).__dict__ + backup_policy_plan_patch_model2 = BackupPolicyPlanPatch( + **backup_policy_plan_patch_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_patch_model == backup_policy_plan_patch_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_patch_model_json2 = backup_policy_plan_patch_model.to_dict() + backup_policy_plan_patch_model_json2 = backup_policy_plan_patch_model.to_dict( + ) assert backup_policy_plan_patch_model_json2 == backup_policy_plan_patch_model_json @@ -48010,49 +51765,69 @@ def test_backup_policy_plan_prototype_serialization(self): zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - backup_policy_plan_clone_policy_prototype_model = {} # BackupPolicyPlanClonePolicyPrototype + backup_policy_plan_clone_policy_prototype_model = { + } # BackupPolicyPlanClonePolicyPrototype backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model['zones'] = [ + zone_identity_model + ] - backup_policy_plan_deletion_trigger_prototype_model = {} # BackupPolicyPlanDeletionTriggerPrototype + backup_policy_plan_deletion_trigger_prototype_model = { + } # BackupPolicyPlanDeletionTriggerPrototype backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model[ + 'delete_over_count'] = 20 encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_identity_model = {} # RegionIdentityByName region_identity_model['name'] = 'us-south' - backup_policy_plan_remote_region_policy_prototype_model = {} # BackupPolicyPlanRemoteRegionPolicyPrototype - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model = { + } # BackupPolicyPlanRemoteRegionPolicyPrototype + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model # Construct a json representation of a BackupPolicyPlanPrototype model backup_policy_plan_prototype_model_json = {} backup_policy_plan_prototype_model_json['active'] = True - backup_policy_plan_prototype_model_json['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_prototype_model_json['clone_policy'] = backup_policy_plan_clone_policy_prototype_model + backup_policy_plan_prototype_model_json['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_prototype_model_json[ + 'clone_policy'] = backup_policy_plan_clone_policy_prototype_model backup_policy_plan_prototype_model_json['copy_user_tags'] = True backup_policy_plan_prototype_model_json['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_prototype_model_json['deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model + backup_policy_plan_prototype_model_json[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model backup_policy_plan_prototype_model_json['name'] = 'my-policy-plan' - backup_policy_plan_prototype_model_json['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_prototype_model_json['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] # Construct a model instance of BackupPolicyPlanPrototype by calling from_dict on the json representation - backup_policy_plan_prototype_model = BackupPolicyPlanPrototype.from_dict(backup_policy_plan_prototype_model_json) + backup_policy_plan_prototype_model = BackupPolicyPlanPrototype.from_dict( + backup_policy_plan_prototype_model_json) assert backup_policy_plan_prototype_model != False # Construct a model instance of BackupPolicyPlanPrototype by calling from_dict on the json representation - backup_policy_plan_prototype_model_dict = BackupPolicyPlanPrototype.from_dict(backup_policy_plan_prototype_model_json).__dict__ - backup_policy_plan_prototype_model2 = BackupPolicyPlanPrototype(**backup_policy_plan_prototype_model_dict) + backup_policy_plan_prototype_model_dict = BackupPolicyPlanPrototype.from_dict( + backup_policy_plan_prototype_model_json).__dict__ + backup_policy_plan_prototype_model2 = BackupPolicyPlanPrototype( + **backup_policy_plan_prototype_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_prototype_model == backup_policy_plan_prototype_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_prototype_model_json2 = backup_policy_plan_prototype_model.to_dict() + backup_policy_plan_prototype_model_json2 = backup_policy_plan_prototype_model.to_dict( + ) assert backup_policy_plan_prototype_model_json2 == backup_policy_plan_prototype_model_json @@ -48068,11 +51843,14 @@ def test_backup_policy_plan_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote @@ -48080,26 +51858,35 @@ def test_backup_policy_plan_reference_serialization(self): # Construct a json representation of a BackupPolicyPlanReference model backup_policy_plan_reference_model_json = {} - backup_policy_plan_reference_model_json['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model_json['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model_json[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model_json[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model_json['name'] = 'my-policy-plan' - backup_policy_plan_reference_model_json['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model_json['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model_json[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model_json[ + 'resource_type'] = 'backup_policy_plan' # Construct a model instance of BackupPolicyPlanReference by calling from_dict on the json representation - backup_policy_plan_reference_model = BackupPolicyPlanReference.from_dict(backup_policy_plan_reference_model_json) + backup_policy_plan_reference_model = BackupPolicyPlanReference.from_dict( + backup_policy_plan_reference_model_json) assert backup_policy_plan_reference_model != False # Construct a model instance of BackupPolicyPlanReference by calling from_dict on the json representation - backup_policy_plan_reference_model_dict = BackupPolicyPlanReference.from_dict(backup_policy_plan_reference_model_json).__dict__ - backup_policy_plan_reference_model2 = BackupPolicyPlanReference(**backup_policy_plan_reference_model_dict) + backup_policy_plan_reference_model_dict = BackupPolicyPlanReference.from_dict( + backup_policy_plan_reference_model_json).__dict__ + backup_policy_plan_reference_model2 = BackupPolicyPlanReference( + **backup_policy_plan_reference_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_reference_model == backup_policy_plan_reference_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_reference_model_json2 = backup_policy_plan_reference_model.to_dict() + backup_policy_plan_reference_model_json2 = backup_policy_plan_reference_model.to_dict( + ) assert backup_policy_plan_reference_model_json2 == backup_policy_plan_reference_model_json @@ -48115,21 +51902,26 @@ def test_backup_policy_plan_reference_deleted_serialization(self): # Construct a json representation of a BackupPolicyPlanReferenceDeleted model backup_policy_plan_reference_deleted_model_json = {} - backup_policy_plan_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of BackupPolicyPlanReferenceDeleted by calling from_dict on the json representation - backup_policy_plan_reference_deleted_model = BackupPolicyPlanReferenceDeleted.from_dict(backup_policy_plan_reference_deleted_model_json) + backup_policy_plan_reference_deleted_model = BackupPolicyPlanReferenceDeleted.from_dict( + backup_policy_plan_reference_deleted_model_json) assert backup_policy_plan_reference_deleted_model != False # Construct a model instance of BackupPolicyPlanReferenceDeleted by calling from_dict on the json representation - backup_policy_plan_reference_deleted_model_dict = BackupPolicyPlanReferenceDeleted.from_dict(backup_policy_plan_reference_deleted_model_json).__dict__ - backup_policy_plan_reference_deleted_model2 = BackupPolicyPlanReferenceDeleted(**backup_policy_plan_reference_deleted_model_dict) + backup_policy_plan_reference_deleted_model_dict = BackupPolicyPlanReferenceDeleted.from_dict( + backup_policy_plan_reference_deleted_model_json).__dict__ + backup_policy_plan_reference_deleted_model2 = BackupPolicyPlanReferenceDeleted( + **backup_policy_plan_reference_deleted_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_reference_deleted_model == backup_policy_plan_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_reference_deleted_model_json2 = backup_policy_plan_reference_deleted_model.to_dict() + backup_policy_plan_reference_deleted_model_json2 = backup_policy_plan_reference_deleted_model.to_dict( + ) assert backup_policy_plan_reference_deleted_model_json2 == backup_policy_plan_reference_deleted_model_json @@ -48146,7 +51938,8 @@ def test_backup_policy_plan_remote_serialization(self): # Construct dict forms of any model objects needed in order to build this model. region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a BackupPolicyPlanRemote model @@ -48154,18 +51947,22 @@ def test_backup_policy_plan_remote_serialization(self): backup_policy_plan_remote_model_json['region'] = region_reference_model # Construct a model instance of BackupPolicyPlanRemote by calling from_dict on the json representation - backup_policy_plan_remote_model = BackupPolicyPlanRemote.from_dict(backup_policy_plan_remote_model_json) + backup_policy_plan_remote_model = BackupPolicyPlanRemote.from_dict( + backup_policy_plan_remote_model_json) assert backup_policy_plan_remote_model != False # Construct a model instance of BackupPolicyPlanRemote by calling from_dict on the json representation - backup_policy_plan_remote_model_dict = BackupPolicyPlanRemote.from_dict(backup_policy_plan_remote_model_json).__dict__ - backup_policy_plan_remote_model2 = BackupPolicyPlanRemote(**backup_policy_plan_remote_model_dict) + backup_policy_plan_remote_model_dict = BackupPolicyPlanRemote.from_dict( + backup_policy_plan_remote_model_json).__dict__ + backup_policy_plan_remote_model2 = BackupPolicyPlanRemote( + **backup_policy_plan_remote_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_remote_model == backup_policy_plan_remote_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_remote_model_json2 = backup_policy_plan_remote_model.to_dict() + backup_policy_plan_remote_model_json2 = backup_policy_plan_remote_model.to_dict( + ) assert backup_policy_plan_remote_model_json2 == backup_policy_plan_remote_model_json @@ -48182,31 +51979,40 @@ def test_backup_policy_plan_remote_region_policy_serialization(self): # Construct dict forms of any model objects needed in order to build this model. encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a BackupPolicyPlanRemoteRegionPolicy model backup_policy_plan_remote_region_policy_model_json = {} - backup_policy_plan_remote_region_policy_model_json['delete_over_count'] = 1 - backup_policy_plan_remote_region_policy_model_json['encryption_key'] = encryption_key_reference_model - backup_policy_plan_remote_region_policy_model_json['region'] = region_reference_model + backup_policy_plan_remote_region_policy_model_json[ + 'delete_over_count'] = 1 + backup_policy_plan_remote_region_policy_model_json[ + 'encryption_key'] = encryption_key_reference_model + backup_policy_plan_remote_region_policy_model_json[ + 'region'] = region_reference_model # Construct a model instance of BackupPolicyPlanRemoteRegionPolicy by calling from_dict on the json representation - backup_policy_plan_remote_region_policy_model = BackupPolicyPlanRemoteRegionPolicy.from_dict(backup_policy_plan_remote_region_policy_model_json) + backup_policy_plan_remote_region_policy_model = BackupPolicyPlanRemoteRegionPolicy.from_dict( + backup_policy_plan_remote_region_policy_model_json) assert backup_policy_plan_remote_region_policy_model != False # Construct a model instance of BackupPolicyPlanRemoteRegionPolicy by calling from_dict on the json representation - backup_policy_plan_remote_region_policy_model_dict = BackupPolicyPlanRemoteRegionPolicy.from_dict(backup_policy_plan_remote_region_policy_model_json).__dict__ - backup_policy_plan_remote_region_policy_model2 = BackupPolicyPlanRemoteRegionPolicy(**backup_policy_plan_remote_region_policy_model_dict) + backup_policy_plan_remote_region_policy_model_dict = BackupPolicyPlanRemoteRegionPolicy.from_dict( + backup_policy_plan_remote_region_policy_model_json).__dict__ + backup_policy_plan_remote_region_policy_model2 = BackupPolicyPlanRemoteRegionPolicy( + **backup_policy_plan_remote_region_policy_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_remote_region_policy_model == backup_policy_plan_remote_region_policy_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_remote_region_policy_model_json2 = backup_policy_plan_remote_region_policy_model.to_dict() + backup_policy_plan_remote_region_policy_model_json2 = backup_policy_plan_remote_region_policy_model.to_dict( + ) assert backup_policy_plan_remote_region_policy_model_json2 == backup_policy_plan_remote_region_policy_model_json @@ -48215,7 +52021,8 @@ class TestModel_BackupPolicyPlanRemoteRegionPolicyPrototype: Test Class for BackupPolicyPlanRemoteRegionPolicyPrototype """ - def test_backup_policy_plan_remote_region_policy_prototype_serialization(self): + def test_backup_policy_plan_remote_region_policy_prototype_serialization( + self): """ Test serialization/deserialization for BackupPolicyPlanRemoteRegionPolicyPrototype """ @@ -48223,30 +52030,39 @@ def test_backup_policy_plan_remote_region_policy_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_identity_model = {} # RegionIdentityByName region_identity_model['name'] = 'us-south' # Construct a json representation of a BackupPolicyPlanRemoteRegionPolicyPrototype model backup_policy_plan_remote_region_policy_prototype_model_json = {} - backup_policy_plan_remote_region_policy_prototype_model_json['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model_json['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model_json['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model_json[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model_json[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model_json[ + 'region'] = region_identity_model # Construct a model instance of BackupPolicyPlanRemoteRegionPolicyPrototype by calling from_dict on the json representation - backup_policy_plan_remote_region_policy_prototype_model = BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(backup_policy_plan_remote_region_policy_prototype_model_json) + backup_policy_plan_remote_region_policy_prototype_model = BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict( + backup_policy_plan_remote_region_policy_prototype_model_json) assert backup_policy_plan_remote_region_policy_prototype_model != False # Construct a model instance of BackupPolicyPlanRemoteRegionPolicyPrototype by calling from_dict on the json representation - backup_policy_plan_remote_region_policy_prototype_model_dict = BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(backup_policy_plan_remote_region_policy_prototype_model_json).__dict__ - backup_policy_plan_remote_region_policy_prototype_model2 = BackupPolicyPlanRemoteRegionPolicyPrototype(**backup_policy_plan_remote_region_policy_prototype_model_dict) + backup_policy_plan_remote_region_policy_prototype_model_dict = BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict( + backup_policy_plan_remote_region_policy_prototype_model_json + ).__dict__ + backup_policy_plan_remote_region_policy_prototype_model2 = BackupPolicyPlanRemoteRegionPolicyPrototype( + **backup_policy_plan_remote_region_policy_prototype_model_dict) # Verify the model instances are equivalent assert backup_policy_plan_remote_region_policy_prototype_model == backup_policy_plan_remote_region_policy_prototype_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_plan_remote_region_policy_prototype_model_json2 = backup_policy_plan_remote_region_policy_prototype_model.to_dict() + backup_policy_plan_remote_region_policy_prototype_model_json2 = backup_policy_plan_remote_region_policy_prototype_model.to_dict( + ) assert backup_policy_plan_remote_region_policy_prototype_model_json2 == backup_policy_plan_remote_region_policy_prototype_model_json @@ -48262,152 +52078,228 @@ def test_bare_metal_server_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted - bare_metal_server_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference - bare_metal_server_boot_target_model['deleted'] = bare_metal_server_disk_reference_deleted_model - bare_metal_server_boot_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_boot_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_boot_target_model['name'] = 'my-bare-metal-server-disk' - bare_metal_server_boot_target_model['resource_type'] = 'bare_metal_server_disk' + bare_metal_server_disk_reference_deleted_model = { + } # BareMetalServerDiskReferenceDeleted + bare_metal_server_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + bare_metal_server_boot_target_model = { + } # BareMetalServerBootTargetBareMetalServerDiskReference + bare_metal_server_boot_target_model[ + 'deleted'] = bare_metal_server_disk_reference_deleted_model + bare_metal_server_boot_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/disks/2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_boot_target_model[ + 'id'] = '2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_boot_target_model[ + 'name'] = 'opponent-delude-slang-knoll' + bare_metal_server_boot_target_model[ + 'resource_type'] = 'bare_metal_server_disk' bare_metal_server_cpu_model = {} # BareMetalServerCPU bare_metal_server_cpu_model['architecture'] = 'amd64' - bare_metal_server_cpu_model['core_count'] = 80 + bare_metal_server_cpu_model['core_count'] = 96 bare_metal_server_cpu_model['socket_count'] = 4 bare_metal_server_cpu_model['threads_per_core'] = 2 bare_metal_server_disk_model = {} # BareMetalServerDisk - bare_metal_server_disk_model['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_disk_model['interface_type'] = 'fcp' - bare_metal_server_disk_model['name'] = 'my-bare-metal-server-disk' + bare_metal_server_disk_model['created_at'] = '2021-05-21T06:09:15Z' + bare_metal_server_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/disks/2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_disk_model[ + 'id'] = '2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_disk_model['interface_type'] = 'sata' + bare_metal_server_disk_model['name'] = 'opponent-delude-slang-knoll' bare_metal_server_disk_model['resource_type'] = 'bare_metal_server_disk' - bare_metal_server_disk_model['size'] = 100 - - bare_metal_server_lifecycle_reason_model = {} # BareMetalServerLifecycleReason - bare_metal_server_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - bare_metal_server_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - bare_metal_server_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - - bare_metal_server_network_attachment_reference_deleted_model = {} # BareMetalServerNetworkAttachmentReferenceDeleted - bare_metal_server_network_attachment_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_disk_model['size'] = 960 + + bare_metal_server_lifecycle_reason_model = { + } # BareMetalServerLifecycleReason + bare_metal_server_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + bare_metal_server_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + bare_metal_server_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + bare_metal_server_network_attachment_reference_deleted_model = { + } # BareMetalServerNetworkAttachmentReferenceDeleted + bare_metal_server_network_attachment_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model['address'] = '10.240.0.5' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - bare_metal_server_network_attachment_reference_model = {} # BareMetalServerNetworkAttachmentReference - bare_metal_server_network_attachment_reference_model['deleted'] = bare_metal_server_network_attachment_reference_deleted_model - bare_metal_server_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_reference_model['id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_reference_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_reference_model['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_attachment_reference_model['resource_type'] = 'bare_metal_server_network_attachment' - bare_metal_server_network_attachment_reference_model['subnet'] = subnet_reference_model - - network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted - network_interface_bare_metal_server_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - network_interface_bare_metal_server_context_reference_model = {} # NetworkInterfaceBareMetalServerContextReference - network_interface_bare_metal_server_context_reference_model['deleted'] = network_interface_bare_metal_server_context_reference_deleted_model - network_interface_bare_metal_server_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_bare_metal_server_context_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_bare_metal_server_context_reference_model['name'] = 'my-bare-metal-server-network-interface' - network_interface_bare_metal_server_context_reference_model['primary_ip'] = reserved_ip_reference_model - network_interface_bare_metal_server_context_reference_model['resource_type'] = 'network_interface' - network_interface_bare_metal_server_context_reference_model['subnet'] = subnet_reference_model - - bare_metal_server_profile_reference_model = {} # BareMetalServerProfileReference - bare_metal_server_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' - bare_metal_server_profile_reference_model['name'] = 'bx2-metal-192x768' - bare_metal_server_profile_reference_model['resource_type'] = 'bare_metal_server_profile' + bare_metal_server_network_attachment_reference_model = { + } # BareMetalServerNetworkAttachmentReference + bare_metal_server_network_attachment_reference_model[ + 'deleted'] = bare_metal_server_network_attachment_reference_deleted_model + bare_metal_server_network_attachment_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_reference_model[ + 'id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_reference_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_attachment_reference_model[ + 'resource_type'] = 'bare_metal_server_network_attachment' + bare_metal_server_network_attachment_reference_model[ + 'subnet'] = subnet_reference_model + + network_interface_bare_metal_server_context_reference_deleted_model = { + } # NetworkInterfaceBareMetalServerContextReferenceDeleted + network_interface_bare_metal_server_context_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + network_interface_bare_metal_server_context_reference_model = { + } # NetworkInterfaceBareMetalServerContextReference + network_interface_bare_metal_server_context_reference_model[ + 'deleted'] = network_interface_bare_metal_server_context_reference_deleted_model + network_interface_bare_metal_server_context_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_interfaces/2302-63209fe4-0168-4b8f-9618-3e30f7118cdf' + network_interface_bare_metal_server_context_reference_model[ + 'id'] = '2302-63209fe4-0168-4b8f-9618-3e30f7118cdf' + network_interface_bare_metal_server_context_reference_model[ + 'name'] = 'my-primary-network-interface' + network_interface_bare_metal_server_context_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + network_interface_bare_metal_server_context_reference_model[ + 'resource_type'] = 'network_interface' + network_interface_bare_metal_server_context_reference_model[ + 'subnet'] = subnet_reference_model + + bare_metal_server_profile_reference_model = { + } # BareMetalServerProfileReference + bare_metal_server_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/profiles/bx2d-metal-192x768' + bare_metal_server_profile_reference_model['name'] = 'bx2d-metal-192x768' + bare_metal_server_profile_reference_model[ + 'resource_type'] = 'bare_metal_server_profile' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['name'] = 'my-resource-group' + resource_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/823edda102129f3232a0dc0655fcff94' + resource_group_reference_model[ + 'id'] = '823edda102129f3232a0dc0655fcff94' + resource_group_reference_model['name'] = 'Default' - bare_metal_server_status_reason_model = {} # BareMetalServerStatusReason + bare_metal_server_status_reason_model = { + } # BareMetalServerStatusReason bare_metal_server_status_reason_model['code'] = 'cannot_start_capacity' - bare_metal_server_status_reason_model['message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.' - bare_metal_server_status_reason_model['more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html' - - bare_metal_server_trusted_platform_module_model = {} # BareMetalServerTrustedPlatformModule - bare_metal_server_trusted_platform_module_model['enabled'] = True + bare_metal_server_status_reason_model[ + 'message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.' + bare_metal_server_status_reason_model[ + 'more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html' + + bare_metal_server_trusted_platform_module_model = { + } # BareMetalServerTrustedPlatformModule + bare_metal_server_trusted_platform_module_model['enabled'] = False bare_metal_server_trusted_platform_module_model['mode'] = 'disabled' - bare_metal_server_trusted_platform_module_model['supported_modes'] = ['disabled'] + bare_metal_server_trusted_platform_module_model['supported_modes'] = [ + 'disabled', 'tpm_2' + ] vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model['crn'] = 'crn:[...]' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r134-bba5c798-447e-490d-b622-dd4cdd8027f6' + vpc_reference_model['id'] = 'r134-bba5c798-447e-490d-b622-dd4cdd8027f6' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' - zone_reference_model['name'] = 'us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-3' + zone_reference_model['name'] = 'us-south-3' # Construct a json representation of a BareMetalServer model bare_metal_server_model_json = {} bare_metal_server_model_json['bandwidth'] = 20000 - bare_metal_server_model_json['boot_target'] = bare_metal_server_boot_target_model + bare_metal_server_model_json[ + 'boot_target'] = bare_metal_server_boot_target_model bare_metal_server_model_json['cpu'] = bare_metal_server_cpu_model bare_metal_server_model_json['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a' + bare_metal_server_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a' bare_metal_server_model_json['disks'] = [bare_metal_server_disk_model] bare_metal_server_model_json['enable_secure_boot'] = False - bare_metal_server_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a' - bare_metal_server_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - bare_metal_server_model_json['lifecycle_reasons'] = [bare_metal_server_lifecycle_reason_model] + bare_metal_server_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a' + bare_metal_server_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + bare_metal_server_model_json['lifecycle_reasons'] = [ + bare_metal_server_lifecycle_reason_model + ] bare_metal_server_model_json['lifecycle_state'] = 'stable' bare_metal_server_model_json['memory'] = 1536 bare_metal_server_model_json['name'] = 'my-bare-metal-server' - bare_metal_server_model_json['network_attachments'] = [bare_metal_server_network_attachment_reference_model] - bare_metal_server_model_json['network_interfaces'] = [network_interface_bare_metal_server_context_reference_model] - bare_metal_server_model_json['primary_network_attachment'] = bare_metal_server_network_attachment_reference_model - bare_metal_server_model_json['primary_network_interface'] = network_interface_bare_metal_server_context_reference_model - bare_metal_server_model_json['profile'] = bare_metal_server_profile_reference_model - bare_metal_server_model_json['resource_group'] = resource_group_reference_model + bare_metal_server_model_json['network_attachments'] = [ + bare_metal_server_network_attachment_reference_model + ] + bare_metal_server_model_json['network_interfaces'] = [ + network_interface_bare_metal_server_context_reference_model + ] + bare_metal_server_model_json[ + 'primary_network_attachment'] = bare_metal_server_network_attachment_reference_model + bare_metal_server_model_json[ + 'primary_network_interface'] = network_interface_bare_metal_server_context_reference_model + bare_metal_server_model_json[ + 'profile'] = bare_metal_server_profile_reference_model + bare_metal_server_model_json[ + 'resource_group'] = resource_group_reference_model bare_metal_server_model_json['resource_type'] = 'bare_metal_server' bare_metal_server_model_json['status'] = 'deleting' - bare_metal_server_model_json['status_reasons'] = [bare_metal_server_status_reason_model] - bare_metal_server_model_json['trusted_platform_module'] = bare_metal_server_trusted_platform_module_model + bare_metal_server_model_json['status_reasons'] = [ + bare_metal_server_status_reason_model + ] + bare_metal_server_model_json[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_model bare_metal_server_model_json['vpc'] = vpc_reference_model bare_metal_server_model_json['zone'] = zone_reference_model # Construct a model instance of BareMetalServer by calling from_dict on the json representation - bare_metal_server_model = BareMetalServer.from_dict(bare_metal_server_model_json) + bare_metal_server_model = BareMetalServer.from_dict( + bare_metal_server_model_json) assert bare_metal_server_model != False # Construct a model instance of BareMetalServer by calling from_dict on the json representation - bare_metal_server_model_dict = BareMetalServer.from_dict(bare_metal_server_model_json).__dict__ - bare_metal_server_model2 = BareMetalServer(**bare_metal_server_model_dict) + bare_metal_server_model_dict = BareMetalServer.from_dict( + bare_metal_server_model_json).__dict__ + bare_metal_server_model2 = BareMetalServer( + **bare_metal_server_model_dict) # Verify the model instances are equivalent assert bare_metal_server_model == bare_metal_server_model2 @@ -48435,18 +52327,22 @@ def test_bare_metal_server_cpu_serialization(self): bare_metal_server_cpu_model_json['threads_per_core'] = 2 # Construct a model instance of BareMetalServerCPU by calling from_dict on the json representation - bare_metal_server_cpu_model = BareMetalServerCPU.from_dict(bare_metal_server_cpu_model_json) + bare_metal_server_cpu_model = BareMetalServerCPU.from_dict( + bare_metal_server_cpu_model_json) assert bare_metal_server_cpu_model != False # Construct a model instance of BareMetalServerCPU by calling from_dict on the json representation - bare_metal_server_cpu_model_dict = BareMetalServerCPU.from_dict(bare_metal_server_cpu_model_json).__dict__ - bare_metal_server_cpu_model2 = BareMetalServerCPU(**bare_metal_server_cpu_model_dict) + bare_metal_server_cpu_model_dict = BareMetalServerCPU.from_dict( + bare_metal_server_cpu_model_json).__dict__ + bare_metal_server_cpu_model2 = BareMetalServerCPU( + **bare_metal_server_cpu_model_dict) # Verify the model instances are equivalent assert bare_metal_server_cpu_model == bare_metal_server_cpu_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_cpu_model_json2 = bare_metal_server_cpu_model.to_dict() + bare_metal_server_cpu_model_json2 = bare_metal_server_cpu_model.to_dict( + ) assert bare_metal_server_cpu_model_json2 == bare_metal_server_cpu_model_json @@ -48462,171 +52358,255 @@ def test_bare_metal_server_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted - bare_metal_server_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference - bare_metal_server_boot_target_model['deleted'] = bare_metal_server_disk_reference_deleted_model - bare_metal_server_boot_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_boot_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_boot_target_model['name'] = 'my-bare-metal-server-disk' - bare_metal_server_boot_target_model['resource_type'] = 'bare_metal_server_disk' + bare_metal_server_disk_reference_deleted_model = { + } # BareMetalServerDiskReferenceDeleted + bare_metal_server_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + bare_metal_server_boot_target_model = { + } # BareMetalServerBootTargetBareMetalServerDiskReference + bare_metal_server_boot_target_model[ + 'deleted'] = bare_metal_server_disk_reference_deleted_model + bare_metal_server_boot_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/disks/2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_boot_target_model[ + 'id'] = '2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_boot_target_model[ + 'name'] = 'opponent-delude-slang-knoll' + bare_metal_server_boot_target_model[ + 'resource_type'] = 'bare_metal_server_disk' bare_metal_server_cpu_model = {} # BareMetalServerCPU bare_metal_server_cpu_model['architecture'] = 'amd64' - bare_metal_server_cpu_model['core_count'] = 80 + bare_metal_server_cpu_model['core_count'] = 96 bare_metal_server_cpu_model['socket_count'] = 4 bare_metal_server_cpu_model['threads_per_core'] = 2 bare_metal_server_disk_model = {} # BareMetalServerDisk - bare_metal_server_disk_model['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_disk_model['interface_type'] = 'fcp' - bare_metal_server_disk_model['name'] = 'my-bare-metal-server-disk' + bare_metal_server_disk_model['created_at'] = '2021-05-21T06:09:15Z' + bare_metal_server_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/disks/2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_disk_model[ + 'id'] = '2302-3744f199-6ccc-4698-8772-bb3937348c96' + bare_metal_server_disk_model['interface_type'] = 'sata' + bare_metal_server_disk_model['name'] = 'opponent-delude-slang-knoll' bare_metal_server_disk_model['resource_type'] = 'bare_metal_server_disk' - bare_metal_server_disk_model['size'] = 100 - - bare_metal_server_lifecycle_reason_model = {} # BareMetalServerLifecycleReason - bare_metal_server_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - bare_metal_server_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - bare_metal_server_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - - bare_metal_server_network_attachment_reference_deleted_model = {} # BareMetalServerNetworkAttachmentReferenceDeleted - bare_metal_server_network_attachment_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_disk_model['size'] = 960 + + bare_metal_server_lifecycle_reason_model = { + } # BareMetalServerLifecycleReason + bare_metal_server_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + bare_metal_server_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + bare_metal_server_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + bare_metal_server_network_attachment_reference_deleted_model = { + } # BareMetalServerNetworkAttachmentReferenceDeleted + bare_metal_server_network_attachment_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model['address'] = '10.240.0.5' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - bare_metal_server_network_attachment_reference_model = {} # BareMetalServerNetworkAttachmentReference - bare_metal_server_network_attachment_reference_model['deleted'] = bare_metal_server_network_attachment_reference_deleted_model - bare_metal_server_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_reference_model['id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_reference_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_reference_model['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_attachment_reference_model['resource_type'] = 'bare_metal_server_network_attachment' - bare_metal_server_network_attachment_reference_model['subnet'] = subnet_reference_model - - network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted - network_interface_bare_metal_server_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - network_interface_bare_metal_server_context_reference_model = {} # NetworkInterfaceBareMetalServerContextReference - network_interface_bare_metal_server_context_reference_model['deleted'] = network_interface_bare_metal_server_context_reference_deleted_model - network_interface_bare_metal_server_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_bare_metal_server_context_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_bare_metal_server_context_reference_model['name'] = 'my-bare-metal-server-network-interface' - network_interface_bare_metal_server_context_reference_model['primary_ip'] = reserved_ip_reference_model - network_interface_bare_metal_server_context_reference_model['resource_type'] = 'network_interface' - network_interface_bare_metal_server_context_reference_model['subnet'] = subnet_reference_model - - bare_metal_server_profile_reference_model = {} # BareMetalServerProfileReference - bare_metal_server_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' - bare_metal_server_profile_reference_model['name'] = 'bx2-metal-192x768' - bare_metal_server_profile_reference_model['resource_type'] = 'bare_metal_server_profile' + bare_metal_server_network_attachment_reference_model = { + } # BareMetalServerNetworkAttachmentReference + bare_metal_server_network_attachment_reference_model[ + 'deleted'] = bare_metal_server_network_attachment_reference_deleted_model + bare_metal_server_network_attachment_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_reference_model[ + 'id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_reference_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_attachment_reference_model[ + 'resource_type'] = 'bare_metal_server_network_attachment' + bare_metal_server_network_attachment_reference_model[ + 'subnet'] = subnet_reference_model + + network_interface_bare_metal_server_context_reference_deleted_model = { + } # NetworkInterfaceBareMetalServerContextReferenceDeleted + network_interface_bare_metal_server_context_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + network_interface_bare_metal_server_context_reference_model = { + } # NetworkInterfaceBareMetalServerContextReference + network_interface_bare_metal_server_context_reference_model[ + 'deleted'] = network_interface_bare_metal_server_context_reference_deleted_model + network_interface_bare_metal_server_context_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_interfaces/2302-63209fe4-0168-4b8f-9618-3e30f7118cdf' + network_interface_bare_metal_server_context_reference_model[ + 'id'] = '2302-63209fe4-0168-4b8f-9618-3e30f7118cdf' + network_interface_bare_metal_server_context_reference_model[ + 'name'] = 'my-primary-network-interface' + network_interface_bare_metal_server_context_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + network_interface_bare_metal_server_context_reference_model[ + 'resource_type'] = 'network_interface' + network_interface_bare_metal_server_context_reference_model[ + 'subnet'] = subnet_reference_model + + bare_metal_server_profile_reference_model = { + } # BareMetalServerProfileReference + bare_metal_server_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/profiles/bx2d-metal-192x768' + bare_metal_server_profile_reference_model['name'] = 'bx2d-metal-192x768' + bare_metal_server_profile_reference_model[ + 'resource_type'] = 'bare_metal_server_profile' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['name'] = 'my-resource-group' + resource_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/823edda102129f3232a0dc0655fcff94' + resource_group_reference_model[ + 'id'] = '823edda102129f3232a0dc0655fcff94' + resource_group_reference_model['name'] = 'Default' - bare_metal_server_status_reason_model = {} # BareMetalServerStatusReason + bare_metal_server_status_reason_model = { + } # BareMetalServerStatusReason bare_metal_server_status_reason_model['code'] = 'cannot_start_capacity' - bare_metal_server_status_reason_model['message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.' - bare_metal_server_status_reason_model['more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html' - - bare_metal_server_trusted_platform_module_model = {} # BareMetalServerTrustedPlatformModule - bare_metal_server_trusted_platform_module_model['enabled'] = True + bare_metal_server_status_reason_model[ + 'message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.' + bare_metal_server_status_reason_model[ + 'more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html' + + bare_metal_server_trusted_platform_module_model = { + } # BareMetalServerTrustedPlatformModule + bare_metal_server_trusted_platform_module_model['enabled'] = False bare_metal_server_trusted_platform_module_model['mode'] = 'disabled' - bare_metal_server_trusted_platform_module_model['supported_modes'] = ['disabled'] + bare_metal_server_trusted_platform_module_model['supported_modes'] = [ + 'disabled', 'tpm_2' + ] vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model['crn'] = 'crn:[...]' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r134-bba5c798-447e-490d-b622-dd4cdd8027f6' + vpc_reference_model['id'] = 'r134-bba5c798-447e-490d-b622-dd4cdd8027f6' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' - zone_reference_model['name'] = 'us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-3' + zone_reference_model['name'] = 'us-south-3' bare_metal_server_model = {} # BareMetalServer - bare_metal_server_model['bandwidth'] = 20000 - bare_metal_server_model['boot_target'] = bare_metal_server_boot_target_model + bare_metal_server_model['bandwidth'] = 100000 + bare_metal_server_model[ + 'boot_target'] = bare_metal_server_boot_target_model bare_metal_server_model['cpu'] = bare_metal_server_cpu_model - bare_metal_server_model['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a' + bare_metal_server_model['created_at'] = '2021-05-21T06:09:15Z' + bare_metal_server_model['crn'] = 'crn:[...]' bare_metal_server_model['disks'] = [bare_metal_server_disk_model] bare_metal_server_model['enable_secure_boot'] = False - bare_metal_server_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a' - bare_metal_server_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - bare_metal_server_model['lifecycle_reasons'] = [bare_metal_server_lifecycle_reason_model] + bare_metal_server_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c' + bare_metal_server_model[ + 'id'] = '2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c' + bare_metal_server_model['lifecycle_reasons'] = [ + bare_metal_server_lifecycle_reason_model + ] bare_metal_server_model['lifecycle_state'] = 'stable' - bare_metal_server_model['memory'] = 1536 + bare_metal_server_model['memory'] = 768 bare_metal_server_model['name'] = 'my-bare-metal-server' - bare_metal_server_model['network_attachments'] = [bare_metal_server_network_attachment_reference_model] - bare_metal_server_model['network_interfaces'] = [network_interface_bare_metal_server_context_reference_model] - bare_metal_server_model['primary_network_attachment'] = bare_metal_server_network_attachment_reference_model - bare_metal_server_model['primary_network_interface'] = network_interface_bare_metal_server_context_reference_model - bare_metal_server_model['profile'] = bare_metal_server_profile_reference_model - bare_metal_server_model['resource_group'] = resource_group_reference_model + bare_metal_server_model['network_attachments'] = [ + bare_metal_server_network_attachment_reference_model + ] + bare_metal_server_model['network_interfaces'] = [ + network_interface_bare_metal_server_context_reference_model + ] + bare_metal_server_model[ + 'primary_network_attachment'] = bare_metal_server_network_attachment_reference_model + bare_metal_server_model[ + 'primary_network_interface'] = network_interface_bare_metal_server_context_reference_model + bare_metal_server_model[ + 'profile'] = bare_metal_server_profile_reference_model + bare_metal_server_model[ + 'resource_group'] = resource_group_reference_model bare_metal_server_model['resource_type'] = 'bare_metal_server' - bare_metal_server_model['status'] = 'deleting' - bare_metal_server_model['status_reasons'] = [bare_metal_server_status_reason_model] - bare_metal_server_model['trusted_platform_module'] = bare_metal_server_trusted_platform_module_model + bare_metal_server_model['status'] = 'running' + bare_metal_server_model['status_reasons'] = [ + bare_metal_server_status_reason_model + ] + bare_metal_server_model[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_model bare_metal_server_model['vpc'] = vpc_reference_model bare_metal_server_model['zone'] = zone_reference_model - bare_metal_server_collection_first_model = {} # BareMetalServerCollectionFirst - bare_metal_server_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20' + bare_metal_server_collection_first_model = { + } # BareMetalServerCollectionFirst + bare_metal_server_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=50' - bare_metal_server_collection_next_model = {} # BareMetalServerCollectionNext - bare_metal_server_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + bare_metal_server_collection_next_model = { + } # BareMetalServerCollectionNext + bare_metal_server_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a BareMetalServerCollection model bare_metal_server_collection_model_json = {} - bare_metal_server_collection_model_json['bare_metal_servers'] = [bare_metal_server_model] - bare_metal_server_collection_model_json['first'] = bare_metal_server_collection_first_model + bare_metal_server_collection_model_json['bare_metal_servers'] = [ + bare_metal_server_model + ] + bare_metal_server_collection_model_json[ + 'first'] = bare_metal_server_collection_first_model bare_metal_server_collection_model_json['limit'] = 20 - bare_metal_server_collection_model_json['next'] = bare_metal_server_collection_next_model + bare_metal_server_collection_model_json[ + 'next'] = bare_metal_server_collection_next_model bare_metal_server_collection_model_json['total_count'] = 132 # Construct a model instance of BareMetalServerCollection by calling from_dict on the json representation - bare_metal_server_collection_model = BareMetalServerCollection.from_dict(bare_metal_server_collection_model_json) + bare_metal_server_collection_model = BareMetalServerCollection.from_dict( + bare_metal_server_collection_model_json) assert bare_metal_server_collection_model != False # Construct a model instance of BareMetalServerCollection by calling from_dict on the json representation - bare_metal_server_collection_model_dict = BareMetalServerCollection.from_dict(bare_metal_server_collection_model_json).__dict__ - bare_metal_server_collection_model2 = BareMetalServerCollection(**bare_metal_server_collection_model_dict) + bare_metal_server_collection_model_dict = BareMetalServerCollection.from_dict( + bare_metal_server_collection_model_json).__dict__ + bare_metal_server_collection_model2 = BareMetalServerCollection( + **bare_metal_server_collection_model_dict) # Verify the model instances are equivalent assert bare_metal_server_collection_model == bare_metal_server_collection_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_collection_model_json2 = bare_metal_server_collection_model.to_dict() + bare_metal_server_collection_model_json2 = bare_metal_server_collection_model.to_dict( + ) assert bare_metal_server_collection_model_json2 == bare_metal_server_collection_model_json @@ -48642,21 +52622,26 @@ def test_bare_metal_server_collection_first_serialization(self): # Construct a json representation of a BareMetalServerCollectionFirst model bare_metal_server_collection_first_model_json = {} - bare_metal_server_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20' + bare_metal_server_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20' # Construct a model instance of BareMetalServerCollectionFirst by calling from_dict on the json representation - bare_metal_server_collection_first_model = BareMetalServerCollectionFirst.from_dict(bare_metal_server_collection_first_model_json) + bare_metal_server_collection_first_model = BareMetalServerCollectionFirst.from_dict( + bare_metal_server_collection_first_model_json) assert bare_metal_server_collection_first_model != False # Construct a model instance of BareMetalServerCollectionFirst by calling from_dict on the json representation - bare_metal_server_collection_first_model_dict = BareMetalServerCollectionFirst.from_dict(bare_metal_server_collection_first_model_json).__dict__ - bare_metal_server_collection_first_model2 = BareMetalServerCollectionFirst(**bare_metal_server_collection_first_model_dict) + bare_metal_server_collection_first_model_dict = BareMetalServerCollectionFirst.from_dict( + bare_metal_server_collection_first_model_json).__dict__ + bare_metal_server_collection_first_model2 = BareMetalServerCollectionFirst( + **bare_metal_server_collection_first_model_dict) # Verify the model instances are equivalent assert bare_metal_server_collection_first_model == bare_metal_server_collection_first_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_collection_first_model_json2 = bare_metal_server_collection_first_model.to_dict() + bare_metal_server_collection_first_model_json2 = bare_metal_server_collection_first_model.to_dict( + ) assert bare_metal_server_collection_first_model_json2 == bare_metal_server_collection_first_model_json @@ -48672,21 +52657,26 @@ def test_bare_metal_server_collection_next_serialization(self): # Construct a json representation of a BareMetalServerCollectionNext model bare_metal_server_collection_next_model_json = {} - bare_metal_server_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + bare_metal_server_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of BareMetalServerCollectionNext by calling from_dict on the json representation - bare_metal_server_collection_next_model = BareMetalServerCollectionNext.from_dict(bare_metal_server_collection_next_model_json) + bare_metal_server_collection_next_model = BareMetalServerCollectionNext.from_dict( + bare_metal_server_collection_next_model_json) assert bare_metal_server_collection_next_model != False # Construct a model instance of BareMetalServerCollectionNext by calling from_dict on the json representation - bare_metal_server_collection_next_model_dict = BareMetalServerCollectionNext.from_dict(bare_metal_server_collection_next_model_json).__dict__ - bare_metal_server_collection_next_model2 = BareMetalServerCollectionNext(**bare_metal_server_collection_next_model_dict) + bare_metal_server_collection_next_model_dict = BareMetalServerCollectionNext.from_dict( + bare_metal_server_collection_next_model_json).__dict__ + bare_metal_server_collection_next_model2 = BareMetalServerCollectionNext( + **bare_metal_server_collection_next_model_dict) # Verify the model instances are equivalent assert bare_metal_server_collection_next_model == bare_metal_server_collection_next_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_collection_next_model_json2 = bare_metal_server_collection_next_model.to_dict() + bare_metal_server_collection_next_model_json2 = bare_metal_server_collection_next_model.to_dict( + ) assert bare_metal_server_collection_next_model_json2 == bare_metal_server_collection_next_model_json @@ -48702,26 +52692,35 @@ def test_bare_metal_server_console_access_token_serialization(self): # Construct a json representation of a BareMetalServerConsoleAccessToken model bare_metal_server_console_access_token_model_json = {} - bare_metal_server_console_access_token_model_json['access_token'] = 'VGhpcyBJcyBhIHRva2Vu' - bare_metal_server_console_access_token_model_json['console_type'] = 'serial' - bare_metal_server_console_access_token_model_json['created_at'] = '2020-07-27T21:50:14Z' - bare_metal_server_console_access_token_model_json['expires_at'] = '2020-07-27T21:51:14Z' + bare_metal_server_console_access_token_model_json[ + 'access_token'] = 'VGhpcyBJcyBhIHRva2Vu' + bare_metal_server_console_access_token_model_json[ + 'console_type'] = 'serial' + bare_metal_server_console_access_token_model_json[ + 'created_at'] = '2020-07-27T21:50:14Z' + bare_metal_server_console_access_token_model_json[ + 'expires_at'] = '2020-07-27T21:51:14Z' bare_metal_server_console_access_token_model_json['force'] = False - bare_metal_server_console_access_token_model_json['href'] = 'wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu' + bare_metal_server_console_access_token_model_json[ + 'href'] = 'wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu' # Construct a model instance of BareMetalServerConsoleAccessToken by calling from_dict on the json representation - bare_metal_server_console_access_token_model = BareMetalServerConsoleAccessToken.from_dict(bare_metal_server_console_access_token_model_json) + bare_metal_server_console_access_token_model = BareMetalServerConsoleAccessToken.from_dict( + bare_metal_server_console_access_token_model_json) assert bare_metal_server_console_access_token_model != False # Construct a model instance of BareMetalServerConsoleAccessToken by calling from_dict on the json representation - bare_metal_server_console_access_token_model_dict = BareMetalServerConsoleAccessToken.from_dict(bare_metal_server_console_access_token_model_json).__dict__ - bare_metal_server_console_access_token_model2 = BareMetalServerConsoleAccessToken(**bare_metal_server_console_access_token_model_dict) + bare_metal_server_console_access_token_model_dict = BareMetalServerConsoleAccessToken.from_dict( + bare_metal_server_console_access_token_model_json).__dict__ + bare_metal_server_console_access_token_model2 = BareMetalServerConsoleAccessToken( + **bare_metal_server_console_access_token_model_dict) # Verify the model instances are equivalent assert bare_metal_server_console_access_token_model == bare_metal_server_console_access_token_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_console_access_token_model_json2 = bare_metal_server_console_access_token_model.to_dict() + bare_metal_server_console_access_token_model_json2 = bare_metal_server_console_access_token_model.to_dict( + ) assert bare_metal_server_console_access_token_model_json2 == bare_metal_server_console_access_token_model_json @@ -48738,26 +52737,33 @@ def test_bare_metal_server_disk_serialization(self): # Construct a json representation of a BareMetalServerDisk model bare_metal_server_disk_model_json = {} bare_metal_server_disk_model_json['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_disk_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_disk_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_disk_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_disk_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' bare_metal_server_disk_model_json['interface_type'] = 'fcp' bare_metal_server_disk_model_json['name'] = 'my-bare-metal-server-disk' - bare_metal_server_disk_model_json['resource_type'] = 'bare_metal_server_disk' + bare_metal_server_disk_model_json[ + 'resource_type'] = 'bare_metal_server_disk' bare_metal_server_disk_model_json['size'] = 100 # Construct a model instance of BareMetalServerDisk by calling from_dict on the json representation - bare_metal_server_disk_model = BareMetalServerDisk.from_dict(bare_metal_server_disk_model_json) + bare_metal_server_disk_model = BareMetalServerDisk.from_dict( + bare_metal_server_disk_model_json) assert bare_metal_server_disk_model != False # Construct a model instance of BareMetalServerDisk by calling from_dict on the json representation - bare_metal_server_disk_model_dict = BareMetalServerDisk.from_dict(bare_metal_server_disk_model_json).__dict__ - bare_metal_server_disk_model2 = BareMetalServerDisk(**bare_metal_server_disk_model_dict) + bare_metal_server_disk_model_dict = BareMetalServerDisk.from_dict( + bare_metal_server_disk_model_json).__dict__ + bare_metal_server_disk_model2 = BareMetalServerDisk( + **bare_metal_server_disk_model_dict) # Verify the model instances are equivalent assert bare_metal_server_disk_model == bare_metal_server_disk_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_disk_model_json2 = bare_metal_server_disk_model.to_dict() + bare_metal_server_disk_model_json2 = bare_metal_server_disk_model.to_dict( + ) assert bare_metal_server_disk_model_json2 == bare_metal_server_disk_model_json @@ -48775,8 +52781,10 @@ def test_bare_metal_server_disk_collection_serialization(self): bare_metal_server_disk_model = {} # BareMetalServerDisk bare_metal_server_disk_model['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_disk_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' bare_metal_server_disk_model['interface_type'] = 'fcp' bare_metal_server_disk_model['name'] = 'my-bare-metal-server-disk' bare_metal_server_disk_model['resource_type'] = 'bare_metal_server_disk' @@ -48784,21 +52792,27 @@ def test_bare_metal_server_disk_collection_serialization(self): # Construct a json representation of a BareMetalServerDiskCollection model bare_metal_server_disk_collection_model_json = {} - bare_metal_server_disk_collection_model_json['disks'] = [bare_metal_server_disk_model] + bare_metal_server_disk_collection_model_json['disks'] = [ + bare_metal_server_disk_model + ] # Construct a model instance of BareMetalServerDiskCollection by calling from_dict on the json representation - bare_metal_server_disk_collection_model = BareMetalServerDiskCollection.from_dict(bare_metal_server_disk_collection_model_json) + bare_metal_server_disk_collection_model = BareMetalServerDiskCollection.from_dict( + bare_metal_server_disk_collection_model_json) assert bare_metal_server_disk_collection_model != False # Construct a model instance of BareMetalServerDiskCollection by calling from_dict on the json representation - bare_metal_server_disk_collection_model_dict = BareMetalServerDiskCollection.from_dict(bare_metal_server_disk_collection_model_json).__dict__ - bare_metal_server_disk_collection_model2 = BareMetalServerDiskCollection(**bare_metal_server_disk_collection_model_dict) + bare_metal_server_disk_collection_model_dict = BareMetalServerDiskCollection.from_dict( + bare_metal_server_disk_collection_model_json).__dict__ + bare_metal_server_disk_collection_model2 = BareMetalServerDiskCollection( + **bare_metal_server_disk_collection_model_dict) # Verify the model instances are equivalent assert bare_metal_server_disk_collection_model == bare_metal_server_disk_collection_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_disk_collection_model_json2 = bare_metal_server_disk_collection_model.to_dict() + bare_metal_server_disk_collection_model_json2 = bare_metal_server_disk_collection_model.to_dict( + ) assert bare_metal_server_disk_collection_model_json2 == bare_metal_server_disk_collection_model_json @@ -48814,21 +52828,26 @@ def test_bare_metal_server_disk_patch_serialization(self): # Construct a json representation of a BareMetalServerDiskPatch model bare_metal_server_disk_patch_model_json = {} - bare_metal_server_disk_patch_model_json['name'] = 'my-bare-metal-server-disk-updated' + bare_metal_server_disk_patch_model_json[ + 'name'] = 'my-bare-metal-server-disk-updated' # Construct a model instance of BareMetalServerDiskPatch by calling from_dict on the json representation - bare_metal_server_disk_patch_model = BareMetalServerDiskPatch.from_dict(bare_metal_server_disk_patch_model_json) + bare_metal_server_disk_patch_model = BareMetalServerDiskPatch.from_dict( + bare_metal_server_disk_patch_model_json) assert bare_metal_server_disk_patch_model != False # Construct a model instance of BareMetalServerDiskPatch by calling from_dict on the json representation - bare_metal_server_disk_patch_model_dict = BareMetalServerDiskPatch.from_dict(bare_metal_server_disk_patch_model_json).__dict__ - bare_metal_server_disk_patch_model2 = BareMetalServerDiskPatch(**bare_metal_server_disk_patch_model_dict) + bare_metal_server_disk_patch_model_dict = BareMetalServerDiskPatch.from_dict( + bare_metal_server_disk_patch_model_json).__dict__ + bare_metal_server_disk_patch_model2 = BareMetalServerDiskPatch( + **bare_metal_server_disk_patch_model_dict) # Verify the model instances are equivalent assert bare_metal_server_disk_patch_model == bare_metal_server_disk_patch_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_disk_patch_model_json2 = bare_metal_server_disk_patch_model.to_dict() + bare_metal_server_disk_patch_model_json2 = bare_metal_server_disk_patch_model.to_dict( + ) assert bare_metal_server_disk_patch_model_json2 == bare_metal_server_disk_patch_model_json @@ -48844,21 +52863,26 @@ def test_bare_metal_server_disk_reference_deleted_serialization(self): # Construct a json representation of a BareMetalServerDiskReferenceDeleted model bare_metal_server_disk_reference_deleted_model_json = {} - bare_metal_server_disk_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_disk_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of BareMetalServerDiskReferenceDeleted by calling from_dict on the json representation - bare_metal_server_disk_reference_deleted_model = BareMetalServerDiskReferenceDeleted.from_dict(bare_metal_server_disk_reference_deleted_model_json) + bare_metal_server_disk_reference_deleted_model = BareMetalServerDiskReferenceDeleted.from_dict( + bare_metal_server_disk_reference_deleted_model_json) assert bare_metal_server_disk_reference_deleted_model != False # Construct a model instance of BareMetalServerDiskReferenceDeleted by calling from_dict on the json representation - bare_metal_server_disk_reference_deleted_model_dict = BareMetalServerDiskReferenceDeleted.from_dict(bare_metal_server_disk_reference_deleted_model_json).__dict__ - bare_metal_server_disk_reference_deleted_model2 = BareMetalServerDiskReferenceDeleted(**bare_metal_server_disk_reference_deleted_model_dict) + bare_metal_server_disk_reference_deleted_model_dict = BareMetalServerDiskReferenceDeleted.from_dict( + bare_metal_server_disk_reference_deleted_model_json).__dict__ + bare_metal_server_disk_reference_deleted_model2 = BareMetalServerDiskReferenceDeleted( + **bare_metal_server_disk_reference_deleted_model_dict) # Verify the model instances are equivalent assert bare_metal_server_disk_reference_deleted_model == bare_metal_server_disk_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_disk_reference_deleted_model_json2 = bare_metal_server_disk_reference_deleted_model.to_dict() + bare_metal_server_disk_reference_deleted_model_json2 = bare_metal_server_disk_reference_deleted_model.to_dict( + ) assert bare_metal_server_disk_reference_deleted_model_json2 == bare_metal_server_disk_reference_deleted_model_json @@ -48875,14 +52899,16 @@ def test_bare_metal_server_initialization_serialization(self): # Construct dict forms of any model objects needed in order to build this model. image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' image_remote_model = {} # ImageRemote @@ -48890,50 +52916,71 @@ def test_bare_metal_server_initialization_serialization(self): image_remote_model['region'] = region_reference_model image_reference_model = {} # ImageReference - image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['deleted'] = image_reference_deleted_model - image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['name'] = 'my-image' image_reference_model['remote'] = image_remote_model image_reference_model['resource_type'] = 'image' key_reference_deleted_model = {} # KeyReferenceDeleted - key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + key_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' key_reference_model = {} # KeyReference - key_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model['deleted'] = key_reference_deleted_model - key_reference_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' - key_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_reference_model[ + 'fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' + key_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model['name'] = 'my-key' - bare_metal_server_initialization_user_account_model = {} # BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount - bare_metal_server_initialization_user_account_model['encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' - bare_metal_server_initialization_user_account_model['encryption_key'] = key_reference_model - bare_metal_server_initialization_user_account_model['resource_type'] = 'host_user_account' - bare_metal_server_initialization_user_account_model['username'] = 'Administrator' + bare_metal_server_initialization_user_account_model = { + } # BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount + bare_metal_server_initialization_user_account_model[ + 'encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' + bare_metal_server_initialization_user_account_model[ + 'encryption_key'] = key_reference_model + bare_metal_server_initialization_user_account_model[ + 'resource_type'] = 'host_user_account' + bare_metal_server_initialization_user_account_model[ + 'username'] = 'Administrator' # Construct a json representation of a BareMetalServerInitialization model bare_metal_server_initialization_model_json = {} - bare_metal_server_initialization_model_json['image'] = image_reference_model - bare_metal_server_initialization_model_json['keys'] = [key_reference_model] - bare_metal_server_initialization_model_json['user_accounts'] = [bare_metal_server_initialization_user_account_model] + bare_metal_server_initialization_model_json[ + 'image'] = image_reference_model + bare_metal_server_initialization_model_json['keys'] = [ + key_reference_model + ] + bare_metal_server_initialization_model_json['user_accounts'] = [ + bare_metal_server_initialization_user_account_model + ] # Construct a model instance of BareMetalServerInitialization by calling from_dict on the json representation - bare_metal_server_initialization_model = BareMetalServerInitialization.from_dict(bare_metal_server_initialization_model_json) + bare_metal_server_initialization_model = BareMetalServerInitialization.from_dict( + bare_metal_server_initialization_model_json) assert bare_metal_server_initialization_model != False # Construct a model instance of BareMetalServerInitialization by calling from_dict on the json representation - bare_metal_server_initialization_model_dict = BareMetalServerInitialization.from_dict(bare_metal_server_initialization_model_json).__dict__ - bare_metal_server_initialization_model2 = BareMetalServerInitialization(**bare_metal_server_initialization_model_dict) + bare_metal_server_initialization_model_dict = BareMetalServerInitialization.from_dict( + bare_metal_server_initialization_model_json).__dict__ + bare_metal_server_initialization_model2 = BareMetalServerInitialization( + **bare_metal_server_initialization_model_dict) # Verify the model instances are equivalent assert bare_metal_server_initialization_model == bare_metal_server_initialization_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_initialization_model_json2 = bare_metal_server_initialization_model.to_dict() + bare_metal_server_initialization_model_json2 = bare_metal_server_initialization_model.to_dict( + ) assert bare_metal_server_initialization_model_json2 == bare_metal_server_initialization_model_json @@ -48957,23 +53004,31 @@ def test_bare_metal_server_initialization_prototype_serialization(self): # Construct a json representation of a BareMetalServerInitializationPrototype model bare_metal_server_initialization_prototype_model_json = {} - bare_metal_server_initialization_prototype_model_json['image'] = image_identity_model - bare_metal_server_initialization_prototype_model_json['keys'] = [key_identity_model] - bare_metal_server_initialization_prototype_model_json['user_data'] = 'testString' + bare_metal_server_initialization_prototype_model_json[ + 'image'] = image_identity_model + bare_metal_server_initialization_prototype_model_json['keys'] = [ + key_identity_model + ] + bare_metal_server_initialization_prototype_model_json[ + 'user_data'] = 'testString' # Construct a model instance of BareMetalServerInitializationPrototype by calling from_dict on the json representation - bare_metal_server_initialization_prototype_model = BareMetalServerInitializationPrototype.from_dict(bare_metal_server_initialization_prototype_model_json) + bare_metal_server_initialization_prototype_model = BareMetalServerInitializationPrototype.from_dict( + bare_metal_server_initialization_prototype_model_json) assert bare_metal_server_initialization_prototype_model != False # Construct a model instance of BareMetalServerInitializationPrototype by calling from_dict on the json representation - bare_metal_server_initialization_prototype_model_dict = BareMetalServerInitializationPrototype.from_dict(bare_metal_server_initialization_prototype_model_json).__dict__ - bare_metal_server_initialization_prototype_model2 = BareMetalServerInitializationPrototype(**bare_metal_server_initialization_prototype_model_dict) + bare_metal_server_initialization_prototype_model_dict = BareMetalServerInitializationPrototype.from_dict( + bare_metal_server_initialization_prototype_model_json).__dict__ + bare_metal_server_initialization_prototype_model2 = BareMetalServerInitializationPrototype( + **bare_metal_server_initialization_prototype_model_dict) # Verify the model instances are equivalent assert bare_metal_server_initialization_prototype_model == bare_metal_server_initialization_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_initialization_prototype_model_json2 = bare_metal_server_initialization_prototype_model.to_dict() + bare_metal_server_initialization_prototype_model_json2 = bare_metal_server_initialization_prototype_model.to_dict( + ) assert bare_metal_server_initialization_prototype_model_json2 == bare_metal_server_initialization_prototype_model_json @@ -48989,23 +53044,30 @@ def test_bare_metal_server_lifecycle_reason_serialization(self): # Construct a json representation of a BareMetalServerLifecycleReason model bare_metal_server_lifecycle_reason_model_json = {} - bare_metal_server_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - bare_metal_server_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - bare_metal_server_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + bare_metal_server_lifecycle_reason_model_json[ + 'code'] = 'resource_suspended_by_provider' + bare_metal_server_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + bare_metal_server_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of BareMetalServerLifecycleReason by calling from_dict on the json representation - bare_metal_server_lifecycle_reason_model = BareMetalServerLifecycleReason.from_dict(bare_metal_server_lifecycle_reason_model_json) + bare_metal_server_lifecycle_reason_model = BareMetalServerLifecycleReason.from_dict( + bare_metal_server_lifecycle_reason_model_json) assert bare_metal_server_lifecycle_reason_model != False # Construct a model instance of BareMetalServerLifecycleReason by calling from_dict on the json representation - bare_metal_server_lifecycle_reason_model_dict = BareMetalServerLifecycleReason.from_dict(bare_metal_server_lifecycle_reason_model_json).__dict__ - bare_metal_server_lifecycle_reason_model2 = BareMetalServerLifecycleReason(**bare_metal_server_lifecycle_reason_model_dict) + bare_metal_server_lifecycle_reason_model_dict = BareMetalServerLifecycleReason.from_dict( + bare_metal_server_lifecycle_reason_model_json).__dict__ + bare_metal_server_lifecycle_reason_model2 = BareMetalServerLifecycleReason( + **bare_metal_server_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert bare_metal_server_lifecycle_reason_model == bare_metal_server_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_lifecycle_reason_model_json2 = bare_metal_server_lifecycle_reason_model.to_dict() + bare_metal_server_lifecycle_reason_model_json2 = bare_metal_server_lifecycle_reason_model.to_dict( + ) assert bare_metal_server_lifecycle_reason_model_json2 == bare_metal_server_lifecycle_reason_model_json @@ -49014,84 +53076,122 @@ class TestModel_BareMetalServerNetworkAttachmentCollection: Test Class for BareMetalServerNetworkAttachmentCollection """ - def test_bare_metal_server_network_attachment_collection_serialization(self): + def test_bare_metal_server_network_attachment_collection_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentCollection """ # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_network_attachment_collection_first_model = {} # BareMetalServerNetworkAttachmentCollectionFirst - bare_metal_server_network_attachment_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20' + bare_metal_server_network_attachment_collection_first_model = { + } # BareMetalServerNetworkAttachmentCollectionFirst + bare_metal_server_network_attachment_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - virtual_network_interface_reference_attachment_context_model = {} # VirtualNetworkInterfaceReferenceAttachmentContext - virtual_network_interface_reference_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model['resource_type'] = 'virtual_network_interface' - - bare_metal_server_network_attachment_model = {} # BareMetalServerNetworkAttachmentByPCI - bare_metal_server_network_attachment_model['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_network_attachment_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_model['id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + virtual_network_interface_reference_attachment_context_model = { + } # VirtualNetworkInterfaceReferenceAttachmentContext + virtual_network_interface_reference_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model[ + 'resource_type'] = 'virtual_network_interface' + + bare_metal_server_network_attachment_model = { + } # BareMetalServerNetworkAttachmentByPCI + bare_metal_server_network_attachment_model[ + 'created_at'] = '2019-01-01T12:00:00Z' + bare_metal_server_network_attachment_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_model[ + 'id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_attachment_model['lifecycle_state'] = 'stable' - bare_metal_server_network_attachment_model['name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_model[ + 'name'] = 'my-bare-metal-server-network-attachment' bare_metal_server_network_attachment_model['port_speed'] = 1000 - bare_metal_server_network_attachment_model['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_attachment_model['resource_type'] = 'bare_metal_server_network_attachment' - bare_metal_server_network_attachment_model['subnet'] = subnet_reference_model + bare_metal_server_network_attachment_model[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_attachment_model[ + 'resource_type'] = 'bare_metal_server_network_attachment' + bare_metal_server_network_attachment_model[ + 'subnet'] = subnet_reference_model bare_metal_server_network_attachment_model['type'] = 'primary' - bare_metal_server_network_attachment_model['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model + bare_metal_server_network_attachment_model[ + 'virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model bare_metal_server_network_attachment_model['allowed_vlans'] = [4] bare_metal_server_network_attachment_model['interface_type'] = 'pci' - bare_metal_server_network_attachment_collection_next_model = {} # BareMetalServerNetworkAttachmentCollectionNext - bare_metal_server_network_attachment_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' + bare_metal_server_network_attachment_collection_next_model = { + } # BareMetalServerNetworkAttachmentCollectionNext + bare_metal_server_network_attachment_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' # Construct a json representation of a BareMetalServerNetworkAttachmentCollection model bare_metal_server_network_attachment_collection_model_json = {} - bare_metal_server_network_attachment_collection_model_json['first'] = bare_metal_server_network_attachment_collection_first_model + bare_metal_server_network_attachment_collection_model_json[ + 'first'] = bare_metal_server_network_attachment_collection_first_model bare_metal_server_network_attachment_collection_model_json['limit'] = 20 - bare_metal_server_network_attachment_collection_model_json['network_attachments'] = [bare_metal_server_network_attachment_model] - bare_metal_server_network_attachment_collection_model_json['next'] = bare_metal_server_network_attachment_collection_next_model - bare_metal_server_network_attachment_collection_model_json['total_count'] = 132 + bare_metal_server_network_attachment_collection_model_json[ + 'network_attachments'] = [ + bare_metal_server_network_attachment_model + ] + bare_metal_server_network_attachment_collection_model_json[ + 'next'] = bare_metal_server_network_attachment_collection_next_model + bare_metal_server_network_attachment_collection_model_json[ + 'total_count'] = 132 # Construct a model instance of BareMetalServerNetworkAttachmentCollection by calling from_dict on the json representation - bare_metal_server_network_attachment_collection_model = BareMetalServerNetworkAttachmentCollection.from_dict(bare_metal_server_network_attachment_collection_model_json) + bare_metal_server_network_attachment_collection_model = BareMetalServerNetworkAttachmentCollection.from_dict( + bare_metal_server_network_attachment_collection_model_json) assert bare_metal_server_network_attachment_collection_model != False # Construct a model instance of BareMetalServerNetworkAttachmentCollection by calling from_dict on the json representation - bare_metal_server_network_attachment_collection_model_dict = BareMetalServerNetworkAttachmentCollection.from_dict(bare_metal_server_network_attachment_collection_model_json).__dict__ - bare_metal_server_network_attachment_collection_model2 = BareMetalServerNetworkAttachmentCollection(**bare_metal_server_network_attachment_collection_model_dict) + bare_metal_server_network_attachment_collection_model_dict = BareMetalServerNetworkAttachmentCollection.from_dict( + bare_metal_server_network_attachment_collection_model_json).__dict__ + bare_metal_server_network_attachment_collection_model2 = BareMetalServerNetworkAttachmentCollection( + **bare_metal_server_network_attachment_collection_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_collection_model == bare_metal_server_network_attachment_collection_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_collection_model_json2 = bare_metal_server_network_attachment_collection_model.to_dict() + bare_metal_server_network_attachment_collection_model_json2 = bare_metal_server_network_attachment_collection_model.to_dict( + ) assert bare_metal_server_network_attachment_collection_model_json2 == bare_metal_server_network_attachment_collection_model_json @@ -49100,28 +53200,35 @@ class TestModel_BareMetalServerNetworkAttachmentCollectionFirst: Test Class for BareMetalServerNetworkAttachmentCollectionFirst """ - def test_bare_metal_server_network_attachment_collection_first_serialization(self): + def test_bare_metal_server_network_attachment_collection_first_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentCollectionFirst """ # Construct a json representation of a BareMetalServerNetworkAttachmentCollectionFirst model bare_metal_server_network_attachment_collection_first_model_json = {} - bare_metal_server_network_attachment_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20' + bare_metal_server_network_attachment_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?limit=20' # Construct a model instance of BareMetalServerNetworkAttachmentCollectionFirst by calling from_dict on the json representation - bare_metal_server_network_attachment_collection_first_model = BareMetalServerNetworkAttachmentCollectionFirst.from_dict(bare_metal_server_network_attachment_collection_first_model_json) + bare_metal_server_network_attachment_collection_first_model = BareMetalServerNetworkAttachmentCollectionFirst.from_dict( + bare_metal_server_network_attachment_collection_first_model_json) assert bare_metal_server_network_attachment_collection_first_model != False # Construct a model instance of BareMetalServerNetworkAttachmentCollectionFirst by calling from_dict on the json representation - bare_metal_server_network_attachment_collection_first_model_dict = BareMetalServerNetworkAttachmentCollectionFirst.from_dict(bare_metal_server_network_attachment_collection_first_model_json).__dict__ - bare_metal_server_network_attachment_collection_first_model2 = BareMetalServerNetworkAttachmentCollectionFirst(**bare_metal_server_network_attachment_collection_first_model_dict) + bare_metal_server_network_attachment_collection_first_model_dict = BareMetalServerNetworkAttachmentCollectionFirst.from_dict( + bare_metal_server_network_attachment_collection_first_model_json + ).__dict__ + bare_metal_server_network_attachment_collection_first_model2 = BareMetalServerNetworkAttachmentCollectionFirst( + **bare_metal_server_network_attachment_collection_first_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_collection_first_model == bare_metal_server_network_attachment_collection_first_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_collection_first_model_json2 = bare_metal_server_network_attachment_collection_first_model.to_dict() + bare_metal_server_network_attachment_collection_first_model_json2 = bare_metal_server_network_attachment_collection_first_model.to_dict( + ) assert bare_metal_server_network_attachment_collection_first_model_json2 == bare_metal_server_network_attachment_collection_first_model_json @@ -49130,28 +53237,35 @@ class TestModel_BareMetalServerNetworkAttachmentCollectionNext: Test Class for BareMetalServerNetworkAttachmentCollectionNext """ - def test_bare_metal_server_network_attachment_collection_next_serialization(self): + def test_bare_metal_server_network_attachment_collection_next_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentCollectionNext """ # Construct a json representation of a BareMetalServerNetworkAttachmentCollectionNext model bare_metal_server_network_attachment_collection_next_model_json = {} - bare_metal_server_network_attachment_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' + bare_metal_server_network_attachment_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_attachments?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' # Construct a model instance of BareMetalServerNetworkAttachmentCollectionNext by calling from_dict on the json representation - bare_metal_server_network_attachment_collection_next_model = BareMetalServerNetworkAttachmentCollectionNext.from_dict(bare_metal_server_network_attachment_collection_next_model_json) + bare_metal_server_network_attachment_collection_next_model = BareMetalServerNetworkAttachmentCollectionNext.from_dict( + bare_metal_server_network_attachment_collection_next_model_json) assert bare_metal_server_network_attachment_collection_next_model != False # Construct a model instance of BareMetalServerNetworkAttachmentCollectionNext by calling from_dict on the json representation - bare_metal_server_network_attachment_collection_next_model_dict = BareMetalServerNetworkAttachmentCollectionNext.from_dict(bare_metal_server_network_attachment_collection_next_model_json).__dict__ - bare_metal_server_network_attachment_collection_next_model2 = BareMetalServerNetworkAttachmentCollectionNext(**bare_metal_server_network_attachment_collection_next_model_dict) + bare_metal_server_network_attachment_collection_next_model_dict = BareMetalServerNetworkAttachmentCollectionNext.from_dict( + bare_metal_server_network_attachment_collection_next_model_json + ).__dict__ + bare_metal_server_network_attachment_collection_next_model2 = BareMetalServerNetworkAttachmentCollectionNext( + **bare_metal_server_network_attachment_collection_next_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_collection_next_model == bare_metal_server_network_attachment_collection_next_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_collection_next_model_json2 = bare_metal_server_network_attachment_collection_next_model.to_dict() + bare_metal_server_network_attachment_collection_next_model_json2 = bare_metal_server_network_attachment_collection_next_model.to_dict( + ) assert bare_metal_server_network_attachment_collection_next_model_json2 == bare_metal_server_network_attachment_collection_next_model_json @@ -49167,22 +53281,28 @@ def test_bare_metal_server_network_attachment_patch_serialization(self): # Construct a json representation of a BareMetalServerNetworkAttachmentPatch model bare_metal_server_network_attachment_patch_model_json = {} - bare_metal_server_network_attachment_patch_model_json['allowed_vlans'] = [4] - bare_metal_server_network_attachment_patch_model_json['name'] = 'my-bare-metal-server-network-attachment-updated' + bare_metal_server_network_attachment_patch_model_json[ + 'allowed_vlans'] = [4] + bare_metal_server_network_attachment_patch_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment-updated' # Construct a model instance of BareMetalServerNetworkAttachmentPatch by calling from_dict on the json representation - bare_metal_server_network_attachment_patch_model = BareMetalServerNetworkAttachmentPatch.from_dict(bare_metal_server_network_attachment_patch_model_json) + bare_metal_server_network_attachment_patch_model = BareMetalServerNetworkAttachmentPatch.from_dict( + bare_metal_server_network_attachment_patch_model_json) assert bare_metal_server_network_attachment_patch_model != False # Construct a model instance of BareMetalServerNetworkAttachmentPatch by calling from_dict on the json representation - bare_metal_server_network_attachment_patch_model_dict = BareMetalServerNetworkAttachmentPatch.from_dict(bare_metal_server_network_attachment_patch_model_json).__dict__ - bare_metal_server_network_attachment_patch_model2 = BareMetalServerNetworkAttachmentPatch(**bare_metal_server_network_attachment_patch_model_dict) + bare_metal_server_network_attachment_patch_model_dict = BareMetalServerNetworkAttachmentPatch.from_dict( + bare_metal_server_network_attachment_patch_model_json).__dict__ + bare_metal_server_network_attachment_patch_model2 = BareMetalServerNetworkAttachmentPatch( + **bare_metal_server_network_attachment_patch_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_patch_model == bare_metal_server_network_attachment_patch_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_patch_model_json2 = bare_metal_server_network_attachment_patch_model.to_dict() + bare_metal_server_network_attachment_patch_model_json2 = bare_metal_server_network_attachment_patch_model.to_dict( + ) assert bare_metal_server_network_attachment_patch_model_json2 == bare_metal_server_network_attachment_patch_model_json @@ -49198,54 +53318,75 @@ def test_bare_metal_server_network_attachment_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_network_attachment_reference_deleted_model = {} # BareMetalServerNetworkAttachmentReferenceDeleted - bare_metal_server_network_attachment_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_network_attachment_reference_deleted_model = { + } # BareMetalServerNetworkAttachmentReferenceDeleted + bare_metal_server_network_attachment_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model['address'] = '10.240.0.5' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a BareMetalServerNetworkAttachmentReference model bare_metal_server_network_attachment_reference_model_json = {} - bare_metal_server_network_attachment_reference_model_json['deleted'] = bare_metal_server_network_attachment_reference_deleted_model - bare_metal_server_network_attachment_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_reference_model_json['id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_reference_model_json['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_reference_model_json['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_attachment_reference_model_json['resource_type'] = 'bare_metal_server_network_attachment' - bare_metal_server_network_attachment_reference_model_json['subnet'] = subnet_reference_model + bare_metal_server_network_attachment_reference_model_json[ + 'deleted'] = bare_metal_server_network_attachment_reference_deleted_model + bare_metal_server_network_attachment_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_reference_model_json[ + 'id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_reference_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_attachment_reference_model_json[ + 'resource_type'] = 'bare_metal_server_network_attachment' + bare_metal_server_network_attachment_reference_model_json[ + 'subnet'] = subnet_reference_model # Construct a model instance of BareMetalServerNetworkAttachmentReference by calling from_dict on the json representation - bare_metal_server_network_attachment_reference_model = BareMetalServerNetworkAttachmentReference.from_dict(bare_metal_server_network_attachment_reference_model_json) + bare_metal_server_network_attachment_reference_model = BareMetalServerNetworkAttachmentReference.from_dict( + bare_metal_server_network_attachment_reference_model_json) assert bare_metal_server_network_attachment_reference_model != False # Construct a model instance of BareMetalServerNetworkAttachmentReference by calling from_dict on the json representation - bare_metal_server_network_attachment_reference_model_dict = BareMetalServerNetworkAttachmentReference.from_dict(bare_metal_server_network_attachment_reference_model_json).__dict__ - bare_metal_server_network_attachment_reference_model2 = BareMetalServerNetworkAttachmentReference(**bare_metal_server_network_attachment_reference_model_dict) + bare_metal_server_network_attachment_reference_model_dict = BareMetalServerNetworkAttachmentReference.from_dict( + bare_metal_server_network_attachment_reference_model_json).__dict__ + bare_metal_server_network_attachment_reference_model2 = BareMetalServerNetworkAttachmentReference( + **bare_metal_server_network_attachment_reference_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_reference_model == bare_metal_server_network_attachment_reference_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_reference_model_json2 = bare_metal_server_network_attachment_reference_model.to_dict() + bare_metal_server_network_attachment_reference_model_json2 = bare_metal_server_network_attachment_reference_model.to_dict( + ) assert bare_metal_server_network_attachment_reference_model_json2 == bare_metal_server_network_attachment_reference_model_json @@ -49254,28 +53395,35 @@ class TestModel_BareMetalServerNetworkAttachmentReferenceDeleted: Test Class for BareMetalServerNetworkAttachmentReferenceDeleted """ - def test_bare_metal_server_network_attachment_reference_deleted_serialization(self): + def test_bare_metal_server_network_attachment_reference_deleted_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentReferenceDeleted """ # Construct a json representation of a BareMetalServerNetworkAttachmentReferenceDeleted model bare_metal_server_network_attachment_reference_deleted_model_json = {} - bare_metal_server_network_attachment_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_network_attachment_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of BareMetalServerNetworkAttachmentReferenceDeleted by calling from_dict on the json representation - bare_metal_server_network_attachment_reference_deleted_model = BareMetalServerNetworkAttachmentReferenceDeleted.from_dict(bare_metal_server_network_attachment_reference_deleted_model_json) + bare_metal_server_network_attachment_reference_deleted_model = BareMetalServerNetworkAttachmentReferenceDeleted.from_dict( + bare_metal_server_network_attachment_reference_deleted_model_json) assert bare_metal_server_network_attachment_reference_deleted_model != False # Construct a model instance of BareMetalServerNetworkAttachmentReferenceDeleted by calling from_dict on the json representation - bare_metal_server_network_attachment_reference_deleted_model_dict = BareMetalServerNetworkAttachmentReferenceDeleted.from_dict(bare_metal_server_network_attachment_reference_deleted_model_json).__dict__ - bare_metal_server_network_attachment_reference_deleted_model2 = BareMetalServerNetworkAttachmentReferenceDeleted(**bare_metal_server_network_attachment_reference_deleted_model_dict) + bare_metal_server_network_attachment_reference_deleted_model_dict = BareMetalServerNetworkAttachmentReferenceDeleted.from_dict( + bare_metal_server_network_attachment_reference_deleted_model_json + ).__dict__ + bare_metal_server_network_attachment_reference_deleted_model2 = BareMetalServerNetworkAttachmentReferenceDeleted( + **bare_metal_server_network_attachment_reference_deleted_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_reference_deleted_model == bare_metal_server_network_attachment_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_reference_deleted_model_json2 = bare_metal_server_network_attachment_reference_deleted_model.to_dict() + bare_metal_server_network_attachment_reference_deleted_model_json2 = bare_metal_server_network_attachment_reference_deleted_model.to_dict( + ) assert bare_metal_server_network_attachment_reference_deleted_model_json2 == bare_metal_server_network_attachment_reference_deleted_model_json @@ -49291,94 +53439,140 @@ def test_bare_metal_server_network_interface_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_network_interface_collection_first_model = {} # BareMetalServerNetworkInterfaceCollectionFirst - bare_metal_server_network_interface_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20' + bare_metal_server_network_interface_collection_first_model = { + } # BareMetalServerNetworkInterfaceCollectionFirst + bare_metal_server_network_interface_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20' floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' floating_ip_reference_model = {} # FloatingIPReference floating_ip_reference_model['address'] = '203.0.113.1' - floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - bare_metal_server_network_interface_model = {} # BareMetalServerNetworkInterfaceByHiperSocket + bare_metal_server_network_interface_model = { + } # BareMetalServerNetworkInterfaceByHiperSocket bare_metal_server_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_interface_model['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_model['floating_ips'] = [floating_ip_reference_model] - bare_metal_server_network_interface_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_model['mac_address'] = '02:00:04:00:C4:6A' - bare_metal_server_network_interface_model['name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_model[ + 'created_at'] = '2019-01-01T12:00:00Z' + bare_metal_server_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_model['floating_ips'] = [ + floating_ip_reference_model + ] + bare_metal_server_network_interface_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_model[ + 'mac_address'] = '02:00:04:00:C4:6A' + bare_metal_server_network_interface_model[ + 'name'] = 'my-bare-metal-server-network-interface' bare_metal_server_network_interface_model['port_speed'] = 1000 - bare_metal_server_network_interface_model['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_interface_model['resource_type'] = 'network_interface' - bare_metal_server_network_interface_model['security_groups'] = [security_group_reference_model] + bare_metal_server_network_interface_model[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_interface_model[ + 'resource_type'] = 'network_interface' + bare_metal_server_network_interface_model['security_groups'] = [ + security_group_reference_model + ] bare_metal_server_network_interface_model['status'] = 'available' - bare_metal_server_network_interface_model['subnet'] = subnet_reference_model + bare_metal_server_network_interface_model[ + 'subnet'] = subnet_reference_model bare_metal_server_network_interface_model['type'] = 'primary' - bare_metal_server_network_interface_model['interface_type'] = 'hipersocket' + bare_metal_server_network_interface_model[ + 'interface_type'] = 'hipersocket' - bare_metal_server_network_interface_collection_next_model = {} # BareMetalServerNetworkInterfaceCollectionNext - bare_metal_server_network_interface_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' + bare_metal_server_network_interface_collection_next_model = { + } # BareMetalServerNetworkInterfaceCollectionNext + bare_metal_server_network_interface_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' # Construct a json representation of a BareMetalServerNetworkInterfaceCollection model bare_metal_server_network_interface_collection_model_json = {} - bare_metal_server_network_interface_collection_model_json['first'] = bare_metal_server_network_interface_collection_first_model + bare_metal_server_network_interface_collection_model_json[ + 'first'] = bare_metal_server_network_interface_collection_first_model bare_metal_server_network_interface_collection_model_json['limit'] = 20 - bare_metal_server_network_interface_collection_model_json['network_interfaces'] = [bare_metal_server_network_interface_model] - bare_metal_server_network_interface_collection_model_json['next'] = bare_metal_server_network_interface_collection_next_model - bare_metal_server_network_interface_collection_model_json['total_count'] = 132 + bare_metal_server_network_interface_collection_model_json[ + 'network_interfaces'] = [bare_metal_server_network_interface_model] + bare_metal_server_network_interface_collection_model_json[ + 'next'] = bare_metal_server_network_interface_collection_next_model + bare_metal_server_network_interface_collection_model_json[ + 'total_count'] = 132 # Construct a model instance of BareMetalServerNetworkInterfaceCollection by calling from_dict on the json representation - bare_metal_server_network_interface_collection_model = BareMetalServerNetworkInterfaceCollection.from_dict(bare_metal_server_network_interface_collection_model_json) + bare_metal_server_network_interface_collection_model = BareMetalServerNetworkInterfaceCollection.from_dict( + bare_metal_server_network_interface_collection_model_json) assert bare_metal_server_network_interface_collection_model != False # Construct a model instance of BareMetalServerNetworkInterfaceCollection by calling from_dict on the json representation - bare_metal_server_network_interface_collection_model_dict = BareMetalServerNetworkInterfaceCollection.from_dict(bare_metal_server_network_interface_collection_model_json).__dict__ - bare_metal_server_network_interface_collection_model2 = BareMetalServerNetworkInterfaceCollection(**bare_metal_server_network_interface_collection_model_dict) + bare_metal_server_network_interface_collection_model_dict = BareMetalServerNetworkInterfaceCollection.from_dict( + bare_metal_server_network_interface_collection_model_json).__dict__ + bare_metal_server_network_interface_collection_model2 = BareMetalServerNetworkInterfaceCollection( + **bare_metal_server_network_interface_collection_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_collection_model == bare_metal_server_network_interface_collection_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_collection_model_json2 = bare_metal_server_network_interface_collection_model.to_dict() + bare_metal_server_network_interface_collection_model_json2 = bare_metal_server_network_interface_collection_model.to_dict( + ) assert bare_metal_server_network_interface_collection_model_json2 == bare_metal_server_network_interface_collection_model_json @@ -49387,28 +53581,35 @@ class TestModel_BareMetalServerNetworkInterfaceCollectionFirst: Test Class for BareMetalServerNetworkInterfaceCollectionFirst """ - def test_bare_metal_server_network_interface_collection_first_serialization(self): + def test_bare_metal_server_network_interface_collection_first_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfaceCollectionFirst """ # Construct a json representation of a BareMetalServerNetworkInterfaceCollectionFirst model bare_metal_server_network_interface_collection_first_model_json = {} - bare_metal_server_network_interface_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20' + bare_metal_server_network_interface_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20' # Construct a model instance of BareMetalServerNetworkInterfaceCollectionFirst by calling from_dict on the json representation - bare_metal_server_network_interface_collection_first_model = BareMetalServerNetworkInterfaceCollectionFirst.from_dict(bare_metal_server_network_interface_collection_first_model_json) + bare_metal_server_network_interface_collection_first_model = BareMetalServerNetworkInterfaceCollectionFirst.from_dict( + bare_metal_server_network_interface_collection_first_model_json) assert bare_metal_server_network_interface_collection_first_model != False # Construct a model instance of BareMetalServerNetworkInterfaceCollectionFirst by calling from_dict on the json representation - bare_metal_server_network_interface_collection_first_model_dict = BareMetalServerNetworkInterfaceCollectionFirst.from_dict(bare_metal_server_network_interface_collection_first_model_json).__dict__ - bare_metal_server_network_interface_collection_first_model2 = BareMetalServerNetworkInterfaceCollectionFirst(**bare_metal_server_network_interface_collection_first_model_dict) + bare_metal_server_network_interface_collection_first_model_dict = BareMetalServerNetworkInterfaceCollectionFirst.from_dict( + bare_metal_server_network_interface_collection_first_model_json + ).__dict__ + bare_metal_server_network_interface_collection_first_model2 = BareMetalServerNetworkInterfaceCollectionFirst( + **bare_metal_server_network_interface_collection_first_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_collection_first_model == bare_metal_server_network_interface_collection_first_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_collection_first_model_json2 = bare_metal_server_network_interface_collection_first_model.to_dict() + bare_metal_server_network_interface_collection_first_model_json2 = bare_metal_server_network_interface_collection_first_model.to_dict( + ) assert bare_metal_server_network_interface_collection_first_model_json2 == bare_metal_server_network_interface_collection_first_model_json @@ -49417,28 +53618,35 @@ class TestModel_BareMetalServerNetworkInterfaceCollectionNext: Test Class for BareMetalServerNetworkInterfaceCollectionNext """ - def test_bare_metal_server_network_interface_collection_next_serialization(self): + def test_bare_metal_server_network_interface_collection_next_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfaceCollectionNext """ # Construct a json representation of a BareMetalServerNetworkInterfaceCollectionNext model bare_metal_server_network_interface_collection_next_model_json = {} - bare_metal_server_network_interface_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' + bare_metal_server_network_interface_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' # Construct a model instance of BareMetalServerNetworkInterfaceCollectionNext by calling from_dict on the json representation - bare_metal_server_network_interface_collection_next_model = BareMetalServerNetworkInterfaceCollectionNext.from_dict(bare_metal_server_network_interface_collection_next_model_json) + bare_metal_server_network_interface_collection_next_model = BareMetalServerNetworkInterfaceCollectionNext.from_dict( + bare_metal_server_network_interface_collection_next_model_json) assert bare_metal_server_network_interface_collection_next_model != False # Construct a model instance of BareMetalServerNetworkInterfaceCollectionNext by calling from_dict on the json representation - bare_metal_server_network_interface_collection_next_model_dict = BareMetalServerNetworkInterfaceCollectionNext.from_dict(bare_metal_server_network_interface_collection_next_model_json).__dict__ - bare_metal_server_network_interface_collection_next_model2 = BareMetalServerNetworkInterfaceCollectionNext(**bare_metal_server_network_interface_collection_next_model_dict) + bare_metal_server_network_interface_collection_next_model_dict = BareMetalServerNetworkInterfaceCollectionNext.from_dict( + bare_metal_server_network_interface_collection_next_model_json + ).__dict__ + bare_metal_server_network_interface_collection_next_model2 = BareMetalServerNetworkInterfaceCollectionNext( + **bare_metal_server_network_interface_collection_next_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_collection_next_model == bare_metal_server_network_interface_collection_next_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_collection_next_model_json2 = bare_metal_server_network_interface_collection_next_model.to_dict() + bare_metal_server_network_interface_collection_next_model_json2 = bare_metal_server_network_interface_collection_next_model.to_dict( + ) assert bare_metal_server_network_interface_collection_next_model_json2 == bare_metal_server_network_interface_collection_next_model_json @@ -49454,24 +53662,32 @@ def test_bare_metal_server_network_interface_patch_serialization(self): # Construct a json representation of a BareMetalServerNetworkInterfacePatch model bare_metal_server_network_interface_patch_model_json = {} - bare_metal_server_network_interface_patch_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_interface_patch_model_json['allowed_vlans'] = [4] - bare_metal_server_network_interface_patch_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_patch_model_json['name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_patch_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_patch_model_json[ + 'allowed_vlans'] = [4] + bare_metal_server_network_interface_patch_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_patch_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' # Construct a model instance of BareMetalServerNetworkInterfacePatch by calling from_dict on the json representation - bare_metal_server_network_interface_patch_model = BareMetalServerNetworkInterfacePatch.from_dict(bare_metal_server_network_interface_patch_model_json) + bare_metal_server_network_interface_patch_model = BareMetalServerNetworkInterfacePatch.from_dict( + bare_metal_server_network_interface_patch_model_json) assert bare_metal_server_network_interface_patch_model != False # Construct a model instance of BareMetalServerNetworkInterfacePatch by calling from_dict on the json representation - bare_metal_server_network_interface_patch_model_dict = BareMetalServerNetworkInterfacePatch.from_dict(bare_metal_server_network_interface_patch_model_json).__dict__ - bare_metal_server_network_interface_patch_model2 = BareMetalServerNetworkInterfacePatch(**bare_metal_server_network_interface_patch_model_dict) + bare_metal_server_network_interface_patch_model_dict = BareMetalServerNetworkInterfacePatch.from_dict( + bare_metal_server_network_interface_patch_model_json).__dict__ + bare_metal_server_network_interface_patch_model2 = BareMetalServerNetworkInterfacePatch( + **bare_metal_server_network_interface_patch_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_patch_model == bare_metal_server_network_interface_patch_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_patch_model_json2 = bare_metal_server_network_interface_patch_model.to_dict() + bare_metal_server_network_interface_patch_model_json2 = bare_metal_server_network_interface_patch_model.to_dict( + ) assert bare_metal_server_network_interface_patch_model_json2 == bare_metal_server_network_interface_patch_model_json @@ -49480,28 +53696,35 @@ class TestModel_BareMetalServerNetworkInterfaceReferenceDeleted: Test Class for BareMetalServerNetworkInterfaceReferenceDeleted """ - def test_bare_metal_server_network_interface_reference_deleted_serialization(self): + def test_bare_metal_server_network_interface_reference_deleted_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfaceReferenceDeleted """ # Construct a json representation of a BareMetalServerNetworkInterfaceReferenceDeleted model bare_metal_server_network_interface_reference_deleted_model_json = {} - bare_metal_server_network_interface_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_network_interface_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of BareMetalServerNetworkInterfaceReferenceDeleted by calling from_dict on the json representation - bare_metal_server_network_interface_reference_deleted_model = BareMetalServerNetworkInterfaceReferenceDeleted.from_dict(bare_metal_server_network_interface_reference_deleted_model_json) + bare_metal_server_network_interface_reference_deleted_model = BareMetalServerNetworkInterfaceReferenceDeleted.from_dict( + bare_metal_server_network_interface_reference_deleted_model_json) assert bare_metal_server_network_interface_reference_deleted_model != False # Construct a model instance of BareMetalServerNetworkInterfaceReferenceDeleted by calling from_dict on the json representation - bare_metal_server_network_interface_reference_deleted_model_dict = BareMetalServerNetworkInterfaceReferenceDeleted.from_dict(bare_metal_server_network_interface_reference_deleted_model_json).__dict__ - bare_metal_server_network_interface_reference_deleted_model2 = BareMetalServerNetworkInterfaceReferenceDeleted(**bare_metal_server_network_interface_reference_deleted_model_dict) + bare_metal_server_network_interface_reference_deleted_model_dict = BareMetalServerNetworkInterfaceReferenceDeleted.from_dict( + bare_metal_server_network_interface_reference_deleted_model_json + ).__dict__ + bare_metal_server_network_interface_reference_deleted_model2 = BareMetalServerNetworkInterfaceReferenceDeleted( + **bare_metal_server_network_interface_reference_deleted_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_reference_deleted_model == bare_metal_server_network_interface_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_reference_deleted_model_json2 = bare_metal_server_network_interface_reference_deleted_model.to_dict() + bare_metal_server_network_interface_reference_deleted_model_json2 = bare_metal_server_network_interface_reference_deleted_model.to_dict( + ) assert bare_metal_server_network_interface_reference_deleted_model_json2 == bare_metal_server_network_interface_reference_deleted_model_json @@ -49510,28 +53733,38 @@ class TestModel_BareMetalServerNetworkInterfaceReferenceTargetContextDeleted: Test Class for BareMetalServerNetworkInterfaceReferenceTargetContextDeleted """ - def test_bare_metal_server_network_interface_reference_target_context_deleted_serialization(self): + def test_bare_metal_server_network_interface_reference_target_context_deleted_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfaceReferenceTargetContextDeleted """ # Construct a json representation of a BareMetalServerNetworkInterfaceReferenceTargetContextDeleted model bare_metal_server_network_interface_reference_target_context_deleted_model_json = {} - bare_metal_server_network_interface_reference_target_context_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_network_interface_reference_target_context_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of BareMetalServerNetworkInterfaceReferenceTargetContextDeleted by calling from_dict on the json representation - bare_metal_server_network_interface_reference_target_context_deleted_model = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict(bare_metal_server_network_interface_reference_target_context_deleted_model_json) + bare_metal_server_network_interface_reference_target_context_deleted_model = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict( + bare_metal_server_network_interface_reference_target_context_deleted_model_json + ) assert bare_metal_server_network_interface_reference_target_context_deleted_model != False # Construct a model instance of BareMetalServerNetworkInterfaceReferenceTargetContextDeleted by calling from_dict on the json representation - bare_metal_server_network_interface_reference_target_context_deleted_model_dict = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict(bare_metal_server_network_interface_reference_target_context_deleted_model_json).__dict__ - bare_metal_server_network_interface_reference_target_context_deleted_model2 = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted(**bare_metal_server_network_interface_reference_target_context_deleted_model_dict) + bare_metal_server_network_interface_reference_target_context_deleted_model_dict = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted.from_dict( + bare_metal_server_network_interface_reference_target_context_deleted_model_json + ).__dict__ + bare_metal_server_network_interface_reference_target_context_deleted_model2 = BareMetalServerNetworkInterfaceReferenceTargetContextDeleted( + ** + bare_metal_server_network_interface_reference_target_context_deleted_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_interface_reference_target_context_deleted_model == bare_metal_server_network_interface_reference_target_context_deleted_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_reference_target_context_deleted_model_json2 = bare_metal_server_network_interface_reference_target_context_deleted_model.to_dict() + bare_metal_server_network_interface_reference_target_context_deleted_model_json2 = bare_metal_server_network_interface_reference_target_context_deleted_model.to_dict( + ) assert bare_metal_server_network_interface_reference_target_context_deleted_model_json2 == bare_metal_server_network_interface_reference_target_context_deleted_model_json @@ -49547,28 +53780,36 @@ def test_bare_metal_server_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_trusted_platform_module_patch_model = {} # BareMetalServerTrustedPlatformModulePatch - bare_metal_server_trusted_platform_module_patch_model['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_patch_model = { + } # BareMetalServerTrustedPlatformModulePatch + bare_metal_server_trusted_platform_module_patch_model[ + 'mode'] = 'disabled' # Construct a json representation of a BareMetalServerPatch model bare_metal_server_patch_model_json = {} + bare_metal_server_patch_model_json['bandwidth'] = 20000 bare_metal_server_patch_model_json['enable_secure_boot'] = False bare_metal_server_patch_model_json['name'] = 'my-bare-metal-server' - bare_metal_server_patch_model_json['trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model + bare_metal_server_patch_model_json[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model # Construct a model instance of BareMetalServerPatch by calling from_dict on the json representation - bare_metal_server_patch_model = BareMetalServerPatch.from_dict(bare_metal_server_patch_model_json) + bare_metal_server_patch_model = BareMetalServerPatch.from_dict( + bare_metal_server_patch_model_json) assert bare_metal_server_patch_model != False # Construct a model instance of BareMetalServerPatch by calling from_dict on the json representation - bare_metal_server_patch_model_dict = BareMetalServerPatch.from_dict(bare_metal_server_patch_model_json).__dict__ - bare_metal_server_patch_model2 = BareMetalServerPatch(**bare_metal_server_patch_model_dict) + bare_metal_server_patch_model_dict = BareMetalServerPatch.from_dict( + bare_metal_server_patch_model_json).__dict__ + bare_metal_server_patch_model2 = BareMetalServerPatch( + **bare_metal_server_patch_model_dict) # Verify the model instances are equivalent assert bare_metal_server_patch_model == bare_metal_server_patch_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_patch_model_json2 = bare_metal_server_patch_model.to_dict() + bare_metal_server_patch_model_json2 = bare_metal_server_patch_model.to_dict( + ) assert bare_metal_server_patch_model_json2 == bare_metal_server_patch_model_json @@ -49577,48 +53818,64 @@ class TestModel_BareMetalServerPrimaryNetworkInterfacePrototype: Test Class for BareMetalServerPrimaryNetworkInterfacePrototype """ - def test_bare_metal_server_primary_network_interface_prototype_serialization(self): + def test_bare_metal_server_primary_network_interface_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerPrimaryNetworkInterfacePrototype """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a BareMetalServerPrimaryNetworkInterfacePrototype model bare_metal_server_primary_network_interface_prototype_model_json = {} - bare_metal_server_primary_network_interface_prototype_model_json['allow_ip_spoofing'] = True - bare_metal_server_primary_network_interface_prototype_model_json['allowed_vlans'] = [4] - bare_metal_server_primary_network_interface_prototype_model_json['enable_infrastructure_nat'] = True - bare_metal_server_primary_network_interface_prototype_model_json['interface_type'] = 'pci' - bare_metal_server_primary_network_interface_prototype_model_json['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_primary_network_interface_prototype_model_json['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_primary_network_interface_prototype_model_json['security_groups'] = [security_group_identity_model] - bare_metal_server_primary_network_interface_prototype_model_json['subnet'] = subnet_identity_model + bare_metal_server_primary_network_interface_prototype_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_primary_network_interface_prototype_model_json[ + 'allowed_vlans'] = [4] + bare_metal_server_primary_network_interface_prototype_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_primary_network_interface_prototype_model_json[ + 'interface_type'] = 'pci' + bare_metal_server_primary_network_interface_prototype_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_primary_network_interface_prototype_model_json[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_primary_network_interface_prototype_model_json[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_primary_network_interface_prototype_model_json[ + 'subnet'] = subnet_identity_model # Construct a model instance of BareMetalServerPrimaryNetworkInterfacePrototype by calling from_dict on the json representation - bare_metal_server_primary_network_interface_prototype_model = BareMetalServerPrimaryNetworkInterfacePrototype.from_dict(bare_metal_server_primary_network_interface_prototype_model_json) + bare_metal_server_primary_network_interface_prototype_model = BareMetalServerPrimaryNetworkInterfacePrototype.from_dict( + bare_metal_server_primary_network_interface_prototype_model_json) assert bare_metal_server_primary_network_interface_prototype_model != False # Construct a model instance of BareMetalServerPrimaryNetworkInterfacePrototype by calling from_dict on the json representation - bare_metal_server_primary_network_interface_prototype_model_dict = BareMetalServerPrimaryNetworkInterfacePrototype.from_dict(bare_metal_server_primary_network_interface_prototype_model_json).__dict__ - bare_metal_server_primary_network_interface_prototype_model2 = BareMetalServerPrimaryNetworkInterfacePrototype(**bare_metal_server_primary_network_interface_prototype_model_dict) + bare_metal_server_primary_network_interface_prototype_model_dict = BareMetalServerPrimaryNetworkInterfacePrototype.from_dict( + bare_metal_server_primary_network_interface_prototype_model_json + ).__dict__ + bare_metal_server_primary_network_interface_prototype_model2 = BareMetalServerPrimaryNetworkInterfacePrototype( + **bare_metal_server_primary_network_interface_prototype_model_dict) # Verify the model instances are equivalent assert bare_metal_server_primary_network_interface_prototype_model == bare_metal_server_primary_network_interface_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_primary_network_interface_prototype_model_json2 = bare_metal_server_primary_network_interface_prototype_model.to_dict() + bare_metal_server_primary_network_interface_prototype_model_json2 = bare_metal_server_primary_network_interface_prototype_model.to_dict( + ) assert bare_metal_server_primary_network_interface_prototype_model_json2 == bare_metal_server_primary_network_interface_prototype_model_json @@ -49634,104 +53891,152 @@ def test_bare_metal_server_profile_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_profile_bandwidth_model = {} # BareMetalServerProfileBandwidthFixed + bare_metal_server_profile_bandwidth_model = { + } # BareMetalServerProfileBandwidthFixed bare_metal_server_profile_bandwidth_model['type'] = 'fixed' bare_metal_server_profile_bandwidth_model['value'] = 20000 - bare_metal_server_profile_console_types_model = {} # BareMetalServerProfileConsoleTypes + bare_metal_server_profile_console_types_model = { + } # BareMetalServerProfileConsoleTypes bare_metal_server_profile_console_types_model['type'] = 'enum' bare_metal_server_profile_console_types_model['values'] = ['serial'] - bare_metal_server_profile_cpu_architecture_model = {} # BareMetalServerProfileCPUArchitecture + bare_metal_server_profile_cpu_architecture_model = { + } # BareMetalServerProfileCPUArchitecture bare_metal_server_profile_cpu_architecture_model['default'] = 'amd64' bare_metal_server_profile_cpu_architecture_model['type'] = 'fixed' bare_metal_server_profile_cpu_architecture_model['value'] = 'amd64' - bare_metal_server_profile_cpu_core_count_model = {} # BareMetalServerProfileCPUCoreCountFixed + bare_metal_server_profile_cpu_core_count_model = { + } # BareMetalServerProfileCPUCoreCountFixed bare_metal_server_profile_cpu_core_count_model['type'] = 'fixed' bare_metal_server_profile_cpu_core_count_model['value'] = 80 - bare_metal_server_profile_cpu_socket_count_model = {} # BareMetalServerProfileCPUSocketCountFixed + bare_metal_server_profile_cpu_socket_count_model = { + } # BareMetalServerProfileCPUSocketCountFixed bare_metal_server_profile_cpu_socket_count_model['type'] = 'fixed' bare_metal_server_profile_cpu_socket_count_model['value'] = 4 - bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed + bare_metal_server_profile_disk_quantity_model = { + } # BareMetalServerProfileDiskQuantityFixed bare_metal_server_profile_disk_quantity_model['type'] = 'fixed' bare_metal_server_profile_disk_quantity_model['value'] = 4 - bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed + bare_metal_server_profile_disk_size_model = { + } # BareMetalServerProfileDiskSizeFixed bare_metal_server_profile_disk_size_model['type'] = 'fixed' bare_metal_server_profile_disk_size_model['value'] = 100 - bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces - bare_metal_server_profile_disk_supported_interfaces_model['default'] = 'fcp' - bare_metal_server_profile_disk_supported_interfaces_model['type'] = 'enum' - bare_metal_server_profile_disk_supported_interfaces_model['values'] = ['fcp'] + bare_metal_server_profile_disk_supported_interfaces_model = { + } # BareMetalServerProfileDiskSupportedInterfaces + bare_metal_server_profile_disk_supported_interfaces_model[ + 'default'] = 'fcp' + bare_metal_server_profile_disk_supported_interfaces_model[ + 'type'] = 'enum' + bare_metal_server_profile_disk_supported_interfaces_model['values'] = [ + 'fcp' + ] bare_metal_server_profile_disk_model = {} # BareMetalServerProfileDisk - bare_metal_server_profile_disk_model['quantity'] = bare_metal_server_profile_disk_quantity_model - bare_metal_server_profile_disk_model['size'] = bare_metal_server_profile_disk_size_model - bare_metal_server_profile_disk_model['supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model - - bare_metal_server_profile_memory_model = {} # BareMetalServerProfileMemoryFixed + bare_metal_server_profile_disk_model[ + 'quantity'] = bare_metal_server_profile_disk_quantity_model + bare_metal_server_profile_disk_model[ + 'size'] = bare_metal_server_profile_disk_size_model + bare_metal_server_profile_disk_model[ + 'supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model + + bare_metal_server_profile_memory_model = { + } # BareMetalServerProfileMemoryFixed bare_metal_server_profile_memory_model['type'] = 'fixed' bare_metal_server_profile_memory_model['value'] = 16 - bare_metal_server_profile_network_attachment_count_model = {} # BareMetalServerProfileNetworkAttachmentCountRange + bare_metal_server_profile_network_attachment_count_model = { + } # BareMetalServerProfileNetworkAttachmentCountRange bare_metal_server_profile_network_attachment_count_model['max'] = 128 bare_metal_server_profile_network_attachment_count_model['min'] = 1 - bare_metal_server_profile_network_attachment_count_model['type'] = 'range' + bare_metal_server_profile_network_attachment_count_model[ + 'type'] = 'range' - bare_metal_server_profile_network_interface_count_model = {} # BareMetalServerProfileNetworkInterfaceCountRange + bare_metal_server_profile_network_interface_count_model = { + } # BareMetalServerProfileNetworkInterfaceCountRange bare_metal_server_profile_network_interface_count_model['max'] = 128 bare_metal_server_profile_network_interface_count_model['min'] = 1 - bare_metal_server_profile_network_interface_count_model['type'] = 'range' + bare_metal_server_profile_network_interface_count_model[ + 'type'] = 'range' - bare_metal_server_profile_os_architecture_model = {} # BareMetalServerProfileOSArchitecture + bare_metal_server_profile_os_architecture_model = { + } # BareMetalServerProfileOSArchitecture bare_metal_server_profile_os_architecture_model['default'] = 'amd64' bare_metal_server_profile_os_architecture_model['type'] = 'enum' bare_metal_server_profile_os_architecture_model['values'] = ['amd64'] - bare_metal_server_profile_supported_trusted_platform_module_modes_model = {} # BareMetalServerProfileSupportedTrustedPlatformModuleModes - bare_metal_server_profile_supported_trusted_platform_module_modes_model['type'] = 'enum' - bare_metal_server_profile_supported_trusted_platform_module_modes_model['values'] = ['disabled'] - - bare_metal_server_profile_virtual_network_interfaces_supported_model = {} # BareMetalServerProfileVirtualNetworkInterfacesSupported - bare_metal_server_profile_virtual_network_interfaces_supported_model['type'] = 'fixed' - bare_metal_server_profile_virtual_network_interfaces_supported_model['value'] = True + bare_metal_server_profile_supported_trusted_platform_module_modes_model = { + } # BareMetalServerProfileSupportedTrustedPlatformModuleModes + bare_metal_server_profile_supported_trusted_platform_module_modes_model[ + 'default'] = 'disabled' + bare_metal_server_profile_supported_trusted_platform_module_modes_model[ + 'type'] = 'enum' + bare_metal_server_profile_supported_trusted_platform_module_modes_model[ + 'values'] = ['disabled'] + + bare_metal_server_profile_virtual_network_interfaces_supported_model = { + } # BareMetalServerProfileVirtualNetworkInterfacesSupported + bare_metal_server_profile_virtual_network_interfaces_supported_model[ + 'type'] = 'fixed' + bare_metal_server_profile_virtual_network_interfaces_supported_model[ + 'value'] = True # Construct a json representation of a BareMetalServerProfile model bare_metal_server_profile_model_json = {} - bare_metal_server_profile_model_json['bandwidth'] = bare_metal_server_profile_bandwidth_model - bare_metal_server_profile_model_json['console_types'] = bare_metal_server_profile_console_types_model - bare_metal_server_profile_model_json['cpu_architecture'] = bare_metal_server_profile_cpu_architecture_model - bare_metal_server_profile_model_json['cpu_core_count'] = bare_metal_server_profile_cpu_core_count_model - bare_metal_server_profile_model_json['cpu_socket_count'] = bare_metal_server_profile_cpu_socket_count_model - bare_metal_server_profile_model_json['disks'] = [bare_metal_server_profile_disk_model] + bare_metal_server_profile_model_json[ + 'bandwidth'] = bare_metal_server_profile_bandwidth_model + bare_metal_server_profile_model_json[ + 'console_types'] = bare_metal_server_profile_console_types_model + bare_metal_server_profile_model_json[ + 'cpu_architecture'] = bare_metal_server_profile_cpu_architecture_model + bare_metal_server_profile_model_json[ + 'cpu_core_count'] = bare_metal_server_profile_cpu_core_count_model + bare_metal_server_profile_model_json[ + 'cpu_socket_count'] = bare_metal_server_profile_cpu_socket_count_model + bare_metal_server_profile_model_json['disks'] = [ + bare_metal_server_profile_disk_model + ] bare_metal_server_profile_model_json['family'] = 'balanced' - bare_metal_server_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' - bare_metal_server_profile_model_json['memory'] = bare_metal_server_profile_memory_model + bare_metal_server_profile_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' + bare_metal_server_profile_model_json[ + 'memory'] = bare_metal_server_profile_memory_model bare_metal_server_profile_model_json['name'] = 'bx2-metal-192x768' - bare_metal_server_profile_model_json['network_attachment_count'] = bare_metal_server_profile_network_attachment_count_model - bare_metal_server_profile_model_json['network_interface_count'] = bare_metal_server_profile_network_interface_count_model - bare_metal_server_profile_model_json['os_architecture'] = bare_metal_server_profile_os_architecture_model - bare_metal_server_profile_model_json['resource_type'] = 'bare_metal_server_profile' - bare_metal_server_profile_model_json['supported_trusted_platform_module_modes'] = bare_metal_server_profile_supported_trusted_platform_module_modes_model - bare_metal_server_profile_model_json['virtual_network_interfaces_supported'] = bare_metal_server_profile_virtual_network_interfaces_supported_model + bare_metal_server_profile_model_json[ + 'network_attachment_count'] = bare_metal_server_profile_network_attachment_count_model + bare_metal_server_profile_model_json[ + 'network_interface_count'] = bare_metal_server_profile_network_interface_count_model + bare_metal_server_profile_model_json[ + 'os_architecture'] = bare_metal_server_profile_os_architecture_model + bare_metal_server_profile_model_json[ + 'resource_type'] = 'bare_metal_server_profile' + bare_metal_server_profile_model_json[ + 'supported_trusted_platform_module_modes'] = bare_metal_server_profile_supported_trusted_platform_module_modes_model + bare_metal_server_profile_model_json[ + 'virtual_network_interfaces_supported'] = bare_metal_server_profile_virtual_network_interfaces_supported_model # Construct a model instance of BareMetalServerProfile by calling from_dict on the json representation - bare_metal_server_profile_model = BareMetalServerProfile.from_dict(bare_metal_server_profile_model_json) + bare_metal_server_profile_model = BareMetalServerProfile.from_dict( + bare_metal_server_profile_model_json) assert bare_metal_server_profile_model != False # Construct a model instance of BareMetalServerProfile by calling from_dict on the json representation - bare_metal_server_profile_model_dict = BareMetalServerProfile.from_dict(bare_metal_server_profile_model_json).__dict__ - bare_metal_server_profile_model2 = BareMetalServerProfile(**bare_metal_server_profile_model_dict) + bare_metal_server_profile_model_dict = BareMetalServerProfile.from_dict( + bare_metal_server_profile_model_json).__dict__ + bare_metal_server_profile_model2 = BareMetalServerProfile( + **bare_metal_server_profile_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_model == bare_metal_server_profile_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_model_json2 = bare_metal_server_profile_model.to_dict() + bare_metal_server_profile_model_json2 = bare_metal_server_profile_model.to_dict( + ) assert bare_metal_server_profile_model_json2 == bare_metal_server_profile_model_json @@ -49747,23 +54052,28 @@ def test_bare_metal_server_profile_cpu_architecture_serialization(self): # Construct a json representation of a BareMetalServerProfileCPUArchitecture model bare_metal_server_profile_cpu_architecture_model_json = {} - bare_metal_server_profile_cpu_architecture_model_json['default'] = 'amd64' + bare_metal_server_profile_cpu_architecture_model_json[ + 'default'] = 'amd64' bare_metal_server_profile_cpu_architecture_model_json['type'] = 'fixed' bare_metal_server_profile_cpu_architecture_model_json['value'] = 'amd64' # Construct a model instance of BareMetalServerProfileCPUArchitecture by calling from_dict on the json representation - bare_metal_server_profile_cpu_architecture_model = BareMetalServerProfileCPUArchitecture.from_dict(bare_metal_server_profile_cpu_architecture_model_json) + bare_metal_server_profile_cpu_architecture_model = BareMetalServerProfileCPUArchitecture.from_dict( + bare_metal_server_profile_cpu_architecture_model_json) assert bare_metal_server_profile_cpu_architecture_model != False # Construct a model instance of BareMetalServerProfileCPUArchitecture by calling from_dict on the json representation - bare_metal_server_profile_cpu_architecture_model_dict = BareMetalServerProfileCPUArchitecture.from_dict(bare_metal_server_profile_cpu_architecture_model_json).__dict__ - bare_metal_server_profile_cpu_architecture_model2 = BareMetalServerProfileCPUArchitecture(**bare_metal_server_profile_cpu_architecture_model_dict) + bare_metal_server_profile_cpu_architecture_model_dict = BareMetalServerProfileCPUArchitecture.from_dict( + bare_metal_server_profile_cpu_architecture_model_json).__dict__ + bare_metal_server_profile_cpu_architecture_model2 = BareMetalServerProfileCPUArchitecture( + **bare_metal_server_profile_cpu_architecture_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_architecture_model == bare_metal_server_profile_cpu_architecture_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_architecture_model_json2 = bare_metal_server_profile_cpu_architecture_model.to_dict() + bare_metal_server_profile_cpu_architecture_model_json2 = bare_metal_server_profile_cpu_architecture_model.to_dict( + ) assert bare_metal_server_profile_cpu_architecture_model_json2 == bare_metal_server_profile_cpu_architecture_model_json @@ -49779,117 +54089,173 @@ def test_bare_metal_server_profile_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_profile_collection_first_model = {} # BareMetalServerProfileCollectionFirst - bare_metal_server_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20' + bare_metal_server_profile_collection_first_model = { + } # BareMetalServerProfileCollectionFirst + bare_metal_server_profile_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20' - bare_metal_server_profile_collection_next_model = {} # BareMetalServerProfileCollectionNext - bare_metal_server_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + bare_metal_server_profile_collection_next_model = { + } # BareMetalServerProfileCollectionNext + bare_metal_server_profile_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - bare_metal_server_profile_bandwidth_model = {} # BareMetalServerProfileBandwidthFixed + bare_metal_server_profile_bandwidth_model = { + } # BareMetalServerProfileBandwidthFixed bare_metal_server_profile_bandwidth_model['type'] = 'fixed' bare_metal_server_profile_bandwidth_model['value'] = 20000 - bare_metal_server_profile_console_types_model = {} # BareMetalServerProfileConsoleTypes + bare_metal_server_profile_console_types_model = { + } # BareMetalServerProfileConsoleTypes bare_metal_server_profile_console_types_model['type'] = 'enum' bare_metal_server_profile_console_types_model['values'] = ['serial'] - bare_metal_server_profile_cpu_architecture_model = {} # BareMetalServerProfileCPUArchitecture + bare_metal_server_profile_cpu_architecture_model = { + } # BareMetalServerProfileCPUArchitecture bare_metal_server_profile_cpu_architecture_model['default'] = 'amd64' bare_metal_server_profile_cpu_architecture_model['type'] = 'fixed' bare_metal_server_profile_cpu_architecture_model['value'] = 'amd64' - bare_metal_server_profile_cpu_core_count_model = {} # BareMetalServerProfileCPUCoreCountFixed + bare_metal_server_profile_cpu_core_count_model = { + } # BareMetalServerProfileCPUCoreCountFixed bare_metal_server_profile_cpu_core_count_model['type'] = 'fixed' bare_metal_server_profile_cpu_core_count_model['value'] = 80 - bare_metal_server_profile_cpu_socket_count_model = {} # BareMetalServerProfileCPUSocketCountFixed + bare_metal_server_profile_cpu_socket_count_model = { + } # BareMetalServerProfileCPUSocketCountFixed bare_metal_server_profile_cpu_socket_count_model['type'] = 'fixed' bare_metal_server_profile_cpu_socket_count_model['value'] = 4 - bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed + bare_metal_server_profile_disk_quantity_model = { + } # BareMetalServerProfileDiskQuantityFixed bare_metal_server_profile_disk_quantity_model['type'] = 'fixed' bare_metal_server_profile_disk_quantity_model['value'] = 4 - bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed + bare_metal_server_profile_disk_size_model = { + } # BareMetalServerProfileDiskSizeFixed bare_metal_server_profile_disk_size_model['type'] = 'fixed' bare_metal_server_profile_disk_size_model['value'] = 100 - bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces - bare_metal_server_profile_disk_supported_interfaces_model['default'] = 'fcp' - bare_metal_server_profile_disk_supported_interfaces_model['type'] = 'enum' - bare_metal_server_profile_disk_supported_interfaces_model['values'] = ['fcp'] + bare_metal_server_profile_disk_supported_interfaces_model = { + } # BareMetalServerProfileDiskSupportedInterfaces + bare_metal_server_profile_disk_supported_interfaces_model[ + 'default'] = 'fcp' + bare_metal_server_profile_disk_supported_interfaces_model[ + 'type'] = 'enum' + bare_metal_server_profile_disk_supported_interfaces_model['values'] = [ + 'fcp' + ] bare_metal_server_profile_disk_model = {} # BareMetalServerProfileDisk - bare_metal_server_profile_disk_model['quantity'] = bare_metal_server_profile_disk_quantity_model - bare_metal_server_profile_disk_model['size'] = bare_metal_server_profile_disk_size_model - bare_metal_server_profile_disk_model['supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model - - bare_metal_server_profile_memory_model = {} # BareMetalServerProfileMemoryFixed + bare_metal_server_profile_disk_model[ + 'quantity'] = bare_metal_server_profile_disk_quantity_model + bare_metal_server_profile_disk_model[ + 'size'] = bare_metal_server_profile_disk_size_model + bare_metal_server_profile_disk_model[ + 'supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model + + bare_metal_server_profile_memory_model = { + } # BareMetalServerProfileMemoryFixed bare_metal_server_profile_memory_model['type'] = 'fixed' bare_metal_server_profile_memory_model['value'] = 16 - bare_metal_server_profile_network_attachment_count_model = {} # BareMetalServerProfileNetworkAttachmentCountRange + bare_metal_server_profile_network_attachment_count_model = { + } # BareMetalServerProfileNetworkAttachmentCountRange bare_metal_server_profile_network_attachment_count_model['max'] = 128 bare_metal_server_profile_network_attachment_count_model['min'] = 1 - bare_metal_server_profile_network_attachment_count_model['type'] = 'range' + bare_metal_server_profile_network_attachment_count_model[ + 'type'] = 'range' - bare_metal_server_profile_network_interface_count_model = {} # BareMetalServerProfileNetworkInterfaceCountRange + bare_metal_server_profile_network_interface_count_model = { + } # BareMetalServerProfileNetworkInterfaceCountRange bare_metal_server_profile_network_interface_count_model['max'] = 128 bare_metal_server_profile_network_interface_count_model['min'] = 1 - bare_metal_server_profile_network_interface_count_model['type'] = 'range' + bare_metal_server_profile_network_interface_count_model[ + 'type'] = 'range' - bare_metal_server_profile_os_architecture_model = {} # BareMetalServerProfileOSArchitecture + bare_metal_server_profile_os_architecture_model = { + } # BareMetalServerProfileOSArchitecture bare_metal_server_profile_os_architecture_model['default'] = 'amd64' bare_metal_server_profile_os_architecture_model['type'] = 'enum' bare_metal_server_profile_os_architecture_model['values'] = ['amd64'] - bare_metal_server_profile_supported_trusted_platform_module_modes_model = {} # BareMetalServerProfileSupportedTrustedPlatformModuleModes - bare_metal_server_profile_supported_trusted_platform_module_modes_model['type'] = 'enum' - bare_metal_server_profile_supported_trusted_platform_module_modes_model['values'] = ['disabled'] - - bare_metal_server_profile_virtual_network_interfaces_supported_model = {} # BareMetalServerProfileVirtualNetworkInterfacesSupported - bare_metal_server_profile_virtual_network_interfaces_supported_model['type'] = 'fixed' - bare_metal_server_profile_virtual_network_interfaces_supported_model['value'] = True + bare_metal_server_profile_supported_trusted_platform_module_modes_model = { + } # BareMetalServerProfileSupportedTrustedPlatformModuleModes + bare_metal_server_profile_supported_trusted_platform_module_modes_model[ + 'default'] = 'disabled' + bare_metal_server_profile_supported_trusted_platform_module_modes_model[ + 'type'] = 'enum' + bare_metal_server_profile_supported_trusted_platform_module_modes_model[ + 'values'] = ['disabled'] + + bare_metal_server_profile_virtual_network_interfaces_supported_model = { + } # BareMetalServerProfileVirtualNetworkInterfacesSupported + bare_metal_server_profile_virtual_network_interfaces_supported_model[ + 'type'] = 'fixed' + bare_metal_server_profile_virtual_network_interfaces_supported_model[ + 'value'] = True bare_metal_server_profile_model = {} # BareMetalServerProfile - bare_metal_server_profile_model['bandwidth'] = bare_metal_server_profile_bandwidth_model - bare_metal_server_profile_model['console_types'] = bare_metal_server_profile_console_types_model - bare_metal_server_profile_model['cpu_architecture'] = bare_metal_server_profile_cpu_architecture_model - bare_metal_server_profile_model['cpu_core_count'] = bare_metal_server_profile_cpu_core_count_model - bare_metal_server_profile_model['cpu_socket_count'] = bare_metal_server_profile_cpu_socket_count_model - bare_metal_server_profile_model['disks'] = [bare_metal_server_profile_disk_model] + bare_metal_server_profile_model[ + 'bandwidth'] = bare_metal_server_profile_bandwidth_model + bare_metal_server_profile_model[ + 'console_types'] = bare_metal_server_profile_console_types_model + bare_metal_server_profile_model[ + 'cpu_architecture'] = bare_metal_server_profile_cpu_architecture_model + bare_metal_server_profile_model[ + 'cpu_core_count'] = bare_metal_server_profile_cpu_core_count_model + bare_metal_server_profile_model[ + 'cpu_socket_count'] = bare_metal_server_profile_cpu_socket_count_model + bare_metal_server_profile_model['disks'] = [ + bare_metal_server_profile_disk_model + ] bare_metal_server_profile_model['family'] = 'balanced' - bare_metal_server_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' - bare_metal_server_profile_model['memory'] = bare_metal_server_profile_memory_model + bare_metal_server_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' + bare_metal_server_profile_model[ + 'memory'] = bare_metal_server_profile_memory_model bare_metal_server_profile_model['name'] = 'bx2-metal-192x768' - bare_metal_server_profile_model['network_attachment_count'] = bare_metal_server_profile_network_attachment_count_model - bare_metal_server_profile_model['network_interface_count'] = bare_metal_server_profile_network_interface_count_model - bare_metal_server_profile_model['os_architecture'] = bare_metal_server_profile_os_architecture_model - bare_metal_server_profile_model['resource_type'] = 'bare_metal_server_profile' - bare_metal_server_profile_model['supported_trusted_platform_module_modes'] = bare_metal_server_profile_supported_trusted_platform_module_modes_model - bare_metal_server_profile_model['virtual_network_interfaces_supported'] = bare_metal_server_profile_virtual_network_interfaces_supported_model + bare_metal_server_profile_model[ + 'network_attachment_count'] = bare_metal_server_profile_network_attachment_count_model + bare_metal_server_profile_model[ + 'network_interface_count'] = bare_metal_server_profile_network_interface_count_model + bare_metal_server_profile_model[ + 'os_architecture'] = bare_metal_server_profile_os_architecture_model + bare_metal_server_profile_model[ + 'resource_type'] = 'bare_metal_server_profile' + bare_metal_server_profile_model[ + 'supported_trusted_platform_module_modes'] = bare_metal_server_profile_supported_trusted_platform_module_modes_model + bare_metal_server_profile_model[ + 'virtual_network_interfaces_supported'] = bare_metal_server_profile_virtual_network_interfaces_supported_model # Construct a json representation of a BareMetalServerProfileCollection model bare_metal_server_profile_collection_model_json = {} - bare_metal_server_profile_collection_model_json['first'] = bare_metal_server_profile_collection_first_model + bare_metal_server_profile_collection_model_json[ + 'first'] = bare_metal_server_profile_collection_first_model bare_metal_server_profile_collection_model_json['limit'] = 20 - bare_metal_server_profile_collection_model_json['next'] = bare_metal_server_profile_collection_next_model - bare_metal_server_profile_collection_model_json['profiles'] = [bare_metal_server_profile_model] + bare_metal_server_profile_collection_model_json[ + 'next'] = bare_metal_server_profile_collection_next_model + bare_metal_server_profile_collection_model_json['profiles'] = [ + bare_metal_server_profile_model + ] bare_metal_server_profile_collection_model_json['total_count'] = 132 # Construct a model instance of BareMetalServerProfileCollection by calling from_dict on the json representation - bare_metal_server_profile_collection_model = BareMetalServerProfileCollection.from_dict(bare_metal_server_profile_collection_model_json) + bare_metal_server_profile_collection_model = BareMetalServerProfileCollection.from_dict( + bare_metal_server_profile_collection_model_json) assert bare_metal_server_profile_collection_model != False # Construct a model instance of BareMetalServerProfileCollection by calling from_dict on the json representation - bare_metal_server_profile_collection_model_dict = BareMetalServerProfileCollection.from_dict(bare_metal_server_profile_collection_model_json).__dict__ - bare_metal_server_profile_collection_model2 = BareMetalServerProfileCollection(**bare_metal_server_profile_collection_model_dict) + bare_metal_server_profile_collection_model_dict = BareMetalServerProfileCollection.from_dict( + bare_metal_server_profile_collection_model_json).__dict__ + bare_metal_server_profile_collection_model2 = BareMetalServerProfileCollection( + **bare_metal_server_profile_collection_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_collection_model == bare_metal_server_profile_collection_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_collection_model_json2 = bare_metal_server_profile_collection_model.to_dict() + bare_metal_server_profile_collection_model_json2 = bare_metal_server_profile_collection_model.to_dict( + ) assert bare_metal_server_profile_collection_model_json2 == bare_metal_server_profile_collection_model_json @@ -49905,21 +54271,26 @@ def test_bare_metal_server_profile_collection_first_serialization(self): # Construct a json representation of a BareMetalServerProfileCollectionFirst model bare_metal_server_profile_collection_first_model_json = {} - bare_metal_server_profile_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20' + bare_metal_server_profile_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20' # Construct a model instance of BareMetalServerProfileCollectionFirst by calling from_dict on the json representation - bare_metal_server_profile_collection_first_model = BareMetalServerProfileCollectionFirst.from_dict(bare_metal_server_profile_collection_first_model_json) + bare_metal_server_profile_collection_first_model = BareMetalServerProfileCollectionFirst.from_dict( + bare_metal_server_profile_collection_first_model_json) assert bare_metal_server_profile_collection_first_model != False # Construct a model instance of BareMetalServerProfileCollectionFirst by calling from_dict on the json representation - bare_metal_server_profile_collection_first_model_dict = BareMetalServerProfileCollectionFirst.from_dict(bare_metal_server_profile_collection_first_model_json).__dict__ - bare_metal_server_profile_collection_first_model2 = BareMetalServerProfileCollectionFirst(**bare_metal_server_profile_collection_first_model_dict) + bare_metal_server_profile_collection_first_model_dict = BareMetalServerProfileCollectionFirst.from_dict( + bare_metal_server_profile_collection_first_model_json).__dict__ + bare_metal_server_profile_collection_first_model2 = BareMetalServerProfileCollectionFirst( + **bare_metal_server_profile_collection_first_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_collection_first_model == bare_metal_server_profile_collection_first_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_collection_first_model_json2 = bare_metal_server_profile_collection_first_model.to_dict() + bare_metal_server_profile_collection_first_model_json2 = bare_metal_server_profile_collection_first_model.to_dict( + ) assert bare_metal_server_profile_collection_first_model_json2 == bare_metal_server_profile_collection_first_model_json @@ -49935,21 +54306,26 @@ def test_bare_metal_server_profile_collection_next_serialization(self): # Construct a json representation of a BareMetalServerProfileCollectionNext model bare_metal_server_profile_collection_next_model_json = {} - bare_metal_server_profile_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + bare_metal_server_profile_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of BareMetalServerProfileCollectionNext by calling from_dict on the json representation - bare_metal_server_profile_collection_next_model = BareMetalServerProfileCollectionNext.from_dict(bare_metal_server_profile_collection_next_model_json) + bare_metal_server_profile_collection_next_model = BareMetalServerProfileCollectionNext.from_dict( + bare_metal_server_profile_collection_next_model_json) assert bare_metal_server_profile_collection_next_model != False # Construct a model instance of BareMetalServerProfileCollectionNext by calling from_dict on the json representation - bare_metal_server_profile_collection_next_model_dict = BareMetalServerProfileCollectionNext.from_dict(bare_metal_server_profile_collection_next_model_json).__dict__ - bare_metal_server_profile_collection_next_model2 = BareMetalServerProfileCollectionNext(**bare_metal_server_profile_collection_next_model_dict) + bare_metal_server_profile_collection_next_model_dict = BareMetalServerProfileCollectionNext.from_dict( + bare_metal_server_profile_collection_next_model_json).__dict__ + bare_metal_server_profile_collection_next_model2 = BareMetalServerProfileCollectionNext( + **bare_metal_server_profile_collection_next_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_collection_next_model == bare_metal_server_profile_collection_next_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_collection_next_model_json2 = bare_metal_server_profile_collection_next_model.to_dict() + bare_metal_server_profile_collection_next_model_json2 = bare_metal_server_profile_collection_next_model.to_dict( + ) assert bare_metal_server_profile_collection_next_model_json2 == bare_metal_server_profile_collection_next_model_json @@ -49966,21 +54342,27 @@ def test_bare_metal_server_profile_console_types_serialization(self): # Construct a json representation of a BareMetalServerProfileConsoleTypes model bare_metal_server_profile_console_types_model_json = {} bare_metal_server_profile_console_types_model_json['type'] = 'enum' - bare_metal_server_profile_console_types_model_json['values'] = ['serial'] + bare_metal_server_profile_console_types_model_json['values'] = [ + 'serial' + ] # Construct a model instance of BareMetalServerProfileConsoleTypes by calling from_dict on the json representation - bare_metal_server_profile_console_types_model = BareMetalServerProfileConsoleTypes.from_dict(bare_metal_server_profile_console_types_model_json) + bare_metal_server_profile_console_types_model = BareMetalServerProfileConsoleTypes.from_dict( + bare_metal_server_profile_console_types_model_json) assert bare_metal_server_profile_console_types_model != False # Construct a model instance of BareMetalServerProfileConsoleTypes by calling from_dict on the json representation - bare_metal_server_profile_console_types_model_dict = BareMetalServerProfileConsoleTypes.from_dict(bare_metal_server_profile_console_types_model_json).__dict__ - bare_metal_server_profile_console_types_model2 = BareMetalServerProfileConsoleTypes(**bare_metal_server_profile_console_types_model_dict) + bare_metal_server_profile_console_types_model_dict = BareMetalServerProfileConsoleTypes.from_dict( + bare_metal_server_profile_console_types_model_json).__dict__ + bare_metal_server_profile_console_types_model2 = BareMetalServerProfileConsoleTypes( + **bare_metal_server_profile_console_types_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_console_types_model == bare_metal_server_profile_console_types_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_console_types_model_json2 = bare_metal_server_profile_console_types_model.to_dict() + bare_metal_server_profile_console_types_model_json2 = bare_metal_server_profile_console_types_model.to_dict( + ) assert bare_metal_server_profile_console_types_model_json2 == bare_metal_server_profile_console_types_model_json @@ -49996,38 +54378,52 @@ def test_bare_metal_server_profile_disk_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed + bare_metal_server_profile_disk_quantity_model = { + } # BareMetalServerProfileDiskQuantityFixed bare_metal_server_profile_disk_quantity_model['type'] = 'fixed' bare_metal_server_profile_disk_quantity_model['value'] = 4 - bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed + bare_metal_server_profile_disk_size_model = { + } # BareMetalServerProfileDiskSizeFixed bare_metal_server_profile_disk_size_model['type'] = 'fixed' bare_metal_server_profile_disk_size_model['value'] = 100 - bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces - bare_metal_server_profile_disk_supported_interfaces_model['default'] = 'fcp' - bare_metal_server_profile_disk_supported_interfaces_model['type'] = 'enum' - bare_metal_server_profile_disk_supported_interfaces_model['values'] = ['fcp'] + bare_metal_server_profile_disk_supported_interfaces_model = { + } # BareMetalServerProfileDiskSupportedInterfaces + bare_metal_server_profile_disk_supported_interfaces_model[ + 'default'] = 'fcp' + bare_metal_server_profile_disk_supported_interfaces_model[ + 'type'] = 'enum' + bare_metal_server_profile_disk_supported_interfaces_model['values'] = [ + 'fcp' + ] # Construct a json representation of a BareMetalServerProfileDisk model bare_metal_server_profile_disk_model_json = {} - bare_metal_server_profile_disk_model_json['quantity'] = bare_metal_server_profile_disk_quantity_model - bare_metal_server_profile_disk_model_json['size'] = bare_metal_server_profile_disk_size_model - bare_metal_server_profile_disk_model_json['supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model + bare_metal_server_profile_disk_model_json[ + 'quantity'] = bare_metal_server_profile_disk_quantity_model + bare_metal_server_profile_disk_model_json[ + 'size'] = bare_metal_server_profile_disk_size_model + bare_metal_server_profile_disk_model_json[ + 'supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model # Construct a model instance of BareMetalServerProfileDisk by calling from_dict on the json representation - bare_metal_server_profile_disk_model = BareMetalServerProfileDisk.from_dict(bare_metal_server_profile_disk_model_json) + bare_metal_server_profile_disk_model = BareMetalServerProfileDisk.from_dict( + bare_metal_server_profile_disk_model_json) assert bare_metal_server_profile_disk_model != False # Construct a model instance of BareMetalServerProfileDisk by calling from_dict on the json representation - bare_metal_server_profile_disk_model_dict = BareMetalServerProfileDisk.from_dict(bare_metal_server_profile_disk_model_json).__dict__ - bare_metal_server_profile_disk_model2 = BareMetalServerProfileDisk(**bare_metal_server_profile_disk_model_dict) + bare_metal_server_profile_disk_model_dict = BareMetalServerProfileDisk.from_dict( + bare_metal_server_profile_disk_model_json).__dict__ + bare_metal_server_profile_disk_model2 = BareMetalServerProfileDisk( + **bare_metal_server_profile_disk_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_model == bare_metal_server_profile_disk_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_model_json2 = bare_metal_server_profile_disk_model.to_dict() + bare_metal_server_profile_disk_model_json2 = bare_metal_server_profile_disk_model.to_dict( + ) assert bare_metal_server_profile_disk_model_json2 == bare_metal_server_profile_disk_model_json @@ -50036,30 +54432,39 @@ class TestModel_BareMetalServerProfileDiskSupportedInterfaces: Test Class for BareMetalServerProfileDiskSupportedInterfaces """ - def test_bare_metal_server_profile_disk_supported_interfaces_serialization(self): + def test_bare_metal_server_profile_disk_supported_interfaces_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileDiskSupportedInterfaces """ # Construct a json representation of a BareMetalServerProfileDiskSupportedInterfaces model bare_metal_server_profile_disk_supported_interfaces_model_json = {} - bare_metal_server_profile_disk_supported_interfaces_model_json['default'] = 'fcp' - bare_metal_server_profile_disk_supported_interfaces_model_json['type'] = 'enum' - bare_metal_server_profile_disk_supported_interfaces_model_json['values'] = ['fcp'] + bare_metal_server_profile_disk_supported_interfaces_model_json[ + 'default'] = 'fcp' + bare_metal_server_profile_disk_supported_interfaces_model_json[ + 'type'] = 'enum' + bare_metal_server_profile_disk_supported_interfaces_model_json[ + 'values'] = ['fcp'] # Construct a model instance of BareMetalServerProfileDiskSupportedInterfaces by calling from_dict on the json representation - bare_metal_server_profile_disk_supported_interfaces_model = BareMetalServerProfileDiskSupportedInterfaces.from_dict(bare_metal_server_profile_disk_supported_interfaces_model_json) + bare_metal_server_profile_disk_supported_interfaces_model = BareMetalServerProfileDiskSupportedInterfaces.from_dict( + bare_metal_server_profile_disk_supported_interfaces_model_json) assert bare_metal_server_profile_disk_supported_interfaces_model != False # Construct a model instance of BareMetalServerProfileDiskSupportedInterfaces by calling from_dict on the json representation - bare_metal_server_profile_disk_supported_interfaces_model_dict = BareMetalServerProfileDiskSupportedInterfaces.from_dict(bare_metal_server_profile_disk_supported_interfaces_model_json).__dict__ - bare_metal_server_profile_disk_supported_interfaces_model2 = BareMetalServerProfileDiskSupportedInterfaces(**bare_metal_server_profile_disk_supported_interfaces_model_dict) + bare_metal_server_profile_disk_supported_interfaces_model_dict = BareMetalServerProfileDiskSupportedInterfaces.from_dict( + bare_metal_server_profile_disk_supported_interfaces_model_json + ).__dict__ + bare_metal_server_profile_disk_supported_interfaces_model2 = BareMetalServerProfileDiskSupportedInterfaces( + **bare_metal_server_profile_disk_supported_interfaces_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_supported_interfaces_model == bare_metal_server_profile_disk_supported_interfaces_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_supported_interfaces_model_json2 = bare_metal_server_profile_disk_supported_interfaces_model.to_dict() + bare_metal_server_profile_disk_supported_interfaces_model_json2 = bare_metal_server_profile_disk_supported_interfaces_model.to_dict( + ) assert bare_metal_server_profile_disk_supported_interfaces_model_json2 == bare_metal_server_profile_disk_supported_interfaces_model_json @@ -50075,23 +54480,30 @@ def test_bare_metal_server_profile_os_architecture_serialization(self): # Construct a json representation of a BareMetalServerProfileOSArchitecture model bare_metal_server_profile_os_architecture_model_json = {} - bare_metal_server_profile_os_architecture_model_json['default'] = 'amd64' + bare_metal_server_profile_os_architecture_model_json[ + 'default'] = 'amd64' bare_metal_server_profile_os_architecture_model_json['type'] = 'enum' - bare_metal_server_profile_os_architecture_model_json['values'] = ['amd64'] + bare_metal_server_profile_os_architecture_model_json['values'] = [ + 'amd64' + ] # Construct a model instance of BareMetalServerProfileOSArchitecture by calling from_dict on the json representation - bare_metal_server_profile_os_architecture_model = BareMetalServerProfileOSArchitecture.from_dict(bare_metal_server_profile_os_architecture_model_json) + bare_metal_server_profile_os_architecture_model = BareMetalServerProfileOSArchitecture.from_dict( + bare_metal_server_profile_os_architecture_model_json) assert bare_metal_server_profile_os_architecture_model != False # Construct a model instance of BareMetalServerProfileOSArchitecture by calling from_dict on the json representation - bare_metal_server_profile_os_architecture_model_dict = BareMetalServerProfileOSArchitecture.from_dict(bare_metal_server_profile_os_architecture_model_json).__dict__ - bare_metal_server_profile_os_architecture_model2 = BareMetalServerProfileOSArchitecture(**bare_metal_server_profile_os_architecture_model_dict) + bare_metal_server_profile_os_architecture_model_dict = BareMetalServerProfileOSArchitecture.from_dict( + bare_metal_server_profile_os_architecture_model_json).__dict__ + bare_metal_server_profile_os_architecture_model2 = BareMetalServerProfileOSArchitecture( + **bare_metal_server_profile_os_architecture_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_os_architecture_model == bare_metal_server_profile_os_architecture_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_os_architecture_model_json2 = bare_metal_server_profile_os_architecture_model.to_dict() + bare_metal_server_profile_os_architecture_model_json2 = bare_metal_server_profile_os_architecture_model.to_dict( + ) assert bare_metal_server_profile_os_architecture_model_json2 == bare_metal_server_profile_os_architecture_model_json @@ -50107,23 +54519,30 @@ def test_bare_metal_server_profile_reference_serialization(self): # Construct a json representation of a BareMetalServerProfileReference model bare_metal_server_profile_reference_model_json = {} - bare_metal_server_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' - bare_metal_server_profile_reference_model_json['name'] = 'bx2-metal-192x768' - bare_metal_server_profile_reference_model_json['resource_type'] = 'bare_metal_server_profile' + bare_metal_server_profile_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' + bare_metal_server_profile_reference_model_json[ + 'name'] = 'bx2-metal-192x768' + bare_metal_server_profile_reference_model_json[ + 'resource_type'] = 'bare_metal_server_profile' # Construct a model instance of BareMetalServerProfileReference by calling from_dict on the json representation - bare_metal_server_profile_reference_model = BareMetalServerProfileReference.from_dict(bare_metal_server_profile_reference_model_json) + bare_metal_server_profile_reference_model = BareMetalServerProfileReference.from_dict( + bare_metal_server_profile_reference_model_json) assert bare_metal_server_profile_reference_model != False # Construct a model instance of BareMetalServerProfileReference by calling from_dict on the json representation - bare_metal_server_profile_reference_model_dict = BareMetalServerProfileReference.from_dict(bare_metal_server_profile_reference_model_json).__dict__ - bare_metal_server_profile_reference_model2 = BareMetalServerProfileReference(**bare_metal_server_profile_reference_model_dict) + bare_metal_server_profile_reference_model_dict = BareMetalServerProfileReference.from_dict( + bare_metal_server_profile_reference_model_json).__dict__ + bare_metal_server_profile_reference_model2 = BareMetalServerProfileReference( + **bare_metal_server_profile_reference_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_reference_model == bare_metal_server_profile_reference_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_reference_model_json2 = bare_metal_server_profile_reference_model.to_dict() + bare_metal_server_profile_reference_model_json2 = bare_metal_server_profile_reference_model.to_dict( + ) assert bare_metal_server_profile_reference_model_json2 == bare_metal_server_profile_reference_model_json @@ -50132,29 +54551,42 @@ class TestModel_BareMetalServerProfileSupportedTrustedPlatformModuleModes: Test Class for BareMetalServerProfileSupportedTrustedPlatformModuleModes """ - def test_bare_metal_server_profile_supported_trusted_platform_module_modes_serialization(self): + def test_bare_metal_server_profile_supported_trusted_platform_module_modes_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileSupportedTrustedPlatformModuleModes """ # Construct a json representation of a BareMetalServerProfileSupportedTrustedPlatformModuleModes model bare_metal_server_profile_supported_trusted_platform_module_modes_model_json = {} - bare_metal_server_profile_supported_trusted_platform_module_modes_model_json['type'] = 'enum' - bare_metal_server_profile_supported_trusted_platform_module_modes_model_json['values'] = ['disabled'] + bare_metal_server_profile_supported_trusted_platform_module_modes_model_json[ + 'default'] = 'disabled' + bare_metal_server_profile_supported_trusted_platform_module_modes_model_json[ + 'type'] = 'enum' + bare_metal_server_profile_supported_trusted_platform_module_modes_model_json[ + 'values'] = ['disabled'] # Construct a model instance of BareMetalServerProfileSupportedTrustedPlatformModuleModes by calling from_dict on the json representation - bare_metal_server_profile_supported_trusted_platform_module_modes_model = BareMetalServerProfileSupportedTrustedPlatformModuleModes.from_dict(bare_metal_server_profile_supported_trusted_platform_module_modes_model_json) + bare_metal_server_profile_supported_trusted_platform_module_modes_model = BareMetalServerProfileSupportedTrustedPlatformModuleModes.from_dict( + bare_metal_server_profile_supported_trusted_platform_module_modes_model_json + ) assert bare_metal_server_profile_supported_trusted_platform_module_modes_model != False # Construct a model instance of BareMetalServerProfileSupportedTrustedPlatformModuleModes by calling from_dict on the json representation - bare_metal_server_profile_supported_trusted_platform_module_modes_model_dict = BareMetalServerProfileSupportedTrustedPlatformModuleModes.from_dict(bare_metal_server_profile_supported_trusted_platform_module_modes_model_json).__dict__ - bare_metal_server_profile_supported_trusted_platform_module_modes_model2 = BareMetalServerProfileSupportedTrustedPlatformModuleModes(**bare_metal_server_profile_supported_trusted_platform_module_modes_model_dict) + bare_metal_server_profile_supported_trusted_platform_module_modes_model_dict = BareMetalServerProfileSupportedTrustedPlatformModuleModes.from_dict( + bare_metal_server_profile_supported_trusted_platform_module_modes_model_json + ).__dict__ + bare_metal_server_profile_supported_trusted_platform_module_modes_model2 = BareMetalServerProfileSupportedTrustedPlatformModuleModes( + ** + bare_metal_server_profile_supported_trusted_platform_module_modes_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_profile_supported_trusted_platform_module_modes_model == bare_metal_server_profile_supported_trusted_platform_module_modes_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_supported_trusted_platform_module_modes_model_json2 = bare_metal_server_profile_supported_trusted_platform_module_modes_model.to_dict() + bare_metal_server_profile_supported_trusted_platform_module_modes_model_json2 = bare_metal_server_profile_supported_trusted_platform_module_modes_model.to_dict( + ) assert bare_metal_server_profile_supported_trusted_platform_module_modes_model_json2 == bare_metal_server_profile_supported_trusted_platform_module_modes_model_json @@ -50163,29 +54595,40 @@ class TestModel_BareMetalServerProfileVirtualNetworkInterfacesSupported: Test Class for BareMetalServerProfileVirtualNetworkInterfacesSupported """ - def test_bare_metal_server_profile_virtual_network_interfaces_supported_serialization(self): + def test_bare_metal_server_profile_virtual_network_interfaces_supported_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileVirtualNetworkInterfacesSupported """ # Construct a json representation of a BareMetalServerProfileVirtualNetworkInterfacesSupported model bare_metal_server_profile_virtual_network_interfaces_supported_model_json = {} - bare_metal_server_profile_virtual_network_interfaces_supported_model_json['type'] = 'fixed' - bare_metal_server_profile_virtual_network_interfaces_supported_model_json['value'] = True + bare_metal_server_profile_virtual_network_interfaces_supported_model_json[ + 'type'] = 'fixed' + bare_metal_server_profile_virtual_network_interfaces_supported_model_json[ + 'value'] = True # Construct a model instance of BareMetalServerProfileVirtualNetworkInterfacesSupported by calling from_dict on the json representation - bare_metal_server_profile_virtual_network_interfaces_supported_model = BareMetalServerProfileVirtualNetworkInterfacesSupported.from_dict(bare_metal_server_profile_virtual_network_interfaces_supported_model_json) + bare_metal_server_profile_virtual_network_interfaces_supported_model = BareMetalServerProfileVirtualNetworkInterfacesSupported.from_dict( + bare_metal_server_profile_virtual_network_interfaces_supported_model_json + ) assert bare_metal_server_profile_virtual_network_interfaces_supported_model != False # Construct a model instance of BareMetalServerProfileVirtualNetworkInterfacesSupported by calling from_dict on the json representation - bare_metal_server_profile_virtual_network_interfaces_supported_model_dict = BareMetalServerProfileVirtualNetworkInterfacesSupported.from_dict(bare_metal_server_profile_virtual_network_interfaces_supported_model_json).__dict__ - bare_metal_server_profile_virtual_network_interfaces_supported_model2 = BareMetalServerProfileVirtualNetworkInterfacesSupported(**bare_metal_server_profile_virtual_network_interfaces_supported_model_dict) + bare_metal_server_profile_virtual_network_interfaces_supported_model_dict = BareMetalServerProfileVirtualNetworkInterfacesSupported.from_dict( + bare_metal_server_profile_virtual_network_interfaces_supported_model_json + ).__dict__ + bare_metal_server_profile_virtual_network_interfaces_supported_model2 = BareMetalServerProfileVirtualNetworkInterfacesSupported( + ** + bare_metal_server_profile_virtual_network_interfaces_supported_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_profile_virtual_network_interfaces_supported_model == bare_metal_server_profile_virtual_network_interfaces_supported_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_virtual_network_interfaces_supported_model_json2 = bare_metal_server_profile_virtual_network_interfaces_supported_model.to_dict() + bare_metal_server_profile_virtual_network_interfaces_supported_model_json2 = bare_metal_server_profile_virtual_network_interfaces_supported_model.to_dict( + ) assert bare_metal_server_profile_virtual_network_interfaces_supported_model_json2 == bare_metal_server_profile_virtual_network_interfaces_supported_model_json @@ -50201,23 +54644,30 @@ def test_bare_metal_server_status_reason_serialization(self): # Construct a json representation of a BareMetalServerStatusReason model bare_metal_server_status_reason_model_json = {} - bare_metal_server_status_reason_model_json['code'] = 'cannot_start_capacity' - bare_metal_server_status_reason_model_json['message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.' - bare_metal_server_status_reason_model_json['more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html' + bare_metal_server_status_reason_model_json[ + 'code'] = 'cannot_start_capacity' + bare_metal_server_status_reason_model_json[ + 'message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.' + bare_metal_server_status_reason_model_json[ + 'more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html' # Construct a model instance of BareMetalServerStatusReason by calling from_dict on the json representation - bare_metal_server_status_reason_model = BareMetalServerStatusReason.from_dict(bare_metal_server_status_reason_model_json) + bare_metal_server_status_reason_model = BareMetalServerStatusReason.from_dict( + bare_metal_server_status_reason_model_json) assert bare_metal_server_status_reason_model != False # Construct a model instance of BareMetalServerStatusReason by calling from_dict on the json representation - bare_metal_server_status_reason_model_dict = BareMetalServerStatusReason.from_dict(bare_metal_server_status_reason_model_json).__dict__ - bare_metal_server_status_reason_model2 = BareMetalServerStatusReason(**bare_metal_server_status_reason_model_dict) + bare_metal_server_status_reason_model_dict = BareMetalServerStatusReason.from_dict( + bare_metal_server_status_reason_model_json).__dict__ + bare_metal_server_status_reason_model2 = BareMetalServerStatusReason( + **bare_metal_server_status_reason_model_dict) # Verify the model instances are equivalent assert bare_metal_server_status_reason_model == bare_metal_server_status_reason_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_status_reason_model_json2 = bare_metal_server_status_reason_model.to_dict() + bare_metal_server_status_reason_model_json2 = bare_metal_server_status_reason_model.to_dict( + ) assert bare_metal_server_status_reason_model_json2 == bare_metal_server_status_reason_model_json @@ -50234,22 +54684,28 @@ def test_bare_metal_server_trusted_platform_module_serialization(self): # Construct a json representation of a BareMetalServerTrustedPlatformModule model bare_metal_server_trusted_platform_module_model_json = {} bare_metal_server_trusted_platform_module_model_json['enabled'] = True - bare_metal_server_trusted_platform_module_model_json['mode'] = 'disabled' - bare_metal_server_trusted_platform_module_model_json['supported_modes'] = ['disabled'] + bare_metal_server_trusted_platform_module_model_json[ + 'mode'] = 'disabled' + bare_metal_server_trusted_platform_module_model_json[ + 'supported_modes'] = ['disabled'] # Construct a model instance of BareMetalServerTrustedPlatformModule by calling from_dict on the json representation - bare_metal_server_trusted_platform_module_model = BareMetalServerTrustedPlatformModule.from_dict(bare_metal_server_trusted_platform_module_model_json) + bare_metal_server_trusted_platform_module_model = BareMetalServerTrustedPlatformModule.from_dict( + bare_metal_server_trusted_platform_module_model_json) assert bare_metal_server_trusted_platform_module_model != False # Construct a model instance of BareMetalServerTrustedPlatformModule by calling from_dict on the json representation - bare_metal_server_trusted_platform_module_model_dict = BareMetalServerTrustedPlatformModule.from_dict(bare_metal_server_trusted_platform_module_model_json).__dict__ - bare_metal_server_trusted_platform_module_model2 = BareMetalServerTrustedPlatformModule(**bare_metal_server_trusted_platform_module_model_dict) + bare_metal_server_trusted_platform_module_model_dict = BareMetalServerTrustedPlatformModule.from_dict( + bare_metal_server_trusted_platform_module_model_json).__dict__ + bare_metal_server_trusted_platform_module_model2 = BareMetalServerTrustedPlatformModule( + **bare_metal_server_trusted_platform_module_model_dict) # Verify the model instances are equivalent assert bare_metal_server_trusted_platform_module_model == bare_metal_server_trusted_platform_module_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_trusted_platform_module_model_json2 = bare_metal_server_trusted_platform_module_model.to_dict() + bare_metal_server_trusted_platform_module_model_json2 = bare_metal_server_trusted_platform_module_model.to_dict( + ) assert bare_metal_server_trusted_platform_module_model_json2 == bare_metal_server_trusted_platform_module_model_json @@ -50258,28 +54714,34 @@ class TestModel_BareMetalServerTrustedPlatformModulePatch: Test Class for BareMetalServerTrustedPlatformModulePatch """ - def test_bare_metal_server_trusted_platform_module_patch_serialization(self): + def test_bare_metal_server_trusted_platform_module_patch_serialization( + self): """ Test serialization/deserialization for BareMetalServerTrustedPlatformModulePatch """ # Construct a json representation of a BareMetalServerTrustedPlatformModulePatch model bare_metal_server_trusted_platform_module_patch_model_json = {} - bare_metal_server_trusted_platform_module_patch_model_json['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_patch_model_json[ + 'mode'] = 'disabled' # Construct a model instance of BareMetalServerTrustedPlatformModulePatch by calling from_dict on the json representation - bare_metal_server_trusted_platform_module_patch_model = BareMetalServerTrustedPlatformModulePatch.from_dict(bare_metal_server_trusted_platform_module_patch_model_json) + bare_metal_server_trusted_platform_module_patch_model = BareMetalServerTrustedPlatformModulePatch.from_dict( + bare_metal_server_trusted_platform_module_patch_model_json) assert bare_metal_server_trusted_platform_module_patch_model != False # Construct a model instance of BareMetalServerTrustedPlatformModulePatch by calling from_dict on the json representation - bare_metal_server_trusted_platform_module_patch_model_dict = BareMetalServerTrustedPlatformModulePatch.from_dict(bare_metal_server_trusted_platform_module_patch_model_json).__dict__ - bare_metal_server_trusted_platform_module_patch_model2 = BareMetalServerTrustedPlatformModulePatch(**bare_metal_server_trusted_platform_module_patch_model_dict) + bare_metal_server_trusted_platform_module_patch_model_dict = BareMetalServerTrustedPlatformModulePatch.from_dict( + bare_metal_server_trusted_platform_module_patch_model_json).__dict__ + bare_metal_server_trusted_platform_module_patch_model2 = BareMetalServerTrustedPlatformModulePatch( + **bare_metal_server_trusted_platform_module_patch_model_dict) # Verify the model instances are equivalent assert bare_metal_server_trusted_platform_module_patch_model == bare_metal_server_trusted_platform_module_patch_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_trusted_platform_module_patch_model_json2 = bare_metal_server_trusted_platform_module_patch_model.to_dict() + bare_metal_server_trusted_platform_module_patch_model_json2 = bare_metal_server_trusted_platform_module_patch_model.to_dict( + ) assert bare_metal_server_trusted_platform_module_patch_model_json2 == bare_metal_server_trusted_platform_module_patch_model_json @@ -50288,31 +54750,118 @@ class TestModel_BareMetalServerTrustedPlatformModulePrototype: Test Class for BareMetalServerTrustedPlatformModulePrototype """ - def test_bare_metal_server_trusted_platform_module_prototype_serialization(self): + def test_bare_metal_server_trusted_platform_module_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerTrustedPlatformModulePrototype """ # Construct a json representation of a BareMetalServerTrustedPlatformModulePrototype model bare_metal_server_trusted_platform_module_prototype_model_json = {} - bare_metal_server_trusted_platform_module_prototype_model_json['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_prototype_model_json[ + 'mode'] = 'disabled' # Construct a model instance of BareMetalServerTrustedPlatformModulePrototype by calling from_dict on the json representation - bare_metal_server_trusted_platform_module_prototype_model = BareMetalServerTrustedPlatformModulePrototype.from_dict(bare_metal_server_trusted_platform_module_prototype_model_json) + bare_metal_server_trusted_platform_module_prototype_model = BareMetalServerTrustedPlatformModulePrototype.from_dict( + bare_metal_server_trusted_platform_module_prototype_model_json) assert bare_metal_server_trusted_platform_module_prototype_model != False # Construct a model instance of BareMetalServerTrustedPlatformModulePrototype by calling from_dict on the json representation - bare_metal_server_trusted_platform_module_prototype_model_dict = BareMetalServerTrustedPlatformModulePrototype.from_dict(bare_metal_server_trusted_platform_module_prototype_model_json).__dict__ - bare_metal_server_trusted_platform_module_prototype_model2 = BareMetalServerTrustedPlatformModulePrototype(**bare_metal_server_trusted_platform_module_prototype_model_dict) + bare_metal_server_trusted_platform_module_prototype_model_dict = BareMetalServerTrustedPlatformModulePrototype.from_dict( + bare_metal_server_trusted_platform_module_prototype_model_json + ).__dict__ + bare_metal_server_trusted_platform_module_prototype_model2 = BareMetalServerTrustedPlatformModulePrototype( + **bare_metal_server_trusted_platform_module_prototype_model_dict) # Verify the model instances are equivalent assert bare_metal_server_trusted_platform_module_prototype_model == bare_metal_server_trusted_platform_module_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_trusted_platform_module_prototype_model_json2 = bare_metal_server_trusted_platform_module_prototype_model.to_dict() + bare_metal_server_trusted_platform_module_prototype_model_json2 = bare_metal_server_trusted_platform_module_prototype_model.to_dict( + ) assert bare_metal_server_trusted_platform_module_prototype_model_json2 == bare_metal_server_trusted_platform_module_prototype_model_json +class TestModel_CatalogOfferingVersionPlanReference: + """ + Test Class for CatalogOfferingVersionPlanReference + """ + + def test_catalog_offering_version_plan_reference_serialization(self): + """ + Test serialization/deserialization for CatalogOfferingVersionPlanReference + """ + + # Construct dict forms of any model objects needed in order to build this model. + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + # Construct a json representation of a CatalogOfferingVersionPlanReference model + catalog_offering_version_plan_reference_model_json = {} + catalog_offering_version_plan_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model_json[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + # Construct a model instance of CatalogOfferingVersionPlanReference by calling from_dict on the json representation + catalog_offering_version_plan_reference_model = CatalogOfferingVersionPlanReference.from_dict( + catalog_offering_version_plan_reference_model_json) + assert catalog_offering_version_plan_reference_model != False + + # Construct a model instance of CatalogOfferingVersionPlanReference by calling from_dict on the json representation + catalog_offering_version_plan_reference_model_dict = CatalogOfferingVersionPlanReference.from_dict( + catalog_offering_version_plan_reference_model_json).__dict__ + catalog_offering_version_plan_reference_model2 = CatalogOfferingVersionPlanReference( + **catalog_offering_version_plan_reference_model_dict) + + # Verify the model instances are equivalent + assert catalog_offering_version_plan_reference_model == catalog_offering_version_plan_reference_model2 + + # Convert model instance back to dict and verify no loss of data + catalog_offering_version_plan_reference_model_json2 = catalog_offering_version_plan_reference_model.to_dict( + ) + assert catalog_offering_version_plan_reference_model_json2 == catalog_offering_version_plan_reference_model_json + + +class TestModel_CatalogOfferingVersionPlanReferenceDeleted: + """ + Test Class for CatalogOfferingVersionPlanReferenceDeleted + """ + + def test_catalog_offering_version_plan_reference_deleted_serialization( + self): + """ + Test serialization/deserialization for CatalogOfferingVersionPlanReferenceDeleted + """ + + # Construct a json representation of a CatalogOfferingVersionPlanReferenceDeleted model + catalog_offering_version_plan_reference_deleted_model_json = {} + catalog_offering_version_plan_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + # Construct a model instance of CatalogOfferingVersionPlanReferenceDeleted by calling from_dict on the json representation + catalog_offering_version_plan_reference_deleted_model = CatalogOfferingVersionPlanReferenceDeleted.from_dict( + catalog_offering_version_plan_reference_deleted_model_json) + assert catalog_offering_version_plan_reference_deleted_model != False + + # Construct a model instance of CatalogOfferingVersionPlanReferenceDeleted by calling from_dict on the json representation + catalog_offering_version_plan_reference_deleted_model_dict = CatalogOfferingVersionPlanReferenceDeleted.from_dict( + catalog_offering_version_plan_reference_deleted_model_json).__dict__ + catalog_offering_version_plan_reference_deleted_model2 = CatalogOfferingVersionPlanReferenceDeleted( + **catalog_offering_version_plan_reference_deleted_model_dict) + + # Verify the model instances are equivalent + assert catalog_offering_version_plan_reference_deleted_model == catalog_offering_version_plan_reference_deleted_model2 + + # Convert model instance back to dict and verify no loss of data + catalog_offering_version_plan_reference_deleted_model_json2 = catalog_offering_version_plan_reference_deleted_model.to_dict( + ) + assert catalog_offering_version_plan_reference_deleted_model_json2 == catalog_offering_version_plan_reference_deleted_model_json + + class TestModel_CatalogOfferingVersionReference: """ Test Class for CatalogOfferingVersionReference @@ -50325,21 +54874,26 @@ def test_catalog_offering_version_reference_serialization(self): # Construct a json representation of a CatalogOfferingVersionReference model catalog_offering_version_reference_model_json = {} - catalog_offering_version_reference_model_json['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + catalog_offering_version_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' # Construct a model instance of CatalogOfferingVersionReference by calling from_dict on the json representation - catalog_offering_version_reference_model = CatalogOfferingVersionReference.from_dict(catalog_offering_version_reference_model_json) + catalog_offering_version_reference_model = CatalogOfferingVersionReference.from_dict( + catalog_offering_version_reference_model_json) assert catalog_offering_version_reference_model != False # Construct a model instance of CatalogOfferingVersionReference by calling from_dict on the json representation - catalog_offering_version_reference_model_dict = CatalogOfferingVersionReference.from_dict(catalog_offering_version_reference_model_json).__dict__ - catalog_offering_version_reference_model2 = CatalogOfferingVersionReference(**catalog_offering_version_reference_model_dict) + catalog_offering_version_reference_model_dict = CatalogOfferingVersionReference.from_dict( + catalog_offering_version_reference_model_json).__dict__ + catalog_offering_version_reference_model2 = CatalogOfferingVersionReference( + **catalog_offering_version_reference_model_dict) # Verify the model instances are equivalent assert catalog_offering_version_reference_model == catalog_offering_version_reference_model2 # Convert model instance back to dict and verify no loss of data - catalog_offering_version_reference_model_json2 = catalog_offering_version_reference_model.to_dict() + catalog_offering_version_reference_model_json2 = catalog_offering_version_reference_model.to_dict( + ) assert catalog_offering_version_reference_model_json2 == catalog_offering_version_reference_model_json @@ -50355,21 +54909,26 @@ def test_certificate_instance_reference_serialization(self): # Construct a json representation of a CertificateInstanceReference model certificate_instance_reference_model_json = {} - certificate_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a model instance of CertificateInstanceReference by calling from_dict on the json representation - certificate_instance_reference_model = CertificateInstanceReference.from_dict(certificate_instance_reference_model_json) + certificate_instance_reference_model = CertificateInstanceReference.from_dict( + certificate_instance_reference_model_json) assert certificate_instance_reference_model != False # Construct a model instance of CertificateInstanceReference by calling from_dict on the json representation - certificate_instance_reference_model_dict = CertificateInstanceReference.from_dict(certificate_instance_reference_model_json).__dict__ - certificate_instance_reference_model2 = CertificateInstanceReference(**certificate_instance_reference_model_dict) + certificate_instance_reference_model_dict = CertificateInstanceReference.from_dict( + certificate_instance_reference_model_json).__dict__ + certificate_instance_reference_model2 = CertificateInstanceReference( + **certificate_instance_reference_model_dict) # Verify the model instances are equivalent assert certificate_instance_reference_model == certificate_instance_reference_model2 # Convert model instance back to dict and verify no loss of data - certificate_instance_reference_model_json2 = certificate_instance_reference_model.to_dict() + certificate_instance_reference_model_json2 = certificate_instance_reference_model.to_dict( + ) assert certificate_instance_reference_model_json2 == certificate_instance_reference_model_json @@ -50385,22 +54944,28 @@ def test_cloud_object_storage_bucket_reference_serialization(self): # Construct a json representation of a CloudObjectStorageBucketReference model cloud_object_storage_bucket_reference_model_json = {} - cloud_object_storage_bucket_reference_model_json['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' - cloud_object_storage_bucket_reference_model_json['name'] = 'bucket-27200-lwx4cfvcue' + cloud_object_storage_bucket_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' + cloud_object_storage_bucket_reference_model_json[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Construct a model instance of CloudObjectStorageBucketReference by calling from_dict on the json representation - cloud_object_storage_bucket_reference_model = CloudObjectStorageBucketReference.from_dict(cloud_object_storage_bucket_reference_model_json) + cloud_object_storage_bucket_reference_model = CloudObjectStorageBucketReference.from_dict( + cloud_object_storage_bucket_reference_model_json) assert cloud_object_storage_bucket_reference_model != False # Construct a model instance of CloudObjectStorageBucketReference by calling from_dict on the json representation - cloud_object_storage_bucket_reference_model_dict = CloudObjectStorageBucketReference.from_dict(cloud_object_storage_bucket_reference_model_json).__dict__ - cloud_object_storage_bucket_reference_model2 = CloudObjectStorageBucketReference(**cloud_object_storage_bucket_reference_model_dict) + cloud_object_storage_bucket_reference_model_dict = CloudObjectStorageBucketReference.from_dict( + cloud_object_storage_bucket_reference_model_json).__dict__ + cloud_object_storage_bucket_reference_model2 = CloudObjectStorageBucketReference( + **cloud_object_storage_bucket_reference_model_dict) # Verify the model instances are equivalent assert cloud_object_storage_bucket_reference_model == cloud_object_storage_bucket_reference_model2 # Convert model instance back to dict and verify no loss of data - cloud_object_storage_bucket_reference_model_json2 = cloud_object_storage_bucket_reference_model.to_dict() + cloud_object_storage_bucket_reference_model_json2 = cloud_object_storage_bucket_reference_model.to_dict( + ) assert cloud_object_storage_bucket_reference_model_json2 == cloud_object_storage_bucket_reference_model_json @@ -50419,49 +54984,60 @@ def test_cloud_object_storage_object_reference_serialization(self): cloud_object_storage_object_reference_model_json['name'] = 'my-object' # Construct a model instance of CloudObjectStorageObjectReference by calling from_dict on the json representation - cloud_object_storage_object_reference_model = CloudObjectStorageObjectReference.from_dict(cloud_object_storage_object_reference_model_json) + cloud_object_storage_object_reference_model = CloudObjectStorageObjectReference.from_dict( + cloud_object_storage_object_reference_model_json) assert cloud_object_storage_object_reference_model != False # Construct a model instance of CloudObjectStorageObjectReference by calling from_dict on the json representation - cloud_object_storage_object_reference_model_dict = CloudObjectStorageObjectReference.from_dict(cloud_object_storage_object_reference_model_json).__dict__ - cloud_object_storage_object_reference_model2 = CloudObjectStorageObjectReference(**cloud_object_storage_object_reference_model_dict) + cloud_object_storage_object_reference_model_dict = CloudObjectStorageObjectReference.from_dict( + cloud_object_storage_object_reference_model_json).__dict__ + cloud_object_storage_object_reference_model2 = CloudObjectStorageObjectReference( + **cloud_object_storage_object_reference_model_dict) # Verify the model instances are equivalent assert cloud_object_storage_object_reference_model == cloud_object_storage_object_reference_model2 # Convert model instance back to dict and verify no loss of data - cloud_object_storage_object_reference_model_json2 = cloud_object_storage_object_reference_model.to_dict() + cloud_object_storage_object_reference_model_json2 = cloud_object_storage_object_reference_model.to_dict( + ) assert cloud_object_storage_object_reference_model_json2 == cloud_object_storage_object_reference_model_json -class TestModel_DNSInstanceReference: +class TestModel_DNSInstanceReferenceLoadBalancerDNSContext: """ - Test Class for DNSInstanceReference + Test Class for DNSInstanceReferenceLoadBalancerDNSContext """ - def test_dns_instance_reference_serialization(self): + def test_dns_instance_reference_load_balancer_dns_context_serialization( + self): """ - Test serialization/deserialization for DNSInstanceReference + Test serialization/deserialization for DNSInstanceReferenceLoadBalancerDNSContext """ - # Construct a json representation of a DNSInstanceReference model - dns_instance_reference_model_json = {} - dns_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + # Construct a json representation of a DNSInstanceReferenceLoadBalancerDNSContext model + dns_instance_reference_load_balancer_dns_context_model_json = {} + dns_instance_reference_load_balancer_dns_context_model_json[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - # Construct a model instance of DNSInstanceReference by calling from_dict on the json representation - dns_instance_reference_model = DNSInstanceReference.from_dict(dns_instance_reference_model_json) - assert dns_instance_reference_model != False + # Construct a model instance of DNSInstanceReferenceLoadBalancerDNSContext by calling from_dict on the json representation + dns_instance_reference_load_balancer_dns_context_model = DNSInstanceReferenceLoadBalancerDNSContext.from_dict( + dns_instance_reference_load_balancer_dns_context_model_json) + assert dns_instance_reference_load_balancer_dns_context_model != False - # Construct a model instance of DNSInstanceReference by calling from_dict on the json representation - dns_instance_reference_model_dict = DNSInstanceReference.from_dict(dns_instance_reference_model_json).__dict__ - dns_instance_reference_model2 = DNSInstanceReference(**dns_instance_reference_model_dict) + # Construct a model instance of DNSInstanceReferenceLoadBalancerDNSContext by calling from_dict on the json representation + dns_instance_reference_load_balancer_dns_context_model_dict = DNSInstanceReferenceLoadBalancerDNSContext.from_dict( + dns_instance_reference_load_balancer_dns_context_model_json + ).__dict__ + dns_instance_reference_load_balancer_dns_context_model2 = DNSInstanceReferenceLoadBalancerDNSContext( + **dns_instance_reference_load_balancer_dns_context_model_dict) # Verify the model instances are equivalent - assert dns_instance_reference_model == dns_instance_reference_model2 + assert dns_instance_reference_load_balancer_dns_context_model == dns_instance_reference_load_balancer_dns_context_model2 # Convert model instance back to dict and verify no loss of data - dns_instance_reference_model_json2 = dns_instance_reference_model.to_dict() - assert dns_instance_reference_model_json2 == dns_instance_reference_model_json + dns_instance_reference_load_balancer_dns_context_model_json2 = dns_instance_reference_load_balancer_dns_context_model.to_dict( + ) + assert dns_instance_reference_load_balancer_dns_context_model_json2 == dns_instance_reference_load_balancer_dns_context_model_json class TestModel_DNSServer: @@ -50477,7 +55053,8 @@ def test_dns_server_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a DNSServer model @@ -50490,7 +55067,8 @@ def test_dns_server_serialization(self): assert dns_server_model != False # Construct a model instance of DNSServer by calling from_dict on the json representation - dns_server_model_dict = DNSServer.from_dict(dns_server_model_json).__dict__ + dns_server_model_dict = DNSServer.from_dict( + dns_server_model_json).__dict__ dns_server_model2 = DNSServer(**dns_server_model_dict) # Verify the model instances are equivalent @@ -50522,12 +55100,15 @@ def test_dns_server_prototype_serialization(self): dns_server_prototype_model_json['zone_affinity'] = zone_identity_model # Construct a model instance of DNSServerPrototype by calling from_dict on the json representation - dns_server_prototype_model = DNSServerPrototype.from_dict(dns_server_prototype_model_json) + dns_server_prototype_model = DNSServerPrototype.from_dict( + dns_server_prototype_model_json) assert dns_server_prototype_model != False # Construct a model instance of DNSServerPrototype by calling from_dict on the json representation - dns_server_prototype_model_dict = DNSServerPrototype.from_dict(dns_server_prototype_model_json).__dict__ - dns_server_prototype_model2 = DNSServerPrototype(**dns_server_prototype_model_dict) + dns_server_prototype_model_dict = DNSServerPrototype.from_dict( + dns_server_prototype_model_json).__dict__ + dns_server_prototype_model2 = DNSServerPrototype( + **dns_server_prototype_model_dict) # Verify the model instances are equivalent assert dns_server_prototype_model == dns_server_prototype_model2 @@ -50549,15 +55130,19 @@ def test_dns_zone_reference_serialization(self): # Construct a json representation of a DNSZoneReference model dns_zone_reference_model_json = {} - dns_zone_reference_model_json['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' + dns_zone_reference_model_json[ + 'id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' # Construct a model instance of DNSZoneReference by calling from_dict on the json representation - dns_zone_reference_model = DNSZoneReference.from_dict(dns_zone_reference_model_json) + dns_zone_reference_model = DNSZoneReference.from_dict( + dns_zone_reference_model_json) assert dns_zone_reference_model != False # Construct a model instance of DNSZoneReference by calling from_dict on the json representation - dns_zone_reference_model_dict = DNSZoneReference.from_dict(dns_zone_reference_model_json).__dict__ - dns_zone_reference_model2 = DNSZoneReference(**dns_zone_reference_model_dict) + dns_zone_reference_model_dict = DNSZoneReference.from_dict( + dns_zone_reference_model_json).__dict__ + dns_zone_reference_model2 = DNSZoneReference( + **dns_zone_reference_model_dict) # Verify the model instances are equivalent assert dns_zone_reference_model == dns_zone_reference_model2 @@ -50584,49 +55169,70 @@ def test_dedicated_host_serialization(self): vcpu_model['count'] = 4 vcpu_model['manufacturer'] = 'intel' - instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted - instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_disk_reference_deleted_model = { + } # InstanceDiskReferenceDeleted + instance_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_disk_reference_model = {} # InstanceDiskReference - instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model - instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'deleted'] = instance_disk_reference_deleted_model + instance_disk_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_reference_model['name'] = 'my-instance-disk' instance_disk_reference_model['resource_type'] = 'instance_disk' dedicated_host_disk_model = {} # DedicatedHostDisk dedicated_host_disk_model['available'] = 38 dedicated_host_disk_model['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + dedicated_host_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' dedicated_host_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - dedicated_host_disk_model['instance_disks'] = [instance_disk_reference_model] + dedicated_host_disk_model['instance_disks'] = [ + instance_disk_reference_model + ] dedicated_host_disk_model['interface_type'] = 'nvme' dedicated_host_disk_model['lifecycle_state'] = 'stable' dedicated_host_disk_model['name'] = 'my-dedicated-host-disk' dedicated_host_disk_model['provisionable'] = True dedicated_host_disk_model['resource_type'] = 'dedicated_host_disk' dedicated_host_disk_model['size'] = 38 - dedicated_host_disk_model['supported_instance_interface_types'] = ['nvme'] + dedicated_host_disk_model['supported_instance_interface_types'] = [ + 'nvme' + ] - dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted - dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_group_reference_deleted_model = { + } # DedicatedHostGroupReferenceDeleted + dedicated_host_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' dedicated_host_group_reference_model = {} # DedicatedHostGroupReference - dedicated_host_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_reference_model['deleted'] = dedicated_host_group_reference_deleted_model - dedicated_host_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_reference_model['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model[ + 'deleted'] = dedicated_host_group_reference_deleted_model + dedicated_host_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['name'] = 'my-host-group' - dedicated_host_group_reference_model['resource_type'] = 'dedicated_host_group' + dedicated_host_group_reference_model[ + 'resource_type'] = 'dedicated_host_group' instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['deleted'] = instance_reference_deleted_model - instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['name'] = 'my-instance' dedicated_host_numa_node_model = {} # DedicatedHostNUMANode @@ -50637,22 +55243,28 @@ def test_dedicated_host_serialization(self): dedicated_host_numa_model['count'] = 2 dedicated_host_numa_model['nodes'] = [dedicated_host_numa_node_model] - dedicated_host_profile_reference_model = {} # DedicatedHostProfileReference - dedicated_host_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_profile_reference_model = { + } # DedicatedHostProfileReference + dedicated_host_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_profile_reference_model['name'] = 'mx2-host-152x1216' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a DedicatedHost model @@ -50660,33 +55272,43 @@ def test_dedicated_host_serialization(self): dedicated_host_model_json['available_memory'] = 128 dedicated_host_model_json['available_vcpu'] = vcpu_model dedicated_host_model_json['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_model_json['disks'] = [dedicated_host_disk_model] - dedicated_host_model_json['group'] = dedicated_host_group_reference_model - dedicated_host_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_model_json['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_model_json[ + 'group'] = dedicated_host_group_reference_model + dedicated_host_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_model_json[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_model_json['instance_placement_enabled'] = True dedicated_host_model_json['instances'] = [instance_reference_model] dedicated_host_model_json['lifecycle_state'] = 'stable' dedicated_host_model_json['memory'] = 128 dedicated_host_model_json['name'] = 'my-host' dedicated_host_model_json['numa'] = dedicated_host_numa_model - dedicated_host_model_json['profile'] = dedicated_host_profile_reference_model + dedicated_host_model_json[ + 'profile'] = dedicated_host_profile_reference_model dedicated_host_model_json['provisionable'] = True - dedicated_host_model_json['resource_group'] = resource_group_reference_model + dedicated_host_model_json[ + 'resource_group'] = resource_group_reference_model dedicated_host_model_json['resource_type'] = 'dedicated_host' dedicated_host_model_json['socket_count'] = 4 dedicated_host_model_json['state'] = 'available' - dedicated_host_model_json['supported_instance_profiles'] = [instance_profile_reference_model] + dedicated_host_model_json['supported_instance_profiles'] = [ + instance_profile_reference_model + ] dedicated_host_model_json['vcpu'] = vcpu_model dedicated_host_model_json['zone'] = zone_reference_model # Construct a model instance of DedicatedHost by calling from_dict on the json representation - dedicated_host_model = DedicatedHost.from_dict(dedicated_host_model_json) + dedicated_host_model = DedicatedHost.from_dict( + dedicated_host_model_json) assert dedicated_host_model != False # Construct a model instance of DedicatedHost by calling from_dict on the json representation - dedicated_host_model_dict = DedicatedHost.from_dict(dedicated_host_model_json).__dict__ + dedicated_host_model_dict = DedicatedHost.from_dict( + dedicated_host_model_json).__dict__ dedicated_host_model2 = DedicatedHost(**dedicated_host_model_dict) # Verify the model instances are equivalent @@ -50714,49 +55336,70 @@ def test_dedicated_host_collection_serialization(self): vcpu_model['count'] = 4 vcpu_model['manufacturer'] = 'intel' - instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted - instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_disk_reference_deleted_model = { + } # InstanceDiskReferenceDeleted + instance_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_disk_reference_model = {} # InstanceDiskReference - instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model - instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'deleted'] = instance_disk_reference_deleted_model + instance_disk_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_reference_model['name'] = 'my-instance-disk' instance_disk_reference_model['resource_type'] = 'instance_disk' dedicated_host_disk_model = {} # DedicatedHostDisk dedicated_host_disk_model['available'] = 38 dedicated_host_disk_model['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + dedicated_host_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' dedicated_host_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - dedicated_host_disk_model['instance_disks'] = [instance_disk_reference_model] + dedicated_host_disk_model['instance_disks'] = [ + instance_disk_reference_model + ] dedicated_host_disk_model['interface_type'] = 'nvme' dedicated_host_disk_model['lifecycle_state'] = 'stable' dedicated_host_disk_model['name'] = 'my-dedicated-host-disk' dedicated_host_disk_model['provisionable'] = True dedicated_host_disk_model['resource_type'] = 'dedicated_host_disk' dedicated_host_disk_model['size'] = 38 - dedicated_host_disk_model['supported_instance_interface_types'] = ['nvme'] + dedicated_host_disk_model['supported_instance_interface_types'] = [ + 'nvme' + ] - dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted - dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_group_reference_deleted_model = { + } # DedicatedHostGroupReferenceDeleted + dedicated_host_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' dedicated_host_group_reference_model = {} # DedicatedHostGroupReference - dedicated_host_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_reference_model['deleted'] = dedicated_host_group_reference_deleted_model - dedicated_host_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_reference_model['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model[ + 'deleted'] = dedicated_host_group_reference_deleted_model + dedicated_host_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['name'] = 'my-host-group' - dedicated_host_group_reference_model['resource_type'] = 'dedicated_host_group' + dedicated_host_group_reference_model[ + 'resource_type'] = 'dedicated_host_group' instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['deleted'] = instance_reference_deleted_model - instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['name'] = 'my-instance' dedicated_host_numa_node_model = {} # DedicatedHostNUMANode @@ -50767,32 +55410,40 @@ def test_dedicated_host_collection_serialization(self): dedicated_host_numa_model['count'] = 2 dedicated_host_numa_model['nodes'] = [dedicated_host_numa_node_model] - dedicated_host_profile_reference_model = {} # DedicatedHostProfileReference - dedicated_host_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_profile_reference_model = { + } # DedicatedHostProfileReference + dedicated_host_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_profile_reference_model['name'] = 'mx2-host-152x1216' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' dedicated_host_model = {} # DedicatedHost dedicated_host_model['available_memory'] = 128 dedicated_host_model['available_vcpu'] = vcpu_model dedicated_host_model['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_model['disks'] = [dedicated_host_disk_model] dedicated_host_model['group'] = dedicated_host_group_reference_model - dedicated_host_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_model['instance_placement_enabled'] = True dedicated_host_model['instances'] = [instance_reference_model] @@ -50806,37 +55457,50 @@ def test_dedicated_host_collection_serialization(self): dedicated_host_model['resource_type'] = 'dedicated_host' dedicated_host_model['socket_count'] = 4 dedicated_host_model['state'] = 'available' - dedicated_host_model['supported_instance_profiles'] = [instance_profile_reference_model] + dedicated_host_model['supported_instance_profiles'] = [ + instance_profile_reference_model + ] dedicated_host_model['vcpu'] = vcpu_model dedicated_host_model['zone'] = zone_reference_model - dedicated_host_collection_first_model = {} # DedicatedHostCollectionFirst - dedicated_host_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20' + dedicated_host_collection_first_model = { + } # DedicatedHostCollectionFirst + dedicated_host_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20' dedicated_host_collection_next_model = {} # DedicatedHostCollectionNext - dedicated_host_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + dedicated_host_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a DedicatedHostCollection model dedicated_host_collection_model_json = {} - dedicated_host_collection_model_json['dedicated_hosts'] = [dedicated_host_model] - dedicated_host_collection_model_json['first'] = dedicated_host_collection_first_model + dedicated_host_collection_model_json['dedicated_hosts'] = [ + dedicated_host_model + ] + dedicated_host_collection_model_json[ + 'first'] = dedicated_host_collection_first_model dedicated_host_collection_model_json['limit'] = 20 - dedicated_host_collection_model_json['next'] = dedicated_host_collection_next_model + dedicated_host_collection_model_json[ + 'next'] = dedicated_host_collection_next_model dedicated_host_collection_model_json['total_count'] = 132 # Construct a model instance of DedicatedHostCollection by calling from_dict on the json representation - dedicated_host_collection_model = DedicatedHostCollection.from_dict(dedicated_host_collection_model_json) + dedicated_host_collection_model = DedicatedHostCollection.from_dict( + dedicated_host_collection_model_json) assert dedicated_host_collection_model != False # Construct a model instance of DedicatedHostCollection by calling from_dict on the json representation - dedicated_host_collection_model_dict = DedicatedHostCollection.from_dict(dedicated_host_collection_model_json).__dict__ - dedicated_host_collection_model2 = DedicatedHostCollection(**dedicated_host_collection_model_dict) + dedicated_host_collection_model_dict = DedicatedHostCollection.from_dict( + dedicated_host_collection_model_json).__dict__ + dedicated_host_collection_model2 = DedicatedHostCollection( + **dedicated_host_collection_model_dict) # Verify the model instances are equivalent assert dedicated_host_collection_model == dedicated_host_collection_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_collection_model_json2 = dedicated_host_collection_model.to_dict() + dedicated_host_collection_model_json2 = dedicated_host_collection_model.to_dict( + ) assert dedicated_host_collection_model_json2 == dedicated_host_collection_model_json @@ -50852,21 +55516,26 @@ def test_dedicated_host_collection_first_serialization(self): # Construct a json representation of a DedicatedHostCollectionFirst model dedicated_host_collection_first_model_json = {} - dedicated_host_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20' + dedicated_host_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20' # Construct a model instance of DedicatedHostCollectionFirst by calling from_dict on the json representation - dedicated_host_collection_first_model = DedicatedHostCollectionFirst.from_dict(dedicated_host_collection_first_model_json) + dedicated_host_collection_first_model = DedicatedHostCollectionFirst.from_dict( + dedicated_host_collection_first_model_json) assert dedicated_host_collection_first_model != False # Construct a model instance of DedicatedHostCollectionFirst by calling from_dict on the json representation - dedicated_host_collection_first_model_dict = DedicatedHostCollectionFirst.from_dict(dedicated_host_collection_first_model_json).__dict__ - dedicated_host_collection_first_model2 = DedicatedHostCollectionFirst(**dedicated_host_collection_first_model_dict) + dedicated_host_collection_first_model_dict = DedicatedHostCollectionFirst.from_dict( + dedicated_host_collection_first_model_json).__dict__ + dedicated_host_collection_first_model2 = DedicatedHostCollectionFirst( + **dedicated_host_collection_first_model_dict) # Verify the model instances are equivalent assert dedicated_host_collection_first_model == dedicated_host_collection_first_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_collection_first_model_json2 = dedicated_host_collection_first_model.to_dict() + dedicated_host_collection_first_model_json2 = dedicated_host_collection_first_model.to_dict( + ) assert dedicated_host_collection_first_model_json2 == dedicated_host_collection_first_model_json @@ -50882,21 +55551,26 @@ def test_dedicated_host_collection_next_serialization(self): # Construct a json representation of a DedicatedHostCollectionNext model dedicated_host_collection_next_model_json = {} - dedicated_host_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + dedicated_host_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of DedicatedHostCollectionNext by calling from_dict on the json representation - dedicated_host_collection_next_model = DedicatedHostCollectionNext.from_dict(dedicated_host_collection_next_model_json) + dedicated_host_collection_next_model = DedicatedHostCollectionNext.from_dict( + dedicated_host_collection_next_model_json) assert dedicated_host_collection_next_model != False # Construct a model instance of DedicatedHostCollectionNext by calling from_dict on the json representation - dedicated_host_collection_next_model_dict = DedicatedHostCollectionNext.from_dict(dedicated_host_collection_next_model_json).__dict__ - dedicated_host_collection_next_model2 = DedicatedHostCollectionNext(**dedicated_host_collection_next_model_dict) + dedicated_host_collection_next_model_dict = DedicatedHostCollectionNext.from_dict( + dedicated_host_collection_next_model_json).__dict__ + dedicated_host_collection_next_model2 = DedicatedHostCollectionNext( + **dedicated_host_collection_next_model_dict) # Verify the model instances are equivalent assert dedicated_host_collection_next_model == dedicated_host_collection_next_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_collection_next_model_json2 = dedicated_host_collection_next_model.to_dict() + dedicated_host_collection_next_model_json2 = dedicated_host_collection_next_model.to_dict( + ) assert dedicated_host_collection_next_model_json2 == dedicated_host_collection_next_model_json @@ -50912,13 +55586,18 @@ def test_dedicated_host_disk_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted - instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_disk_reference_deleted_model = { + } # InstanceDiskReferenceDeleted + instance_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_disk_reference_model = {} # InstanceDiskReference - instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model - instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'deleted'] = instance_disk_reference_deleted_model + instance_disk_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_reference_model['name'] = 'my-instance-disk' instance_disk_reference_model['resource_type'] = 'instance_disk' @@ -50926,24 +55605,33 @@ def test_dedicated_host_disk_serialization(self): dedicated_host_disk_model_json = {} dedicated_host_disk_model_json['available'] = 38 dedicated_host_disk_model_json['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_disk_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - dedicated_host_disk_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - dedicated_host_disk_model_json['instance_disks'] = [instance_disk_reference_model] + dedicated_host_disk_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + dedicated_host_disk_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + dedicated_host_disk_model_json['instance_disks'] = [ + instance_disk_reference_model + ] dedicated_host_disk_model_json['interface_type'] = 'nvme' dedicated_host_disk_model_json['lifecycle_state'] = 'stable' dedicated_host_disk_model_json['name'] = 'my-dedicated-host-disk' dedicated_host_disk_model_json['provisionable'] = True dedicated_host_disk_model_json['resource_type'] = 'dedicated_host_disk' dedicated_host_disk_model_json['size'] = 38 - dedicated_host_disk_model_json['supported_instance_interface_types'] = ['nvme'] + dedicated_host_disk_model_json['supported_instance_interface_types'] = [ + 'nvme' + ] # Construct a model instance of DedicatedHostDisk by calling from_dict on the json representation - dedicated_host_disk_model = DedicatedHostDisk.from_dict(dedicated_host_disk_model_json) + dedicated_host_disk_model = DedicatedHostDisk.from_dict( + dedicated_host_disk_model_json) assert dedicated_host_disk_model != False # Construct a model instance of DedicatedHostDisk by calling from_dict on the json representation - dedicated_host_disk_model_dict = DedicatedHostDisk.from_dict(dedicated_host_disk_model_json).__dict__ - dedicated_host_disk_model2 = DedicatedHostDisk(**dedicated_host_disk_model_dict) + dedicated_host_disk_model_dict = DedicatedHostDisk.from_dict( + dedicated_host_disk_model_json).__dict__ + dedicated_host_disk_model2 = DedicatedHostDisk( + **dedicated_host_disk_model_dict) # Verify the model instances are equivalent assert dedicated_host_disk_model == dedicated_host_disk_model2 @@ -50965,47 +55653,63 @@ def test_dedicated_host_disk_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted - instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_disk_reference_deleted_model = { + } # InstanceDiskReferenceDeleted + instance_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_disk_reference_model = {} # InstanceDiskReference - instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model - instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'deleted'] = instance_disk_reference_deleted_model + instance_disk_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_reference_model['name'] = 'my-instance-disk' instance_disk_reference_model['resource_type'] = 'instance_disk' dedicated_host_disk_model = {} # DedicatedHostDisk dedicated_host_disk_model['available'] = 38 dedicated_host_disk_model['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + dedicated_host_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' dedicated_host_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - dedicated_host_disk_model['instance_disks'] = [instance_disk_reference_model] + dedicated_host_disk_model['instance_disks'] = [ + instance_disk_reference_model + ] dedicated_host_disk_model['interface_type'] = 'nvme' dedicated_host_disk_model['lifecycle_state'] = 'stable' dedicated_host_disk_model['name'] = 'my-dedicated-host-disk' dedicated_host_disk_model['provisionable'] = True dedicated_host_disk_model['resource_type'] = 'dedicated_host_disk' dedicated_host_disk_model['size'] = 38 - dedicated_host_disk_model['supported_instance_interface_types'] = ['nvme'] + dedicated_host_disk_model['supported_instance_interface_types'] = [ + 'nvme' + ] # Construct a json representation of a DedicatedHostDiskCollection model dedicated_host_disk_collection_model_json = {} - dedicated_host_disk_collection_model_json['disks'] = [dedicated_host_disk_model] + dedicated_host_disk_collection_model_json['disks'] = [ + dedicated_host_disk_model + ] # Construct a model instance of DedicatedHostDiskCollection by calling from_dict on the json representation - dedicated_host_disk_collection_model = DedicatedHostDiskCollection.from_dict(dedicated_host_disk_collection_model_json) + dedicated_host_disk_collection_model = DedicatedHostDiskCollection.from_dict( + dedicated_host_disk_collection_model_json) assert dedicated_host_disk_collection_model != False # Construct a model instance of DedicatedHostDiskCollection by calling from_dict on the json representation - dedicated_host_disk_collection_model_dict = DedicatedHostDiskCollection.from_dict(dedicated_host_disk_collection_model_json).__dict__ - dedicated_host_disk_collection_model2 = DedicatedHostDiskCollection(**dedicated_host_disk_collection_model_dict) + dedicated_host_disk_collection_model_dict = DedicatedHostDiskCollection.from_dict( + dedicated_host_disk_collection_model_json).__dict__ + dedicated_host_disk_collection_model2 = DedicatedHostDiskCollection( + **dedicated_host_disk_collection_model_dict) # Verify the model instances are equivalent assert dedicated_host_disk_collection_model == dedicated_host_disk_collection_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_disk_collection_model_json2 = dedicated_host_disk_collection_model.to_dict() + dedicated_host_disk_collection_model_json2 = dedicated_host_disk_collection_model.to_dict( + ) assert dedicated_host_disk_collection_model_json2 == dedicated_host_disk_collection_model_json @@ -51024,18 +55728,22 @@ def test_dedicated_host_disk_patch_serialization(self): dedicated_host_disk_patch_model_json['name'] = 'my-disk-updated' # Construct a model instance of DedicatedHostDiskPatch by calling from_dict on the json representation - dedicated_host_disk_patch_model = DedicatedHostDiskPatch.from_dict(dedicated_host_disk_patch_model_json) + dedicated_host_disk_patch_model = DedicatedHostDiskPatch.from_dict( + dedicated_host_disk_patch_model_json) assert dedicated_host_disk_patch_model != False # Construct a model instance of DedicatedHostDiskPatch by calling from_dict on the json representation - dedicated_host_disk_patch_model_dict = DedicatedHostDiskPatch.from_dict(dedicated_host_disk_patch_model_json).__dict__ - dedicated_host_disk_patch_model2 = DedicatedHostDiskPatch(**dedicated_host_disk_patch_model_dict) + dedicated_host_disk_patch_model_dict = DedicatedHostDiskPatch.from_dict( + dedicated_host_disk_patch_model_json).__dict__ + dedicated_host_disk_patch_model2 = DedicatedHostDiskPatch( + **dedicated_host_disk_patch_model_dict) # Verify the model instances are equivalent assert dedicated_host_disk_patch_model == dedicated_host_disk_patch_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_disk_patch_model_json2 = dedicated_host_disk_patch_model.to_dict() + dedicated_host_disk_patch_model_json2 = dedicated_host_disk_patch_model.to_dict( + ) assert dedicated_host_disk_patch_model_json2 == dedicated_host_disk_patch_model_json @@ -51051,53 +55759,75 @@ def test_dedicated_host_group_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted - dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_reference_deleted_model = { + } # DedicatedHostReferenceDeleted + dedicated_host_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' dedicated_host_reference_model = {} # DedicatedHostReference - dedicated_host_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model - dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'deleted'] = dedicated_host_reference_deleted_model + dedicated_host_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['name'] = 'my-host' dedicated_host_reference_model['resource_type'] = 'dedicated_host' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a DedicatedHostGroup model dedicated_host_group_model_json = {} dedicated_host_group_model_json['class'] = 'mx2' dedicated_host_group_model_json['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_model_json['dedicated_hosts'] = [dedicated_host_reference_model] + dedicated_host_group_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_model_json['dedicated_hosts'] = [ + dedicated_host_reference_model + ] dedicated_host_group_model_json['family'] = 'balanced' - dedicated_host_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_model_json['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_model_json[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_model_json['name'] = 'my-host-group' - dedicated_host_group_model_json['resource_group'] = resource_group_reference_model - dedicated_host_group_model_json['resource_type'] = 'dedicated_host_group' - dedicated_host_group_model_json['supported_instance_profiles'] = [instance_profile_reference_model] + dedicated_host_group_model_json[ + 'resource_group'] = resource_group_reference_model + dedicated_host_group_model_json[ + 'resource_type'] = 'dedicated_host_group' + dedicated_host_group_model_json['supported_instance_profiles'] = [ + instance_profile_reference_model + ] dedicated_host_group_model_json['zone'] = zone_reference_model # Construct a model instance of DedicatedHostGroup by calling from_dict on the json representation - dedicated_host_group_model = DedicatedHostGroup.from_dict(dedicated_host_group_model_json) + dedicated_host_group_model = DedicatedHostGroup.from_dict( + dedicated_host_group_model_json) assert dedicated_host_group_model != False # Construct a model instance of DedicatedHostGroup by calling from_dict on the json representation - dedicated_host_group_model_dict = DedicatedHostGroup.from_dict(dedicated_host_group_model_json).__dict__ - dedicated_host_group_model2 = DedicatedHostGroup(**dedicated_host_group_model_dict) + dedicated_host_group_model_dict = DedicatedHostGroup.from_dict( + dedicated_host_group_model_json).__dict__ + dedicated_host_group_model2 = DedicatedHostGroup( + **dedicated_host_group_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_model == dedicated_host_group_model2 @@ -51119,72 +55849,102 @@ def test_dedicated_host_group_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_group_collection_first_model = {} # DedicatedHostGroupCollectionFirst - dedicated_host_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20' + dedicated_host_group_collection_first_model = { + } # DedicatedHostGroupCollectionFirst + dedicated_host_group_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20' - dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted - dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_reference_deleted_model = { + } # DedicatedHostReferenceDeleted + dedicated_host_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' dedicated_host_reference_model = {} # DedicatedHostReference - dedicated_host_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model - dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'deleted'] = dedicated_host_reference_deleted_model + dedicated_host_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['name'] = 'my-host' dedicated_host_reference_model['resource_type'] = 'dedicated_host' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' dedicated_host_group_model = {} # DedicatedHostGroup dedicated_host_group_model['class'] = 'mx2' dedicated_host_group_model['created_at'] = '2019-01-01T12:00:00Z' - dedicated_host_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_model['dedicated_hosts'] = [dedicated_host_reference_model] + dedicated_host_group_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_model['dedicated_hosts'] = [ + dedicated_host_reference_model + ] dedicated_host_group_model['family'] = 'balanced' - dedicated_host_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_model['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_model[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_model['name'] = 'my-host-group' - dedicated_host_group_model['resource_group'] = resource_group_reference_model + dedicated_host_group_model[ + 'resource_group'] = resource_group_reference_model dedicated_host_group_model['resource_type'] = 'dedicated_host_group' - dedicated_host_group_model['supported_instance_profiles'] = [instance_profile_reference_model] + dedicated_host_group_model['supported_instance_profiles'] = [ + instance_profile_reference_model + ] dedicated_host_group_model['zone'] = zone_reference_model - dedicated_host_group_collection_next_model = {} # DedicatedHostGroupCollectionNext - dedicated_host_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + dedicated_host_group_collection_next_model = { + } # DedicatedHostGroupCollectionNext + dedicated_host_group_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a DedicatedHostGroupCollection model dedicated_host_group_collection_model_json = {} - dedicated_host_group_collection_model_json['first'] = dedicated_host_group_collection_first_model - dedicated_host_group_collection_model_json['groups'] = [dedicated_host_group_model] + dedicated_host_group_collection_model_json[ + 'first'] = dedicated_host_group_collection_first_model + dedicated_host_group_collection_model_json['groups'] = [ + dedicated_host_group_model + ] dedicated_host_group_collection_model_json['limit'] = 20 - dedicated_host_group_collection_model_json['next'] = dedicated_host_group_collection_next_model + dedicated_host_group_collection_model_json[ + 'next'] = dedicated_host_group_collection_next_model dedicated_host_group_collection_model_json['total_count'] = 132 # Construct a model instance of DedicatedHostGroupCollection by calling from_dict on the json representation - dedicated_host_group_collection_model = DedicatedHostGroupCollection.from_dict(dedicated_host_group_collection_model_json) + dedicated_host_group_collection_model = DedicatedHostGroupCollection.from_dict( + dedicated_host_group_collection_model_json) assert dedicated_host_group_collection_model != False # Construct a model instance of DedicatedHostGroupCollection by calling from_dict on the json representation - dedicated_host_group_collection_model_dict = DedicatedHostGroupCollection.from_dict(dedicated_host_group_collection_model_json).__dict__ - dedicated_host_group_collection_model2 = DedicatedHostGroupCollection(**dedicated_host_group_collection_model_dict) + dedicated_host_group_collection_model_dict = DedicatedHostGroupCollection.from_dict( + dedicated_host_group_collection_model_json).__dict__ + dedicated_host_group_collection_model2 = DedicatedHostGroupCollection( + **dedicated_host_group_collection_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_collection_model == dedicated_host_group_collection_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_collection_model_json2 = dedicated_host_group_collection_model.to_dict() + dedicated_host_group_collection_model_json2 = dedicated_host_group_collection_model.to_dict( + ) assert dedicated_host_group_collection_model_json2 == dedicated_host_group_collection_model_json @@ -51200,21 +55960,26 @@ def test_dedicated_host_group_collection_first_serialization(self): # Construct a json representation of a DedicatedHostGroupCollectionFirst model dedicated_host_group_collection_first_model_json = {} - dedicated_host_group_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20' + dedicated_host_group_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20' # Construct a model instance of DedicatedHostGroupCollectionFirst by calling from_dict on the json representation - dedicated_host_group_collection_first_model = DedicatedHostGroupCollectionFirst.from_dict(dedicated_host_group_collection_first_model_json) + dedicated_host_group_collection_first_model = DedicatedHostGroupCollectionFirst.from_dict( + dedicated_host_group_collection_first_model_json) assert dedicated_host_group_collection_first_model != False # Construct a model instance of DedicatedHostGroupCollectionFirst by calling from_dict on the json representation - dedicated_host_group_collection_first_model_dict = DedicatedHostGroupCollectionFirst.from_dict(dedicated_host_group_collection_first_model_json).__dict__ - dedicated_host_group_collection_first_model2 = DedicatedHostGroupCollectionFirst(**dedicated_host_group_collection_first_model_dict) + dedicated_host_group_collection_first_model_dict = DedicatedHostGroupCollectionFirst.from_dict( + dedicated_host_group_collection_first_model_json).__dict__ + dedicated_host_group_collection_first_model2 = DedicatedHostGroupCollectionFirst( + **dedicated_host_group_collection_first_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_collection_first_model == dedicated_host_group_collection_first_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_collection_first_model_json2 = dedicated_host_group_collection_first_model.to_dict() + dedicated_host_group_collection_first_model_json2 = dedicated_host_group_collection_first_model.to_dict( + ) assert dedicated_host_group_collection_first_model_json2 == dedicated_host_group_collection_first_model_json @@ -51230,21 +55995,26 @@ def test_dedicated_host_group_collection_next_serialization(self): # Construct a json representation of a DedicatedHostGroupCollectionNext model dedicated_host_group_collection_next_model_json = {} - dedicated_host_group_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + dedicated_host_group_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of DedicatedHostGroupCollectionNext by calling from_dict on the json representation - dedicated_host_group_collection_next_model = DedicatedHostGroupCollectionNext.from_dict(dedicated_host_group_collection_next_model_json) + dedicated_host_group_collection_next_model = DedicatedHostGroupCollectionNext.from_dict( + dedicated_host_group_collection_next_model_json) assert dedicated_host_group_collection_next_model != False # Construct a model instance of DedicatedHostGroupCollectionNext by calling from_dict on the json representation - dedicated_host_group_collection_next_model_dict = DedicatedHostGroupCollectionNext.from_dict(dedicated_host_group_collection_next_model_json).__dict__ - dedicated_host_group_collection_next_model2 = DedicatedHostGroupCollectionNext(**dedicated_host_group_collection_next_model_dict) + dedicated_host_group_collection_next_model_dict = DedicatedHostGroupCollectionNext.from_dict( + dedicated_host_group_collection_next_model_json).__dict__ + dedicated_host_group_collection_next_model2 = DedicatedHostGroupCollectionNext( + **dedicated_host_group_collection_next_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_collection_next_model == dedicated_host_group_collection_next_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_collection_next_model_json2 = dedicated_host_group_collection_next_model.to_dict() + dedicated_host_group_collection_next_model_json2 = dedicated_host_group_collection_next_model.to_dict( + ) assert dedicated_host_group_collection_next_model_json2 == dedicated_host_group_collection_next_model_json @@ -51263,18 +56033,22 @@ def test_dedicated_host_group_patch_serialization(self): dedicated_host_group_patch_model_json['name'] = 'my-host-group' # Construct a model instance of DedicatedHostGroupPatch by calling from_dict on the json representation - dedicated_host_group_patch_model = DedicatedHostGroupPatch.from_dict(dedicated_host_group_patch_model_json) + dedicated_host_group_patch_model = DedicatedHostGroupPatch.from_dict( + dedicated_host_group_patch_model_json) assert dedicated_host_group_patch_model != False # Construct a model instance of DedicatedHostGroupPatch by calling from_dict on the json representation - dedicated_host_group_patch_model_dict = DedicatedHostGroupPatch.from_dict(dedicated_host_group_patch_model_json).__dict__ - dedicated_host_group_patch_model2 = DedicatedHostGroupPatch(**dedicated_host_group_patch_model_dict) + dedicated_host_group_patch_model_dict = DedicatedHostGroupPatch.from_dict( + dedicated_host_group_patch_model_json).__dict__ + dedicated_host_group_patch_model2 = DedicatedHostGroupPatch( + **dedicated_host_group_patch_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_patch_model == dedicated_host_group_patch_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_patch_model_json2 = dedicated_host_group_patch_model.to_dict() + dedicated_host_group_patch_model_json2 = dedicated_host_group_patch_model.to_dict( + ) assert dedicated_host_group_patch_model_json2 == dedicated_host_group_patch_model_json @@ -51283,7 +56057,8 @@ class TestModel_DedicatedHostGroupPrototypeDedicatedHostByZoneContext: Test Class for DedicatedHostGroupPrototypeDedicatedHostByZoneContext """ - def test_dedicated_host_group_prototype_dedicated_host_by_zone_context_serialization(self): + def test_dedicated_host_group_prototype_dedicated_host_by_zone_context_serialization( + self): """ Test serialization/deserialization for DedicatedHostGroupPrototypeDedicatedHostByZoneContext """ @@ -51295,22 +56070,32 @@ def test_dedicated_host_group_prototype_dedicated_host_by_zone_context_serializa # Construct a json representation of a DedicatedHostGroupPrototypeDedicatedHostByZoneContext model dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json = {} - dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json['name'] = 'my-host-group' - dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json['resource_group'] = resource_group_identity_model + dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json[ + 'name'] = 'my-host-group' + dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json[ + 'resource_group'] = resource_group_identity_model # Construct a model instance of DedicatedHostGroupPrototypeDedicatedHostByZoneContext by calling from_dict on the json representation - dedicated_host_group_prototype_dedicated_host_by_zone_context_model = DedicatedHostGroupPrototypeDedicatedHostByZoneContext.from_dict(dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json) + dedicated_host_group_prototype_dedicated_host_by_zone_context_model = DedicatedHostGroupPrototypeDedicatedHostByZoneContext.from_dict( + dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json + ) assert dedicated_host_group_prototype_dedicated_host_by_zone_context_model != False # Construct a model instance of DedicatedHostGroupPrototypeDedicatedHostByZoneContext by calling from_dict on the json representation - dedicated_host_group_prototype_dedicated_host_by_zone_context_model_dict = DedicatedHostGroupPrototypeDedicatedHostByZoneContext.from_dict(dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json).__dict__ - dedicated_host_group_prototype_dedicated_host_by_zone_context_model2 = DedicatedHostGroupPrototypeDedicatedHostByZoneContext(**dedicated_host_group_prototype_dedicated_host_by_zone_context_model_dict) + dedicated_host_group_prototype_dedicated_host_by_zone_context_model_dict = DedicatedHostGroupPrototypeDedicatedHostByZoneContext.from_dict( + dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json + ).__dict__ + dedicated_host_group_prototype_dedicated_host_by_zone_context_model2 = DedicatedHostGroupPrototypeDedicatedHostByZoneContext( + ** + dedicated_host_group_prototype_dedicated_host_by_zone_context_model_dict + ) # Verify the model instances are equivalent assert dedicated_host_group_prototype_dedicated_host_by_zone_context_model == dedicated_host_group_prototype_dedicated_host_by_zone_context_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json2 = dedicated_host_group_prototype_dedicated_host_by_zone_context_model.to_dict() + dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json2 = dedicated_host_group_prototype_dedicated_host_by_zone_context_model.to_dict( + ) assert dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json2 == dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json @@ -51326,31 +56111,42 @@ def test_dedicated_host_group_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted - dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_group_reference_deleted_model = { + } # DedicatedHostGroupReferenceDeleted + dedicated_host_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a DedicatedHostGroupReference model dedicated_host_group_reference_model_json = {} - dedicated_host_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_reference_model_json['deleted'] = dedicated_host_group_reference_deleted_model - dedicated_host_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - dedicated_host_group_reference_model_json['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model_json[ + 'deleted'] = dedicated_host_group_reference_deleted_model + dedicated_host_group_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_reference_model_json[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model_json['name'] = 'my-host-group' - dedicated_host_group_reference_model_json['resource_type'] = 'dedicated_host_group' + dedicated_host_group_reference_model_json[ + 'resource_type'] = 'dedicated_host_group' # Construct a model instance of DedicatedHostGroupReference by calling from_dict on the json representation - dedicated_host_group_reference_model = DedicatedHostGroupReference.from_dict(dedicated_host_group_reference_model_json) + dedicated_host_group_reference_model = DedicatedHostGroupReference.from_dict( + dedicated_host_group_reference_model_json) assert dedicated_host_group_reference_model != False # Construct a model instance of DedicatedHostGroupReference by calling from_dict on the json representation - dedicated_host_group_reference_model_dict = DedicatedHostGroupReference.from_dict(dedicated_host_group_reference_model_json).__dict__ - dedicated_host_group_reference_model2 = DedicatedHostGroupReference(**dedicated_host_group_reference_model_dict) + dedicated_host_group_reference_model_dict = DedicatedHostGroupReference.from_dict( + dedicated_host_group_reference_model_json).__dict__ + dedicated_host_group_reference_model2 = DedicatedHostGroupReference( + **dedicated_host_group_reference_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_reference_model == dedicated_host_group_reference_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_reference_model_json2 = dedicated_host_group_reference_model.to_dict() + dedicated_host_group_reference_model_json2 = dedicated_host_group_reference_model.to_dict( + ) assert dedicated_host_group_reference_model_json2 == dedicated_host_group_reference_model_json @@ -51366,21 +56162,26 @@ def test_dedicated_host_group_reference_deleted_serialization(self): # Construct a json representation of a DedicatedHostGroupReferenceDeleted model dedicated_host_group_reference_deleted_model_json = {} - dedicated_host_group_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_group_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of DedicatedHostGroupReferenceDeleted by calling from_dict on the json representation - dedicated_host_group_reference_deleted_model = DedicatedHostGroupReferenceDeleted.from_dict(dedicated_host_group_reference_deleted_model_json) + dedicated_host_group_reference_deleted_model = DedicatedHostGroupReferenceDeleted.from_dict( + dedicated_host_group_reference_deleted_model_json) assert dedicated_host_group_reference_deleted_model != False # Construct a model instance of DedicatedHostGroupReferenceDeleted by calling from_dict on the json representation - dedicated_host_group_reference_deleted_model_dict = DedicatedHostGroupReferenceDeleted.from_dict(dedicated_host_group_reference_deleted_model_json).__dict__ - dedicated_host_group_reference_deleted_model2 = DedicatedHostGroupReferenceDeleted(**dedicated_host_group_reference_deleted_model_dict) + dedicated_host_group_reference_deleted_model_dict = DedicatedHostGroupReferenceDeleted.from_dict( + dedicated_host_group_reference_deleted_model_json).__dict__ + dedicated_host_group_reference_deleted_model2 = DedicatedHostGroupReferenceDeleted( + **dedicated_host_group_reference_deleted_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_reference_deleted_model == dedicated_host_group_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_reference_deleted_model_json2 = dedicated_host_group_reference_deleted_model.to_dict() + dedicated_host_group_reference_deleted_model_json2 = dedicated_host_group_reference_deleted_model.to_dict( + ) assert dedicated_host_group_reference_deleted_model_json2 == dedicated_host_group_reference_deleted_model_json @@ -51403,15 +56204,20 @@ def test_dedicated_host_numa_serialization(self): # Construct a json representation of a DedicatedHostNUMA model dedicated_host_numa_model_json = {} dedicated_host_numa_model_json['count'] = 2 - dedicated_host_numa_model_json['nodes'] = [dedicated_host_numa_node_model] + dedicated_host_numa_model_json['nodes'] = [ + dedicated_host_numa_node_model + ] # Construct a model instance of DedicatedHostNUMA by calling from_dict on the json representation - dedicated_host_numa_model = DedicatedHostNUMA.from_dict(dedicated_host_numa_model_json) + dedicated_host_numa_model = DedicatedHostNUMA.from_dict( + dedicated_host_numa_model_json) assert dedicated_host_numa_model != False # Construct a model instance of DedicatedHostNUMA by calling from_dict on the json representation - dedicated_host_numa_model_dict = DedicatedHostNUMA.from_dict(dedicated_host_numa_model_json).__dict__ - dedicated_host_numa_model2 = DedicatedHostNUMA(**dedicated_host_numa_model_dict) + dedicated_host_numa_model_dict = DedicatedHostNUMA.from_dict( + dedicated_host_numa_model_json).__dict__ + dedicated_host_numa_model2 = DedicatedHostNUMA( + **dedicated_host_numa_model_dict) # Verify the model instances are equivalent assert dedicated_host_numa_model == dedicated_host_numa_model2 @@ -51437,18 +56243,22 @@ def test_dedicated_host_numa_node_serialization(self): dedicated_host_numa_node_model_json['vcpu'] = 56 # Construct a model instance of DedicatedHostNUMANode by calling from_dict on the json representation - dedicated_host_numa_node_model = DedicatedHostNUMANode.from_dict(dedicated_host_numa_node_model_json) + dedicated_host_numa_node_model = DedicatedHostNUMANode.from_dict( + dedicated_host_numa_node_model_json) assert dedicated_host_numa_node_model != False # Construct a model instance of DedicatedHostNUMANode by calling from_dict on the json representation - dedicated_host_numa_node_model_dict = DedicatedHostNUMANode.from_dict(dedicated_host_numa_node_model_json).__dict__ - dedicated_host_numa_node_model2 = DedicatedHostNUMANode(**dedicated_host_numa_node_model_dict) + dedicated_host_numa_node_model_dict = DedicatedHostNUMANode.from_dict( + dedicated_host_numa_node_model_json).__dict__ + dedicated_host_numa_node_model2 = DedicatedHostNUMANode( + **dedicated_host_numa_node_model_dict) # Verify the model instances are equivalent assert dedicated_host_numa_node_model == dedicated_host_numa_node_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_numa_node_model_json2 = dedicated_host_numa_node_model.to_dict() + dedicated_host_numa_node_model_json2 = dedicated_host_numa_node_model.to_dict( + ) assert dedicated_host_numa_node_model_json2 == dedicated_host_numa_node_model_json @@ -51468,12 +56278,15 @@ def test_dedicated_host_patch_serialization(self): dedicated_host_patch_model_json['name'] = 'my-host' # Construct a model instance of DedicatedHostPatch by calling from_dict on the json representation - dedicated_host_patch_model = DedicatedHostPatch.from_dict(dedicated_host_patch_model_json) + dedicated_host_patch_model = DedicatedHostPatch.from_dict( + dedicated_host_patch_model_json) assert dedicated_host_patch_model != False # Construct a model instance of DedicatedHostPatch by calling from_dict on the json representation - dedicated_host_patch_model_dict = DedicatedHostPatch.from_dict(dedicated_host_patch_model_json).__dict__ - dedicated_host_patch_model2 = DedicatedHostPatch(**dedicated_host_patch_model_dict) + dedicated_host_patch_model_dict = DedicatedHostPatch.from_dict( + dedicated_host_patch_model_json).__dict__ + dedicated_host_patch_model2 = DedicatedHostPatch( + **dedicated_host_patch_model_dict) # Verify the model instances are equivalent assert dedicated_host_patch_model == dedicated_host_patch_model2 @@ -51495,42 +56308,56 @@ def test_dedicated_host_profile_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface + dedicated_host_profile_disk_interface_model = { + } # DedicatedHostProfileDiskInterface dedicated_host_profile_disk_interface_model['type'] = 'fixed' dedicated_host_profile_disk_interface_model['value'] = 'nvme' - dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity + dedicated_host_profile_disk_quantity_model = { + } # DedicatedHostProfileDiskQuantity dedicated_host_profile_disk_quantity_model['type'] = 'fixed' dedicated_host_profile_disk_quantity_model['value'] = 4 - dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize + dedicated_host_profile_disk_size_model = { + } # DedicatedHostProfileDiskSize dedicated_host_profile_disk_size_model['type'] = 'fixed' dedicated_host_profile_disk_size_model['value'] = 3200 - dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces + dedicated_host_profile_disk_supported_interfaces_model = { + } # DedicatedHostProfileDiskSupportedInterfaces dedicated_host_profile_disk_supported_interfaces_model['type'] = 'fixed' - dedicated_host_profile_disk_supported_interfaces_model['value'] = ['nvme'] + dedicated_host_profile_disk_supported_interfaces_model['value'] = [ + 'nvme' + ] dedicated_host_profile_disk_model = {} # DedicatedHostProfileDisk - dedicated_host_profile_disk_model['interface_type'] = dedicated_host_profile_disk_interface_model - dedicated_host_profile_disk_model['quantity'] = dedicated_host_profile_disk_quantity_model - dedicated_host_profile_disk_model['size'] = dedicated_host_profile_disk_size_model - dedicated_host_profile_disk_model['supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model - - dedicated_host_profile_memory_model = {} # DedicatedHostProfileMemoryFixed + dedicated_host_profile_disk_model[ + 'interface_type'] = dedicated_host_profile_disk_interface_model + dedicated_host_profile_disk_model[ + 'quantity'] = dedicated_host_profile_disk_quantity_model + dedicated_host_profile_disk_model[ + 'size'] = dedicated_host_profile_disk_size_model + dedicated_host_profile_disk_model[ + 'supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model + + dedicated_host_profile_memory_model = { + } # DedicatedHostProfileMemoryFixed dedicated_host_profile_memory_model['type'] = 'fixed' dedicated_host_profile_memory_model['value'] = 16 - dedicated_host_profile_socket_model = {} # DedicatedHostProfileSocketFixed + dedicated_host_profile_socket_model = { + } # DedicatedHostProfileSocketFixed dedicated_host_profile_socket_model['type'] = 'fixed' dedicated_host_profile_socket_model['value'] = 2 instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' - dedicated_host_profile_vcpu_architecture_model = {} # DedicatedHostProfileVCPUArchitecture + dedicated_host_profile_vcpu_architecture_model = { + } # DedicatedHostProfileVCPUArchitecture dedicated_host_profile_vcpu_architecture_model['type'] = 'fixed' dedicated_host_profile_vcpu_architecture_model['value'] = 'amd64' @@ -51538,38 +56365,53 @@ def test_dedicated_host_profile_serialization(self): dedicated_host_profile_vcpu_model['type'] = 'fixed' dedicated_host_profile_vcpu_model['value'] = 16 - dedicated_host_profile_vcpu_manufacturer_model = {} # DedicatedHostProfileVCPUManufacturer + dedicated_host_profile_vcpu_manufacturer_model = { + } # DedicatedHostProfileVCPUManufacturer dedicated_host_profile_vcpu_manufacturer_model['type'] = 'fixed' dedicated_host_profile_vcpu_manufacturer_model['value'] = 'intel' # Construct a json representation of a DedicatedHostProfile model dedicated_host_profile_model_json = {} dedicated_host_profile_model_json['class'] = 'mx2' - dedicated_host_profile_model_json['disks'] = [dedicated_host_profile_disk_model] + dedicated_host_profile_model_json['disks'] = [ + dedicated_host_profile_disk_model + ] dedicated_host_profile_model_json['family'] = 'balanced' - dedicated_host_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_profile_model_json['memory'] = dedicated_host_profile_memory_model + dedicated_host_profile_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_profile_model_json[ + 'memory'] = dedicated_host_profile_memory_model dedicated_host_profile_model_json['name'] = 'mx2-host-152x1216' - dedicated_host_profile_model_json['socket_count'] = dedicated_host_profile_socket_model + dedicated_host_profile_model_json[ + 'socket_count'] = dedicated_host_profile_socket_model dedicated_host_profile_model_json['status'] = 'current' - dedicated_host_profile_model_json['supported_instance_profiles'] = [instance_profile_reference_model] - dedicated_host_profile_model_json['vcpu_architecture'] = dedicated_host_profile_vcpu_architecture_model - dedicated_host_profile_model_json['vcpu_count'] = dedicated_host_profile_vcpu_model - dedicated_host_profile_model_json['vcpu_manufacturer'] = dedicated_host_profile_vcpu_manufacturer_model + dedicated_host_profile_model_json['supported_instance_profiles'] = [ + instance_profile_reference_model + ] + dedicated_host_profile_model_json[ + 'vcpu_architecture'] = dedicated_host_profile_vcpu_architecture_model + dedicated_host_profile_model_json[ + 'vcpu_count'] = dedicated_host_profile_vcpu_model + dedicated_host_profile_model_json[ + 'vcpu_manufacturer'] = dedicated_host_profile_vcpu_manufacturer_model # Construct a model instance of DedicatedHostProfile by calling from_dict on the json representation - dedicated_host_profile_model = DedicatedHostProfile.from_dict(dedicated_host_profile_model_json) + dedicated_host_profile_model = DedicatedHostProfile.from_dict( + dedicated_host_profile_model_json) assert dedicated_host_profile_model != False # Construct a model instance of DedicatedHostProfile by calling from_dict on the json representation - dedicated_host_profile_model_dict = DedicatedHostProfile.from_dict(dedicated_host_profile_model_json).__dict__ - dedicated_host_profile_model2 = DedicatedHostProfile(**dedicated_host_profile_model_dict) + dedicated_host_profile_model_dict = DedicatedHostProfile.from_dict( + dedicated_host_profile_model_json).__dict__ + dedicated_host_profile_model2 = DedicatedHostProfile( + **dedicated_host_profile_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_model == dedicated_host_profile_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_model_json2 = dedicated_host_profile_model.to_dict() + dedicated_host_profile_model_json2 = dedicated_host_profile_model.to_dict( + ) assert dedicated_host_profile_model_json2 == dedicated_host_profile_model_json @@ -51585,48 +56427,66 @@ def test_dedicated_host_profile_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_profile_collection_first_model = {} # DedicatedHostProfileCollectionFirst - dedicated_host_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20' + dedicated_host_profile_collection_first_model = { + } # DedicatedHostProfileCollectionFirst + dedicated_host_profile_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20' - dedicated_host_profile_collection_next_model = {} # DedicatedHostProfileCollectionNext - dedicated_host_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20' + dedicated_host_profile_collection_next_model = { + } # DedicatedHostProfileCollectionNext + dedicated_host_profile_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20' - dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface + dedicated_host_profile_disk_interface_model = { + } # DedicatedHostProfileDiskInterface dedicated_host_profile_disk_interface_model['type'] = 'fixed' dedicated_host_profile_disk_interface_model['value'] = 'nvme' - dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity + dedicated_host_profile_disk_quantity_model = { + } # DedicatedHostProfileDiskQuantity dedicated_host_profile_disk_quantity_model['type'] = 'fixed' dedicated_host_profile_disk_quantity_model['value'] = 4 - dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize + dedicated_host_profile_disk_size_model = { + } # DedicatedHostProfileDiskSize dedicated_host_profile_disk_size_model['type'] = 'fixed' dedicated_host_profile_disk_size_model['value'] = 3200 - dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces + dedicated_host_profile_disk_supported_interfaces_model = { + } # DedicatedHostProfileDiskSupportedInterfaces dedicated_host_profile_disk_supported_interfaces_model['type'] = 'fixed' - dedicated_host_profile_disk_supported_interfaces_model['value'] = ['nvme'] + dedicated_host_profile_disk_supported_interfaces_model['value'] = [ + 'nvme' + ] dedicated_host_profile_disk_model = {} # DedicatedHostProfileDisk - dedicated_host_profile_disk_model['interface_type'] = dedicated_host_profile_disk_interface_model - dedicated_host_profile_disk_model['quantity'] = dedicated_host_profile_disk_quantity_model - dedicated_host_profile_disk_model['size'] = dedicated_host_profile_disk_size_model - dedicated_host_profile_disk_model['supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model - - dedicated_host_profile_memory_model = {} # DedicatedHostProfileMemoryFixed + dedicated_host_profile_disk_model[ + 'interface_type'] = dedicated_host_profile_disk_interface_model + dedicated_host_profile_disk_model[ + 'quantity'] = dedicated_host_profile_disk_quantity_model + dedicated_host_profile_disk_model[ + 'size'] = dedicated_host_profile_disk_size_model + dedicated_host_profile_disk_model[ + 'supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model + + dedicated_host_profile_memory_model = { + } # DedicatedHostProfileMemoryFixed dedicated_host_profile_memory_model['type'] = 'fixed' dedicated_host_profile_memory_model['value'] = 16 - dedicated_host_profile_socket_model = {} # DedicatedHostProfileSocketFixed + dedicated_host_profile_socket_model = { + } # DedicatedHostProfileSocketFixed dedicated_host_profile_socket_model['type'] = 'fixed' dedicated_host_profile_socket_model['value'] = 2 instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' - dedicated_host_profile_vcpu_architecture_model = {} # DedicatedHostProfileVCPUArchitecture + dedicated_host_profile_vcpu_architecture_model = { + } # DedicatedHostProfileVCPUArchitecture dedicated_host_profile_vcpu_architecture_model['type'] = 'fixed' dedicated_host_profile_vcpu_architecture_model['value'] = 'amd64' @@ -51634,45 +56494,64 @@ def test_dedicated_host_profile_collection_serialization(self): dedicated_host_profile_vcpu_model['type'] = 'fixed' dedicated_host_profile_vcpu_model['value'] = 16 - dedicated_host_profile_vcpu_manufacturer_model = {} # DedicatedHostProfileVCPUManufacturer + dedicated_host_profile_vcpu_manufacturer_model = { + } # DedicatedHostProfileVCPUManufacturer dedicated_host_profile_vcpu_manufacturer_model['type'] = 'fixed' dedicated_host_profile_vcpu_manufacturer_model['value'] = 'intel' dedicated_host_profile_model = {} # DedicatedHostProfile dedicated_host_profile_model['class'] = 'mx2' - dedicated_host_profile_model['disks'] = [dedicated_host_profile_disk_model] + dedicated_host_profile_model['disks'] = [ + dedicated_host_profile_disk_model + ] dedicated_host_profile_model['family'] = 'balanced' - dedicated_host_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_profile_model['memory'] = dedicated_host_profile_memory_model + dedicated_host_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_profile_model[ + 'memory'] = dedicated_host_profile_memory_model dedicated_host_profile_model['name'] = 'mx2-host-152x1216' - dedicated_host_profile_model['socket_count'] = dedicated_host_profile_socket_model + dedicated_host_profile_model[ + 'socket_count'] = dedicated_host_profile_socket_model dedicated_host_profile_model['status'] = 'current' - dedicated_host_profile_model['supported_instance_profiles'] = [instance_profile_reference_model] - dedicated_host_profile_model['vcpu_architecture'] = dedicated_host_profile_vcpu_architecture_model - dedicated_host_profile_model['vcpu_count'] = dedicated_host_profile_vcpu_model - dedicated_host_profile_model['vcpu_manufacturer'] = dedicated_host_profile_vcpu_manufacturer_model + dedicated_host_profile_model['supported_instance_profiles'] = [ + instance_profile_reference_model + ] + dedicated_host_profile_model[ + 'vcpu_architecture'] = dedicated_host_profile_vcpu_architecture_model + dedicated_host_profile_model[ + 'vcpu_count'] = dedicated_host_profile_vcpu_model + dedicated_host_profile_model[ + 'vcpu_manufacturer'] = dedicated_host_profile_vcpu_manufacturer_model # Construct a json representation of a DedicatedHostProfileCollection model dedicated_host_profile_collection_model_json = {} - dedicated_host_profile_collection_model_json['first'] = dedicated_host_profile_collection_first_model + dedicated_host_profile_collection_model_json[ + 'first'] = dedicated_host_profile_collection_first_model dedicated_host_profile_collection_model_json['limit'] = 20 - dedicated_host_profile_collection_model_json['next'] = dedicated_host_profile_collection_next_model - dedicated_host_profile_collection_model_json['profiles'] = [dedicated_host_profile_model] + dedicated_host_profile_collection_model_json[ + 'next'] = dedicated_host_profile_collection_next_model + dedicated_host_profile_collection_model_json['profiles'] = [ + dedicated_host_profile_model + ] dedicated_host_profile_collection_model_json['total_count'] = 132 # Construct a model instance of DedicatedHostProfileCollection by calling from_dict on the json representation - dedicated_host_profile_collection_model = DedicatedHostProfileCollection.from_dict(dedicated_host_profile_collection_model_json) + dedicated_host_profile_collection_model = DedicatedHostProfileCollection.from_dict( + dedicated_host_profile_collection_model_json) assert dedicated_host_profile_collection_model != False # Construct a model instance of DedicatedHostProfileCollection by calling from_dict on the json representation - dedicated_host_profile_collection_model_dict = DedicatedHostProfileCollection.from_dict(dedicated_host_profile_collection_model_json).__dict__ - dedicated_host_profile_collection_model2 = DedicatedHostProfileCollection(**dedicated_host_profile_collection_model_dict) + dedicated_host_profile_collection_model_dict = DedicatedHostProfileCollection.from_dict( + dedicated_host_profile_collection_model_json).__dict__ + dedicated_host_profile_collection_model2 = DedicatedHostProfileCollection( + **dedicated_host_profile_collection_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_collection_model == dedicated_host_profile_collection_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_collection_model_json2 = dedicated_host_profile_collection_model.to_dict() + dedicated_host_profile_collection_model_json2 = dedicated_host_profile_collection_model.to_dict( + ) assert dedicated_host_profile_collection_model_json2 == dedicated_host_profile_collection_model_json @@ -51688,21 +56567,26 @@ def test_dedicated_host_profile_collection_first_serialization(self): # Construct a json representation of a DedicatedHostProfileCollectionFirst model dedicated_host_profile_collection_first_model_json = {} - dedicated_host_profile_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20' + dedicated_host_profile_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20' # Construct a model instance of DedicatedHostProfileCollectionFirst by calling from_dict on the json representation - dedicated_host_profile_collection_first_model = DedicatedHostProfileCollectionFirst.from_dict(dedicated_host_profile_collection_first_model_json) + dedicated_host_profile_collection_first_model = DedicatedHostProfileCollectionFirst.from_dict( + dedicated_host_profile_collection_first_model_json) assert dedicated_host_profile_collection_first_model != False # Construct a model instance of DedicatedHostProfileCollectionFirst by calling from_dict on the json representation - dedicated_host_profile_collection_first_model_dict = DedicatedHostProfileCollectionFirst.from_dict(dedicated_host_profile_collection_first_model_json).__dict__ - dedicated_host_profile_collection_first_model2 = DedicatedHostProfileCollectionFirst(**dedicated_host_profile_collection_first_model_dict) + dedicated_host_profile_collection_first_model_dict = DedicatedHostProfileCollectionFirst.from_dict( + dedicated_host_profile_collection_first_model_json).__dict__ + dedicated_host_profile_collection_first_model2 = DedicatedHostProfileCollectionFirst( + **dedicated_host_profile_collection_first_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_collection_first_model == dedicated_host_profile_collection_first_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_collection_first_model_json2 = dedicated_host_profile_collection_first_model.to_dict() + dedicated_host_profile_collection_first_model_json2 = dedicated_host_profile_collection_first_model.to_dict( + ) assert dedicated_host_profile_collection_first_model_json2 == dedicated_host_profile_collection_first_model_json @@ -51718,21 +56602,26 @@ def test_dedicated_host_profile_collection_next_serialization(self): # Construct a json representation of a DedicatedHostProfileCollectionNext model dedicated_host_profile_collection_next_model_json = {} - dedicated_host_profile_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20' + dedicated_host_profile_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20' # Construct a model instance of DedicatedHostProfileCollectionNext by calling from_dict on the json representation - dedicated_host_profile_collection_next_model = DedicatedHostProfileCollectionNext.from_dict(dedicated_host_profile_collection_next_model_json) + dedicated_host_profile_collection_next_model = DedicatedHostProfileCollectionNext.from_dict( + dedicated_host_profile_collection_next_model_json) assert dedicated_host_profile_collection_next_model != False # Construct a model instance of DedicatedHostProfileCollectionNext by calling from_dict on the json representation - dedicated_host_profile_collection_next_model_dict = DedicatedHostProfileCollectionNext.from_dict(dedicated_host_profile_collection_next_model_json).__dict__ - dedicated_host_profile_collection_next_model2 = DedicatedHostProfileCollectionNext(**dedicated_host_profile_collection_next_model_dict) + dedicated_host_profile_collection_next_model_dict = DedicatedHostProfileCollectionNext.from_dict( + dedicated_host_profile_collection_next_model_json).__dict__ + dedicated_host_profile_collection_next_model2 = DedicatedHostProfileCollectionNext( + **dedicated_host_profile_collection_next_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_collection_next_model == dedicated_host_profile_collection_next_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_collection_next_model_json2 = dedicated_host_profile_collection_next_model.to_dict() + dedicated_host_profile_collection_next_model_json2 = dedicated_host_profile_collection_next_model.to_dict( + ) assert dedicated_host_profile_collection_next_model_json2 == dedicated_host_profile_collection_next_model_json @@ -51748,42 +56637,56 @@ def test_dedicated_host_profile_disk_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface + dedicated_host_profile_disk_interface_model = { + } # DedicatedHostProfileDiskInterface dedicated_host_profile_disk_interface_model['type'] = 'fixed' dedicated_host_profile_disk_interface_model['value'] = 'nvme' - dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity + dedicated_host_profile_disk_quantity_model = { + } # DedicatedHostProfileDiskQuantity dedicated_host_profile_disk_quantity_model['type'] = 'fixed' dedicated_host_profile_disk_quantity_model['value'] = 4 - dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize + dedicated_host_profile_disk_size_model = { + } # DedicatedHostProfileDiskSize dedicated_host_profile_disk_size_model['type'] = 'fixed' dedicated_host_profile_disk_size_model['value'] = 3200 - dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces + dedicated_host_profile_disk_supported_interfaces_model = { + } # DedicatedHostProfileDiskSupportedInterfaces dedicated_host_profile_disk_supported_interfaces_model['type'] = 'fixed' - dedicated_host_profile_disk_supported_interfaces_model['value'] = ['nvme'] + dedicated_host_profile_disk_supported_interfaces_model['value'] = [ + 'nvme' + ] # Construct a json representation of a DedicatedHostProfileDisk model dedicated_host_profile_disk_model_json = {} - dedicated_host_profile_disk_model_json['interface_type'] = dedicated_host_profile_disk_interface_model - dedicated_host_profile_disk_model_json['quantity'] = dedicated_host_profile_disk_quantity_model - dedicated_host_profile_disk_model_json['size'] = dedicated_host_profile_disk_size_model - dedicated_host_profile_disk_model_json['supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model + dedicated_host_profile_disk_model_json[ + 'interface_type'] = dedicated_host_profile_disk_interface_model + dedicated_host_profile_disk_model_json[ + 'quantity'] = dedicated_host_profile_disk_quantity_model + dedicated_host_profile_disk_model_json[ + 'size'] = dedicated_host_profile_disk_size_model + dedicated_host_profile_disk_model_json[ + 'supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model # Construct a model instance of DedicatedHostProfileDisk by calling from_dict on the json representation - dedicated_host_profile_disk_model = DedicatedHostProfileDisk.from_dict(dedicated_host_profile_disk_model_json) + dedicated_host_profile_disk_model = DedicatedHostProfileDisk.from_dict( + dedicated_host_profile_disk_model_json) assert dedicated_host_profile_disk_model != False # Construct a model instance of DedicatedHostProfileDisk by calling from_dict on the json representation - dedicated_host_profile_disk_model_dict = DedicatedHostProfileDisk.from_dict(dedicated_host_profile_disk_model_json).__dict__ - dedicated_host_profile_disk_model2 = DedicatedHostProfileDisk(**dedicated_host_profile_disk_model_dict) + dedicated_host_profile_disk_model_dict = DedicatedHostProfileDisk.from_dict( + dedicated_host_profile_disk_model_json).__dict__ + dedicated_host_profile_disk_model2 = DedicatedHostProfileDisk( + **dedicated_host_profile_disk_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_disk_model == dedicated_host_profile_disk_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_disk_model_json2 = dedicated_host_profile_disk_model.to_dict() + dedicated_host_profile_disk_model_json2 = dedicated_host_profile_disk_model.to_dict( + ) assert dedicated_host_profile_disk_model_json2 == dedicated_host_profile_disk_model_json @@ -51803,18 +56706,22 @@ def test_dedicated_host_profile_disk_interface_serialization(self): dedicated_host_profile_disk_interface_model_json['value'] = 'nvme' # Construct a model instance of DedicatedHostProfileDiskInterface by calling from_dict on the json representation - dedicated_host_profile_disk_interface_model = DedicatedHostProfileDiskInterface.from_dict(dedicated_host_profile_disk_interface_model_json) + dedicated_host_profile_disk_interface_model = DedicatedHostProfileDiskInterface.from_dict( + dedicated_host_profile_disk_interface_model_json) assert dedicated_host_profile_disk_interface_model != False # Construct a model instance of DedicatedHostProfileDiskInterface by calling from_dict on the json representation - dedicated_host_profile_disk_interface_model_dict = DedicatedHostProfileDiskInterface.from_dict(dedicated_host_profile_disk_interface_model_json).__dict__ - dedicated_host_profile_disk_interface_model2 = DedicatedHostProfileDiskInterface(**dedicated_host_profile_disk_interface_model_dict) + dedicated_host_profile_disk_interface_model_dict = DedicatedHostProfileDiskInterface.from_dict( + dedicated_host_profile_disk_interface_model_json).__dict__ + dedicated_host_profile_disk_interface_model2 = DedicatedHostProfileDiskInterface( + **dedicated_host_profile_disk_interface_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_disk_interface_model == dedicated_host_profile_disk_interface_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_disk_interface_model_json2 = dedicated_host_profile_disk_interface_model.to_dict() + dedicated_host_profile_disk_interface_model_json2 = dedicated_host_profile_disk_interface_model.to_dict( + ) assert dedicated_host_profile_disk_interface_model_json2 == dedicated_host_profile_disk_interface_model_json @@ -51834,18 +56741,22 @@ def test_dedicated_host_profile_disk_quantity_serialization(self): dedicated_host_profile_disk_quantity_model_json['value'] = 4 # Construct a model instance of DedicatedHostProfileDiskQuantity by calling from_dict on the json representation - dedicated_host_profile_disk_quantity_model = DedicatedHostProfileDiskQuantity.from_dict(dedicated_host_profile_disk_quantity_model_json) + dedicated_host_profile_disk_quantity_model = DedicatedHostProfileDiskQuantity.from_dict( + dedicated_host_profile_disk_quantity_model_json) assert dedicated_host_profile_disk_quantity_model != False # Construct a model instance of DedicatedHostProfileDiskQuantity by calling from_dict on the json representation - dedicated_host_profile_disk_quantity_model_dict = DedicatedHostProfileDiskQuantity.from_dict(dedicated_host_profile_disk_quantity_model_json).__dict__ - dedicated_host_profile_disk_quantity_model2 = DedicatedHostProfileDiskQuantity(**dedicated_host_profile_disk_quantity_model_dict) + dedicated_host_profile_disk_quantity_model_dict = DedicatedHostProfileDiskQuantity.from_dict( + dedicated_host_profile_disk_quantity_model_json).__dict__ + dedicated_host_profile_disk_quantity_model2 = DedicatedHostProfileDiskQuantity( + **dedicated_host_profile_disk_quantity_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_disk_quantity_model == dedicated_host_profile_disk_quantity_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_disk_quantity_model_json2 = dedicated_host_profile_disk_quantity_model.to_dict() + dedicated_host_profile_disk_quantity_model_json2 = dedicated_host_profile_disk_quantity_model.to_dict( + ) assert dedicated_host_profile_disk_quantity_model_json2 == dedicated_host_profile_disk_quantity_model_json @@ -51865,18 +56776,22 @@ def test_dedicated_host_profile_disk_size_serialization(self): dedicated_host_profile_disk_size_model_json['value'] = 3200 # Construct a model instance of DedicatedHostProfileDiskSize by calling from_dict on the json representation - dedicated_host_profile_disk_size_model = DedicatedHostProfileDiskSize.from_dict(dedicated_host_profile_disk_size_model_json) + dedicated_host_profile_disk_size_model = DedicatedHostProfileDiskSize.from_dict( + dedicated_host_profile_disk_size_model_json) assert dedicated_host_profile_disk_size_model != False # Construct a model instance of DedicatedHostProfileDiskSize by calling from_dict on the json representation - dedicated_host_profile_disk_size_model_dict = DedicatedHostProfileDiskSize.from_dict(dedicated_host_profile_disk_size_model_json).__dict__ - dedicated_host_profile_disk_size_model2 = DedicatedHostProfileDiskSize(**dedicated_host_profile_disk_size_model_dict) + dedicated_host_profile_disk_size_model_dict = DedicatedHostProfileDiskSize.from_dict( + dedicated_host_profile_disk_size_model_json).__dict__ + dedicated_host_profile_disk_size_model2 = DedicatedHostProfileDiskSize( + **dedicated_host_profile_disk_size_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_disk_size_model == dedicated_host_profile_disk_size_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_disk_size_model_json2 = dedicated_host_profile_disk_size_model.to_dict() + dedicated_host_profile_disk_size_model_json2 = dedicated_host_profile_disk_size_model.to_dict( + ) assert dedicated_host_profile_disk_size_model_json2 == dedicated_host_profile_disk_size_model_json @@ -51885,29 +56800,38 @@ class TestModel_DedicatedHostProfileDiskSupportedInterfaces: Test Class for DedicatedHostProfileDiskSupportedInterfaces """ - def test_dedicated_host_profile_disk_supported_interfaces_serialization(self): + def test_dedicated_host_profile_disk_supported_interfaces_serialization( + self): """ Test serialization/deserialization for DedicatedHostProfileDiskSupportedInterfaces """ # Construct a json representation of a DedicatedHostProfileDiskSupportedInterfaces model dedicated_host_profile_disk_supported_interfaces_model_json = {} - dedicated_host_profile_disk_supported_interfaces_model_json['type'] = 'fixed' - dedicated_host_profile_disk_supported_interfaces_model_json['value'] = ['nvme'] + dedicated_host_profile_disk_supported_interfaces_model_json[ + 'type'] = 'fixed' + dedicated_host_profile_disk_supported_interfaces_model_json['value'] = [ + 'nvme' + ] # Construct a model instance of DedicatedHostProfileDiskSupportedInterfaces by calling from_dict on the json representation - dedicated_host_profile_disk_supported_interfaces_model = DedicatedHostProfileDiskSupportedInterfaces.from_dict(dedicated_host_profile_disk_supported_interfaces_model_json) + dedicated_host_profile_disk_supported_interfaces_model = DedicatedHostProfileDiskSupportedInterfaces.from_dict( + dedicated_host_profile_disk_supported_interfaces_model_json) assert dedicated_host_profile_disk_supported_interfaces_model != False # Construct a model instance of DedicatedHostProfileDiskSupportedInterfaces by calling from_dict on the json representation - dedicated_host_profile_disk_supported_interfaces_model_dict = DedicatedHostProfileDiskSupportedInterfaces.from_dict(dedicated_host_profile_disk_supported_interfaces_model_json).__dict__ - dedicated_host_profile_disk_supported_interfaces_model2 = DedicatedHostProfileDiskSupportedInterfaces(**dedicated_host_profile_disk_supported_interfaces_model_dict) + dedicated_host_profile_disk_supported_interfaces_model_dict = DedicatedHostProfileDiskSupportedInterfaces.from_dict( + dedicated_host_profile_disk_supported_interfaces_model_json + ).__dict__ + dedicated_host_profile_disk_supported_interfaces_model2 = DedicatedHostProfileDiskSupportedInterfaces( + **dedicated_host_profile_disk_supported_interfaces_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_disk_supported_interfaces_model == dedicated_host_profile_disk_supported_interfaces_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_disk_supported_interfaces_model_json2 = dedicated_host_profile_disk_supported_interfaces_model.to_dict() + dedicated_host_profile_disk_supported_interfaces_model_json2 = dedicated_host_profile_disk_supported_interfaces_model.to_dict( + ) assert dedicated_host_profile_disk_supported_interfaces_model_json2 == dedicated_host_profile_disk_supported_interfaces_model_json @@ -51923,22 +56847,28 @@ def test_dedicated_host_profile_reference_serialization(self): # Construct a json representation of a DedicatedHostProfileReference model dedicated_host_profile_reference_model_json = {} - dedicated_host_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_profile_reference_model_json['name'] = 'mx2-host-152x1216' + dedicated_host_profile_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_profile_reference_model_json[ + 'name'] = 'mx2-host-152x1216' # Construct a model instance of DedicatedHostProfileReference by calling from_dict on the json representation - dedicated_host_profile_reference_model = DedicatedHostProfileReference.from_dict(dedicated_host_profile_reference_model_json) + dedicated_host_profile_reference_model = DedicatedHostProfileReference.from_dict( + dedicated_host_profile_reference_model_json) assert dedicated_host_profile_reference_model != False # Construct a model instance of DedicatedHostProfileReference by calling from_dict on the json representation - dedicated_host_profile_reference_model_dict = DedicatedHostProfileReference.from_dict(dedicated_host_profile_reference_model_json).__dict__ - dedicated_host_profile_reference_model2 = DedicatedHostProfileReference(**dedicated_host_profile_reference_model_dict) + dedicated_host_profile_reference_model_dict = DedicatedHostProfileReference.from_dict( + dedicated_host_profile_reference_model_json).__dict__ + dedicated_host_profile_reference_model2 = DedicatedHostProfileReference( + **dedicated_host_profile_reference_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_reference_model == dedicated_host_profile_reference_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_reference_model_json2 = dedicated_host_profile_reference_model.to_dict() + dedicated_host_profile_reference_model_json2 = dedicated_host_profile_reference_model.to_dict( + ) assert dedicated_host_profile_reference_model_json2 == dedicated_host_profile_reference_model_json @@ -51958,18 +56888,22 @@ def test_dedicated_host_profile_vcpu_architecture_serialization(self): dedicated_host_profile_vcpu_architecture_model_json['value'] = 'amd64' # Construct a model instance of DedicatedHostProfileVCPUArchitecture by calling from_dict on the json representation - dedicated_host_profile_vcpu_architecture_model = DedicatedHostProfileVCPUArchitecture.from_dict(dedicated_host_profile_vcpu_architecture_model_json) + dedicated_host_profile_vcpu_architecture_model = DedicatedHostProfileVCPUArchitecture.from_dict( + dedicated_host_profile_vcpu_architecture_model_json) assert dedicated_host_profile_vcpu_architecture_model != False # Construct a model instance of DedicatedHostProfileVCPUArchitecture by calling from_dict on the json representation - dedicated_host_profile_vcpu_architecture_model_dict = DedicatedHostProfileVCPUArchitecture.from_dict(dedicated_host_profile_vcpu_architecture_model_json).__dict__ - dedicated_host_profile_vcpu_architecture_model2 = DedicatedHostProfileVCPUArchitecture(**dedicated_host_profile_vcpu_architecture_model_dict) + dedicated_host_profile_vcpu_architecture_model_dict = DedicatedHostProfileVCPUArchitecture.from_dict( + dedicated_host_profile_vcpu_architecture_model_json).__dict__ + dedicated_host_profile_vcpu_architecture_model2 = DedicatedHostProfileVCPUArchitecture( + **dedicated_host_profile_vcpu_architecture_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_vcpu_architecture_model == dedicated_host_profile_vcpu_architecture_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_vcpu_architecture_model_json2 = dedicated_host_profile_vcpu_architecture_model.to_dict() + dedicated_host_profile_vcpu_architecture_model_json2 = dedicated_host_profile_vcpu_architecture_model.to_dict( + ) assert dedicated_host_profile_vcpu_architecture_model_json2 == dedicated_host_profile_vcpu_architecture_model_json @@ -51989,18 +56923,22 @@ def test_dedicated_host_profile_vcpu_manufacturer_serialization(self): dedicated_host_profile_vcpu_manufacturer_model_json['value'] = 'intel' # Construct a model instance of DedicatedHostProfileVCPUManufacturer by calling from_dict on the json representation - dedicated_host_profile_vcpu_manufacturer_model = DedicatedHostProfileVCPUManufacturer.from_dict(dedicated_host_profile_vcpu_manufacturer_model_json) + dedicated_host_profile_vcpu_manufacturer_model = DedicatedHostProfileVCPUManufacturer.from_dict( + dedicated_host_profile_vcpu_manufacturer_model_json) assert dedicated_host_profile_vcpu_manufacturer_model != False # Construct a model instance of DedicatedHostProfileVCPUManufacturer by calling from_dict on the json representation - dedicated_host_profile_vcpu_manufacturer_model_dict = DedicatedHostProfileVCPUManufacturer.from_dict(dedicated_host_profile_vcpu_manufacturer_model_json).__dict__ - dedicated_host_profile_vcpu_manufacturer_model2 = DedicatedHostProfileVCPUManufacturer(**dedicated_host_profile_vcpu_manufacturer_model_dict) + dedicated_host_profile_vcpu_manufacturer_model_dict = DedicatedHostProfileVCPUManufacturer.from_dict( + dedicated_host_profile_vcpu_manufacturer_model_json).__dict__ + dedicated_host_profile_vcpu_manufacturer_model2 = DedicatedHostProfileVCPUManufacturer( + **dedicated_host_profile_vcpu_manufacturer_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_vcpu_manufacturer_model == dedicated_host_profile_vcpu_manufacturer_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_vcpu_manufacturer_model_json2 = dedicated_host_profile_vcpu_manufacturer_model.to_dict() + dedicated_host_profile_vcpu_manufacturer_model_json2 = dedicated_host_profile_vcpu_manufacturer_model.to_dict( + ) assert dedicated_host_profile_vcpu_manufacturer_model_json2 == dedicated_host_profile_vcpu_manufacturer_model_json @@ -52016,31 +56954,41 @@ def test_dedicated_host_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted - dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_reference_deleted_model = { + } # DedicatedHostReferenceDeleted + dedicated_host_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a DedicatedHostReference model dedicated_host_reference_model_json = {} - dedicated_host_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model_json['deleted'] = dedicated_host_reference_deleted_model - dedicated_host_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model_json['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model_json[ + 'deleted'] = dedicated_host_reference_deleted_model + dedicated_host_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model_json[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model_json['name'] = 'my-host' dedicated_host_reference_model_json['resource_type'] = 'dedicated_host' # Construct a model instance of DedicatedHostReference by calling from_dict on the json representation - dedicated_host_reference_model = DedicatedHostReference.from_dict(dedicated_host_reference_model_json) + dedicated_host_reference_model = DedicatedHostReference.from_dict( + dedicated_host_reference_model_json) assert dedicated_host_reference_model != False # Construct a model instance of DedicatedHostReference by calling from_dict on the json representation - dedicated_host_reference_model_dict = DedicatedHostReference.from_dict(dedicated_host_reference_model_json).__dict__ - dedicated_host_reference_model2 = DedicatedHostReference(**dedicated_host_reference_model_dict) + dedicated_host_reference_model_dict = DedicatedHostReference.from_dict( + dedicated_host_reference_model_json).__dict__ + dedicated_host_reference_model2 = DedicatedHostReference( + **dedicated_host_reference_model_dict) # Verify the model instances are equivalent assert dedicated_host_reference_model == dedicated_host_reference_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_reference_model_json2 = dedicated_host_reference_model.to_dict() + dedicated_host_reference_model_json2 = dedicated_host_reference_model.to_dict( + ) assert dedicated_host_reference_model_json2 == dedicated_host_reference_model_json @@ -52056,21 +57004,26 @@ def test_dedicated_host_reference_deleted_serialization(self): # Construct a json representation of a DedicatedHostReferenceDeleted model dedicated_host_reference_deleted_model_json = {} - dedicated_host_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of DedicatedHostReferenceDeleted by calling from_dict on the json representation - dedicated_host_reference_deleted_model = DedicatedHostReferenceDeleted.from_dict(dedicated_host_reference_deleted_model_json) + dedicated_host_reference_deleted_model = DedicatedHostReferenceDeleted.from_dict( + dedicated_host_reference_deleted_model_json) assert dedicated_host_reference_deleted_model != False # Construct a model instance of DedicatedHostReferenceDeleted by calling from_dict on the json representation - dedicated_host_reference_deleted_model_dict = DedicatedHostReferenceDeleted.from_dict(dedicated_host_reference_deleted_model_json).__dict__ - dedicated_host_reference_deleted_model2 = DedicatedHostReferenceDeleted(**dedicated_host_reference_deleted_model_dict) + dedicated_host_reference_deleted_model_dict = DedicatedHostReferenceDeleted.from_dict( + dedicated_host_reference_deleted_model_json).__dict__ + dedicated_host_reference_deleted_model2 = DedicatedHostReferenceDeleted( + **dedicated_host_reference_deleted_model_dict) # Verify the model instances are equivalent assert dedicated_host_reference_deleted_model == dedicated_host_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_reference_deleted_model_json2 = dedicated_host_reference_deleted_model.to_dict() + dedicated_host_reference_deleted_model_json2 = dedicated_host_reference_deleted_model.to_dict( + ) assert dedicated_host_reference_deleted_model_json2 == dedicated_host_reference_deleted_model_json @@ -52087,27 +57040,37 @@ def test_default_network_acl_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' - network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP + network_acl_rule_item_model = { + } # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP network_acl_rule_item_model['action'] = 'allow' network_acl_rule_item_model['before'] = network_acl_rule_reference_model network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z' network_acl_rule_item_model['destination'] = '192.168.3.0/24' network_acl_rule_item_model['direction'] = 'inbound' - network_acl_rule_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_item_model['ip_version'] = 'ipv4' network_acl_rule_item_model['name'] = 'my-rule-1' network_acl_rule_item_model['source'] = '192.168.3.0/24' @@ -52118,23 +57081,30 @@ def test_default_network_acl_serialization(self): network_acl_rule_item_model['source_port_min'] = 49152 subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -52142,22 +57112,30 @@ def test_default_network_acl_serialization(self): # Construct a json representation of a DefaultNetworkACL model default_network_acl_model_json = {} default_network_acl_model_json['created_at'] = '2019-01-01T12:00:00Z' - default_network_acl_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - default_network_acl_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - default_network_acl_model_json['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - default_network_acl_model_json['name'] = 'mnemonic-ersatz-eatery-mythology' - default_network_acl_model_json['resource_group'] = resource_group_reference_model + default_network_acl_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + default_network_acl_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + default_network_acl_model_json[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + default_network_acl_model_json[ + 'name'] = 'mnemonic-ersatz-eatery-mythology' + default_network_acl_model_json[ + 'resource_group'] = resource_group_reference_model default_network_acl_model_json['rules'] = [network_acl_rule_item_model] default_network_acl_model_json['subnets'] = [subnet_reference_model] default_network_acl_model_json['vpc'] = vpc_reference_model # Construct a model instance of DefaultNetworkACL by calling from_dict on the json representation - default_network_acl_model = DefaultNetworkACL.from_dict(default_network_acl_model_json) + default_network_acl_model = DefaultNetworkACL.from_dict( + default_network_acl_model_json) assert default_network_acl_model != False # Construct a model instance of DefaultNetworkACL by calling from_dict on the json representation - default_network_acl_model_dict = DefaultNetworkACL.from_dict(default_network_acl_model_json).__dict__ - default_network_acl_model2 = DefaultNetworkACL(**default_network_acl_model_dict) + default_network_acl_model_dict = DefaultNetworkACL.from_dict( + default_network_acl_model_json).__dict__ + default_network_acl_model2 = DefaultNetworkACL( + **default_network_acl_model_dict) # Verify the model instances are equivalent assert default_network_acl_model == default_network_acl_model2 @@ -52183,32 +57161,45 @@ def test_default_routing_table_serialization(self): resource_filter_model['resource_type'] = 'vpn_gateway' route_reference_deleted_model = {} # RouteReferenceDeleted - route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + route_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' route_reference_model = {} # RouteReference route_reference_model['deleted'] = route_reference_deleted_model - route_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-ae54c371-56be-4306-91bd-bb64df239d69' - route_reference_model['id'] = 'r006-ae54c371-56be-4306-91bd-bb64df239d69' + route_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-ae54c371-56be-4306-91bd-bb64df239d69' + route_reference_model[ + 'id'] = 'r006-ae54c371-56be-4306-91bd-bb64df239d69' route_reference_model['name'] = 'my-route-1' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-8722d01c-9c78-4555-82b5-53ad1266f959' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-8722d01c-9c78-4555-82b5-53ad1266f959' - subnet_reference_model['id'] = '0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'id'] = '0717-8722d01c-9c78-4555-82b5-53ad1266f959' subnet_reference_model['name'] = 'my-subnet-1' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a DefaultRoutingTable model default_routing_table_model_json = {} - default_routing_table_model_json['accept_routes_from'] = [resource_filter_model] - default_routing_table_model_json['advertise_routes_to'] = ['transit_gateway', 'direct_link'] + default_routing_table_model_json['accept_routes_from'] = [ + resource_filter_model + ] + default_routing_table_model_json['advertise_routes_to'] = [ + 'transit_gateway', 'direct_link' + ] default_routing_table_model_json['created_at'] = '2019-01-01T12:00:00Z' - default_routing_table_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - default_routing_table_model_json['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + default_routing_table_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + default_routing_table_model_json[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' default_routing_table_model_json['is_default'] = True default_routing_table_model_json['lifecycle_state'] = 'stable' default_routing_table_model_json['name'] = 'milled-easy-equine-machines' @@ -52221,18 +57212,22 @@ def test_default_routing_table_serialization(self): default_routing_table_model_json['subnets'] = [subnet_reference_model] # Construct a model instance of DefaultRoutingTable by calling from_dict on the json representation - default_routing_table_model = DefaultRoutingTable.from_dict(default_routing_table_model_json) + default_routing_table_model = DefaultRoutingTable.from_dict( + default_routing_table_model_json) assert default_routing_table_model != False # Construct a model instance of DefaultRoutingTable by calling from_dict on the json representation - default_routing_table_model_dict = DefaultRoutingTable.from_dict(default_routing_table_model_json).__dict__ - default_routing_table_model2 = DefaultRoutingTable(**default_routing_table_model_dict) + default_routing_table_model_dict = DefaultRoutingTable.from_dict( + default_routing_table_model_json).__dict__ + default_routing_table_model2 = DefaultRoutingTable( + **default_routing_table_model_dict) # Verify the model instances are equivalent assert default_routing_table_model == default_routing_table_model2 # Convert model instance back to dict and verify no loss of data - default_routing_table_model_json2 = default_routing_table_model.to_dict() + default_routing_table_model_json2 = default_routing_table_model.to_dict( + ) assert default_routing_table_model_json2 == default_routing_table_model_json @@ -52249,8 +57244,10 @@ def test_default_security_group_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' security_group_rule_local_model = {} # SecurityGroupRuleLocalIP @@ -52259,32 +57256,45 @@ def test_default_security_group_serialization(self): security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP security_group_rule_remote_model['address'] = '192.168.3.4' - security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll + security_group_rule_model = { + } # SecurityGroupRuleSecurityGroupRuleProtocolAll security_group_rule_model['direction'] = 'inbound' - security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model security_group_rule_model['remote'] = security_group_rule_remote_model security_group_rule_model['protocol'] = 'all' - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext - security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model - security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['name'] = 'my-instance-network-interface' - security_group_target_reference_model['resource_type'] = 'network_interface' + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + security_group_target_reference_model = { + } # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext + security_group_target_reference_model[ + 'deleted'] = network_interface_reference_target_context_deleted_model + security_group_target_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'name'] = 'my-instance-network-interface' + security_group_target_reference_model[ + 'resource_type'] = 'network_interface' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -52292,28 +57302,39 @@ def test_default_security_group_serialization(self): # Construct a json representation of a DefaultSecurityGroup model default_security_group_model_json = {} default_security_group_model_json['created_at'] = '2019-01-01T12:00:00Z' - default_security_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - default_security_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - default_security_group_model_json['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - default_security_group_model_json['name'] = 'observant-chip-emphatic-engraver' - default_security_group_model_json['resource_group'] = resource_group_reference_model + default_security_group_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + default_security_group_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + default_security_group_model_json[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + default_security_group_model_json[ + 'name'] = 'observant-chip-emphatic-engraver' + default_security_group_model_json[ + 'resource_group'] = resource_group_reference_model default_security_group_model_json['rules'] = [security_group_rule_model] - default_security_group_model_json['targets'] = [security_group_target_reference_model] + default_security_group_model_json['targets'] = [ + security_group_target_reference_model + ] default_security_group_model_json['vpc'] = vpc_reference_model # Construct a model instance of DefaultSecurityGroup by calling from_dict on the json representation - default_security_group_model = DefaultSecurityGroup.from_dict(default_security_group_model_json) + default_security_group_model = DefaultSecurityGroup.from_dict( + default_security_group_model_json) assert default_security_group_model != False # Construct a model instance of DefaultSecurityGroup by calling from_dict on the json representation - default_security_group_model_dict = DefaultSecurityGroup.from_dict(default_security_group_model_json).__dict__ - default_security_group_model2 = DefaultSecurityGroup(**default_security_group_model_dict) + default_security_group_model_dict = DefaultSecurityGroup.from_dict( + default_security_group_model_json).__dict__ + default_security_group_model2 = DefaultSecurityGroup( + **default_security_group_model_dict) # Verify the model instances are equivalent assert default_security_group_model == default_security_group_model2 # Convert model instance back to dict and verify no loss of data - default_security_group_model_json2 = default_security_group_model.to_dict() + default_security_group_model_json2 = default_security_group_model.to_dict( + ) assert default_security_group_model_json2 == default_security_group_model_json @@ -52329,21 +57350,26 @@ def test_encryption_key_reference_serialization(self): # Construct a json representation of a EncryptionKeyReference model encryption_key_reference_model_json = {} - encryption_key_reference_model_json['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a model instance of EncryptionKeyReference by calling from_dict on the json representation - encryption_key_reference_model = EncryptionKeyReference.from_dict(encryption_key_reference_model_json) + encryption_key_reference_model = EncryptionKeyReference.from_dict( + encryption_key_reference_model_json) assert encryption_key_reference_model != False # Construct a model instance of EncryptionKeyReference by calling from_dict on the json representation - encryption_key_reference_model_dict = EncryptionKeyReference.from_dict(encryption_key_reference_model_json).__dict__ - encryption_key_reference_model2 = EncryptionKeyReference(**encryption_key_reference_model_dict) + encryption_key_reference_model_dict = EncryptionKeyReference.from_dict( + encryption_key_reference_model_json).__dict__ + encryption_key_reference_model2 = EncryptionKeyReference( + **encryption_key_reference_model_dict) # Verify the model instances are equivalent assert encryption_key_reference_model == encryption_key_reference_model2 # Convert model instance back to dict and verify no loss of data - encryption_key_reference_model_json2 = encryption_key_reference_model.to_dict() + encryption_key_reference_model_json2 = encryption_key_reference_model.to_dict( + ) assert encryption_key_reference_model_json2 == encryption_key_reference_model_json @@ -52360,47 +57386,69 @@ def test_endpoint_gateway_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - endpoint_gateway_lifecycle_reason_model = {} # EndpointGatewayLifecycleReason - endpoint_gateway_lifecycle_reason_model['code'] = 'dns_resolution_binding_pending' - endpoint_gateway_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - endpoint_gateway_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + endpoint_gateway_lifecycle_reason_model = { + } # EndpointGatewayLifecycleReason + endpoint_gateway_lifecycle_reason_model[ + 'code'] = 'dns_resolution_binding_pending' + endpoint_gateway_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + endpoint_gateway_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' - endpoint_gateway_target_model = {} # EndpointGatewayTargetProviderCloudServiceReference - endpoint_gateway_target_model['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' - endpoint_gateway_target_model['resource_type'] = 'provider_cloud_service' + endpoint_gateway_target_model = { + } # EndpointGatewayTargetProviderCloudServiceReference + endpoint_gateway_target_model[ + 'crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' + endpoint_gateway_target_model[ + 'resource_type'] = 'provider_cloud_service' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -52409,28 +57457,41 @@ def test_endpoint_gateway_serialization(self): endpoint_gateway_model_json = {} endpoint_gateway_model_json['allow_dns_resolution_binding'] = True endpoint_gateway_model_json['created_at'] = '2019-01-01T12:00:00Z' - endpoint_gateway_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' endpoint_gateway_model_json['health_state'] = 'ok' - endpoint_gateway_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_model_json['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_model_json[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' endpoint_gateway_model_json['ips'] = [reserved_ip_reference_model] - endpoint_gateway_model_json['lifecycle_reasons'] = [endpoint_gateway_lifecycle_reason_model] + endpoint_gateway_model_json['lifecycle_reasons'] = [ + endpoint_gateway_lifecycle_reason_model + ] endpoint_gateway_model_json['lifecycle_state'] = 'stable' endpoint_gateway_model_json['name'] = 'my-endpoint-gateway' - endpoint_gateway_model_json['resource_group'] = resource_group_reference_model + endpoint_gateway_model_json[ + 'resource_group'] = resource_group_reference_model endpoint_gateway_model_json['resource_type'] = 'endpoint_gateway' - endpoint_gateway_model_json['security_groups'] = [security_group_reference_model] - endpoint_gateway_model_json['service_endpoint'] = 'my-cloudant-instance.appdomain.cloud' - endpoint_gateway_model_json['service_endpoints'] = ['my-cloudant-instance.appdomain.cloud'] + endpoint_gateway_model_json['security_groups'] = [ + security_group_reference_model + ] + endpoint_gateway_model_json[ + 'service_endpoint'] = 'my-cloudant-instance.appdomain.cloud' + endpoint_gateway_model_json['service_endpoints'] = [ + 'my-cloudant-instance.appdomain.cloud' + ] endpoint_gateway_model_json['target'] = endpoint_gateway_target_model endpoint_gateway_model_json['vpc'] = vpc_reference_model # Construct a model instance of EndpointGateway by calling from_dict on the json representation - endpoint_gateway_model = EndpointGateway.from_dict(endpoint_gateway_model_json) + endpoint_gateway_model = EndpointGateway.from_dict( + endpoint_gateway_model_json) assert endpoint_gateway_model != False # Construct a model instance of EndpointGateway by calling from_dict on the json representation - endpoint_gateway_model_dict = EndpointGateway.from_dict(endpoint_gateway_model_json).__dict__ + endpoint_gateway_model_dict = EndpointGateway.from_dict( + endpoint_gateway_model_json).__dict__ endpoint_gateway_model2 = EndpointGateway(**endpoint_gateway_model_dict) # Verify the model instances are equivalent @@ -52454,47 +57515,69 @@ def test_endpoint_gateway_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - endpoint_gateway_lifecycle_reason_model = {} # EndpointGatewayLifecycleReason - endpoint_gateway_lifecycle_reason_model['code'] = 'dns_resolution_binding_pending' - endpoint_gateway_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - endpoint_gateway_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + endpoint_gateway_lifecycle_reason_model = { + } # EndpointGatewayLifecycleReason + endpoint_gateway_lifecycle_reason_model[ + 'code'] = 'dns_resolution_binding_pending' + endpoint_gateway_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + endpoint_gateway_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' - endpoint_gateway_target_model = {} # EndpointGatewayTargetProviderCloudServiceReference - endpoint_gateway_target_model['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' - endpoint_gateway_target_model['resource_type'] = 'provider_cloud_service' + endpoint_gateway_target_model = { + } # EndpointGatewayTargetProviderCloudServiceReference + endpoint_gateway_target_model[ + 'crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' + endpoint_gateway_target_model[ + 'resource_type'] = 'provider_cloud_service' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -52502,49 +57585,72 @@ def test_endpoint_gateway_collection_serialization(self): endpoint_gateway_model = {} # EndpointGateway endpoint_gateway_model['allow_dns_resolution_binding'] = True endpoint_gateway_model['created_at'] = '2019-01-01T12:00:00Z' - endpoint_gateway_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' endpoint_gateway_model['health_state'] = 'ok' - endpoint_gateway_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' endpoint_gateway_model['ips'] = [reserved_ip_reference_model] - endpoint_gateway_model['lifecycle_reasons'] = [endpoint_gateway_lifecycle_reason_model] + endpoint_gateway_model['lifecycle_reasons'] = [ + endpoint_gateway_lifecycle_reason_model + ] endpoint_gateway_model['lifecycle_state'] = 'stable' endpoint_gateway_model['name'] = 'my-endpoint-gateway' - endpoint_gateway_model['resource_group'] = resource_group_reference_model + endpoint_gateway_model[ + 'resource_group'] = resource_group_reference_model endpoint_gateway_model['resource_type'] = 'endpoint_gateway' - endpoint_gateway_model['security_groups'] = [security_group_reference_model] - endpoint_gateway_model['service_endpoint'] = 'my-cloudant-instance.appdomain.cloud' - endpoint_gateway_model['service_endpoints'] = ['my-cloudant-instance.appdomain.cloud'] + endpoint_gateway_model['security_groups'] = [ + security_group_reference_model + ] + endpoint_gateway_model[ + 'service_endpoint'] = 'my-cloudant-instance.appdomain.cloud' + endpoint_gateway_model['service_endpoints'] = [ + 'my-cloudant-instance.appdomain.cloud' + ] endpoint_gateway_model['target'] = endpoint_gateway_target_model endpoint_gateway_model['vpc'] = vpc_reference_model - endpoint_gateway_collection_first_model = {} # EndpointGatewayCollectionFirst - endpoint_gateway_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20' + endpoint_gateway_collection_first_model = { + } # EndpointGatewayCollectionFirst + endpoint_gateway_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20' - endpoint_gateway_collection_next_model = {} # EndpointGatewayCollectionNext - endpoint_gateway_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20' + endpoint_gateway_collection_next_model = { + } # EndpointGatewayCollectionNext + endpoint_gateway_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20' # Construct a json representation of a EndpointGatewayCollection model endpoint_gateway_collection_model_json = {} - endpoint_gateway_collection_model_json['endpoint_gateways'] = [endpoint_gateway_model] - endpoint_gateway_collection_model_json['first'] = endpoint_gateway_collection_first_model + endpoint_gateway_collection_model_json['endpoint_gateways'] = [ + endpoint_gateway_model + ] + endpoint_gateway_collection_model_json[ + 'first'] = endpoint_gateway_collection_first_model endpoint_gateway_collection_model_json['limit'] = 20 - endpoint_gateway_collection_model_json['next'] = endpoint_gateway_collection_next_model + endpoint_gateway_collection_model_json[ + 'next'] = endpoint_gateway_collection_next_model endpoint_gateway_collection_model_json['total_count'] = 132 # Construct a model instance of EndpointGatewayCollection by calling from_dict on the json representation - endpoint_gateway_collection_model = EndpointGatewayCollection.from_dict(endpoint_gateway_collection_model_json) + endpoint_gateway_collection_model = EndpointGatewayCollection.from_dict( + endpoint_gateway_collection_model_json) assert endpoint_gateway_collection_model != False # Construct a model instance of EndpointGatewayCollection by calling from_dict on the json representation - endpoint_gateway_collection_model_dict = EndpointGatewayCollection.from_dict(endpoint_gateway_collection_model_json).__dict__ - endpoint_gateway_collection_model2 = EndpointGatewayCollection(**endpoint_gateway_collection_model_dict) + endpoint_gateway_collection_model_dict = EndpointGatewayCollection.from_dict( + endpoint_gateway_collection_model_json).__dict__ + endpoint_gateway_collection_model2 = EndpointGatewayCollection( + **endpoint_gateway_collection_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_collection_model == endpoint_gateway_collection_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_collection_model_json2 = endpoint_gateway_collection_model.to_dict() + endpoint_gateway_collection_model_json2 = endpoint_gateway_collection_model.to_dict( + ) assert endpoint_gateway_collection_model_json2 == endpoint_gateway_collection_model_json @@ -52560,21 +57666,26 @@ def test_endpoint_gateway_collection_first_serialization(self): # Construct a json representation of a EndpointGatewayCollectionFirst model endpoint_gateway_collection_first_model_json = {} - endpoint_gateway_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20' + endpoint_gateway_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20' # Construct a model instance of EndpointGatewayCollectionFirst by calling from_dict on the json representation - endpoint_gateway_collection_first_model = EndpointGatewayCollectionFirst.from_dict(endpoint_gateway_collection_first_model_json) + endpoint_gateway_collection_first_model = EndpointGatewayCollectionFirst.from_dict( + endpoint_gateway_collection_first_model_json) assert endpoint_gateway_collection_first_model != False # Construct a model instance of EndpointGatewayCollectionFirst by calling from_dict on the json representation - endpoint_gateway_collection_first_model_dict = EndpointGatewayCollectionFirst.from_dict(endpoint_gateway_collection_first_model_json).__dict__ - endpoint_gateway_collection_first_model2 = EndpointGatewayCollectionFirst(**endpoint_gateway_collection_first_model_dict) + endpoint_gateway_collection_first_model_dict = EndpointGatewayCollectionFirst.from_dict( + endpoint_gateway_collection_first_model_json).__dict__ + endpoint_gateway_collection_first_model2 = EndpointGatewayCollectionFirst( + **endpoint_gateway_collection_first_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_collection_first_model == endpoint_gateway_collection_first_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_collection_first_model_json2 = endpoint_gateway_collection_first_model.to_dict() + endpoint_gateway_collection_first_model_json2 = endpoint_gateway_collection_first_model.to_dict( + ) assert endpoint_gateway_collection_first_model_json2 == endpoint_gateway_collection_first_model_json @@ -52590,21 +57701,26 @@ def test_endpoint_gateway_collection_next_serialization(self): # Construct a json representation of a EndpointGatewayCollectionNext model endpoint_gateway_collection_next_model_json = {} - endpoint_gateway_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20' + endpoint_gateway_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20' # Construct a model instance of EndpointGatewayCollectionNext by calling from_dict on the json representation - endpoint_gateway_collection_next_model = EndpointGatewayCollectionNext.from_dict(endpoint_gateway_collection_next_model_json) + endpoint_gateway_collection_next_model = EndpointGatewayCollectionNext.from_dict( + endpoint_gateway_collection_next_model_json) assert endpoint_gateway_collection_next_model != False # Construct a model instance of EndpointGatewayCollectionNext by calling from_dict on the json representation - endpoint_gateway_collection_next_model_dict = EndpointGatewayCollectionNext.from_dict(endpoint_gateway_collection_next_model_json).__dict__ - endpoint_gateway_collection_next_model2 = EndpointGatewayCollectionNext(**endpoint_gateway_collection_next_model_dict) + endpoint_gateway_collection_next_model_dict = EndpointGatewayCollectionNext.from_dict( + endpoint_gateway_collection_next_model_json).__dict__ + endpoint_gateway_collection_next_model2 = EndpointGatewayCollectionNext( + **endpoint_gateway_collection_next_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_collection_next_model == endpoint_gateway_collection_next_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_collection_next_model_json2 = endpoint_gateway_collection_next_model.to_dict() + endpoint_gateway_collection_next_model_json2 = endpoint_gateway_collection_next_model.to_dict( + ) assert endpoint_gateway_collection_next_model_json2 == endpoint_gateway_collection_next_model_json @@ -52620,23 +57736,30 @@ def test_endpoint_gateway_lifecycle_reason_serialization(self): # Construct a json representation of a EndpointGatewayLifecycleReason model endpoint_gateway_lifecycle_reason_model_json = {} - endpoint_gateway_lifecycle_reason_model_json['code'] = 'dns_resolution_binding_pending' - endpoint_gateway_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - endpoint_gateway_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + endpoint_gateway_lifecycle_reason_model_json[ + 'code'] = 'dns_resolution_binding_pending' + endpoint_gateway_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + endpoint_gateway_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of EndpointGatewayLifecycleReason by calling from_dict on the json representation - endpoint_gateway_lifecycle_reason_model = EndpointGatewayLifecycleReason.from_dict(endpoint_gateway_lifecycle_reason_model_json) + endpoint_gateway_lifecycle_reason_model = EndpointGatewayLifecycleReason.from_dict( + endpoint_gateway_lifecycle_reason_model_json) assert endpoint_gateway_lifecycle_reason_model != False # Construct a model instance of EndpointGatewayLifecycleReason by calling from_dict on the json representation - endpoint_gateway_lifecycle_reason_model_dict = EndpointGatewayLifecycleReason.from_dict(endpoint_gateway_lifecycle_reason_model_json).__dict__ - endpoint_gateway_lifecycle_reason_model2 = EndpointGatewayLifecycleReason(**endpoint_gateway_lifecycle_reason_model_dict) + endpoint_gateway_lifecycle_reason_model_dict = EndpointGatewayLifecycleReason.from_dict( + endpoint_gateway_lifecycle_reason_model_json).__dict__ + endpoint_gateway_lifecycle_reason_model2 = EndpointGatewayLifecycleReason( + **endpoint_gateway_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_lifecycle_reason_model == endpoint_gateway_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_lifecycle_reason_model_json2 = endpoint_gateway_lifecycle_reason_model.to_dict() + endpoint_gateway_lifecycle_reason_model_json2 = endpoint_gateway_lifecycle_reason_model.to_dict( + ) assert endpoint_gateway_lifecycle_reason_model_json2 == endpoint_gateway_lifecycle_reason_model_json @@ -52656,18 +57779,22 @@ def test_endpoint_gateway_patch_serialization(self): endpoint_gateway_patch_model_json['name'] = 'my-endpoint-gateway' # Construct a model instance of EndpointGatewayPatch by calling from_dict on the json representation - endpoint_gateway_patch_model = EndpointGatewayPatch.from_dict(endpoint_gateway_patch_model_json) + endpoint_gateway_patch_model = EndpointGatewayPatch.from_dict( + endpoint_gateway_patch_model_json) assert endpoint_gateway_patch_model != False # Construct a model instance of EndpointGatewayPatch by calling from_dict on the json representation - endpoint_gateway_patch_model_dict = EndpointGatewayPatch.from_dict(endpoint_gateway_patch_model_json).__dict__ - endpoint_gateway_patch_model2 = EndpointGatewayPatch(**endpoint_gateway_patch_model_dict) + endpoint_gateway_patch_model_dict = EndpointGatewayPatch.from_dict( + endpoint_gateway_patch_model_json).__dict__ + endpoint_gateway_patch_model2 = EndpointGatewayPatch( + **endpoint_gateway_patch_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_patch_model == endpoint_gateway_patch_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_patch_model_json2 = endpoint_gateway_patch_model.to_dict() + endpoint_gateway_patch_model_json2 = endpoint_gateway_patch_model.to_dict( + ) assert endpoint_gateway_patch_model_json2 == endpoint_gateway_patch_model_json @@ -52683,21 +57810,26 @@ def test_endpoint_gateway_reference_deleted_serialization(self): # Construct a json representation of a EndpointGatewayReferenceDeleted model endpoint_gateway_reference_deleted_model_json = {} - endpoint_gateway_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + endpoint_gateway_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of EndpointGatewayReferenceDeleted by calling from_dict on the json representation - endpoint_gateway_reference_deleted_model = EndpointGatewayReferenceDeleted.from_dict(endpoint_gateway_reference_deleted_model_json) + endpoint_gateway_reference_deleted_model = EndpointGatewayReferenceDeleted.from_dict( + endpoint_gateway_reference_deleted_model_json) assert endpoint_gateway_reference_deleted_model != False # Construct a model instance of EndpointGatewayReferenceDeleted by calling from_dict on the json representation - endpoint_gateway_reference_deleted_model_dict = EndpointGatewayReferenceDeleted.from_dict(endpoint_gateway_reference_deleted_model_json).__dict__ - endpoint_gateway_reference_deleted_model2 = EndpointGatewayReferenceDeleted(**endpoint_gateway_reference_deleted_model_dict) + endpoint_gateway_reference_deleted_model_dict = EndpointGatewayReferenceDeleted.from_dict( + endpoint_gateway_reference_deleted_model_json).__dict__ + endpoint_gateway_reference_deleted_model2 = EndpointGatewayReferenceDeleted( + **endpoint_gateway_reference_deleted_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_reference_deleted_model == endpoint_gateway_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_reference_deleted_model_json2 = endpoint_gateway_reference_deleted_model.to_dict() + endpoint_gateway_reference_deleted_model_json2 = endpoint_gateway_reference_deleted_model.to_dict( + ) assert endpoint_gateway_reference_deleted_model_json2 == endpoint_gateway_reference_deleted_model_json @@ -52718,7 +57850,8 @@ def test_endpoint_gateway_reference_remote_serialization(self): account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' endpoint_gateway_remote_model = {} # EndpointGatewayRemote @@ -52727,26 +57860,36 @@ def test_endpoint_gateway_reference_remote_serialization(self): # Construct a json representation of a EndpointGatewayReferenceRemote model endpoint_gateway_reference_remote_model_json = {} - endpoint_gateway_reference_remote_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_reference_remote_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_reference_remote_model_json['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_reference_remote_model_json['name'] = 'my-endpoint-gateway' - endpoint_gateway_reference_remote_model_json['remote'] = endpoint_gateway_remote_model - endpoint_gateway_reference_remote_model_json['resource_type'] = 'endpoint_gateway' + endpoint_gateway_reference_remote_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model_json[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model_json[ + 'name'] = 'my-endpoint-gateway' + endpoint_gateway_reference_remote_model_json[ + 'remote'] = endpoint_gateway_remote_model + endpoint_gateway_reference_remote_model_json[ + 'resource_type'] = 'endpoint_gateway' # Construct a model instance of EndpointGatewayReferenceRemote by calling from_dict on the json representation - endpoint_gateway_reference_remote_model = EndpointGatewayReferenceRemote.from_dict(endpoint_gateway_reference_remote_model_json) + endpoint_gateway_reference_remote_model = EndpointGatewayReferenceRemote.from_dict( + endpoint_gateway_reference_remote_model_json) assert endpoint_gateway_reference_remote_model != False # Construct a model instance of EndpointGatewayReferenceRemote by calling from_dict on the json representation - endpoint_gateway_reference_remote_model_dict = EndpointGatewayReferenceRemote.from_dict(endpoint_gateway_reference_remote_model_json).__dict__ - endpoint_gateway_reference_remote_model2 = EndpointGatewayReferenceRemote(**endpoint_gateway_reference_remote_model_dict) + endpoint_gateway_reference_remote_model_dict = EndpointGatewayReferenceRemote.from_dict( + endpoint_gateway_reference_remote_model_json).__dict__ + endpoint_gateway_reference_remote_model2 = EndpointGatewayReferenceRemote( + **endpoint_gateway_reference_remote_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_reference_remote_model == endpoint_gateway_reference_remote_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_reference_remote_model_json2 = endpoint_gateway_reference_remote_model.to_dict() + endpoint_gateway_reference_remote_model_json2 = endpoint_gateway_reference_remote_model.to_dict( + ) assert endpoint_gateway_reference_remote_model_json2 == endpoint_gateway_reference_remote_model_json @@ -52767,7 +57910,8 @@ def test_endpoint_gateway_remote_serialization(self): account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a EndpointGatewayRemote model @@ -52776,18 +57920,22 @@ def test_endpoint_gateway_remote_serialization(self): endpoint_gateway_remote_model_json['region'] = region_reference_model # Construct a model instance of EndpointGatewayRemote by calling from_dict on the json representation - endpoint_gateway_remote_model = EndpointGatewayRemote.from_dict(endpoint_gateway_remote_model_json) + endpoint_gateway_remote_model = EndpointGatewayRemote.from_dict( + endpoint_gateway_remote_model_json) assert endpoint_gateway_remote_model != False # Construct a model instance of EndpointGatewayRemote by calling from_dict on the json representation - endpoint_gateway_remote_model_dict = EndpointGatewayRemote.from_dict(endpoint_gateway_remote_model_json).__dict__ - endpoint_gateway_remote_model2 = EndpointGatewayRemote(**endpoint_gateway_remote_model_dict) + endpoint_gateway_remote_model_dict = EndpointGatewayRemote.from_dict( + endpoint_gateway_remote_model_json).__dict__ + endpoint_gateway_remote_model2 = EndpointGatewayRemote( + **endpoint_gateway_remote_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_remote_model == endpoint_gateway_remote_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_remote_model_json2 = endpoint_gateway_remote_model.to_dict() + endpoint_gateway_remote_model_json2 = endpoint_gateway_remote_model.to_dict( + ) assert endpoint_gateway_remote_model_json2 == endpoint_gateway_remote_model_json @@ -52804,45 +57952,61 @@ def test_floating_ip_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted - network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_deleted_model = { + } # NetworkInterfaceReferenceDeleted + network_interface_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference - floating_ip_target_model['deleted'] = network_interface_reference_deleted_model - floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - floating_ip_target_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_model = { + } # FloatingIPTargetNetworkInterfaceReference + floating_ip_target_model[ + 'deleted'] = network_interface_reference_deleted_model + floating_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' floating_ip_target_model['name'] = 'my-instance-network-interface' floating_ip_target_model['primary_ip'] = reserved_ip_reference_model floating_ip_target_model['resource_type'] = 'network_interface' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a FloatingIP model floating_ip_model_json = {} floating_ip_model_json['address'] = '203.0.113.1' floating_ip_model_json['created_at'] = '2019-01-01T12:00:00Z' - floating_ip_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_model_json['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_model_json['name'] = 'my-floating-ip' - floating_ip_model_json['resource_group'] = resource_group_reference_model + floating_ip_model_json[ + 'resource_group'] = resource_group_reference_model floating_ip_model_json['status'] = 'available' floating_ip_model_json['target'] = floating_ip_target_model floating_ip_model_json['zone'] = zone_reference_model @@ -52852,7 +58016,8 @@ def test_floating_ip_serialization(self): assert floating_ip_model != False # Construct a model instance of FloatingIP by calling from_dict on the json representation - floating_ip_model_dict = FloatingIP.from_dict(floating_ip_model_json).__dict__ + floating_ip_model_dict = FloatingIP.from_dict( + floating_ip_model_json).__dict__ floating_ip_model2 = FloatingIP(**floating_ip_model_dict) # Verify the model instances are equivalent @@ -52876,44 +58041,60 @@ def test_floating_ip_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_collection_first_model = {} # FloatingIPCollectionFirst - floating_ip_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20' + floating_ip_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted - network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_deleted_model = { + } # NetworkInterfaceReferenceDeleted + network_interface_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference - floating_ip_target_model['deleted'] = network_interface_reference_deleted_model - floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - floating_ip_target_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_model = { + } # FloatingIPTargetNetworkInterfaceReference + floating_ip_target_model[ + 'deleted'] = network_interface_reference_deleted_model + floating_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' floating_ip_target_model['name'] = 'my-instance-network-interface' floating_ip_target_model['primary_ip'] = reserved_ip_reference_model floating_ip_target_model['resource_type'] = 'network_interface' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' floating_ip_model = {} # FloatingIP floating_ip_model['address'] = '203.0.113.1' floating_ip_model['created_at'] = '2019-01-01T12:00:00Z' - floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_model['name'] = 'my-floating-ip' floating_ip_model['resource_group'] = resource_group_reference_model @@ -52922,29 +58103,36 @@ def test_floating_ip_collection_serialization(self): floating_ip_model['zone'] = zone_reference_model floating_ip_collection_next_model = {} # FloatingIPCollectionNext - floating_ip_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + floating_ip_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a FloatingIPCollection model floating_ip_collection_model_json = {} - floating_ip_collection_model_json['first'] = floating_ip_collection_first_model + floating_ip_collection_model_json[ + 'first'] = floating_ip_collection_first_model floating_ip_collection_model_json['floating_ips'] = [floating_ip_model] floating_ip_collection_model_json['limit'] = 20 - floating_ip_collection_model_json['next'] = floating_ip_collection_next_model + floating_ip_collection_model_json[ + 'next'] = floating_ip_collection_next_model floating_ip_collection_model_json['total_count'] = 132 # Construct a model instance of FloatingIPCollection by calling from_dict on the json representation - floating_ip_collection_model = FloatingIPCollection.from_dict(floating_ip_collection_model_json) + floating_ip_collection_model = FloatingIPCollection.from_dict( + floating_ip_collection_model_json) assert floating_ip_collection_model != False # Construct a model instance of FloatingIPCollection by calling from_dict on the json representation - floating_ip_collection_model_dict = FloatingIPCollection.from_dict(floating_ip_collection_model_json).__dict__ - floating_ip_collection_model2 = FloatingIPCollection(**floating_ip_collection_model_dict) + floating_ip_collection_model_dict = FloatingIPCollection.from_dict( + floating_ip_collection_model_json).__dict__ + floating_ip_collection_model2 = FloatingIPCollection( + **floating_ip_collection_model_dict) # Verify the model instances are equivalent assert floating_ip_collection_model == floating_ip_collection_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_collection_model_json2 = floating_ip_collection_model.to_dict() + floating_ip_collection_model_json2 = floating_ip_collection_model.to_dict( + ) assert floating_ip_collection_model_json2 == floating_ip_collection_model_json @@ -52960,21 +58148,26 @@ def test_floating_ip_collection_first_serialization(self): # Construct a json representation of a FloatingIPCollectionFirst model floating_ip_collection_first_model_json = {} - floating_ip_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20' + floating_ip_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20' # Construct a model instance of FloatingIPCollectionFirst by calling from_dict on the json representation - floating_ip_collection_first_model = FloatingIPCollectionFirst.from_dict(floating_ip_collection_first_model_json) + floating_ip_collection_first_model = FloatingIPCollectionFirst.from_dict( + floating_ip_collection_first_model_json) assert floating_ip_collection_first_model != False # Construct a model instance of FloatingIPCollectionFirst by calling from_dict on the json representation - floating_ip_collection_first_model_dict = FloatingIPCollectionFirst.from_dict(floating_ip_collection_first_model_json).__dict__ - floating_ip_collection_first_model2 = FloatingIPCollectionFirst(**floating_ip_collection_first_model_dict) + floating_ip_collection_first_model_dict = FloatingIPCollectionFirst.from_dict( + floating_ip_collection_first_model_json).__dict__ + floating_ip_collection_first_model2 = FloatingIPCollectionFirst( + **floating_ip_collection_first_model_dict) # Verify the model instances are equivalent assert floating_ip_collection_first_model == floating_ip_collection_first_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_collection_first_model_json2 = floating_ip_collection_first_model.to_dict() + floating_ip_collection_first_model_json2 = floating_ip_collection_first_model.to_dict( + ) assert floating_ip_collection_first_model_json2 == floating_ip_collection_first_model_json @@ -52990,21 +58183,26 @@ def test_floating_ip_collection_next_serialization(self): # Construct a json representation of a FloatingIPCollectionNext model floating_ip_collection_next_model_json = {} - floating_ip_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + floating_ip_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of FloatingIPCollectionNext by calling from_dict on the json representation - floating_ip_collection_next_model = FloatingIPCollectionNext.from_dict(floating_ip_collection_next_model_json) + floating_ip_collection_next_model = FloatingIPCollectionNext.from_dict( + floating_ip_collection_next_model_json) assert floating_ip_collection_next_model != False # Construct a model instance of FloatingIPCollectionNext by calling from_dict on the json representation - floating_ip_collection_next_model_dict = FloatingIPCollectionNext.from_dict(floating_ip_collection_next_model_json).__dict__ - floating_ip_collection_next_model2 = FloatingIPCollectionNext(**floating_ip_collection_next_model_dict) + floating_ip_collection_next_model_dict = FloatingIPCollectionNext.from_dict( + floating_ip_collection_next_model_json).__dict__ + floating_ip_collection_next_model2 = FloatingIPCollectionNext( + **floating_ip_collection_next_model_dict) # Verify the model instances are equivalent assert floating_ip_collection_next_model == floating_ip_collection_next_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_collection_next_model_json2 = floating_ip_collection_next_model.to_dict() + floating_ip_collection_next_model_json2 = floating_ip_collection_next_model.to_dict( + ) assert floating_ip_collection_next_model_json2 == floating_ip_collection_next_model_json @@ -53013,51 +58211,72 @@ class TestModel_FloatingIPCollectionVirtualNetworkInterfaceContext: Test Class for FloatingIPCollectionVirtualNetworkInterfaceContext """ - def test_floating_ip_collection_virtual_network_interface_context_serialization(self): + def test_floating_ip_collection_virtual_network_interface_context_serialization( + self): """ Test serialization/deserialization for FloatingIPCollectionVirtualNetworkInterfaceContext """ # Construct dict forms of any model objects needed in order to build this model. - floating_ip_collection_virtual_network_interface_context_first_model = {} # FloatingIPCollectionVirtualNetworkInterfaceContextFirst - floating_ip_collection_virtual_network_interface_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20' + floating_ip_collection_virtual_network_interface_context_first_model = { + } # FloatingIPCollectionVirtualNetworkInterfaceContextFirst + floating_ip_collection_virtual_network_interface_context_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20' floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' floating_ip_reference_model = {} # FloatingIPReference floating_ip_reference_model['address'] = '203.0.113.1' - floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_reference_model['name'] = 'my-floating-ip' - floating_ip_collection_virtual_network_interface_context_next_model = {} # FloatingIPCollectionVirtualNetworkInterfaceContextNext - floating_ip_collection_virtual_network_interface_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + floating_ip_collection_virtual_network_interface_context_next_model = { + } # FloatingIPCollectionVirtualNetworkInterfaceContextNext + floating_ip_collection_virtual_network_interface_context_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a FloatingIPCollectionVirtualNetworkInterfaceContext model floating_ip_collection_virtual_network_interface_context_model_json = {} - floating_ip_collection_virtual_network_interface_context_model_json['first'] = floating_ip_collection_virtual_network_interface_context_first_model - floating_ip_collection_virtual_network_interface_context_model_json['floating_ips'] = [floating_ip_reference_model] - floating_ip_collection_virtual_network_interface_context_model_json['limit'] = 20 - floating_ip_collection_virtual_network_interface_context_model_json['next'] = floating_ip_collection_virtual_network_interface_context_next_model - floating_ip_collection_virtual_network_interface_context_model_json['total_count'] = 132 + floating_ip_collection_virtual_network_interface_context_model_json[ + 'first'] = floating_ip_collection_virtual_network_interface_context_first_model + floating_ip_collection_virtual_network_interface_context_model_json[ + 'floating_ips'] = [floating_ip_reference_model] + floating_ip_collection_virtual_network_interface_context_model_json[ + 'limit'] = 20 + floating_ip_collection_virtual_network_interface_context_model_json[ + 'next'] = floating_ip_collection_virtual_network_interface_context_next_model + floating_ip_collection_virtual_network_interface_context_model_json[ + 'total_count'] = 132 # Construct a model instance of FloatingIPCollectionVirtualNetworkInterfaceContext by calling from_dict on the json representation - floating_ip_collection_virtual_network_interface_context_model = FloatingIPCollectionVirtualNetworkInterfaceContext.from_dict(floating_ip_collection_virtual_network_interface_context_model_json) + floating_ip_collection_virtual_network_interface_context_model = FloatingIPCollectionVirtualNetworkInterfaceContext.from_dict( + floating_ip_collection_virtual_network_interface_context_model_json) assert floating_ip_collection_virtual_network_interface_context_model != False # Construct a model instance of FloatingIPCollectionVirtualNetworkInterfaceContext by calling from_dict on the json representation - floating_ip_collection_virtual_network_interface_context_model_dict = FloatingIPCollectionVirtualNetworkInterfaceContext.from_dict(floating_ip_collection_virtual_network_interface_context_model_json).__dict__ - floating_ip_collection_virtual_network_interface_context_model2 = FloatingIPCollectionVirtualNetworkInterfaceContext(**floating_ip_collection_virtual_network_interface_context_model_dict) + floating_ip_collection_virtual_network_interface_context_model_dict = FloatingIPCollectionVirtualNetworkInterfaceContext.from_dict( + floating_ip_collection_virtual_network_interface_context_model_json + ).__dict__ + floating_ip_collection_virtual_network_interface_context_model2 = FloatingIPCollectionVirtualNetworkInterfaceContext( + ** + floating_ip_collection_virtual_network_interface_context_model_dict) # Verify the model instances are equivalent assert floating_ip_collection_virtual_network_interface_context_model == floating_ip_collection_virtual_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_collection_virtual_network_interface_context_model_json2 = floating_ip_collection_virtual_network_interface_context_model.to_dict() + floating_ip_collection_virtual_network_interface_context_model_json2 = floating_ip_collection_virtual_network_interface_context_model.to_dict( + ) assert floating_ip_collection_virtual_network_interface_context_model_json2 == floating_ip_collection_virtual_network_interface_context_model_json @@ -53066,28 +58285,38 @@ class TestModel_FloatingIPCollectionVirtualNetworkInterfaceContextFirst: Test Class for FloatingIPCollectionVirtualNetworkInterfaceContextFirst """ - def test_floating_ip_collection_virtual_network_interface_context_first_serialization(self): + def test_floating_ip_collection_virtual_network_interface_context_first_serialization( + self): """ Test serialization/deserialization for FloatingIPCollectionVirtualNetworkInterfaceContextFirst """ # Construct a json representation of a FloatingIPCollectionVirtualNetworkInterfaceContextFirst model floating_ip_collection_virtual_network_interface_context_first_model_json = {} - floating_ip_collection_virtual_network_interface_context_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20' + floating_ip_collection_virtual_network_interface_context_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?limit=20' # Construct a model instance of FloatingIPCollectionVirtualNetworkInterfaceContextFirst by calling from_dict on the json representation - floating_ip_collection_virtual_network_interface_context_first_model = FloatingIPCollectionVirtualNetworkInterfaceContextFirst.from_dict(floating_ip_collection_virtual_network_interface_context_first_model_json) + floating_ip_collection_virtual_network_interface_context_first_model = FloatingIPCollectionVirtualNetworkInterfaceContextFirst.from_dict( + floating_ip_collection_virtual_network_interface_context_first_model_json + ) assert floating_ip_collection_virtual_network_interface_context_first_model != False # Construct a model instance of FloatingIPCollectionVirtualNetworkInterfaceContextFirst by calling from_dict on the json representation - floating_ip_collection_virtual_network_interface_context_first_model_dict = FloatingIPCollectionVirtualNetworkInterfaceContextFirst.from_dict(floating_ip_collection_virtual_network_interface_context_first_model_json).__dict__ - floating_ip_collection_virtual_network_interface_context_first_model2 = FloatingIPCollectionVirtualNetworkInterfaceContextFirst(**floating_ip_collection_virtual_network_interface_context_first_model_dict) + floating_ip_collection_virtual_network_interface_context_first_model_dict = FloatingIPCollectionVirtualNetworkInterfaceContextFirst.from_dict( + floating_ip_collection_virtual_network_interface_context_first_model_json + ).__dict__ + floating_ip_collection_virtual_network_interface_context_first_model2 = FloatingIPCollectionVirtualNetworkInterfaceContextFirst( + ** + floating_ip_collection_virtual_network_interface_context_first_model_dict + ) # Verify the model instances are equivalent assert floating_ip_collection_virtual_network_interface_context_first_model == floating_ip_collection_virtual_network_interface_context_first_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_collection_virtual_network_interface_context_first_model_json2 = floating_ip_collection_virtual_network_interface_context_first_model.to_dict() + floating_ip_collection_virtual_network_interface_context_first_model_json2 = floating_ip_collection_virtual_network_interface_context_first_model.to_dict( + ) assert floating_ip_collection_virtual_network_interface_context_first_model_json2 == floating_ip_collection_virtual_network_interface_context_first_model_json @@ -53096,28 +58325,38 @@ class TestModel_FloatingIPCollectionVirtualNetworkInterfaceContextNext: Test Class for FloatingIPCollectionVirtualNetworkInterfaceContextNext """ - def test_floating_ip_collection_virtual_network_interface_context_next_serialization(self): + def test_floating_ip_collection_virtual_network_interface_context_next_serialization( + self): """ Test serialization/deserialization for FloatingIPCollectionVirtualNetworkInterfaceContextNext """ # Construct a json representation of a FloatingIPCollectionVirtualNetworkInterfaceContextNext model floating_ip_collection_virtual_network_interface_context_next_model_json = {} - floating_ip_collection_virtual_network_interface_context_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + floating_ip_collection_virtual_network_interface_context_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of FloatingIPCollectionVirtualNetworkInterfaceContextNext by calling from_dict on the json representation - floating_ip_collection_virtual_network_interface_context_next_model = FloatingIPCollectionVirtualNetworkInterfaceContextNext.from_dict(floating_ip_collection_virtual_network_interface_context_next_model_json) + floating_ip_collection_virtual_network_interface_context_next_model = FloatingIPCollectionVirtualNetworkInterfaceContextNext.from_dict( + floating_ip_collection_virtual_network_interface_context_next_model_json + ) assert floating_ip_collection_virtual_network_interface_context_next_model != False # Construct a model instance of FloatingIPCollectionVirtualNetworkInterfaceContextNext by calling from_dict on the json representation - floating_ip_collection_virtual_network_interface_context_next_model_dict = FloatingIPCollectionVirtualNetworkInterfaceContextNext.from_dict(floating_ip_collection_virtual_network_interface_context_next_model_json).__dict__ - floating_ip_collection_virtual_network_interface_context_next_model2 = FloatingIPCollectionVirtualNetworkInterfaceContextNext(**floating_ip_collection_virtual_network_interface_context_next_model_dict) + floating_ip_collection_virtual_network_interface_context_next_model_dict = FloatingIPCollectionVirtualNetworkInterfaceContextNext.from_dict( + floating_ip_collection_virtual_network_interface_context_next_model_json + ).__dict__ + floating_ip_collection_virtual_network_interface_context_next_model2 = FloatingIPCollectionVirtualNetworkInterfaceContextNext( + ** + floating_ip_collection_virtual_network_interface_context_next_model_dict + ) # Verify the model instances are equivalent assert floating_ip_collection_virtual_network_interface_context_next_model == floating_ip_collection_virtual_network_interface_context_next_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_collection_virtual_network_interface_context_next_model_json2 = floating_ip_collection_virtual_network_interface_context_next_model.to_dict() + floating_ip_collection_virtual_network_interface_context_next_model_json2 = floating_ip_collection_virtual_network_interface_context_next_model.to_dict( + ) assert floating_ip_collection_virtual_network_interface_context_next_model_json2 == floating_ip_collection_virtual_network_interface_context_next_model_json @@ -53133,8 +58372,10 @@ def test_floating_ip_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - floating_ip_target_patch_model = {} # FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById - floating_ip_target_patch_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_patch_model = { + } # FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById + floating_ip_target_patch_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a json representation of a FloatingIPPatch model floating_ip_patch_model_json = {} @@ -53142,12 +58383,15 @@ def test_floating_ip_patch_serialization(self): floating_ip_patch_model_json['target'] = floating_ip_target_patch_model # Construct a model instance of FloatingIPPatch by calling from_dict on the json representation - floating_ip_patch_model = FloatingIPPatch.from_dict(floating_ip_patch_model_json) + floating_ip_patch_model = FloatingIPPatch.from_dict( + floating_ip_patch_model_json) assert floating_ip_patch_model != False # Construct a model instance of FloatingIPPatch by calling from_dict on the json representation - floating_ip_patch_model_dict = FloatingIPPatch.from_dict(floating_ip_patch_model_json).__dict__ - floating_ip_patch_model2 = FloatingIPPatch(**floating_ip_patch_model_dict) + floating_ip_patch_model_dict = FloatingIPPatch.from_dict( + floating_ip_patch_model_json).__dict__ + floating_ip_patch_model2 = FloatingIPPatch( + **floating_ip_patch_model_dict) # Verify the model instances are equivalent assert floating_ip_patch_model == floating_ip_patch_model2 @@ -53170,30 +58414,39 @@ def test_floating_ip_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a FloatingIPReference model floating_ip_reference_model_json = {} floating_ip_reference_model_json['address'] = '203.0.113.1' - floating_ip_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model_json['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model_json['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model_json[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model_json[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_reference_model_json['name'] = 'my-floating-ip' # Construct a model instance of FloatingIPReference by calling from_dict on the json representation - floating_ip_reference_model = FloatingIPReference.from_dict(floating_ip_reference_model_json) + floating_ip_reference_model = FloatingIPReference.from_dict( + floating_ip_reference_model_json) assert floating_ip_reference_model != False # Construct a model instance of FloatingIPReference by calling from_dict on the json representation - floating_ip_reference_model_dict = FloatingIPReference.from_dict(floating_ip_reference_model_json).__dict__ - floating_ip_reference_model2 = FloatingIPReference(**floating_ip_reference_model_dict) + floating_ip_reference_model_dict = FloatingIPReference.from_dict( + floating_ip_reference_model_json).__dict__ + floating_ip_reference_model2 = FloatingIPReference( + **floating_ip_reference_model_dict) # Verify the model instances are equivalent assert floating_ip_reference_model == floating_ip_reference_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_reference_model_json2 = floating_ip_reference_model.to_dict() + floating_ip_reference_model_json2 = floating_ip_reference_model.to_dict( + ) assert floating_ip_reference_model_json2 == floating_ip_reference_model_json @@ -53209,21 +58462,26 @@ def test_floating_ip_reference_deleted_serialization(self): # Construct a json representation of a FloatingIPReferenceDeleted model floating_ip_reference_deleted_model_json = {} - floating_ip_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of FloatingIPReferenceDeleted by calling from_dict on the json representation - floating_ip_reference_deleted_model = FloatingIPReferenceDeleted.from_dict(floating_ip_reference_deleted_model_json) + floating_ip_reference_deleted_model = FloatingIPReferenceDeleted.from_dict( + floating_ip_reference_deleted_model_json) assert floating_ip_reference_deleted_model != False # Construct a model instance of FloatingIPReferenceDeleted by calling from_dict on the json representation - floating_ip_reference_deleted_model_dict = FloatingIPReferenceDeleted.from_dict(floating_ip_reference_deleted_model_json).__dict__ - floating_ip_reference_deleted_model2 = FloatingIPReferenceDeleted(**floating_ip_reference_deleted_model_dict) + floating_ip_reference_deleted_model_dict = FloatingIPReferenceDeleted.from_dict( + floating_ip_reference_deleted_model_json).__dict__ + floating_ip_reference_deleted_model2 = FloatingIPReferenceDeleted( + **floating_ip_reference_deleted_model_dict) # Verify the model instances are equivalent assert floating_ip_reference_deleted_model == floating_ip_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_reference_deleted_model_json2 = floating_ip_reference_deleted_model.to_dict() + floating_ip_reference_deleted_model_json2 = floating_ip_reference_deleted_model.to_dict( + ) assert floating_ip_reference_deleted_model_json2 == floating_ip_reference_deleted_model_json @@ -53240,41 +58498,56 @@ def test_floating_ip_unpaginated_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted - network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_deleted_model = { + } # NetworkInterfaceReferenceDeleted + network_interface_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference - floating_ip_target_model['deleted'] = network_interface_reference_deleted_model - floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - floating_ip_target_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_model = { + } # FloatingIPTargetNetworkInterfaceReference + floating_ip_target_model[ + 'deleted'] = network_interface_reference_deleted_model + floating_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' floating_ip_target_model['name'] = 'my-instance-network-interface' floating_ip_target_model['primary_ip'] = reserved_ip_reference_model floating_ip_target_model['resource_type'] = 'network_interface' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' floating_ip_model = {} # FloatingIP floating_ip_model['address'] = '203.0.113.1' floating_ip_model['created_at'] = '2019-01-01T12:00:00Z' - floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_model['name'] = 'my-floating-ip' floating_ip_model['resource_group'] = resource_group_reference_model @@ -53284,21 +58557,27 @@ def test_floating_ip_unpaginated_collection_serialization(self): # Construct a json representation of a FloatingIPUnpaginatedCollection model floating_ip_unpaginated_collection_model_json = {} - floating_ip_unpaginated_collection_model_json['floating_ips'] = [floating_ip_model] + floating_ip_unpaginated_collection_model_json['floating_ips'] = [ + floating_ip_model + ] # Construct a model instance of FloatingIPUnpaginatedCollection by calling from_dict on the json representation - floating_ip_unpaginated_collection_model = FloatingIPUnpaginatedCollection.from_dict(floating_ip_unpaginated_collection_model_json) + floating_ip_unpaginated_collection_model = FloatingIPUnpaginatedCollection.from_dict( + floating_ip_unpaginated_collection_model_json) assert floating_ip_unpaginated_collection_model != False # Construct a model instance of FloatingIPUnpaginatedCollection by calling from_dict on the json representation - floating_ip_unpaginated_collection_model_dict = FloatingIPUnpaginatedCollection.from_dict(floating_ip_unpaginated_collection_model_json).__dict__ - floating_ip_unpaginated_collection_model2 = FloatingIPUnpaginatedCollection(**floating_ip_unpaginated_collection_model_dict) + floating_ip_unpaginated_collection_model_dict = FloatingIPUnpaginatedCollection.from_dict( + floating_ip_unpaginated_collection_model_json).__dict__ + floating_ip_unpaginated_collection_model2 = FloatingIPUnpaginatedCollection( + **floating_ip_unpaginated_collection_model_dict) # Verify the model instances are equivalent assert floating_ip_unpaginated_collection_model == floating_ip_unpaginated_collection_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_unpaginated_collection_model_json2 = floating_ip_unpaginated_collection_model.to_dict() + floating_ip_unpaginated_collection_model_json2 = floating_ip_unpaginated_collection_model.to_dict( + ) assert floating_ip_unpaginated_collection_model_json2 == floating_ip_unpaginated_collection_model_json @@ -53315,30 +58594,44 @@ def test_flow_log_collector_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference - legacy_cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue' - - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext - flow_log_collector_target_model['deleted'] = network_interface_reference_target_context_deleted_model - flow_log_collector_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - flow_log_collector_target_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - flow_log_collector_target_model['name'] = 'my-instance-network-interface' + legacy_cloud_object_storage_bucket_reference_model = { + } # LegacyCloudObjectStorageBucketReference + legacy_cloud_object_storage_bucket_reference_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' + + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + flow_log_collector_target_model = { + } # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext + flow_log_collector_target_model[ + 'deleted'] = network_interface_reference_target_context_deleted_model + flow_log_collector_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_model[ + 'name'] = 'my-instance-network-interface' flow_log_collector_target_model['resource_type'] = 'network_interface' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -53348,23 +58641,32 @@ def test_flow_log_collector_serialization(self): flow_log_collector_model_json['active'] = True flow_log_collector_model_json['auto_delete'] = True flow_log_collector_model_json['created_at'] = '2019-01-01T12:00:00Z' - flow_log_collector_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689' - flow_log_collector_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689' - flow_log_collector_model_json['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + flow_log_collector_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689' + flow_log_collector_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689' + flow_log_collector_model_json[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' flow_log_collector_model_json['lifecycle_state'] = 'stable' flow_log_collector_model_json['name'] = 'my-flow-log-collector' - flow_log_collector_model_json['resource_group'] = resource_group_reference_model - flow_log_collector_model_json['storage_bucket'] = legacy_cloud_object_storage_bucket_reference_model - flow_log_collector_model_json['target'] = flow_log_collector_target_model + flow_log_collector_model_json[ + 'resource_group'] = resource_group_reference_model + flow_log_collector_model_json[ + 'storage_bucket'] = legacy_cloud_object_storage_bucket_reference_model + flow_log_collector_model_json[ + 'target'] = flow_log_collector_target_model flow_log_collector_model_json['vpc'] = vpc_reference_model # Construct a model instance of FlowLogCollector by calling from_dict on the json representation - flow_log_collector_model = FlowLogCollector.from_dict(flow_log_collector_model_json) + flow_log_collector_model = FlowLogCollector.from_dict( + flow_log_collector_model_json) assert flow_log_collector_model != False # Construct a model instance of FlowLogCollector by calling from_dict on the json representation - flow_log_collector_model_dict = FlowLogCollector.from_dict(flow_log_collector_model_json).__dict__ - flow_log_collector_model2 = FlowLogCollector(**flow_log_collector_model_dict) + flow_log_collector_model_dict = FlowLogCollector.from_dict( + flow_log_collector_model_json).__dict__ + flow_log_collector_model2 = FlowLogCollector( + **flow_log_collector_model_dict) # Verify the model instances are equivalent assert flow_log_collector_model == flow_log_collector_model2 @@ -53386,34 +58688,50 @@ def test_flow_log_collector_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - flow_log_collector_collection_first_model = {} # FlowLogCollectorCollectionFirst - flow_log_collector_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20' + flow_log_collector_collection_first_model = { + } # FlowLogCollectorCollectionFirst + flow_log_collector_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference - legacy_cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue' - - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext - flow_log_collector_target_model['deleted'] = network_interface_reference_target_context_deleted_model - flow_log_collector_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - flow_log_collector_target_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - flow_log_collector_target_model['name'] = 'my-instance-network-interface' + legacy_cloud_object_storage_bucket_reference_model = { + } # LegacyCloudObjectStorageBucketReference + legacy_cloud_object_storage_bucket_reference_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' + + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + flow_log_collector_target_model = { + } # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext + flow_log_collector_target_model[ + 'deleted'] = network_interface_reference_target_context_deleted_model + flow_log_collector_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_model[ + 'name'] = 'my-instance-network-interface' flow_log_collector_target_model['resource_type'] = 'network_interface' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -53422,40 +58740,54 @@ def test_flow_log_collector_collection_serialization(self): flow_log_collector_model['active'] = True flow_log_collector_model['auto_delete'] = True flow_log_collector_model['created_at'] = '2019-01-01T12:00:00Z' - flow_log_collector_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689' - flow_log_collector_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689' + flow_log_collector_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689' + flow_log_collector_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689' flow_log_collector_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' flow_log_collector_model['lifecycle_state'] = 'stable' flow_log_collector_model['name'] = 'my-flow-log-collector' - flow_log_collector_model['resource_group'] = resource_group_reference_model - flow_log_collector_model['storage_bucket'] = legacy_cloud_object_storage_bucket_reference_model + flow_log_collector_model[ + 'resource_group'] = resource_group_reference_model + flow_log_collector_model[ + 'storage_bucket'] = legacy_cloud_object_storage_bucket_reference_model flow_log_collector_model['target'] = flow_log_collector_target_model flow_log_collector_model['vpc'] = vpc_reference_model - flow_log_collector_collection_next_model = {} # FlowLogCollectorCollectionNext - flow_log_collector_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + flow_log_collector_collection_next_model = { + } # FlowLogCollectorCollectionNext + flow_log_collector_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a FlowLogCollectorCollection model flow_log_collector_collection_model_json = {} - flow_log_collector_collection_model_json['first'] = flow_log_collector_collection_first_model - flow_log_collector_collection_model_json['flow_log_collectors'] = [flow_log_collector_model] + flow_log_collector_collection_model_json[ + 'first'] = flow_log_collector_collection_first_model + flow_log_collector_collection_model_json['flow_log_collectors'] = [ + flow_log_collector_model + ] flow_log_collector_collection_model_json['limit'] = 20 - flow_log_collector_collection_model_json['next'] = flow_log_collector_collection_next_model + flow_log_collector_collection_model_json[ + 'next'] = flow_log_collector_collection_next_model flow_log_collector_collection_model_json['total_count'] = 132 # Construct a model instance of FlowLogCollectorCollection by calling from_dict on the json representation - flow_log_collector_collection_model = FlowLogCollectorCollection.from_dict(flow_log_collector_collection_model_json) + flow_log_collector_collection_model = FlowLogCollectorCollection.from_dict( + flow_log_collector_collection_model_json) assert flow_log_collector_collection_model != False # Construct a model instance of FlowLogCollectorCollection by calling from_dict on the json representation - flow_log_collector_collection_model_dict = FlowLogCollectorCollection.from_dict(flow_log_collector_collection_model_json).__dict__ - flow_log_collector_collection_model2 = FlowLogCollectorCollection(**flow_log_collector_collection_model_dict) + flow_log_collector_collection_model_dict = FlowLogCollectorCollection.from_dict( + flow_log_collector_collection_model_json).__dict__ + flow_log_collector_collection_model2 = FlowLogCollectorCollection( + **flow_log_collector_collection_model_dict) # Verify the model instances are equivalent assert flow_log_collector_collection_model == flow_log_collector_collection_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_collection_model_json2 = flow_log_collector_collection_model.to_dict() + flow_log_collector_collection_model_json2 = flow_log_collector_collection_model.to_dict( + ) assert flow_log_collector_collection_model_json2 == flow_log_collector_collection_model_json @@ -53471,21 +58803,26 @@ def test_flow_log_collector_collection_first_serialization(self): # Construct a json representation of a FlowLogCollectorCollectionFirst model flow_log_collector_collection_first_model_json = {} - flow_log_collector_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20' + flow_log_collector_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20' # Construct a model instance of FlowLogCollectorCollectionFirst by calling from_dict on the json representation - flow_log_collector_collection_first_model = FlowLogCollectorCollectionFirst.from_dict(flow_log_collector_collection_first_model_json) + flow_log_collector_collection_first_model = FlowLogCollectorCollectionFirst.from_dict( + flow_log_collector_collection_first_model_json) assert flow_log_collector_collection_first_model != False # Construct a model instance of FlowLogCollectorCollectionFirst by calling from_dict on the json representation - flow_log_collector_collection_first_model_dict = FlowLogCollectorCollectionFirst.from_dict(flow_log_collector_collection_first_model_json).__dict__ - flow_log_collector_collection_first_model2 = FlowLogCollectorCollectionFirst(**flow_log_collector_collection_first_model_dict) + flow_log_collector_collection_first_model_dict = FlowLogCollectorCollectionFirst.from_dict( + flow_log_collector_collection_first_model_json).__dict__ + flow_log_collector_collection_first_model2 = FlowLogCollectorCollectionFirst( + **flow_log_collector_collection_first_model_dict) # Verify the model instances are equivalent assert flow_log_collector_collection_first_model == flow_log_collector_collection_first_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_collection_first_model_json2 = flow_log_collector_collection_first_model.to_dict() + flow_log_collector_collection_first_model_json2 = flow_log_collector_collection_first_model.to_dict( + ) assert flow_log_collector_collection_first_model_json2 == flow_log_collector_collection_first_model_json @@ -53501,21 +58838,26 @@ def test_flow_log_collector_collection_next_serialization(self): # Construct a json representation of a FlowLogCollectorCollectionNext model flow_log_collector_collection_next_model_json = {} - flow_log_collector_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + flow_log_collector_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of FlowLogCollectorCollectionNext by calling from_dict on the json representation - flow_log_collector_collection_next_model = FlowLogCollectorCollectionNext.from_dict(flow_log_collector_collection_next_model_json) + flow_log_collector_collection_next_model = FlowLogCollectorCollectionNext.from_dict( + flow_log_collector_collection_next_model_json) assert flow_log_collector_collection_next_model != False # Construct a model instance of FlowLogCollectorCollectionNext by calling from_dict on the json representation - flow_log_collector_collection_next_model_dict = FlowLogCollectorCollectionNext.from_dict(flow_log_collector_collection_next_model_json).__dict__ - flow_log_collector_collection_next_model2 = FlowLogCollectorCollectionNext(**flow_log_collector_collection_next_model_dict) + flow_log_collector_collection_next_model_dict = FlowLogCollectorCollectionNext.from_dict( + flow_log_collector_collection_next_model_json).__dict__ + flow_log_collector_collection_next_model2 = FlowLogCollectorCollectionNext( + **flow_log_collector_collection_next_model_dict) # Verify the model instances are equivalent assert flow_log_collector_collection_next_model == flow_log_collector_collection_next_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_collection_next_model_json2 = flow_log_collector_collection_next_model.to_dict() + flow_log_collector_collection_next_model_json2 = flow_log_collector_collection_next_model.to_dict( + ) assert flow_log_collector_collection_next_model_json2 == flow_log_collector_collection_next_model_json @@ -53535,18 +58877,22 @@ def test_flow_log_collector_patch_serialization(self): flow_log_collector_patch_model_json['name'] = 'my-flow-log-collector' # Construct a model instance of FlowLogCollectorPatch by calling from_dict on the json representation - flow_log_collector_patch_model = FlowLogCollectorPatch.from_dict(flow_log_collector_patch_model_json) + flow_log_collector_patch_model = FlowLogCollectorPatch.from_dict( + flow_log_collector_patch_model_json) assert flow_log_collector_patch_model != False # Construct a model instance of FlowLogCollectorPatch by calling from_dict on the json representation - flow_log_collector_patch_model_dict = FlowLogCollectorPatch.from_dict(flow_log_collector_patch_model_json).__dict__ - flow_log_collector_patch_model2 = FlowLogCollectorPatch(**flow_log_collector_patch_model_dict) + flow_log_collector_patch_model_dict = FlowLogCollectorPatch.from_dict( + flow_log_collector_patch_model_json).__dict__ + flow_log_collector_patch_model2 = FlowLogCollectorPatch( + **flow_log_collector_patch_model_dict) # Verify the model instances are equivalent assert flow_log_collector_patch_model == flow_log_collector_patch_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_patch_model_json2 = flow_log_collector_patch_model.to_dict() + flow_log_collector_patch_model_json2 = flow_log_collector_patch_model.to_dict( + ) assert flow_log_collector_patch_model_json2 == flow_log_collector_patch_model_json @@ -53562,21 +58908,26 @@ def test_generic_resource_reference_deleted_serialization(self): # Construct a json representation of a GenericResourceReferenceDeleted model generic_resource_reference_deleted_model_json = {} - generic_resource_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + generic_resource_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of GenericResourceReferenceDeleted by calling from_dict on the json representation - generic_resource_reference_deleted_model = GenericResourceReferenceDeleted.from_dict(generic_resource_reference_deleted_model_json) + generic_resource_reference_deleted_model = GenericResourceReferenceDeleted.from_dict( + generic_resource_reference_deleted_model_json) assert generic_resource_reference_deleted_model != False # Construct a model instance of GenericResourceReferenceDeleted by calling from_dict on the json representation - generic_resource_reference_deleted_model_dict = GenericResourceReferenceDeleted.from_dict(generic_resource_reference_deleted_model_json).__dict__ - generic_resource_reference_deleted_model2 = GenericResourceReferenceDeleted(**generic_resource_reference_deleted_model_dict) + generic_resource_reference_deleted_model_dict = GenericResourceReferenceDeleted.from_dict( + generic_resource_reference_deleted_model_json).__dict__ + generic_resource_reference_deleted_model2 = GenericResourceReferenceDeleted( + **generic_resource_reference_deleted_model_dict) # Verify the model instances are equivalent assert generic_resource_reference_deleted_model == generic_resource_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - generic_resource_reference_deleted_model_json2 = generic_resource_reference_deleted_model.to_dict() + generic_resource_reference_deleted_model_json2 = generic_resource_reference_deleted_model.to_dict( + ) assert generic_resource_reference_deleted_model_json2 == generic_resource_reference_deleted_model_json @@ -53592,29 +58943,41 @@ def test_ike_policy_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference - vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + vpn_gateway_connection_reference_model = { + } # VPNGatewayConnectionReference + vpn_gateway_connection_reference_model[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model[ + 'resource_type'] = 'vpn_gateway_connection' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' # Construct a json representation of a IKEPolicy model ike_policy_model_json = {} ike_policy_model_json['authentication_algorithm'] = 'md5' - ike_policy_model_json['connections'] = [vpn_gateway_connection_reference_model] + ike_policy_model_json['connections'] = [ + vpn_gateway_connection_reference_model + ] ike_policy_model_json['created_at'] = '2019-01-01T12:00:00Z' ike_policy_model_json['dh_group'] = 14 ike_policy_model_json['encryption_algorithm'] = 'aes128' - ike_policy_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_model_json['ike_version'] = 1 ike_policy_model_json['key_lifetime'] = 28800 @@ -53628,7 +58991,8 @@ def test_ike_policy_serialization(self): assert ike_policy_model != False # Construct a model instance of IKEPolicy by calling from_dict on the json representation - ike_policy_model_dict = IKEPolicy.from_dict(ike_policy_model_json).__dict__ + ike_policy_model_dict = IKEPolicy.from_dict( + ike_policy_model_json).__dict__ ike_policy_model2 = IKEPolicy(**ike_policy_model_dict) # Verify the model instances are equivalent @@ -53652,30 +59016,43 @@ def test_ike_policy_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. ike_policy_collection_first_model = {} # IKEPolicyCollectionFirst - ike_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20' - - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference - vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + ike_policy_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20' + + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + vpn_gateway_connection_reference_model = { + } # VPNGatewayConnectionReference + vpn_gateway_connection_reference_model[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model[ + 'resource_type'] = 'vpn_gateway_connection' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' ike_policy_model = {} # IKEPolicy ike_policy_model['authentication_algorithm'] = 'md5' - ike_policy_model['connections'] = [vpn_gateway_connection_reference_model] + ike_policy_model['connections'] = [ + vpn_gateway_connection_reference_model + ] ike_policy_model['created_at'] = '2019-01-01T12:00:00Z' ike_policy_model['dh_group'] = 14 ike_policy_model['encryption_algorithm'] = 'aes128' - ike_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_model['ike_version'] = 1 ike_policy_model['key_lifetime'] = 28800 @@ -53685,29 +59062,36 @@ def test_ike_policy_collection_serialization(self): ike_policy_model['resource_type'] = 'ike_policy' ike_policy_collection_next_model = {} # IKEPolicyCollectionNext - ike_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + ike_policy_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' # Construct a json representation of a IKEPolicyCollection model ike_policy_collection_model_json = {} - ike_policy_collection_model_json['first'] = ike_policy_collection_first_model + ike_policy_collection_model_json[ + 'first'] = ike_policy_collection_first_model ike_policy_collection_model_json['ike_policies'] = [ike_policy_model] ike_policy_collection_model_json['limit'] = 20 - ike_policy_collection_model_json['next'] = ike_policy_collection_next_model + ike_policy_collection_model_json[ + 'next'] = ike_policy_collection_next_model ike_policy_collection_model_json['total_count'] = 132 # Construct a model instance of IKEPolicyCollection by calling from_dict on the json representation - ike_policy_collection_model = IKEPolicyCollection.from_dict(ike_policy_collection_model_json) + ike_policy_collection_model = IKEPolicyCollection.from_dict( + ike_policy_collection_model_json) assert ike_policy_collection_model != False # Construct a model instance of IKEPolicyCollection by calling from_dict on the json representation - ike_policy_collection_model_dict = IKEPolicyCollection.from_dict(ike_policy_collection_model_json).__dict__ - ike_policy_collection_model2 = IKEPolicyCollection(**ike_policy_collection_model_dict) + ike_policy_collection_model_dict = IKEPolicyCollection.from_dict( + ike_policy_collection_model_json).__dict__ + ike_policy_collection_model2 = IKEPolicyCollection( + **ike_policy_collection_model_dict) # Verify the model instances are equivalent assert ike_policy_collection_model == ike_policy_collection_model2 # Convert model instance back to dict and verify no loss of data - ike_policy_collection_model_json2 = ike_policy_collection_model.to_dict() + ike_policy_collection_model_json2 = ike_policy_collection_model.to_dict( + ) assert ike_policy_collection_model_json2 == ike_policy_collection_model_json @@ -53723,21 +59107,26 @@ def test_ike_policy_collection_first_serialization(self): # Construct a json representation of a IKEPolicyCollectionFirst model ike_policy_collection_first_model_json = {} - ike_policy_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20' + ike_policy_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20' # Construct a model instance of IKEPolicyCollectionFirst by calling from_dict on the json representation - ike_policy_collection_first_model = IKEPolicyCollectionFirst.from_dict(ike_policy_collection_first_model_json) + ike_policy_collection_first_model = IKEPolicyCollectionFirst.from_dict( + ike_policy_collection_first_model_json) assert ike_policy_collection_first_model != False # Construct a model instance of IKEPolicyCollectionFirst by calling from_dict on the json representation - ike_policy_collection_first_model_dict = IKEPolicyCollectionFirst.from_dict(ike_policy_collection_first_model_json).__dict__ - ike_policy_collection_first_model2 = IKEPolicyCollectionFirst(**ike_policy_collection_first_model_dict) + ike_policy_collection_first_model_dict = IKEPolicyCollectionFirst.from_dict( + ike_policy_collection_first_model_json).__dict__ + ike_policy_collection_first_model2 = IKEPolicyCollectionFirst( + **ike_policy_collection_first_model_dict) # Verify the model instances are equivalent assert ike_policy_collection_first_model == ike_policy_collection_first_model2 # Convert model instance back to dict and verify no loss of data - ike_policy_collection_first_model_json2 = ike_policy_collection_first_model.to_dict() + ike_policy_collection_first_model_json2 = ike_policy_collection_first_model.to_dict( + ) assert ike_policy_collection_first_model_json2 == ike_policy_collection_first_model_json @@ -53753,24 +59142,248 @@ def test_ike_policy_collection_next_serialization(self): # Construct a json representation of a IKEPolicyCollectionNext model ike_policy_collection_next_model_json = {} - ike_policy_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + ike_policy_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' # Construct a model instance of IKEPolicyCollectionNext by calling from_dict on the json representation - ike_policy_collection_next_model = IKEPolicyCollectionNext.from_dict(ike_policy_collection_next_model_json) + ike_policy_collection_next_model = IKEPolicyCollectionNext.from_dict( + ike_policy_collection_next_model_json) assert ike_policy_collection_next_model != False # Construct a model instance of IKEPolicyCollectionNext by calling from_dict on the json representation - ike_policy_collection_next_model_dict = IKEPolicyCollectionNext.from_dict(ike_policy_collection_next_model_json).__dict__ - ike_policy_collection_next_model2 = IKEPolicyCollectionNext(**ike_policy_collection_next_model_dict) + ike_policy_collection_next_model_dict = IKEPolicyCollectionNext.from_dict( + ike_policy_collection_next_model_json).__dict__ + ike_policy_collection_next_model2 = IKEPolicyCollectionNext( + **ike_policy_collection_next_model_dict) # Verify the model instances are equivalent assert ike_policy_collection_next_model == ike_policy_collection_next_model2 # Convert model instance back to dict and verify no loss of data - ike_policy_collection_next_model_json2 = ike_policy_collection_next_model.to_dict() + ike_policy_collection_next_model_json2 = ike_policy_collection_next_model.to_dict( + ) assert ike_policy_collection_next_model_json2 == ike_policy_collection_next_model_json +class TestModel_IKEPolicyConnectionCollection: + """ + Test Class for IKEPolicyConnectionCollection + """ + + def test_ike_policy_connection_collection_serialization(self): + """ + Test serialization/deserialization for IKEPolicyConnectionCollection + """ + + # Construct dict forms of any model objects needed in order to build this model. + + vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD + vpn_gateway_connection_dpd_model['action'] = 'none' + vpn_gateway_connection_dpd_model['interval'] = 15 + vpn_gateway_connection_dpd_model['timeout'] = 30 + + ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted + ike_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + ike_policy_reference_model = {} # IKEPolicyReference + ike_policy_reference_model[ + 'deleted'] = ike_policy_reference_deleted_model + ike_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model['name'] = 'my-ike-policy' + ike_policy_reference_model['resource_type'] = 'ike_policy' + + i_psec_policy_reference_deleted_model = { + } # IPsecPolicyReferenceDeleted + i_psec_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + i_psec_policy_reference_model = {} # IPsecPolicyReference + i_psec_policy_reference_model[ + 'deleted'] = i_psec_policy_reference_deleted_model + i_psec_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model['name'] = 'my-ipsec-policy' + i_psec_policy_reference_model['resource_type'] = 'ipsec_policy' + + vpn_gateway_connection_status_reason_model = { + } # VPNGatewayConnectionStatusReason + vpn_gateway_connection_status_reason_model[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_status_reason_model[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model['type'] = 'ipv4_address' + vpn_gateway_connection_ike_identity_model['value'] = '192.0.2.4' + + vpn_gateway_connection_policy_mode_local_model = { + } # VPNGatewayConnectionPolicyModeLocal + vpn_gateway_connection_policy_mode_local_model['cidrs'] = [ + '192.0.2.0/24' + ] + vpn_gateway_connection_policy_mode_local_model['ike_identities'] = [ + vpn_gateway_connection_ike_identity_model + ] + + vpn_gateway_connection_policy_mode_peer_model = { + } # VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress + vpn_gateway_connection_policy_mode_peer_model['cidrs'] = [ + '192.0.3.0/24' + ] + vpn_gateway_connection_policy_mode_peer_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_policy_mode_peer_model['type'] = 'address' + vpn_gateway_connection_policy_mode_peer_model['address'] = '192.0.2.5' + + vpn_gateway_connection_model = {} # VPNGatewayConnectionPolicyMode + vpn_gateway_connection_model['admin_state_up'] = True + vpn_gateway_connection_model['authentication_mode'] = 'psk' + vpn_gateway_connection_model[ + 'created_at'] = '2018-12-13T19:40:12.124000Z' + vpn_gateway_connection_model[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_model + vpn_gateway_connection_model['establish_mode'] = 'peer_only' + vpn_gateway_connection_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/52f69dc3-6a5c-4bcf-b264-e7fae279b15c' + vpn_gateway_connection_model[ + 'id'] = '52f69dc3-6a5c-4bcf-b264-e7fae279b15c' + vpn_gateway_connection_model['ike_policy'] = ike_policy_reference_model + vpn_gateway_connection_model[ + 'ipsec_policy'] = i_psec_policy_reference_model + vpn_gateway_connection_model['mode'] = 'policy' + vpn_gateway_connection_model['name'] = 'my-vpn-connection-1' + vpn_gateway_connection_model['psk'] = 'lkj14b1oi0alcniejkso' + vpn_gateway_connection_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_model['status'] = 'down' + vpn_gateway_connection_model['status_reasons'] = [ + vpn_gateway_connection_status_reason_model + ] + vpn_gateway_connection_model[ + 'local'] = vpn_gateway_connection_policy_mode_local_model + vpn_gateway_connection_model[ + 'peer'] = vpn_gateway_connection_policy_mode_peer_model + + ike_policy_connection_collection_first_model = { + } # IKEPolicyConnectionCollectionFirst + ike_policy_connection_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?limit=20' + + ike_policy_connection_collection_next_model = { + } # IKEPolicyConnectionCollectionNext + ike_policy_connection_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?start=c6d339ad873241c4acc936dfcff3f6d2&limit=20' + + # Construct a json representation of a IKEPolicyConnectionCollection model + ike_policy_connection_collection_model_json = {} + ike_policy_connection_collection_model_json['connections'] = [ + vpn_gateway_connection_model + ] + ike_policy_connection_collection_model_json[ + 'first'] = ike_policy_connection_collection_first_model + ike_policy_connection_collection_model_json['limit'] = 20 + ike_policy_connection_collection_model_json[ + 'next'] = ike_policy_connection_collection_next_model + ike_policy_connection_collection_model_json['total_count'] = 132 + + # Construct a model instance of IKEPolicyConnectionCollection by calling from_dict on the json representation + ike_policy_connection_collection_model = IKEPolicyConnectionCollection.from_dict( + ike_policy_connection_collection_model_json) + assert ike_policy_connection_collection_model != False + + # Construct a model instance of IKEPolicyConnectionCollection by calling from_dict on the json representation + ike_policy_connection_collection_model_dict = IKEPolicyConnectionCollection.from_dict( + ike_policy_connection_collection_model_json).__dict__ + ike_policy_connection_collection_model2 = IKEPolicyConnectionCollection( + **ike_policy_connection_collection_model_dict) + + # Verify the model instances are equivalent + assert ike_policy_connection_collection_model == ike_policy_connection_collection_model2 + + # Convert model instance back to dict and verify no loss of data + ike_policy_connection_collection_model_json2 = ike_policy_connection_collection_model.to_dict( + ) + assert ike_policy_connection_collection_model_json2 == ike_policy_connection_collection_model_json + + +class TestModel_IKEPolicyConnectionCollectionFirst: + """ + Test Class for IKEPolicyConnectionCollectionFirst + """ + + def test_ike_policy_connection_collection_first_serialization(self): + """ + Test serialization/deserialization for IKEPolicyConnectionCollectionFirst + """ + + # Construct a json representation of a IKEPolicyConnectionCollectionFirst model + ike_policy_connection_collection_first_model_json = {} + ike_policy_connection_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?limit=20' + + # Construct a model instance of IKEPolicyConnectionCollectionFirst by calling from_dict on the json representation + ike_policy_connection_collection_first_model = IKEPolicyConnectionCollectionFirst.from_dict( + ike_policy_connection_collection_first_model_json) + assert ike_policy_connection_collection_first_model != False + + # Construct a model instance of IKEPolicyConnectionCollectionFirst by calling from_dict on the json representation + ike_policy_connection_collection_first_model_dict = IKEPolicyConnectionCollectionFirst.from_dict( + ike_policy_connection_collection_first_model_json).__dict__ + ike_policy_connection_collection_first_model2 = IKEPolicyConnectionCollectionFirst( + **ike_policy_connection_collection_first_model_dict) + + # Verify the model instances are equivalent + assert ike_policy_connection_collection_first_model == ike_policy_connection_collection_first_model2 + + # Convert model instance back to dict and verify no loss of data + ike_policy_connection_collection_first_model_json2 = ike_policy_connection_collection_first_model.to_dict( + ) + assert ike_policy_connection_collection_first_model_json2 == ike_policy_connection_collection_first_model_json + + +class TestModel_IKEPolicyConnectionCollectionNext: + """ + Test Class for IKEPolicyConnectionCollectionNext + """ + + def test_ike_policy_connection_collection_next_serialization(self): + """ + Test serialization/deserialization for IKEPolicyConnectionCollectionNext + """ + + # Construct a json representation of a IKEPolicyConnectionCollectionNext model + ike_policy_connection_collection_next_model_json = {} + ike_policy_connection_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?start=c6d339ad873241c4acc936dfcff3f6d2&limit=20' + + # Construct a model instance of IKEPolicyConnectionCollectionNext by calling from_dict on the json representation + ike_policy_connection_collection_next_model = IKEPolicyConnectionCollectionNext.from_dict( + ike_policy_connection_collection_next_model_json) + assert ike_policy_connection_collection_next_model != False + + # Construct a model instance of IKEPolicyConnectionCollectionNext by calling from_dict on the json representation + ike_policy_connection_collection_next_model_dict = IKEPolicyConnectionCollectionNext.from_dict( + ike_policy_connection_collection_next_model_json).__dict__ + ike_policy_connection_collection_next_model2 = IKEPolicyConnectionCollectionNext( + **ike_policy_connection_collection_next_model_dict) + + # Verify the model instances are equivalent + assert ike_policy_connection_collection_next_model == ike_policy_connection_collection_next_model2 + + # Convert model instance back to dict and verify no loss of data + ike_policy_connection_collection_next_model_json2 = ike_policy_connection_collection_next_model.to_dict( + ) + assert ike_policy_connection_collection_next_model_json2 == ike_policy_connection_collection_next_model_json + + class TestModel_IKEPolicyPatch: """ Test Class for IKEPolicyPatch @@ -53791,11 +59404,13 @@ def test_ike_policy_patch_serialization(self): ike_policy_patch_model_json['name'] = 'my-ike-policy' # Construct a model instance of IKEPolicyPatch by calling from_dict on the json representation - ike_policy_patch_model = IKEPolicyPatch.from_dict(ike_policy_patch_model_json) + ike_policy_patch_model = IKEPolicyPatch.from_dict( + ike_policy_patch_model_json) assert ike_policy_patch_model != False # Construct a model instance of IKEPolicyPatch by calling from_dict on the json representation - ike_policy_patch_model_dict = IKEPolicyPatch.from_dict(ike_policy_patch_model_json).__dict__ + ike_policy_patch_model_dict = IKEPolicyPatch.from_dict( + ike_policy_patch_model_json).__dict__ ike_policy_patch_model2 = IKEPolicyPatch(**ike_policy_patch_model_dict) # Verify the model instances are equivalent @@ -53819,23 +59434,30 @@ def test_ike_policy_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted - ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + ike_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a IKEPolicyReference model ike_policy_reference_model_json = {} - ike_policy_reference_model_json['deleted'] = ike_policy_reference_deleted_model - ike_policy_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - ike_policy_reference_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model_json[ + 'deleted'] = ike_policy_reference_deleted_model + ike_policy_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_reference_model_json['name'] = 'my-ike-policy' ike_policy_reference_model_json['resource_type'] = 'ike_policy' # Construct a model instance of IKEPolicyReference by calling from_dict on the json representation - ike_policy_reference_model = IKEPolicyReference.from_dict(ike_policy_reference_model_json) + ike_policy_reference_model = IKEPolicyReference.from_dict( + ike_policy_reference_model_json) assert ike_policy_reference_model != False # Construct a model instance of IKEPolicyReference by calling from_dict on the json representation - ike_policy_reference_model_dict = IKEPolicyReference.from_dict(ike_policy_reference_model_json).__dict__ - ike_policy_reference_model2 = IKEPolicyReference(**ike_policy_reference_model_dict) + ike_policy_reference_model_dict = IKEPolicyReference.from_dict( + ike_policy_reference_model_json).__dict__ + ike_policy_reference_model2 = IKEPolicyReference( + **ike_policy_reference_model_dict) # Verify the model instances are equivalent assert ike_policy_reference_model == ike_policy_reference_model2 @@ -53857,21 +59479,26 @@ def test_ike_policy_reference_deleted_serialization(self): # Construct a json representation of a IKEPolicyReferenceDeleted model ike_policy_reference_deleted_model_json = {} - ike_policy_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + ike_policy_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of IKEPolicyReferenceDeleted by calling from_dict on the json representation - ike_policy_reference_deleted_model = IKEPolicyReferenceDeleted.from_dict(ike_policy_reference_deleted_model_json) + ike_policy_reference_deleted_model = IKEPolicyReferenceDeleted.from_dict( + ike_policy_reference_deleted_model_json) assert ike_policy_reference_deleted_model != False # Construct a model instance of IKEPolicyReferenceDeleted by calling from_dict on the json representation - ike_policy_reference_deleted_model_dict = IKEPolicyReferenceDeleted.from_dict(ike_policy_reference_deleted_model_json).__dict__ - ike_policy_reference_deleted_model2 = IKEPolicyReferenceDeleted(**ike_policy_reference_deleted_model_dict) + ike_policy_reference_deleted_model_dict = IKEPolicyReferenceDeleted.from_dict( + ike_policy_reference_deleted_model_json).__dict__ + ike_policy_reference_deleted_model2 = IKEPolicyReferenceDeleted( + **ike_policy_reference_deleted_model_dict) # Verify the model instances are equivalent assert ike_policy_reference_deleted_model == ike_policy_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - ike_policy_reference_deleted_model_json2 = ike_policy_reference_deleted_model.to_dict() + ike_policy_reference_deleted_model_json2 = ike_policy_reference_deleted_model.to_dict( + ) assert ike_policy_reference_deleted_model_json2 == ike_policy_reference_deleted_model_json @@ -53917,34 +59544,47 @@ def test_i_psec_policy_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference - vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + vpn_gateway_connection_reference_model = { + } # VPNGatewayConnectionReference + vpn_gateway_connection_reference_model[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model[ + 'resource_type'] = 'vpn_gateway_connection' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' # Construct a json representation of a IPsecPolicy model i_psec_policy_model_json = {} i_psec_policy_model_json['authentication_algorithm'] = 'disabled' - i_psec_policy_model_json['connections'] = [vpn_gateway_connection_reference_model] + i_psec_policy_model_json['connections'] = [ + vpn_gateway_connection_reference_model + ] i_psec_policy_model_json['created_at'] = '2019-01-01T12:00:00Z' i_psec_policy_model_json['encapsulation_mode'] = 'tunnel' i_psec_policy_model_json['encryption_algorithm'] = 'aes128' - i_psec_policy_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_model_json['key_lifetime'] = 3600 i_psec_policy_model_json['name'] = 'my-ipsec-policy' i_psec_policy_model_json['pfs'] = 'disabled' - i_psec_policy_model_json['resource_group'] = resource_group_reference_model + i_psec_policy_model_json[ + 'resource_group'] = resource_group_reference_model i_psec_policy_model_json['resource_type'] = 'ipsec_policy' i_psec_policy_model_json['transform_protocol'] = 'esp' @@ -53953,7 +59593,8 @@ def test_i_psec_policy_serialization(self): assert i_psec_policy_model != False # Construct a model instance of IPsecPolicy by calling from_dict on the json representation - i_psec_policy_model_dict = IPsecPolicy.from_dict(i_psec_policy_model_json).__dict__ + i_psec_policy_model_dict = IPsecPolicy.from_dict( + i_psec_policy_model_json).__dict__ i_psec_policy_model2 = IPsecPolicy(**i_psec_policy_model_dict) # Verify the model instances are equivalent @@ -53977,30 +59618,43 @@ def test_i_psec_policy_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. i_psec_policy_collection_first_model = {} # IPsecPolicyCollectionFirst - i_psec_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20' - - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference - vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + i_psec_policy_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20' + + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + vpn_gateway_connection_reference_model = { + } # VPNGatewayConnectionReference + vpn_gateway_connection_reference_model[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model[ + 'resource_type'] = 'vpn_gateway_connection' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' i_psec_policy_model = {} # IPsecPolicy i_psec_policy_model['authentication_algorithm'] = 'disabled' - i_psec_policy_model['connections'] = [vpn_gateway_connection_reference_model] + i_psec_policy_model['connections'] = [ + vpn_gateway_connection_reference_model + ] i_psec_policy_model['created_at'] = '2019-01-01T12:00:00Z' i_psec_policy_model['encapsulation_mode'] = 'tunnel' i_psec_policy_model['encryption_algorithm'] = 'aes128' - i_psec_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_model['key_lifetime'] = 3600 i_psec_policy_model['name'] = 'my-ipsec-policy' @@ -54010,29 +59664,38 @@ def test_i_psec_policy_collection_serialization(self): i_psec_policy_model['transform_protocol'] = 'esp' i_psec_policy_collection_next_model = {} # IPsecPolicyCollectionNext - i_psec_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + i_psec_policy_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' # Construct a json representation of a IPsecPolicyCollection model i_psec_policy_collection_model_json = {} - i_psec_policy_collection_model_json['first'] = i_psec_policy_collection_first_model - i_psec_policy_collection_model_json['ipsec_policies'] = [i_psec_policy_model] + i_psec_policy_collection_model_json[ + 'first'] = i_psec_policy_collection_first_model + i_psec_policy_collection_model_json['ipsec_policies'] = [ + i_psec_policy_model + ] i_psec_policy_collection_model_json['limit'] = 20 - i_psec_policy_collection_model_json['next'] = i_psec_policy_collection_next_model + i_psec_policy_collection_model_json[ + 'next'] = i_psec_policy_collection_next_model i_psec_policy_collection_model_json['total_count'] = 132 # Construct a model instance of IPsecPolicyCollection by calling from_dict on the json representation - i_psec_policy_collection_model = IPsecPolicyCollection.from_dict(i_psec_policy_collection_model_json) + i_psec_policy_collection_model = IPsecPolicyCollection.from_dict( + i_psec_policy_collection_model_json) assert i_psec_policy_collection_model != False # Construct a model instance of IPsecPolicyCollection by calling from_dict on the json representation - i_psec_policy_collection_model_dict = IPsecPolicyCollection.from_dict(i_psec_policy_collection_model_json).__dict__ - i_psec_policy_collection_model2 = IPsecPolicyCollection(**i_psec_policy_collection_model_dict) + i_psec_policy_collection_model_dict = IPsecPolicyCollection.from_dict( + i_psec_policy_collection_model_json).__dict__ + i_psec_policy_collection_model2 = IPsecPolicyCollection( + **i_psec_policy_collection_model_dict) # Verify the model instances are equivalent assert i_psec_policy_collection_model == i_psec_policy_collection_model2 # Convert model instance back to dict and verify no loss of data - i_psec_policy_collection_model_json2 = i_psec_policy_collection_model.to_dict() + i_psec_policy_collection_model_json2 = i_psec_policy_collection_model.to_dict( + ) assert i_psec_policy_collection_model_json2 == i_psec_policy_collection_model_json @@ -54048,21 +59711,26 @@ def test_i_psec_policy_collection_first_serialization(self): # Construct a json representation of a IPsecPolicyCollectionFirst model i_psec_policy_collection_first_model_json = {} - i_psec_policy_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20' + i_psec_policy_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20' # Construct a model instance of IPsecPolicyCollectionFirst by calling from_dict on the json representation - i_psec_policy_collection_first_model = IPsecPolicyCollectionFirst.from_dict(i_psec_policy_collection_first_model_json) + i_psec_policy_collection_first_model = IPsecPolicyCollectionFirst.from_dict( + i_psec_policy_collection_first_model_json) assert i_psec_policy_collection_first_model != False # Construct a model instance of IPsecPolicyCollectionFirst by calling from_dict on the json representation - i_psec_policy_collection_first_model_dict = IPsecPolicyCollectionFirst.from_dict(i_psec_policy_collection_first_model_json).__dict__ - i_psec_policy_collection_first_model2 = IPsecPolicyCollectionFirst(**i_psec_policy_collection_first_model_dict) + i_psec_policy_collection_first_model_dict = IPsecPolicyCollectionFirst.from_dict( + i_psec_policy_collection_first_model_json).__dict__ + i_psec_policy_collection_first_model2 = IPsecPolicyCollectionFirst( + **i_psec_policy_collection_first_model_dict) # Verify the model instances are equivalent assert i_psec_policy_collection_first_model == i_psec_policy_collection_first_model2 # Convert model instance back to dict and verify no loss of data - i_psec_policy_collection_first_model_json2 = i_psec_policy_collection_first_model.to_dict() + i_psec_policy_collection_first_model_json2 = i_psec_policy_collection_first_model.to_dict( + ) assert i_psec_policy_collection_first_model_json2 == i_psec_policy_collection_first_model_json @@ -54078,24 +59746,248 @@ def test_i_psec_policy_collection_next_serialization(self): # Construct a json representation of a IPsecPolicyCollectionNext model i_psec_policy_collection_next_model_json = {} - i_psec_policy_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + i_psec_policy_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' # Construct a model instance of IPsecPolicyCollectionNext by calling from_dict on the json representation - i_psec_policy_collection_next_model = IPsecPolicyCollectionNext.from_dict(i_psec_policy_collection_next_model_json) + i_psec_policy_collection_next_model = IPsecPolicyCollectionNext.from_dict( + i_psec_policy_collection_next_model_json) assert i_psec_policy_collection_next_model != False # Construct a model instance of IPsecPolicyCollectionNext by calling from_dict on the json representation - i_psec_policy_collection_next_model_dict = IPsecPolicyCollectionNext.from_dict(i_psec_policy_collection_next_model_json).__dict__ - i_psec_policy_collection_next_model2 = IPsecPolicyCollectionNext(**i_psec_policy_collection_next_model_dict) + i_psec_policy_collection_next_model_dict = IPsecPolicyCollectionNext.from_dict( + i_psec_policy_collection_next_model_json).__dict__ + i_psec_policy_collection_next_model2 = IPsecPolicyCollectionNext( + **i_psec_policy_collection_next_model_dict) # Verify the model instances are equivalent assert i_psec_policy_collection_next_model == i_psec_policy_collection_next_model2 # Convert model instance back to dict and verify no loss of data - i_psec_policy_collection_next_model_json2 = i_psec_policy_collection_next_model.to_dict() + i_psec_policy_collection_next_model_json2 = i_psec_policy_collection_next_model.to_dict( + ) assert i_psec_policy_collection_next_model_json2 == i_psec_policy_collection_next_model_json +class TestModel_IPsecPolicyConnectionCollection: + """ + Test Class for IPsecPolicyConnectionCollection + """ + + def test_i_psec_policy_connection_collection_serialization(self): + """ + Test serialization/deserialization for IPsecPolicyConnectionCollection + """ + + # Construct dict forms of any model objects needed in order to build this model. + + vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD + vpn_gateway_connection_dpd_model['action'] = 'none' + vpn_gateway_connection_dpd_model['interval'] = 15 + vpn_gateway_connection_dpd_model['timeout'] = 30 + + ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted + ike_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + ike_policy_reference_model = {} # IKEPolicyReference + ike_policy_reference_model[ + 'deleted'] = ike_policy_reference_deleted_model + ike_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model['name'] = 'my-ike-policy' + ike_policy_reference_model['resource_type'] = 'ike_policy' + + i_psec_policy_reference_deleted_model = { + } # IPsecPolicyReferenceDeleted + i_psec_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + i_psec_policy_reference_model = {} # IPsecPolicyReference + i_psec_policy_reference_model[ + 'deleted'] = i_psec_policy_reference_deleted_model + i_psec_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model['name'] = 'my-ipsec-policy' + i_psec_policy_reference_model['resource_type'] = 'ipsec_policy' + + vpn_gateway_connection_status_reason_model = { + } # VPNGatewayConnectionStatusReason + vpn_gateway_connection_status_reason_model[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_status_reason_model[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model['type'] = 'ipv4_address' + vpn_gateway_connection_ike_identity_model['value'] = '192.0.2.4' + + vpn_gateway_connection_policy_mode_local_model = { + } # VPNGatewayConnectionPolicyModeLocal + vpn_gateway_connection_policy_mode_local_model['cidrs'] = [ + '192.0.2.0/24' + ] + vpn_gateway_connection_policy_mode_local_model['ike_identities'] = [ + vpn_gateway_connection_ike_identity_model + ] + + vpn_gateway_connection_policy_mode_peer_model = { + } # VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress + vpn_gateway_connection_policy_mode_peer_model['cidrs'] = [ + '192.0.3.0/24' + ] + vpn_gateway_connection_policy_mode_peer_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_policy_mode_peer_model['type'] = 'address' + vpn_gateway_connection_policy_mode_peer_model['address'] = '192.0.2.5' + + vpn_gateway_connection_model = {} # VPNGatewayConnectionPolicyMode + vpn_gateway_connection_model['admin_state_up'] = True + vpn_gateway_connection_model['authentication_mode'] = 'psk' + vpn_gateway_connection_model[ + 'created_at'] = '2018-12-13T19:40:12.124000Z' + vpn_gateway_connection_model[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_model + vpn_gateway_connection_model['establish_mode'] = 'peer_only' + vpn_gateway_connection_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/52f69dc3-6a5c-4bcf-b264-e7fae279b15c' + vpn_gateway_connection_model[ + 'id'] = '52f69dc3-6a5c-4bcf-b264-e7fae279b15c' + vpn_gateway_connection_model['ike_policy'] = ike_policy_reference_model + vpn_gateway_connection_model[ + 'ipsec_policy'] = i_psec_policy_reference_model + vpn_gateway_connection_model['mode'] = 'policy' + vpn_gateway_connection_model['name'] = 'my-vpn-connection-1' + vpn_gateway_connection_model['psk'] = 'lkj14b1oi0alcniejkso' + vpn_gateway_connection_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_model['status'] = 'down' + vpn_gateway_connection_model['status_reasons'] = [ + vpn_gateway_connection_status_reason_model + ] + vpn_gateway_connection_model[ + 'local'] = vpn_gateway_connection_policy_mode_local_model + vpn_gateway_connection_model[ + 'peer'] = vpn_gateway_connection_policy_mode_peer_model + + i_psec_policy_connection_collection_first_model = { + } # IPsecPolicyConnectionCollectionFirst + i_psec_policy_connection_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?limit=20' + + i_psec_policy_connection_collection_next_model = { + } # IPsecPolicyConnectionCollectionNext + i_psec_policy_connection_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?start=250337b8fa72455c962e-c23e5706d452&limit=20' + + # Construct a json representation of a IPsecPolicyConnectionCollection model + i_psec_policy_connection_collection_model_json = {} + i_psec_policy_connection_collection_model_json['connections'] = [ + vpn_gateway_connection_model + ] + i_psec_policy_connection_collection_model_json[ + 'first'] = i_psec_policy_connection_collection_first_model + i_psec_policy_connection_collection_model_json['limit'] = 20 + i_psec_policy_connection_collection_model_json[ + 'next'] = i_psec_policy_connection_collection_next_model + i_psec_policy_connection_collection_model_json['total_count'] = 132 + + # Construct a model instance of IPsecPolicyConnectionCollection by calling from_dict on the json representation + i_psec_policy_connection_collection_model = IPsecPolicyConnectionCollection.from_dict( + i_psec_policy_connection_collection_model_json) + assert i_psec_policy_connection_collection_model != False + + # Construct a model instance of IPsecPolicyConnectionCollection by calling from_dict on the json representation + i_psec_policy_connection_collection_model_dict = IPsecPolicyConnectionCollection.from_dict( + i_psec_policy_connection_collection_model_json).__dict__ + i_psec_policy_connection_collection_model2 = IPsecPolicyConnectionCollection( + **i_psec_policy_connection_collection_model_dict) + + # Verify the model instances are equivalent + assert i_psec_policy_connection_collection_model == i_psec_policy_connection_collection_model2 + + # Convert model instance back to dict and verify no loss of data + i_psec_policy_connection_collection_model_json2 = i_psec_policy_connection_collection_model.to_dict( + ) + assert i_psec_policy_connection_collection_model_json2 == i_psec_policy_connection_collection_model_json + + +class TestModel_IPsecPolicyConnectionCollectionFirst: + """ + Test Class for IPsecPolicyConnectionCollectionFirst + """ + + def test_i_psec_policy_connection_collection_first_serialization(self): + """ + Test serialization/deserialization for IPsecPolicyConnectionCollectionFirst + """ + + # Construct a json representation of a IPsecPolicyConnectionCollectionFirst model + i_psec_policy_connection_collection_first_model_json = {} + i_psec_policy_connection_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?limit=20' + + # Construct a model instance of IPsecPolicyConnectionCollectionFirst by calling from_dict on the json representation + i_psec_policy_connection_collection_first_model = IPsecPolicyConnectionCollectionFirst.from_dict( + i_psec_policy_connection_collection_first_model_json) + assert i_psec_policy_connection_collection_first_model != False + + # Construct a model instance of IPsecPolicyConnectionCollectionFirst by calling from_dict on the json representation + i_psec_policy_connection_collection_first_model_dict = IPsecPolicyConnectionCollectionFirst.from_dict( + i_psec_policy_connection_collection_first_model_json).__dict__ + i_psec_policy_connection_collection_first_model2 = IPsecPolicyConnectionCollectionFirst( + **i_psec_policy_connection_collection_first_model_dict) + + # Verify the model instances are equivalent + assert i_psec_policy_connection_collection_first_model == i_psec_policy_connection_collection_first_model2 + + # Convert model instance back to dict and verify no loss of data + i_psec_policy_connection_collection_first_model_json2 = i_psec_policy_connection_collection_first_model.to_dict( + ) + assert i_psec_policy_connection_collection_first_model_json2 == i_psec_policy_connection_collection_first_model_json + + +class TestModel_IPsecPolicyConnectionCollectionNext: + """ + Test Class for IPsecPolicyConnectionCollectionNext + """ + + def test_i_psec_policy_connection_collection_next_serialization(self): + """ + Test serialization/deserialization for IPsecPolicyConnectionCollectionNext + """ + + # Construct a json representation of a IPsecPolicyConnectionCollectionNext model + i_psec_policy_connection_collection_next_model_json = {} + i_psec_policy_connection_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?start=250337b8fa72455c962e-c23e5706d452&limit=20' + + # Construct a model instance of IPsecPolicyConnectionCollectionNext by calling from_dict on the json representation + i_psec_policy_connection_collection_next_model = IPsecPolicyConnectionCollectionNext.from_dict( + i_psec_policy_connection_collection_next_model_json) + assert i_psec_policy_connection_collection_next_model != False + + # Construct a model instance of IPsecPolicyConnectionCollectionNext by calling from_dict on the json representation + i_psec_policy_connection_collection_next_model_dict = IPsecPolicyConnectionCollectionNext.from_dict( + i_psec_policy_connection_collection_next_model_json).__dict__ + i_psec_policy_connection_collection_next_model2 = IPsecPolicyConnectionCollectionNext( + **i_psec_policy_connection_collection_next_model_dict) + + # Verify the model instances are equivalent + assert i_psec_policy_connection_collection_next_model == i_psec_policy_connection_collection_next_model2 + + # Convert model instance back to dict and verify no loss of data + i_psec_policy_connection_collection_next_model_json2 = i_psec_policy_connection_collection_next_model.to_dict( + ) + assert i_psec_policy_connection_collection_next_model_json2 == i_psec_policy_connection_collection_next_model_json + + class TestModel_IPsecPolicyPatch: """ Test Class for IPsecPolicyPatch @@ -54115,12 +60007,15 @@ def test_i_psec_policy_patch_serialization(self): i_psec_policy_patch_model_json['pfs'] = 'disabled' # Construct a model instance of IPsecPolicyPatch by calling from_dict on the json representation - i_psec_policy_patch_model = IPsecPolicyPatch.from_dict(i_psec_policy_patch_model_json) + i_psec_policy_patch_model = IPsecPolicyPatch.from_dict( + i_psec_policy_patch_model_json) assert i_psec_policy_patch_model != False # Construct a model instance of IPsecPolicyPatch by calling from_dict on the json representation - i_psec_policy_patch_model_dict = IPsecPolicyPatch.from_dict(i_psec_policy_patch_model_json).__dict__ - i_psec_policy_patch_model2 = IPsecPolicyPatch(**i_psec_policy_patch_model_dict) + i_psec_policy_patch_model_dict = IPsecPolicyPatch.from_dict( + i_psec_policy_patch_model_json).__dict__ + i_psec_policy_patch_model2 = IPsecPolicyPatch( + **i_psec_policy_patch_model_dict) # Verify the model instances are equivalent assert i_psec_policy_patch_model == i_psec_policy_patch_model2 @@ -54142,30 +60037,39 @@ def test_i_psec_policy_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted - i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + i_psec_policy_reference_deleted_model = { + } # IPsecPolicyReferenceDeleted + i_psec_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a IPsecPolicyReference model i_psec_policy_reference_model_json = {} - i_psec_policy_reference_model_json['deleted'] = i_psec_policy_reference_deleted_model - i_psec_policy_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - i_psec_policy_reference_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model_json[ + 'deleted'] = i_psec_policy_reference_deleted_model + i_psec_policy_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_reference_model_json['name'] = 'my-ipsec-policy' i_psec_policy_reference_model_json['resource_type'] = 'ipsec_policy' # Construct a model instance of IPsecPolicyReference by calling from_dict on the json representation - i_psec_policy_reference_model = IPsecPolicyReference.from_dict(i_psec_policy_reference_model_json) + i_psec_policy_reference_model = IPsecPolicyReference.from_dict( + i_psec_policy_reference_model_json) assert i_psec_policy_reference_model != False # Construct a model instance of IPsecPolicyReference by calling from_dict on the json representation - i_psec_policy_reference_model_dict = IPsecPolicyReference.from_dict(i_psec_policy_reference_model_json).__dict__ - i_psec_policy_reference_model2 = IPsecPolicyReference(**i_psec_policy_reference_model_dict) + i_psec_policy_reference_model_dict = IPsecPolicyReference.from_dict( + i_psec_policy_reference_model_json).__dict__ + i_psec_policy_reference_model2 = IPsecPolicyReference( + **i_psec_policy_reference_model_dict) # Verify the model instances are equivalent assert i_psec_policy_reference_model == i_psec_policy_reference_model2 # Convert model instance back to dict and verify no loss of data - i_psec_policy_reference_model_json2 = i_psec_policy_reference_model.to_dict() + i_psec_policy_reference_model_json2 = i_psec_policy_reference_model.to_dict( + ) assert i_psec_policy_reference_model_json2 == i_psec_policy_reference_model_json @@ -54181,21 +60085,26 @@ def test_i_psec_policy_reference_deleted_serialization(self): # Construct a json representation of a IPsecPolicyReferenceDeleted model i_psec_policy_reference_deleted_model_json = {} - i_psec_policy_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + i_psec_policy_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of IPsecPolicyReferenceDeleted by calling from_dict on the json representation - i_psec_policy_reference_deleted_model = IPsecPolicyReferenceDeleted.from_dict(i_psec_policy_reference_deleted_model_json) + i_psec_policy_reference_deleted_model = IPsecPolicyReferenceDeleted.from_dict( + i_psec_policy_reference_deleted_model_json) assert i_psec_policy_reference_deleted_model != False # Construct a model instance of IPsecPolicyReferenceDeleted by calling from_dict on the json representation - i_psec_policy_reference_deleted_model_dict = IPsecPolicyReferenceDeleted.from_dict(i_psec_policy_reference_deleted_model_json).__dict__ - i_psec_policy_reference_deleted_model2 = IPsecPolicyReferenceDeleted(**i_psec_policy_reference_deleted_model_dict) + i_psec_policy_reference_deleted_model_dict = IPsecPolicyReferenceDeleted.from_dict( + i_psec_policy_reference_deleted_model_json).__dict__ + i_psec_policy_reference_deleted_model2 = IPsecPolicyReferenceDeleted( + **i_psec_policy_reference_deleted_model_dict) # Verify the model instances are equivalent assert i_psec_policy_reference_deleted_model == i_psec_policy_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - i_psec_policy_reference_deleted_model_json2 = i_psec_policy_reference_deleted_model.to_dict() + i_psec_policy_reference_deleted_model_json2 = i_psec_policy_reference_deleted_model.to_dict( + ) assert i_psec_policy_reference_deleted_model_json2 == i_psec_policy_reference_deleted_model_json @@ -54211,53 +60120,68 @@ def test_image_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference - catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' image_catalog_offering_model = {} # ImageCatalogOffering image_catalog_offering_model['managed'] = True - image_catalog_offering_model['version'] = catalog_offering_version_reference_model + image_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' image_file_checksums_model = {} # ImageFileChecksums - image_file_checksums_model['sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' + image_file_checksums_model[ + 'sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' image_file_model = {} # ImageFile image_file_model['checksums'] = image_file_checksums_model image_file_model['size'] = 1 operating_system_model = {} # OperatingSystem + operating_system_model['allow_user_image_creation'] = True operating_system_model['architecture'] = 'amd64' operating_system_model['dedicated_host_only'] = False operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model['family'] = 'Ubuntu Server' - operating_system_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model['name'] = 'ubuntu-16-amd64' + operating_system_model['user_data_format'] = 'cloud_init' operating_system_model['vendor'] = 'Canonical' operating_system_model['version'] = '16.04 LTS' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' volume_remote_model = {} # VolumeRemote volume_remote_model['region'] = region_reference_model volume_reference_model = {} # VolumeReference - volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['deleted'] = volume_reference_deleted_model - volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['name'] = 'my-volume' volume_reference_model['remote'] = volume_remote_model volume_reference_model['resource_type'] = 'volume' @@ -54265,18 +60189,21 @@ def test_image_serialization(self): image_status_reason_model = {} # ImageStatusReason image_status_reason_model['code'] = 'encryption_key_deleted' image_status_reason_model['message'] = 'testString' - image_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + image_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' # Construct a json representation of a Image model image_model_json = {} image_model_json['catalog_offering'] = image_catalog_offering_model image_model_json['created_at'] = '2019-01-01T12:00:00Z' - image_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_model_json['deprecation_at'] = '2019-01-01T12:00:00Z' image_model_json['encryption'] = 'user_managed' image_model_json['encryption_key'] = encryption_key_reference_model image_model_json['file'] = image_file_model - image_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_model_json['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_model_json['minimum_provisioned_size'] = 38 image_model_json['name'] = 'my-image' @@ -54287,6 +60214,7 @@ def test_image_serialization(self): image_model_json['source_volume'] = volume_reference_model image_model_json['status'] = 'available' image_model_json['status_reasons'] = [image_status_reason_model] + image_model_json['user_data_format'] = 'cloud_init' image_model_json['visibility'] = 'private' # Construct a model instance of Image by calling from_dict on the json representation @@ -54317,27 +60245,34 @@ def test_image_catalog_offering_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference - catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' # Construct a json representation of a ImageCatalogOffering model image_catalog_offering_model_json = {} image_catalog_offering_model_json['managed'] = True - image_catalog_offering_model_json['version'] = catalog_offering_version_reference_model + image_catalog_offering_model_json[ + 'version'] = catalog_offering_version_reference_model # Construct a model instance of ImageCatalogOffering by calling from_dict on the json representation - image_catalog_offering_model = ImageCatalogOffering.from_dict(image_catalog_offering_model_json) + image_catalog_offering_model = ImageCatalogOffering.from_dict( + image_catalog_offering_model_json) assert image_catalog_offering_model != False # Construct a model instance of ImageCatalogOffering by calling from_dict on the json representation - image_catalog_offering_model_dict = ImageCatalogOffering.from_dict(image_catalog_offering_model_json).__dict__ - image_catalog_offering_model2 = ImageCatalogOffering(**image_catalog_offering_model_dict) + image_catalog_offering_model_dict = ImageCatalogOffering.from_dict( + image_catalog_offering_model_json).__dict__ + image_catalog_offering_model2 = ImageCatalogOffering( + **image_catalog_offering_model_dict) # Verify the model instances are equivalent assert image_catalog_offering_model == image_catalog_offering_model2 # Convert model instance back to dict and verify no loss of data - image_catalog_offering_model_json2 = image_catalog_offering_model.to_dict() + image_catalog_offering_model_json2 = image_catalog_offering_model.to_dict( + ) assert image_catalog_offering_model_json2 == image_catalog_offering_model_json @@ -54354,55 +60289,71 @@ def test_image_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. image_collection_first_model = {} # ImageCollectionFirst - image_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?limit=20' + image_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?limit=20' - catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference - catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' image_catalog_offering_model = {} # ImageCatalogOffering image_catalog_offering_model['managed'] = True - image_catalog_offering_model['version'] = catalog_offering_version_reference_model + image_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' image_file_checksums_model = {} # ImageFileChecksums - image_file_checksums_model['sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' + image_file_checksums_model[ + 'sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' image_file_model = {} # ImageFile image_file_model['checksums'] = image_file_checksums_model image_file_model['size'] = 1 operating_system_model = {} # OperatingSystem + operating_system_model['allow_user_image_creation'] = True operating_system_model['architecture'] = 'amd64' operating_system_model['dedicated_host_only'] = False operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model['family'] = 'Ubuntu Server' - operating_system_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model['name'] = 'ubuntu-16-amd64' + operating_system_model['user_data_format'] = 'cloud_init' operating_system_model['vendor'] = 'Canonical' operating_system_model['version'] = '16.04 LTS' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' volume_remote_model = {} # VolumeRemote volume_remote_model['region'] = region_reference_model volume_reference_model = {} # VolumeReference - volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['deleted'] = volume_reference_deleted_model - volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['name'] = 'my-volume' volume_reference_model['remote'] = volume_remote_model volume_reference_model['resource_type'] = 'volume' @@ -54410,17 +60361,20 @@ def test_image_collection_serialization(self): image_status_reason_model = {} # ImageStatusReason image_status_reason_model['code'] = 'encryption_key_deleted' image_status_reason_model['message'] = 'testString' - image_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + image_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' image_model = {} # Image image_model['catalog_offering'] = image_catalog_offering_model image_model['created_at'] = '2019-01-01T12:00:00Z' - image_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_model['deprecation_at'] = '2019-01-01T12:00:00Z' image_model['encryption'] = 'user_managed' image_model['encryption_key'] = encryption_key_reference_model image_model['file'] = image_file_model - image_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_model['minimum_provisioned_size'] = 38 image_model['name'] = 'my-image' @@ -54431,10 +60385,12 @@ def test_image_collection_serialization(self): image_model['source_volume'] = volume_reference_model image_model['status'] = 'available' image_model['status_reasons'] = [image_status_reason_model] + image_model['user_data_format'] = 'cloud_init' image_model['visibility'] = 'private' image_collection_next_model = {} # ImageCollectionNext - image_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + image_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a ImageCollection model image_collection_model_json = {} @@ -54445,11 +60401,13 @@ def test_image_collection_serialization(self): image_collection_model_json['total_count'] = 132 # Construct a model instance of ImageCollection by calling from_dict on the json representation - image_collection_model = ImageCollection.from_dict(image_collection_model_json) + image_collection_model = ImageCollection.from_dict( + image_collection_model_json) assert image_collection_model != False # Construct a model instance of ImageCollection by calling from_dict on the json representation - image_collection_model_dict = ImageCollection.from_dict(image_collection_model_json).__dict__ + image_collection_model_dict = ImageCollection.from_dict( + image_collection_model_json).__dict__ image_collection_model2 = ImageCollection(**image_collection_model_dict) # Verify the model instances are equivalent @@ -54472,21 +60430,26 @@ def test_image_collection_first_serialization(self): # Construct a json representation of a ImageCollectionFirst model image_collection_first_model_json = {} - image_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?limit=20' + image_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?limit=20' # Construct a model instance of ImageCollectionFirst by calling from_dict on the json representation - image_collection_first_model = ImageCollectionFirst.from_dict(image_collection_first_model_json) + image_collection_first_model = ImageCollectionFirst.from_dict( + image_collection_first_model_json) assert image_collection_first_model != False # Construct a model instance of ImageCollectionFirst by calling from_dict on the json representation - image_collection_first_model_dict = ImageCollectionFirst.from_dict(image_collection_first_model_json).__dict__ - image_collection_first_model2 = ImageCollectionFirst(**image_collection_first_model_dict) + image_collection_first_model_dict = ImageCollectionFirst.from_dict( + image_collection_first_model_json).__dict__ + image_collection_first_model2 = ImageCollectionFirst( + **image_collection_first_model_dict) # Verify the model instances are equivalent assert image_collection_first_model == image_collection_first_model2 # Convert model instance back to dict and verify no loss of data - image_collection_first_model_json2 = image_collection_first_model.to_dict() + image_collection_first_model_json2 = image_collection_first_model.to_dict( + ) assert image_collection_first_model_json2 == image_collection_first_model_json @@ -54502,21 +60465,26 @@ def test_image_collection_next_serialization(self): # Construct a json representation of a ImageCollectionNext model image_collection_next_model_json = {} - image_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + image_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of ImageCollectionNext by calling from_dict on the json representation - image_collection_next_model = ImageCollectionNext.from_dict(image_collection_next_model_json) + image_collection_next_model = ImageCollectionNext.from_dict( + image_collection_next_model_json) assert image_collection_next_model != False # Construct a model instance of ImageCollectionNext by calling from_dict on the json representation - image_collection_next_model_dict = ImageCollectionNext.from_dict(image_collection_next_model_json).__dict__ - image_collection_next_model2 = ImageCollectionNext(**image_collection_next_model_dict) + image_collection_next_model_dict = ImageCollectionNext.from_dict( + image_collection_next_model_json).__dict__ + image_collection_next_model2 = ImageCollectionNext( + **image_collection_next_model_dict) # Verify the model instances are equivalent assert image_collection_next_model == image_collection_next_model2 # Convert model instance back to dict and verify no loss of data - image_collection_next_model_json2 = image_collection_next_model.to_dict() + image_collection_next_model_json2 = image_collection_next_model.to_dict( + ) assert image_collection_next_model_json2 == image_collection_next_model_json @@ -54533,40 +60501,56 @@ def test_image_export_job_serialization(self): # Construct dict forms of any model objects needed in order to build this model. image_export_job_status_reason_model = {} # ImageExportJobStatusReason - image_export_job_status_reason_model['code'] = 'cannot_access_storage_bucket' + image_export_job_status_reason_model[ + 'code'] = 'cannot_access_storage_bucket' image_export_job_status_reason_model['message'] = 'testString' - image_export_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq' - - cloud_object_storage_bucket_reference_model = {} # CloudObjectStorageBucketReference - cloud_object_storage_bucket_reference_model['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' - cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue' - - cloud_object_storage_object_reference_model = {} # CloudObjectStorageObjectReference + image_export_job_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq' + + cloud_object_storage_bucket_reference_model = { + } # CloudObjectStorageBucketReference + cloud_object_storage_bucket_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' + cloud_object_storage_bucket_reference_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' + + cloud_object_storage_object_reference_model = { + } # CloudObjectStorageObjectReference cloud_object_storage_object_reference_model['name'] = 'my-object' # Construct a json representation of a ImageExportJob model image_export_job_model_json = {} image_export_job_model_json['completed_at'] = '2019-01-01T12:00:00Z' image_export_job_model_json['created_at'] = '2019-01-01T12:00:00Z' - image_export_job_model_json['encrypted_data_key'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=' + image_export_job_model_json[ + 'encrypted_data_key'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=' image_export_job_model_json['format'] = 'qcow2' - image_export_job_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a' - image_export_job_model_json['id'] = 'r134-095e9baf-01d4-4e29-986e-20d26606b82a' + image_export_job_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a' + image_export_job_model_json[ + 'id'] = 'r134-095e9baf-01d4-4e29-986e-20d26606b82a' image_export_job_model_json['name'] = 'my-image-export' image_export_job_model_json['resource_type'] = 'image_export_job' image_export_job_model_json['started_at'] = '2019-01-01T12:00:00Z' image_export_job_model_json['status'] = 'deleting' - image_export_job_model_json['status_reasons'] = [image_export_job_status_reason_model] - image_export_job_model_json['storage_bucket'] = cloud_object_storage_bucket_reference_model - image_export_job_model_json['storage_href'] = 'cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2' - image_export_job_model_json['storage_object'] = cloud_object_storage_object_reference_model + image_export_job_model_json['status_reasons'] = [ + image_export_job_status_reason_model + ] + image_export_job_model_json[ + 'storage_bucket'] = cloud_object_storage_bucket_reference_model + image_export_job_model_json[ + 'storage_href'] = 'cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2' + image_export_job_model_json[ + 'storage_object'] = cloud_object_storage_object_reference_model # Construct a model instance of ImageExportJob by calling from_dict on the json representation - image_export_job_model = ImageExportJob.from_dict(image_export_job_model_json) + image_export_job_model = ImageExportJob.from_dict( + image_export_job_model_json) assert image_export_job_model != False # Construct a model instance of ImageExportJob by calling from_dict on the json representation - image_export_job_model_dict = ImageExportJob.from_dict(image_export_job_model_json).__dict__ + image_export_job_model_dict = ImageExportJob.from_dict( + image_export_job_model_json).__dict__ image_export_job_model2 = ImageExportJob(**image_export_job_model_dict) # Verify the model instances are equivalent @@ -54592,18 +60576,22 @@ def test_image_export_job_patch_serialization(self): image_export_job_patch_model_json['name'] = 'my-image-export' # Construct a model instance of ImageExportJobPatch by calling from_dict on the json representation - image_export_job_patch_model = ImageExportJobPatch.from_dict(image_export_job_patch_model_json) + image_export_job_patch_model = ImageExportJobPatch.from_dict( + image_export_job_patch_model_json) assert image_export_job_patch_model != False # Construct a model instance of ImageExportJobPatch by calling from_dict on the json representation - image_export_job_patch_model_dict = ImageExportJobPatch.from_dict(image_export_job_patch_model_json).__dict__ - image_export_job_patch_model2 = ImageExportJobPatch(**image_export_job_patch_model_dict) + image_export_job_patch_model_dict = ImageExportJobPatch.from_dict( + image_export_job_patch_model_json).__dict__ + image_export_job_patch_model2 = ImageExportJobPatch( + **image_export_job_patch_model_dict) # Verify the model instances are equivalent assert image_export_job_patch_model == image_export_job_patch_model2 # Convert model instance back to dict and verify no loss of data - image_export_job_patch_model_json2 = image_export_job_patch_model.to_dict() + image_export_job_patch_model_json2 = image_export_job_patch_model.to_dict( + ) assert image_export_job_patch_model_json2 == image_export_job_patch_model_json @@ -54619,23 +60607,29 @@ def test_image_export_job_status_reason_serialization(self): # Construct a json representation of a ImageExportJobStatusReason model image_export_job_status_reason_model_json = {} - image_export_job_status_reason_model_json['code'] = 'cannot_access_storage_bucket' + image_export_job_status_reason_model_json[ + 'code'] = 'cannot_access_storage_bucket' image_export_job_status_reason_model_json['message'] = 'testString' - image_export_job_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq' + image_export_job_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq' # Construct a model instance of ImageExportJobStatusReason by calling from_dict on the json representation - image_export_job_status_reason_model = ImageExportJobStatusReason.from_dict(image_export_job_status_reason_model_json) + image_export_job_status_reason_model = ImageExportJobStatusReason.from_dict( + image_export_job_status_reason_model_json) assert image_export_job_status_reason_model != False # Construct a model instance of ImageExportJobStatusReason by calling from_dict on the json representation - image_export_job_status_reason_model_dict = ImageExportJobStatusReason.from_dict(image_export_job_status_reason_model_json).__dict__ - image_export_job_status_reason_model2 = ImageExportJobStatusReason(**image_export_job_status_reason_model_dict) + image_export_job_status_reason_model_dict = ImageExportJobStatusReason.from_dict( + image_export_job_status_reason_model_json).__dict__ + image_export_job_status_reason_model2 = ImageExportJobStatusReason( + **image_export_job_status_reason_model_dict) # Verify the model instances are equivalent assert image_export_job_status_reason_model == image_export_job_status_reason_model2 # Convert model instance back to dict and verify no loss of data - image_export_job_status_reason_model_json2 = image_export_job_status_reason_model.to_dict() + image_export_job_status_reason_model_json2 = image_export_job_status_reason_model.to_dict( + ) assert image_export_job_status_reason_model_json2 == image_export_job_status_reason_model_json @@ -54652,50 +60646,70 @@ def test_image_export_job_unpaginated_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. image_export_job_status_reason_model = {} # ImageExportJobStatusReason - image_export_job_status_reason_model['code'] = 'cannot_access_storage_bucket' + image_export_job_status_reason_model[ + 'code'] = 'cannot_access_storage_bucket' image_export_job_status_reason_model['message'] = 'testString' - image_export_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq' - - cloud_object_storage_bucket_reference_model = {} # CloudObjectStorageBucketReference - cloud_object_storage_bucket_reference_model['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' - cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue' - - cloud_object_storage_object_reference_model = {} # CloudObjectStorageObjectReference + image_export_job_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq' + + cloud_object_storage_bucket_reference_model = { + } # CloudObjectStorageBucketReference + cloud_object_storage_bucket_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' + cloud_object_storage_bucket_reference_model[ + 'name'] = 'bucket-27200-lwx4cfvcue' + + cloud_object_storage_object_reference_model = { + } # CloudObjectStorageObjectReference cloud_object_storage_object_reference_model['name'] = 'my-object' image_export_job_model = {} # ImageExportJob image_export_job_model['completed_at'] = '2019-01-01T12:00:00Z' image_export_job_model['created_at'] = '2019-01-01T12:00:00Z' - image_export_job_model['encrypted_data_key'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=' + image_export_job_model[ + 'encrypted_data_key'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=' image_export_job_model['format'] = 'qcow2' - image_export_job_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a' - image_export_job_model['id'] = 'r134-095e9baf-01d4-4e29-986e-20d26606b82a' + image_export_job_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a' + image_export_job_model[ + 'id'] = 'r134-095e9baf-01d4-4e29-986e-20d26606b82a' image_export_job_model['name'] = 'my-image-export' image_export_job_model['resource_type'] = 'image_export_job' image_export_job_model['started_at'] = '2019-01-01T12:00:00Z' image_export_job_model['status'] = 'deleting' - image_export_job_model['status_reasons'] = [image_export_job_status_reason_model] - image_export_job_model['storage_bucket'] = cloud_object_storage_bucket_reference_model - image_export_job_model['storage_href'] = 'cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2' - image_export_job_model['storage_object'] = cloud_object_storage_object_reference_model + image_export_job_model['status_reasons'] = [ + image_export_job_status_reason_model + ] + image_export_job_model[ + 'storage_bucket'] = cloud_object_storage_bucket_reference_model + image_export_job_model[ + 'storage_href'] = 'cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2' + image_export_job_model[ + 'storage_object'] = cloud_object_storage_object_reference_model # Construct a json representation of a ImageExportJobUnpaginatedCollection model image_export_job_unpaginated_collection_model_json = {} - image_export_job_unpaginated_collection_model_json['export_jobs'] = [image_export_job_model] + image_export_job_unpaginated_collection_model_json['export_jobs'] = [ + image_export_job_model + ] # Construct a model instance of ImageExportJobUnpaginatedCollection by calling from_dict on the json representation - image_export_job_unpaginated_collection_model = ImageExportJobUnpaginatedCollection.from_dict(image_export_job_unpaginated_collection_model_json) + image_export_job_unpaginated_collection_model = ImageExportJobUnpaginatedCollection.from_dict( + image_export_job_unpaginated_collection_model_json) assert image_export_job_unpaginated_collection_model != False # Construct a model instance of ImageExportJobUnpaginatedCollection by calling from_dict on the json representation - image_export_job_unpaginated_collection_model_dict = ImageExportJobUnpaginatedCollection.from_dict(image_export_job_unpaginated_collection_model_json).__dict__ - image_export_job_unpaginated_collection_model2 = ImageExportJobUnpaginatedCollection(**image_export_job_unpaginated_collection_model_dict) + image_export_job_unpaginated_collection_model_dict = ImageExportJobUnpaginatedCollection.from_dict( + image_export_job_unpaginated_collection_model_json).__dict__ + image_export_job_unpaginated_collection_model2 = ImageExportJobUnpaginatedCollection( + **image_export_job_unpaginated_collection_model_dict) # Verify the model instances are equivalent assert image_export_job_unpaginated_collection_model == image_export_job_unpaginated_collection_model2 # Convert model instance back to dict and verify no loss of data - image_export_job_unpaginated_collection_model_json2 = image_export_job_unpaginated_collection_model.to_dict() + image_export_job_unpaginated_collection_model_json2 = image_export_job_unpaginated_collection_model.to_dict( + ) assert image_export_job_unpaginated_collection_model_json2 == image_export_job_unpaginated_collection_model_json @@ -54712,7 +60726,8 @@ def test_image_file_serialization(self): # Construct dict forms of any model objects needed in order to build this model. image_file_checksums_model = {} # ImageFileChecksums - image_file_checksums_model['sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' + image_file_checksums_model[ + 'sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' # Construct a json representation of a ImageFile model image_file_model_json = {} @@ -54724,7 +60739,8 @@ def test_image_file_serialization(self): assert image_file_model != False # Construct a model instance of ImageFile by calling from_dict on the json representation - image_file_model_dict = ImageFile.from_dict(image_file_model_json).__dict__ + image_file_model_dict = ImageFile.from_dict( + image_file_model_json).__dict__ image_file_model2 = ImageFile(**image_file_model_dict) # Verify the model instances are equivalent @@ -54747,15 +60763,19 @@ def test_image_file_checksums_serialization(self): # Construct a json representation of a ImageFileChecksums model image_file_checksums_model_json = {} - image_file_checksums_model_json['sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' + image_file_checksums_model_json[ + 'sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15' # Construct a model instance of ImageFileChecksums by calling from_dict on the json representation - image_file_checksums_model = ImageFileChecksums.from_dict(image_file_checksums_model_json) + image_file_checksums_model = ImageFileChecksums.from_dict( + image_file_checksums_model_json) assert image_file_checksums_model != False # Construct a model instance of ImageFileChecksums by calling from_dict on the json representation - image_file_checksums_model_dict = ImageFileChecksums.from_dict(image_file_checksums_model_json).__dict__ - image_file_checksums_model2 = ImageFileChecksums(**image_file_checksums_model_dict) + image_file_checksums_model_dict = ImageFileChecksums.from_dict( + image_file_checksums_model_json).__dict__ + image_file_checksums_model2 = ImageFileChecksums( + **image_file_checksums_model_dict) # Verify the model instances are equivalent assert image_file_checksums_model == image_file_checksums_model2 @@ -54777,15 +60797,19 @@ def test_image_file_prototype_serialization(self): # Construct a json representation of a ImageFilePrototype model image_file_prototype_model_json = {} - image_file_prototype_model_json['href'] = 'cos://us-south/custom-image-vpc-bucket/customImage-0.vhd' + image_file_prototype_model_json[ + 'href'] = 'cos://us-south/custom-image-vpc-bucket/customImage-0.vhd' # Construct a model instance of ImageFilePrototype by calling from_dict on the json representation - image_file_prototype_model = ImageFilePrototype.from_dict(image_file_prototype_model_json) + image_file_prototype_model = ImageFilePrototype.from_dict( + image_file_prototype_model_json) assert image_file_prototype_model != False # Construct a model instance of ImageFilePrototype by calling from_dict on the json representation - image_file_prototype_model_dict = ImageFilePrototype.from_dict(image_file_prototype_model_json).__dict__ - image_file_prototype_model2 = ImageFilePrototype(**image_file_prototype_model_dict) + image_file_prototype_model_dict = ImageFilePrototype.from_dict( + image_file_prototype_model_json).__dict__ + image_file_prototype_model2 = ImageFilePrototype( + **image_file_prototype_model_dict) # Verify the model instances are equivalent assert image_file_prototype_model == image_file_prototype_model2 @@ -54816,7 +60840,8 @@ def test_image_patch_serialization(self): assert image_patch_model != False # Construct a model instance of ImagePatch by calling from_dict on the json representation - image_patch_model_dict = ImagePatch.from_dict(image_patch_model_json).__dict__ + image_patch_model_dict = ImagePatch.from_dict( + image_patch_model_json).__dict__ image_patch_model2 = ImagePatch(**image_patch_model_dict) # Verify the model instances are equivalent @@ -54840,14 +60865,16 @@ def test_image_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' image_remote_model = {} # ImageRemote @@ -54856,20 +60883,25 @@ def test_image_reference_serialization(self): # Construct a json representation of a ImageReference model image_reference_model_json = {} - image_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model_json['deleted'] = image_reference_deleted_model - image_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model_json['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model_json[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model_json['name'] = 'my-image' image_reference_model_json['remote'] = image_remote_model image_reference_model_json['resource_type'] = 'image' # Construct a model instance of ImageReference by calling from_dict on the json representation - image_reference_model = ImageReference.from_dict(image_reference_model_json) + image_reference_model = ImageReference.from_dict( + image_reference_model_json) assert image_reference_model != False # Construct a model instance of ImageReference by calling from_dict on the json representation - image_reference_model_dict = ImageReference.from_dict(image_reference_model_json).__dict__ + image_reference_model_dict = ImageReference.from_dict( + image_reference_model_json).__dict__ image_reference_model2 = ImageReference(**image_reference_model_dict) # Verify the model instances are equivalent @@ -54892,21 +60924,26 @@ def test_image_reference_deleted_serialization(self): # Construct a json representation of a ImageReferenceDeleted model image_reference_deleted_model_json = {} - image_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of ImageReferenceDeleted by calling from_dict on the json representation - image_reference_deleted_model = ImageReferenceDeleted.from_dict(image_reference_deleted_model_json) + image_reference_deleted_model = ImageReferenceDeleted.from_dict( + image_reference_deleted_model_json) assert image_reference_deleted_model != False # Construct a model instance of ImageReferenceDeleted by calling from_dict on the json representation - image_reference_deleted_model_dict = ImageReferenceDeleted.from_dict(image_reference_deleted_model_json).__dict__ - image_reference_deleted_model2 = ImageReferenceDeleted(**image_reference_deleted_model_dict) + image_reference_deleted_model_dict = ImageReferenceDeleted.from_dict( + image_reference_deleted_model_json).__dict__ + image_reference_deleted_model2 = ImageReferenceDeleted( + **image_reference_deleted_model_dict) # Verify the model instances are equivalent assert image_reference_deleted_model == image_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - image_reference_deleted_model_json2 = image_reference_deleted_model.to_dict() + image_reference_deleted_model_json2 = image_reference_deleted_model.to_dict( + ) assert image_reference_deleted_model_json2 == image_reference_deleted_model_json @@ -54927,7 +60964,8 @@ def test_image_remote_serialization(self): account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a ImageRemote model @@ -54940,7 +60978,8 @@ def test_image_remote_serialization(self): assert image_remote_model != False # Construct a model instance of ImageRemote by calling from_dict on the json representation - image_remote_model_dict = ImageRemote.from_dict(image_remote_model_json).__dict__ + image_remote_model_dict = ImageRemote.from_dict( + image_remote_model_json).__dict__ image_remote_model2 = ImageRemote(**image_remote_model_dict) # Verify the model instances are equivalent @@ -54965,15 +61004,19 @@ def test_image_status_reason_serialization(self): image_status_reason_model_json = {} image_status_reason_model_json['code'] = 'encryption_key_deleted' image_status_reason_model_json['message'] = 'testString' - image_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + image_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' # Construct a model instance of ImageStatusReason by calling from_dict on the json representation - image_status_reason_model = ImageStatusReason.from_dict(image_status_reason_model_json) + image_status_reason_model = ImageStatusReason.from_dict( + image_status_reason_model_json) assert image_status_reason_model != False # Construct a model instance of ImageStatusReason by calling from_dict on the json representation - image_status_reason_model_dict = ImageStatusReason.from_dict(image_status_reason_model_json).__dict__ - image_status_reason_model2 = ImageStatusReason(**image_status_reason_model_dict) + image_status_reason_model_dict = ImageStatusReason.from_dict( + image_status_reason_model_json).__dict__ + image_status_reason_model2 = ImageStatusReason( + **image_status_reason_model_dict) # Verify the model instances are equivalent assert image_status_reason_model == image_status_reason_model2 @@ -54998,51 +61041,93 @@ def test_instance_serialization(self): instance_availability_policy_model = {} # InstanceAvailabilityPolicy instance_availability_policy_model['host_failure'] = 'restart' - volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted - volume_attachment_reference_instance_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_instance_context_deleted_model = { + } # VolumeAttachmentReferenceInstanceContextDeleted + volume_attachment_reference_instance_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a-w8mw8' - - volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted - volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext - volume_reference_volume_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model - volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_device_model[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a-w8mw8' + + volume_reference_volume_attachment_context_deleted_model = { + } # VolumeReferenceVolumeAttachmentContextDeleted + volume_reference_volume_attachment_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + volume_reference_volume_attachment_context_model = { + } # VolumeReferenceVolumeAttachmentContext + volume_reference_volume_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model[ + 'deleted'] = volume_reference_volume_attachment_context_deleted_model + volume_reference_volume_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_volume_attachment_context_model['name'] = 'my-volume' - volume_reference_volume_attachment_context_model['resource_type'] = 'volume' - - volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext - volume_attachment_reference_instance_context_model['deleted'] = volume_attachment_reference_instance_context_deleted_model - volume_attachment_reference_instance_context_model['device'] = volume_attachment_device_model - volume_attachment_reference_instance_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_instance_context_model['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_instance_context_model['name'] = 'my-volume-attachment' - volume_attachment_reference_instance_context_model['volume'] = volume_reference_volume_attachment_context_model - - catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference - catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + volume_reference_volume_attachment_context_model[ + 'resource_type'] = 'volume' + + volume_attachment_reference_instance_context_model = { + } # VolumeAttachmentReferenceInstanceContext + volume_attachment_reference_instance_context_model[ + 'deleted'] = volume_attachment_reference_instance_context_deleted_model + volume_attachment_reference_instance_context_model[ + 'device'] = volume_attachment_device_model + volume_attachment_reference_instance_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_instance_context_model[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_instance_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_reference_instance_context_model[ + 'volume'] = volume_reference_volume_attachment_context_model + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' instance_catalog_offering_model = {} # InstanceCatalogOffering - instance_catalog_offering_model['version'] = catalog_offering_version_reference_model + instance_catalog_offering_model[ + 'plan'] = catalog_offering_version_plan_reference_model + instance_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model - dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted - dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_reference_deleted_model = { + } # DedicatedHostReferenceDeleted + dedicated_host_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' dedicated_host_reference_model = {} # DedicatedHostReference - dedicated_host_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model - dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'deleted'] = dedicated_host_reference_deleted_model + dedicated_host_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['name'] = 'my-dedicated-host' dedicated_host_reference_model['resource_type'] = 'dedicated_host' instance_disk_model = {} # InstanceDisk instance_disk_model['created_at'] = '2019-01-01T12:00:00Z' - instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model['interface_type'] = 'nvme' instance_disk_model['name'] = 'my-instance-disk' @@ -55057,18 +61142,22 @@ def test_instance_serialization(self): instance_health_reason_model = {} # InstanceHealthReason instance_health_reason_model['code'] = 'reservation_expired' - instance_health_reason_model['message'] = 'The reservation cannot be used because it has expired.' - instance_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons' + instance_health_reason_model[ + 'message'] = 'The reservation cannot be used because it has expired.' + instance_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons' image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' image_remote_model = {} # ImageRemote @@ -55076,110 +61165,163 @@ def test_instance_serialization(self): image_remote_model['region'] = region_reference_model image_reference_model = {} # ImageReference - image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['deleted'] = image_reference_deleted_model - image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['name'] = 'my-image' image_reference_model['remote'] = image_remote_model image_reference_model['resource_type'] = 'image' instance_lifecycle_reason_model = {} # InstanceLifecycleReason - instance_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - instance_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - instance_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + instance_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + instance_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' instance_metadata_service_model = {} # InstanceMetadataService instance_metadata_service_model['enabled'] = True instance_metadata_service_model['protocol'] = 'http' instance_metadata_service_model['response_hop_limit'] = 1 - instance_network_attachment_reference_deleted_model = {} # InstanceNetworkAttachmentReferenceDeleted - instance_network_attachment_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_network_attachment_reference_deleted_model = { + } # InstanceNetworkAttachmentReferenceDeleted + instance_network_attachment_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.240.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - instance_network_attachment_reference_model = {} # InstanceNetworkAttachmentReference - instance_network_attachment_reference_model['deleted'] = instance_network_attachment_reference_deleted_model - instance_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717-eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - instance_network_attachment_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - instance_network_attachment_reference_model['name'] = 'my-network-attachment' - instance_network_attachment_reference_model['primary_ip'] = reserved_ip_reference_model - instance_network_attachment_reference_model['resource_type'] = 'instance_network_attachment' - instance_network_attachment_reference_model['subnet'] = subnet_reference_model - - network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted - network_interface_instance_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference - network_interface_instance_context_reference_model['deleted'] = network_interface_instance_context_reference_deleted_model - network_interface_instance_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_instance_context_reference_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_instance_context_reference_model['name'] = 'my-instance-network-interface' - network_interface_instance_context_reference_model['primary_ip'] = reserved_ip_reference_model - network_interface_instance_context_reference_model['resource_type'] = 'network_interface' - network_interface_instance_context_reference_model['subnet'] = subnet_reference_model - - dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted - dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_placement_target_model = {} # InstancePlacementTargetDedicatedHostGroupReference - instance_placement_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_placement_target_model['deleted'] = dedicated_host_group_reference_deleted_model - instance_placement_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_placement_target_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_network_attachment_reference_model = { + } # InstanceNetworkAttachmentReference + instance_network_attachment_reference_model[ + 'deleted'] = instance_network_attachment_reference_deleted_model + instance_network_attachment_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717-eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_reference_model[ + 'id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_reference_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + instance_network_attachment_reference_model[ + 'resource_type'] = 'instance_network_attachment' + instance_network_attachment_reference_model[ + 'subnet'] = subnet_reference_model + + network_interface_instance_context_reference_deleted_model = { + } # NetworkInterfaceInstanceContextReferenceDeleted + network_interface_instance_context_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + network_interface_instance_context_reference_model = { + } # NetworkInterfaceInstanceContextReference + network_interface_instance_context_reference_model[ + 'deleted'] = network_interface_instance_context_reference_deleted_model + network_interface_instance_context_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_instance_context_reference_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_instance_context_reference_model[ + 'name'] = 'my-instance-network-interface' + network_interface_instance_context_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + network_interface_instance_context_reference_model[ + 'resource_type'] = 'network_interface' + network_interface_instance_context_reference_model[ + 'subnet'] = subnet_reference_model + + dedicated_host_group_reference_deleted_model = { + } # DedicatedHostGroupReferenceDeleted + dedicated_host_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_placement_target_model = { + } # InstancePlacementTargetDedicatedHostGroupReference + instance_placement_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_model[ + 'deleted'] = dedicated_host_group_reference_deleted_model + instance_placement_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_placement_target_model['name'] = 'my-dedicated-host' instance_placement_target_model['resource_type'] = 'dedicated_host' instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' reservation_reference_deleted_model = {} # ReservationReferenceDeleted - reservation_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reservation_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reservation_reference_model = {} # ReservationReference - reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model['deleted'] = reservation_reference_deleted_model - reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'deleted'] = reservation_reference_deleted_model + reservation_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['name'] = 'my-reservation' reservation_reference_model['resource_type'] = 'reservation' instance_reservation_affinity_model = {} # InstanceReservationAffinity instance_reservation_affinity_model['policy'] = 'disabled' - instance_reservation_affinity_model['pool'] = [reservation_reference_model] + instance_reservation_affinity_model['pool'] = [ + reservation_reference_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' instance_status_reason_model = {} # InstanceStatusReason instance_status_reason_model['code'] = 'cannot_start_storage' - instance_status_reason_model['message'] = 'The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted' - instance_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + instance_status_reason_model[ + 'message'] = 'The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted' + instance_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' instance_vcpu_model = {} # InstanceVCPU instance_vcpu_model['architecture'] = 'amd64' @@ -55187,50 +61329,72 @@ def test_instance_serialization(self): instance_vcpu_model['manufacturer'] = 'intel' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a Instance model instance_model_json = {} - instance_model_json['availability_policy'] = instance_availability_policy_model + instance_model_json[ + 'availability_policy'] = instance_availability_policy_model instance_model_json['bandwidth'] = 1000 - instance_model_json['boot_volume_attachment'] = volume_attachment_reference_instance_context_model - instance_model_json['catalog_offering'] = instance_catalog_offering_model + instance_model_json[ + 'boot_volume_attachment'] = volume_attachment_reference_instance_context_model + instance_model_json[ + 'catalog_offering'] = instance_catalog_offering_model + instance_model_json['confidential_compute_mode'] = 'disabled' instance_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_model_json['dedicated_host'] = dedicated_host_reference_model instance_model_json['disks'] = [instance_disk_model] + instance_model_json['enable_secure_boot'] = True instance_model_json['gpu'] = instance_gpu_model instance_model_json['health_reasons'] = [instance_health_reason_model] instance_model_json['health_state'] = 'ok' - instance_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' instance_model_json['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_model_json['image'] = image_reference_model - instance_model_json['lifecycle_reasons'] = [instance_lifecycle_reason_model] + instance_model_json['lifecycle_reasons'] = [ + instance_lifecycle_reason_model + ] instance_model_json['lifecycle_state'] = 'stable' instance_model_json['memory'] = 8 - instance_model_json['metadata_service'] = instance_metadata_service_model + instance_model_json[ + 'metadata_service'] = instance_metadata_service_model instance_model_json['name'] = 'my-instance' - instance_model_json['network_attachments'] = [instance_network_attachment_reference_model] - instance_model_json['network_interfaces'] = [network_interface_instance_context_reference_model] + instance_model_json['network_attachments'] = [ + instance_network_attachment_reference_model + ] + instance_model_json['network_interfaces'] = [ + network_interface_instance_context_reference_model + ] instance_model_json['numa_count'] = 2 - instance_model_json['placement_target'] = instance_placement_target_model - instance_model_json['primary_network_attachment'] = instance_network_attachment_reference_model - instance_model_json['primary_network_interface'] = network_interface_instance_context_reference_model + instance_model_json[ + 'placement_target'] = instance_placement_target_model + instance_model_json[ + 'primary_network_attachment'] = instance_network_attachment_reference_model + instance_model_json[ + 'primary_network_interface'] = network_interface_instance_context_reference_model instance_model_json['profile'] = instance_profile_reference_model instance_model_json['reservation'] = reservation_reference_model - instance_model_json['reservation_affinity'] = instance_reservation_affinity_model + instance_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_model instance_model_json['resource_group'] = resource_group_reference_model instance_model_json['resource_type'] = 'instance' instance_model_json['startable'] = True @@ -55239,7 +61403,9 @@ def test_instance_serialization(self): instance_model_json['total_network_bandwidth'] = 500 instance_model_json['total_volume_bandwidth'] = 500 instance_model_json['vcpu'] = instance_vcpu_model - instance_model_json['volume_attachments'] = [volume_attachment_reference_instance_context_model] + instance_model_json['volume_attachments'] = [ + volume_attachment_reference_instance_context_model + ] instance_model_json['vpc'] = vpc_reference_model instance_model_json['zone'] = zone_reference_model @@ -55274,18 +61440,22 @@ def test_instance_action_serialization(self): instance_action_model_json['completed_at'] = '2019-01-01T12:00:00Z' instance_action_model_json['created_at'] = '2019-01-01T12:00:00Z' instance_action_model_json['force'] = True - instance_action_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/actions/109a1b6e-1242-4de1-be44-38705e9474ed' - instance_action_model_json['id'] = '109a1b6e-1242-4de1-be44-38705e9474ed' + instance_action_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/actions/109a1b6e-1242-4de1-be44-38705e9474ed' + instance_action_model_json[ + 'id'] = '109a1b6e-1242-4de1-be44-38705e9474ed' instance_action_model_json['started_at'] = '2019-01-01T12:00:00Z' instance_action_model_json['status'] = 'completed' instance_action_model_json['type'] = 'reboot' # Construct a model instance of InstanceAction by calling from_dict on the json representation - instance_action_model = InstanceAction.from_dict(instance_action_model_json) + instance_action_model = InstanceAction.from_dict( + instance_action_model_json) assert instance_action_model != False # Construct a model instance of InstanceAction by calling from_dict on the json representation - instance_action_model_dict = InstanceAction.from_dict(instance_action_model_json).__dict__ + instance_action_model_dict = InstanceAction.from_dict( + instance_action_model_json).__dict__ instance_action_model2 = InstanceAction(**instance_action_model_dict) # Verify the model instances are equivalent @@ -55311,18 +61481,22 @@ def test_instance_availability_policy_serialization(self): instance_availability_policy_model_json['host_failure'] = 'restart' # Construct a model instance of InstanceAvailabilityPolicy by calling from_dict on the json representation - instance_availability_policy_model = InstanceAvailabilityPolicy.from_dict(instance_availability_policy_model_json) + instance_availability_policy_model = InstanceAvailabilityPolicy.from_dict( + instance_availability_policy_model_json) assert instance_availability_policy_model != False # Construct a model instance of InstanceAvailabilityPolicy by calling from_dict on the json representation - instance_availability_policy_model_dict = InstanceAvailabilityPolicy.from_dict(instance_availability_policy_model_json).__dict__ - instance_availability_policy_model2 = InstanceAvailabilityPolicy(**instance_availability_policy_model_dict) + instance_availability_policy_model_dict = InstanceAvailabilityPolicy.from_dict( + instance_availability_policy_model_json).__dict__ + instance_availability_policy_model2 = InstanceAvailabilityPolicy( + **instance_availability_policy_model_dict) # Verify the model instances are equivalent assert instance_availability_policy_model == instance_availability_policy_model2 # Convert model instance back to dict and verify no loss of data - instance_availability_policy_model_json2 = instance_availability_policy_model.to_dict() + instance_availability_policy_model_json2 = instance_availability_policy_model.to_dict( + ) assert instance_availability_policy_model_json2 == instance_availability_policy_model_json @@ -55338,21 +61512,26 @@ def test_instance_availability_policy_patch_serialization(self): # Construct a json representation of a InstanceAvailabilityPolicyPatch model instance_availability_policy_patch_model_json = {} - instance_availability_policy_patch_model_json['host_failure'] = 'restart' + instance_availability_policy_patch_model_json[ + 'host_failure'] = 'restart' # Construct a model instance of InstanceAvailabilityPolicyPatch by calling from_dict on the json representation - instance_availability_policy_patch_model = InstanceAvailabilityPolicyPatch.from_dict(instance_availability_policy_patch_model_json) + instance_availability_policy_patch_model = InstanceAvailabilityPolicyPatch.from_dict( + instance_availability_policy_patch_model_json) assert instance_availability_policy_patch_model != False # Construct a model instance of InstanceAvailabilityPolicyPatch by calling from_dict on the json representation - instance_availability_policy_patch_model_dict = InstanceAvailabilityPolicyPatch.from_dict(instance_availability_policy_patch_model_json).__dict__ - instance_availability_policy_patch_model2 = InstanceAvailabilityPolicyPatch(**instance_availability_policy_patch_model_dict) + instance_availability_policy_patch_model_dict = InstanceAvailabilityPolicyPatch.from_dict( + instance_availability_policy_patch_model_json).__dict__ + instance_availability_policy_patch_model2 = InstanceAvailabilityPolicyPatch( + **instance_availability_policy_patch_model_dict) # Verify the model instances are equivalent assert instance_availability_policy_patch_model == instance_availability_policy_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_availability_policy_patch_model_json2 = instance_availability_policy_patch_model.to_dict() + instance_availability_policy_patch_model_json2 = instance_availability_policy_patch_model.to_dict( + ) assert instance_availability_policy_patch_model_json2 == instance_availability_policy_patch_model_json @@ -55368,21 +61547,26 @@ def test_instance_availability_policy_prototype_serialization(self): # Construct a json representation of a InstanceAvailabilityPolicyPrototype model instance_availability_policy_prototype_model_json = {} - instance_availability_policy_prototype_model_json['host_failure'] = 'restart' + instance_availability_policy_prototype_model_json[ + 'host_failure'] = 'restart' # Construct a model instance of InstanceAvailabilityPolicyPrototype by calling from_dict on the json representation - instance_availability_policy_prototype_model = InstanceAvailabilityPolicyPrototype.from_dict(instance_availability_policy_prototype_model_json) + instance_availability_policy_prototype_model = InstanceAvailabilityPolicyPrototype.from_dict( + instance_availability_policy_prototype_model_json) assert instance_availability_policy_prototype_model != False # Construct a model instance of InstanceAvailabilityPolicyPrototype by calling from_dict on the json representation - instance_availability_policy_prototype_model_dict = InstanceAvailabilityPolicyPrototype.from_dict(instance_availability_policy_prototype_model_json).__dict__ - instance_availability_policy_prototype_model2 = InstanceAvailabilityPolicyPrototype(**instance_availability_policy_prototype_model_dict) + instance_availability_policy_prototype_model_dict = InstanceAvailabilityPolicyPrototype.from_dict( + instance_availability_policy_prototype_model_json).__dict__ + instance_availability_policy_prototype_model2 = InstanceAvailabilityPolicyPrototype( + **instance_availability_policy_prototype_model_dict) # Verify the model instances are equivalent assert instance_availability_policy_prototype_model == instance_availability_policy_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_availability_policy_prototype_model_json2 = instance_availability_policy_prototype_model.to_dict() + instance_availability_policy_prototype_model_json2 = instance_availability_policy_prototype_model.to_dict( + ) assert instance_availability_policy_prototype_model_json2 == instance_availability_policy_prototype_model_json @@ -55398,26 +61582,47 @@ def test_instance_catalog_offering_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference - catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' # Construct a json representation of a InstanceCatalogOffering model instance_catalog_offering_model_json = {} - instance_catalog_offering_model_json['version'] = catalog_offering_version_reference_model + instance_catalog_offering_model_json[ + 'plan'] = catalog_offering_version_plan_reference_model + instance_catalog_offering_model_json[ + 'version'] = catalog_offering_version_reference_model # Construct a model instance of InstanceCatalogOffering by calling from_dict on the json representation - instance_catalog_offering_model = InstanceCatalogOffering.from_dict(instance_catalog_offering_model_json) + instance_catalog_offering_model = InstanceCatalogOffering.from_dict( + instance_catalog_offering_model_json) assert instance_catalog_offering_model != False # Construct a model instance of InstanceCatalogOffering by calling from_dict on the json representation - instance_catalog_offering_model_dict = InstanceCatalogOffering.from_dict(instance_catalog_offering_model_json).__dict__ - instance_catalog_offering_model2 = InstanceCatalogOffering(**instance_catalog_offering_model_dict) + instance_catalog_offering_model_dict = InstanceCatalogOffering.from_dict( + instance_catalog_offering_model_json).__dict__ + instance_catalog_offering_model2 = InstanceCatalogOffering( + **instance_catalog_offering_model_dict) # Verify the model instances are equivalent assert instance_catalog_offering_model == instance_catalog_offering_model2 # Convert model instance back to dict and verify no loss of data - instance_catalog_offering_model_json2 = instance_catalog_offering_model.to_dict() + instance_catalog_offering_model_json2 = instance_catalog_offering_model.to_dict( + ) assert instance_catalog_offering_model_json2 == instance_catalog_offering_model_json @@ -55434,56 +61639,99 @@ def test_instance_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_collection_first_model = {} # InstanceCollectionFirst - instance_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20' + instance_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20' instance_availability_policy_model = {} # InstanceAvailabilityPolicy instance_availability_policy_model['host_failure'] = 'restart' - volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted - volume_attachment_reference_instance_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_instance_context_deleted_model = { + } # VolumeAttachmentReferenceInstanceContextDeleted + volume_attachment_reference_instance_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a-w8mw8' - - volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted - volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext - volume_reference_volume_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model - volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_device_model[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a-w8mw8' + + volume_reference_volume_attachment_context_deleted_model = { + } # VolumeReferenceVolumeAttachmentContextDeleted + volume_reference_volume_attachment_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + volume_reference_volume_attachment_context_model = { + } # VolumeReferenceVolumeAttachmentContext + volume_reference_volume_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model[ + 'deleted'] = volume_reference_volume_attachment_context_deleted_model + volume_reference_volume_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_volume_attachment_context_model['name'] = 'my-volume' - volume_reference_volume_attachment_context_model['resource_type'] = 'volume' - - volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext - volume_attachment_reference_instance_context_model['deleted'] = volume_attachment_reference_instance_context_deleted_model - volume_attachment_reference_instance_context_model['device'] = volume_attachment_device_model - volume_attachment_reference_instance_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_instance_context_model['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_instance_context_model['name'] = 'my-volume-attachment' - volume_attachment_reference_instance_context_model['volume'] = volume_reference_volume_attachment_context_model - - catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference - catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + volume_reference_volume_attachment_context_model[ + 'resource_type'] = 'volume' + + volume_attachment_reference_instance_context_model = { + } # VolumeAttachmentReferenceInstanceContext + volume_attachment_reference_instance_context_model[ + 'deleted'] = volume_attachment_reference_instance_context_deleted_model + volume_attachment_reference_instance_context_model[ + 'device'] = volume_attachment_device_model + volume_attachment_reference_instance_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_instance_context_model[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_instance_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_reference_instance_context_model[ + 'volume'] = volume_reference_volume_attachment_context_model + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' instance_catalog_offering_model = {} # InstanceCatalogOffering - instance_catalog_offering_model['version'] = catalog_offering_version_reference_model + instance_catalog_offering_model[ + 'plan'] = catalog_offering_version_plan_reference_model + instance_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model - dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted - dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_reference_deleted_model = { + } # DedicatedHostReferenceDeleted + dedicated_host_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' dedicated_host_reference_model = {} # DedicatedHostReference - dedicated_host_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model - dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - dedicated_host_reference_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'deleted'] = dedicated_host_reference_deleted_model + dedicated_host_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + dedicated_host_reference_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['name'] = 'my-dedicated-host' dedicated_host_reference_model['resource_type'] = 'dedicated_host' instance_disk_model = {} # InstanceDisk instance_disk_model['created_at'] = '2019-01-01T12:00:00Z' - instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model['interface_type'] = 'nvme' instance_disk_model['name'] = 'my-instance-disk' @@ -55498,18 +61746,22 @@ def test_instance_collection_serialization(self): instance_health_reason_model = {} # InstanceHealthReason instance_health_reason_model['code'] = 'reservation_expired' - instance_health_reason_model['message'] = 'The reservation cannot be used because it has expired.' - instance_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons' + instance_health_reason_model[ + 'message'] = 'The reservation cannot be used because it has expired.' + instance_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons' image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' image_remote_model = {} # ImageRemote @@ -55517,110 +61769,163 @@ def test_instance_collection_serialization(self): image_remote_model['region'] = region_reference_model image_reference_model = {} # ImageReference - image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['deleted'] = image_reference_deleted_model - image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['name'] = 'my-image' image_reference_model['remote'] = image_remote_model image_reference_model['resource_type'] = 'image' instance_lifecycle_reason_model = {} # InstanceLifecycleReason - instance_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - instance_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - instance_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + instance_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + instance_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' instance_metadata_service_model = {} # InstanceMetadataService instance_metadata_service_model['enabled'] = True instance_metadata_service_model['protocol'] = 'http' instance_metadata_service_model['response_hop_limit'] = 1 - instance_network_attachment_reference_deleted_model = {} # InstanceNetworkAttachmentReferenceDeleted - instance_network_attachment_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_network_attachment_reference_deleted_model = { + } # InstanceNetworkAttachmentReferenceDeleted + instance_network_attachment_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.240.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - instance_network_attachment_reference_model = {} # InstanceNetworkAttachmentReference - instance_network_attachment_reference_model['deleted'] = instance_network_attachment_reference_deleted_model - instance_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717-eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - instance_network_attachment_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - instance_network_attachment_reference_model['name'] = 'my-network-attachment' - instance_network_attachment_reference_model['primary_ip'] = reserved_ip_reference_model - instance_network_attachment_reference_model['resource_type'] = 'instance_network_attachment' - instance_network_attachment_reference_model['subnet'] = subnet_reference_model - - network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted - network_interface_instance_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference - network_interface_instance_context_reference_model['deleted'] = network_interface_instance_context_reference_deleted_model - network_interface_instance_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_instance_context_reference_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_instance_context_reference_model['name'] = 'my-instance-network-interface' - network_interface_instance_context_reference_model['primary_ip'] = reserved_ip_reference_model - network_interface_instance_context_reference_model['resource_type'] = 'network_interface' - network_interface_instance_context_reference_model['subnet'] = subnet_reference_model - - dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted - dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_placement_target_model = {} # InstancePlacementTargetDedicatedHostGroupReference - instance_placement_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_placement_target_model['deleted'] = dedicated_host_group_reference_deleted_model - instance_placement_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_placement_target_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_network_attachment_reference_model = { + } # InstanceNetworkAttachmentReference + instance_network_attachment_reference_model[ + 'deleted'] = instance_network_attachment_reference_deleted_model + instance_network_attachment_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717-eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_reference_model[ + 'id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_reference_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + instance_network_attachment_reference_model[ + 'resource_type'] = 'instance_network_attachment' + instance_network_attachment_reference_model[ + 'subnet'] = subnet_reference_model + + network_interface_instance_context_reference_deleted_model = { + } # NetworkInterfaceInstanceContextReferenceDeleted + network_interface_instance_context_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + network_interface_instance_context_reference_model = { + } # NetworkInterfaceInstanceContextReference + network_interface_instance_context_reference_model[ + 'deleted'] = network_interface_instance_context_reference_deleted_model + network_interface_instance_context_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_instance_context_reference_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_instance_context_reference_model[ + 'name'] = 'my-instance-network-interface' + network_interface_instance_context_reference_model[ + 'primary_ip'] = reserved_ip_reference_model + network_interface_instance_context_reference_model[ + 'resource_type'] = 'network_interface' + network_interface_instance_context_reference_model[ + 'subnet'] = subnet_reference_model + + dedicated_host_group_reference_deleted_model = { + } # DedicatedHostGroupReferenceDeleted + dedicated_host_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_placement_target_model = { + } # InstancePlacementTargetDedicatedHostGroupReference + instance_placement_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_model[ + 'deleted'] = dedicated_host_group_reference_deleted_model + instance_placement_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_placement_target_model['name'] = 'my-dedicated-host' instance_placement_target_model['resource_type'] = 'dedicated_host' instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model['name'] = 'bx2-4x16' instance_profile_reference_model['resource_type'] = 'instance_profile' reservation_reference_deleted_model = {} # ReservationReferenceDeleted - reservation_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reservation_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reservation_reference_model = {} # ReservationReference - reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model['deleted'] = reservation_reference_deleted_model - reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'deleted'] = reservation_reference_deleted_model + reservation_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['name'] = 'my-reservation' reservation_reference_model['resource_type'] = 'reservation' instance_reservation_affinity_model = {} # InstanceReservationAffinity instance_reservation_affinity_model['policy'] = 'disabled' - instance_reservation_affinity_model['pool'] = [reservation_reference_model] + instance_reservation_affinity_model['pool'] = [ + reservation_reference_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' instance_status_reason_model = {} # InstanceStatusReason instance_status_reason_model['code'] = 'cannot_start_storage' - instance_status_reason_model['message'] = 'The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted' - instance_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + instance_status_reason_model[ + 'message'] = 'The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted' + instance_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' instance_vcpu_model = {} # InstanceVCPU instance_vcpu_model['architecture'] = 'amd64' @@ -55628,49 +61933,66 @@ def test_instance_collection_serialization(self): instance_vcpu_model['manufacturer'] = 'intel' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' instance_model = {} # Instance - instance_model['availability_policy'] = instance_availability_policy_model + instance_model[ + 'availability_policy'] = instance_availability_policy_model instance_model['bandwidth'] = 4000 - instance_model['boot_volume_attachment'] = volume_attachment_reference_instance_context_model + instance_model[ + 'boot_volume_attachment'] = volume_attachment_reference_instance_context_model instance_model['catalog_offering'] = instance_catalog_offering_model + instance_model['confidential_compute_mode'] = 'sgx' instance_model['created_at'] = '2020-03-26T16:11:57Z' - instance_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' + instance_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_model['dedicated_host'] = dedicated_host_reference_model instance_model['disks'] = [instance_disk_model] + instance_model['enable_secure_boot'] = True instance_model['gpu'] = instance_gpu_model instance_model['health_reasons'] = [instance_health_reason_model] instance_model['health_state'] = 'ok' - instance_model['href'] = 'https://eu-gb.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - instance_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' + instance_model[ + 'href'] = 'https://eu-gb.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' + instance_model['id'] = 'eb1b7391-2ca2-4ab5-84a8-b92157a633b0' instance_model['image'] = image_reference_model instance_model['lifecycle_reasons'] = [instance_lifecycle_reason_model] instance_model['lifecycle_state'] = 'stable' instance_model['memory'] = 8 instance_model['metadata_service'] = instance_metadata_service_model instance_model['name'] = 'my-instance' - instance_model['network_attachments'] = [instance_network_attachment_reference_model] - instance_model['network_interfaces'] = [network_interface_instance_context_reference_model] + instance_model['network_attachments'] = [ + instance_network_attachment_reference_model + ] + instance_model['network_interfaces'] = [ + network_interface_instance_context_reference_model + ] instance_model['numa_count'] = 2 instance_model['placement_target'] = instance_placement_target_model - instance_model['primary_network_attachment'] = instance_network_attachment_reference_model - instance_model['primary_network_interface'] = network_interface_instance_context_reference_model + instance_model[ + 'primary_network_attachment'] = instance_network_attachment_reference_model + instance_model[ + 'primary_network_interface'] = network_interface_instance_context_reference_model instance_model['profile'] = instance_profile_reference_model instance_model['reservation'] = reservation_reference_model - instance_model['reservation_affinity'] = instance_reservation_affinity_model + instance_model[ + 'reservation_affinity'] = instance_reservation_affinity_model instance_model['resource_group'] = resource_group_reference_model instance_model['resource_type'] = 'instance' instance_model['startable'] = True @@ -55679,28 +62001,35 @@ def test_instance_collection_serialization(self): instance_model['total_network_bandwidth'] = 3000 instance_model['total_volume_bandwidth'] = 1000 instance_model['vcpu'] = instance_vcpu_model - instance_model['volume_attachments'] = [volume_attachment_reference_instance_context_model] + instance_model['volume_attachments'] = [ + volume_attachment_reference_instance_context_model + ] instance_model['vpc'] = vpc_reference_model instance_model['zone'] = zone_reference_model instance_collection_next_model = {} # InstanceCollectionNext - instance_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?start=a977a97fae634c4da1470691cbc4c4a1&limit=20' + instance_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?start=a977a97fae634c4da1470691cbc4c4a1&limit=20' # Construct a json representation of a InstanceCollection model instance_collection_model_json = {} - instance_collection_model_json['first'] = instance_collection_first_model + instance_collection_model_json[ + 'first'] = instance_collection_first_model instance_collection_model_json['instances'] = [instance_model] instance_collection_model_json['limit'] = 20 instance_collection_model_json['next'] = instance_collection_next_model instance_collection_model_json['total_count'] = 132 # Construct a model instance of InstanceCollection by calling from_dict on the json representation - instance_collection_model = InstanceCollection.from_dict(instance_collection_model_json) + instance_collection_model = InstanceCollection.from_dict( + instance_collection_model_json) assert instance_collection_model != False # Construct a model instance of InstanceCollection by calling from_dict on the json representation - instance_collection_model_dict = InstanceCollection.from_dict(instance_collection_model_json).__dict__ - instance_collection_model2 = InstanceCollection(**instance_collection_model_dict) + instance_collection_model_dict = InstanceCollection.from_dict( + instance_collection_model_json).__dict__ + instance_collection_model2 = InstanceCollection( + **instance_collection_model_dict) # Verify the model instances are equivalent assert instance_collection_model == instance_collection_model2 @@ -55722,21 +62051,26 @@ def test_instance_collection_first_serialization(self): # Construct a json representation of a InstanceCollectionFirst model instance_collection_first_model_json = {} - instance_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20' + instance_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20' # Construct a model instance of InstanceCollectionFirst by calling from_dict on the json representation - instance_collection_first_model = InstanceCollectionFirst.from_dict(instance_collection_first_model_json) + instance_collection_first_model = InstanceCollectionFirst.from_dict( + instance_collection_first_model_json) assert instance_collection_first_model != False # Construct a model instance of InstanceCollectionFirst by calling from_dict on the json representation - instance_collection_first_model_dict = InstanceCollectionFirst.from_dict(instance_collection_first_model_json).__dict__ - instance_collection_first_model2 = InstanceCollectionFirst(**instance_collection_first_model_dict) + instance_collection_first_model_dict = InstanceCollectionFirst.from_dict( + instance_collection_first_model_json).__dict__ + instance_collection_first_model2 = InstanceCollectionFirst( + **instance_collection_first_model_dict) # Verify the model instances are equivalent assert instance_collection_first_model == instance_collection_first_model2 # Convert model instance back to dict and verify no loss of data - instance_collection_first_model_json2 = instance_collection_first_model.to_dict() + instance_collection_first_model_json2 = instance_collection_first_model.to_dict( + ) assert instance_collection_first_model_json2 == instance_collection_first_model_json @@ -55752,21 +62086,26 @@ def test_instance_collection_next_serialization(self): # Construct a json representation of a InstanceCollectionNext model instance_collection_next_model_json = {} - instance_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of InstanceCollectionNext by calling from_dict on the json representation - instance_collection_next_model = InstanceCollectionNext.from_dict(instance_collection_next_model_json) + instance_collection_next_model = InstanceCollectionNext.from_dict( + instance_collection_next_model_json) assert instance_collection_next_model != False # Construct a model instance of InstanceCollectionNext by calling from_dict on the json representation - instance_collection_next_model_dict = InstanceCollectionNext.from_dict(instance_collection_next_model_json).__dict__ - instance_collection_next_model2 = InstanceCollectionNext(**instance_collection_next_model_dict) + instance_collection_next_model_dict = InstanceCollectionNext.from_dict( + instance_collection_next_model_json).__dict__ + instance_collection_next_model2 = InstanceCollectionNext( + **instance_collection_next_model_dict) # Verify the model instances are equivalent assert instance_collection_next_model == instance_collection_next_model2 # Convert model instance back to dict and verify no loss of data - instance_collection_next_model_json2 = instance_collection_next_model.to_dict() + instance_collection_next_model_json2 = instance_collection_next_model.to_dict( + ) assert instance_collection_next_model_json2 == instance_collection_next_model_json @@ -55782,26 +62121,34 @@ def test_instance_console_access_token_serialization(self): # Construct a json representation of a InstanceConsoleAccessToken model instance_console_access_token_model_json = {} - instance_console_access_token_model_json['access_token'] = 'VGhpcyBJcyBhIHRva2Vu' + instance_console_access_token_model_json[ + 'access_token'] = 'VGhpcyBJcyBhIHRva2Vu' instance_console_access_token_model_json['console_type'] = 'serial' - instance_console_access_token_model_json['created_at'] = '2020-07-27T21:50:14Z' - instance_console_access_token_model_json['expires_at'] = '2020-07-27T21:51:14Z' + instance_console_access_token_model_json[ + 'created_at'] = '2020-07-27T21:50:14Z' + instance_console_access_token_model_json[ + 'expires_at'] = '2020-07-27T21:51:14Z' instance_console_access_token_model_json['force'] = False - instance_console_access_token_model_json['href'] = 'wss://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu' + instance_console_access_token_model_json[ + 'href'] = 'wss://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu' # Construct a model instance of InstanceConsoleAccessToken by calling from_dict on the json representation - instance_console_access_token_model = InstanceConsoleAccessToken.from_dict(instance_console_access_token_model_json) + instance_console_access_token_model = InstanceConsoleAccessToken.from_dict( + instance_console_access_token_model_json) assert instance_console_access_token_model != False # Construct a model instance of InstanceConsoleAccessToken by calling from_dict on the json representation - instance_console_access_token_model_dict = InstanceConsoleAccessToken.from_dict(instance_console_access_token_model_json).__dict__ - instance_console_access_token_model2 = InstanceConsoleAccessToken(**instance_console_access_token_model_dict) + instance_console_access_token_model_dict = InstanceConsoleAccessToken.from_dict( + instance_console_access_token_model_json).__dict__ + instance_console_access_token_model2 = InstanceConsoleAccessToken( + **instance_console_access_token_model_dict) # Verify the model instances are equivalent assert instance_console_access_token_model == instance_console_access_token_model2 # Convert model instance back to dict and verify no loss of data - instance_console_access_token_model_json2 = instance_console_access_token_model.to_dict() + instance_console_access_token_model_json2 = instance_console_access_token_model.to_dict( + ) assert instance_console_access_token_model_json2 == instance_console_access_token_model_json @@ -55817,27 +62164,35 @@ def test_instance_default_trusted_profile_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a json representation of a InstanceDefaultTrustedProfilePrototype model instance_default_trusted_profile_prototype_model_json = {} - instance_default_trusted_profile_prototype_model_json['auto_link'] = False - instance_default_trusted_profile_prototype_model_json['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model_json[ + 'auto_link'] = False + instance_default_trusted_profile_prototype_model_json[ + 'target'] = trusted_profile_identity_model # Construct a model instance of InstanceDefaultTrustedProfilePrototype by calling from_dict on the json representation - instance_default_trusted_profile_prototype_model = InstanceDefaultTrustedProfilePrototype.from_dict(instance_default_trusted_profile_prototype_model_json) + instance_default_trusted_profile_prototype_model = InstanceDefaultTrustedProfilePrototype.from_dict( + instance_default_trusted_profile_prototype_model_json) assert instance_default_trusted_profile_prototype_model != False # Construct a model instance of InstanceDefaultTrustedProfilePrototype by calling from_dict on the json representation - instance_default_trusted_profile_prototype_model_dict = InstanceDefaultTrustedProfilePrototype.from_dict(instance_default_trusted_profile_prototype_model_json).__dict__ - instance_default_trusted_profile_prototype_model2 = InstanceDefaultTrustedProfilePrototype(**instance_default_trusted_profile_prototype_model_dict) + instance_default_trusted_profile_prototype_model_dict = InstanceDefaultTrustedProfilePrototype.from_dict( + instance_default_trusted_profile_prototype_model_json).__dict__ + instance_default_trusted_profile_prototype_model2 = InstanceDefaultTrustedProfilePrototype( + **instance_default_trusted_profile_prototype_model_dict) # Verify the model instances are equivalent assert instance_default_trusted_profile_prototype_model == instance_default_trusted_profile_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_default_trusted_profile_prototype_model_json2 = instance_default_trusted_profile_prototype_model.to_dict() + instance_default_trusted_profile_prototype_model_json2 = instance_default_trusted_profile_prototype_model.to_dict( + ) assert instance_default_trusted_profile_prototype_model_json2 == instance_default_trusted_profile_prototype_model_json @@ -55854,7 +62209,8 @@ def test_instance_disk_serialization(self): # Construct a json representation of a InstanceDisk model instance_disk_model_json = {} instance_disk_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_disk_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model_json['interface_type'] = 'nvme' instance_disk_model_json['name'] = 'my-instance-disk' @@ -55866,7 +62222,8 @@ def test_instance_disk_serialization(self): assert instance_disk_model != False # Construct a model instance of InstanceDisk by calling from_dict on the json representation - instance_disk_model_dict = InstanceDisk.from_dict(instance_disk_model_json).__dict__ + instance_disk_model_dict = InstanceDisk.from_dict( + instance_disk_model_json).__dict__ instance_disk_model2 = InstanceDisk(**instance_disk_model_dict) # Verify the model instances are equivalent @@ -55891,7 +62248,8 @@ def test_instance_disk_collection_serialization(self): instance_disk_model = {} # InstanceDisk instance_disk_model['created_at'] = '2019-01-01T12:00:00Z' - instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_model['interface_type'] = 'nvme' instance_disk_model['name'] = 'my-instance-disk' @@ -55903,18 +62261,22 @@ def test_instance_disk_collection_serialization(self): instance_disk_collection_model_json['disks'] = [instance_disk_model] # Construct a model instance of InstanceDiskCollection by calling from_dict on the json representation - instance_disk_collection_model = InstanceDiskCollection.from_dict(instance_disk_collection_model_json) + instance_disk_collection_model = InstanceDiskCollection.from_dict( + instance_disk_collection_model_json) assert instance_disk_collection_model != False # Construct a model instance of InstanceDiskCollection by calling from_dict on the json representation - instance_disk_collection_model_dict = InstanceDiskCollection.from_dict(instance_disk_collection_model_json).__dict__ - instance_disk_collection_model2 = InstanceDiskCollection(**instance_disk_collection_model_dict) + instance_disk_collection_model_dict = InstanceDiskCollection.from_dict( + instance_disk_collection_model_json).__dict__ + instance_disk_collection_model2 = InstanceDiskCollection( + **instance_disk_collection_model_dict) # Verify the model instances are equivalent assert instance_disk_collection_model == instance_disk_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_disk_collection_model_json2 = instance_disk_collection_model.to_dict() + instance_disk_collection_model_json2 = instance_disk_collection_model.to_dict( + ) assert instance_disk_collection_model_json2 == instance_disk_collection_model_json @@ -55933,12 +62295,15 @@ def test_instance_disk_patch_serialization(self): instance_disk_patch_model_json['name'] = 'my-instance-disk-updated' # Construct a model instance of InstanceDiskPatch by calling from_dict on the json representation - instance_disk_patch_model = InstanceDiskPatch.from_dict(instance_disk_patch_model_json) + instance_disk_patch_model = InstanceDiskPatch.from_dict( + instance_disk_patch_model_json) assert instance_disk_patch_model != False # Construct a model instance of InstanceDiskPatch by calling from_dict on the json representation - instance_disk_patch_model_dict = InstanceDiskPatch.from_dict(instance_disk_patch_model_json).__dict__ - instance_disk_patch_model2 = InstanceDiskPatch(**instance_disk_patch_model_dict) + instance_disk_patch_model_dict = InstanceDiskPatch.from_dict( + instance_disk_patch_model_json).__dict__ + instance_disk_patch_model2 = InstanceDiskPatch( + **instance_disk_patch_model_dict) # Verify the model instances are equivalent assert instance_disk_patch_model == instance_disk_patch_model2 @@ -55960,30 +62325,39 @@ def test_instance_disk_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted - instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_disk_reference_deleted_model = { + } # InstanceDiskReferenceDeleted + instance_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceDiskReference model instance_disk_reference_model_json = {} - instance_disk_reference_model_json['deleted'] = instance_disk_reference_deleted_model - instance_disk_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - instance_disk_reference_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model_json[ + 'deleted'] = instance_disk_reference_deleted_model + instance_disk_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + instance_disk_reference_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' instance_disk_reference_model_json['name'] = 'my-instance-disk' instance_disk_reference_model_json['resource_type'] = 'instance_disk' # Construct a model instance of InstanceDiskReference by calling from_dict on the json representation - instance_disk_reference_model = InstanceDiskReference.from_dict(instance_disk_reference_model_json) + instance_disk_reference_model = InstanceDiskReference.from_dict( + instance_disk_reference_model_json) assert instance_disk_reference_model != False # Construct a model instance of InstanceDiskReference by calling from_dict on the json representation - instance_disk_reference_model_dict = InstanceDiskReference.from_dict(instance_disk_reference_model_json).__dict__ - instance_disk_reference_model2 = InstanceDiskReference(**instance_disk_reference_model_dict) + instance_disk_reference_model_dict = InstanceDiskReference.from_dict( + instance_disk_reference_model_json).__dict__ + instance_disk_reference_model2 = InstanceDiskReference( + **instance_disk_reference_model_dict) # Verify the model instances are equivalent assert instance_disk_reference_model == instance_disk_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_disk_reference_model_json2 = instance_disk_reference_model.to_dict() + instance_disk_reference_model_json2 = instance_disk_reference_model.to_dict( + ) assert instance_disk_reference_model_json2 == instance_disk_reference_model_json @@ -55999,21 +62373,26 @@ def test_instance_disk_reference_deleted_serialization(self): # Construct a json representation of a InstanceDiskReferenceDeleted model instance_disk_reference_deleted_model_json = {} - instance_disk_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_disk_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceDiskReferenceDeleted by calling from_dict on the json representation - instance_disk_reference_deleted_model = InstanceDiskReferenceDeleted.from_dict(instance_disk_reference_deleted_model_json) + instance_disk_reference_deleted_model = InstanceDiskReferenceDeleted.from_dict( + instance_disk_reference_deleted_model_json) assert instance_disk_reference_deleted_model != False # Construct a model instance of InstanceDiskReferenceDeleted by calling from_dict on the json representation - instance_disk_reference_deleted_model_dict = InstanceDiskReferenceDeleted.from_dict(instance_disk_reference_deleted_model_json).__dict__ - instance_disk_reference_deleted_model2 = InstanceDiskReferenceDeleted(**instance_disk_reference_deleted_model_dict) + instance_disk_reference_deleted_model_dict = InstanceDiskReferenceDeleted.from_dict( + instance_disk_reference_deleted_model_json).__dict__ + instance_disk_reference_deleted_model2 = InstanceDiskReferenceDeleted( + **instance_disk_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_disk_reference_deleted_model == instance_disk_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_disk_reference_deleted_model_json2 = instance_disk_reference_deleted_model.to_dict() + instance_disk_reference_deleted_model_json2 = instance_disk_reference_deleted_model.to_dict( + ) assert instance_disk_reference_deleted_model_json2 == instance_disk_reference_deleted_model_json @@ -56039,7 +62418,8 @@ def test_instance_gpu_serialization(self): assert instance_gpu_model != False # Construct a model instance of InstanceGPU by calling from_dict on the json representation - instance_gpu_model_dict = InstanceGPU.from_dict(instance_gpu_model_json).__dict__ + instance_gpu_model_dict = InstanceGPU.from_dict( + instance_gpu_model_json).__dict__ instance_gpu_model2 = InstanceGPU(**instance_gpu_model_dict) # Verify the model instances are equivalent @@ -56062,62 +62442,90 @@ def test_instance_group_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted - instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_template_reference_deleted_model = { + } # InstanceTemplateReferenceDeleted + instance_template_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_template_reference_model = {} # InstanceTemplateReference instance_template_reference_model['crn'] = 'crn:[...]' - instance_template_reference_model['deleted'] = instance_template_reference_deleted_model - instance_template_reference_model['href'] = 'https://eu-gb.iaas.cloud.ibm.com/v1/instance/templates/07a7-eca9fd45-e086-4400-a799-77b09ec5be84' - instance_template_reference_model['id'] = '07a7-eca9fd45-e086-4400-a799-77b09ec5be84' + instance_template_reference_model[ + 'deleted'] = instance_template_reference_deleted_model + instance_template_reference_model[ + 'href'] = 'https://eu-gb.iaas.cloud.ibm.com/v1/instance/templates/07a7-eca9fd45-e086-4400-a799-77b09ec5be84' + instance_template_reference_model[ + 'id'] = '07a7-eca9fd45-e086-4400-a799-77b09ec5be84' instance_template_reference_model['name'] = 'my-instance-template' - instance_group_lifecycle_reason_model = {} # InstanceGroupLifecycleReason - instance_group_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - instance_group_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - instance_group_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + instance_group_lifecycle_reason_model = { + } # InstanceGroupLifecycleReason + instance_group_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + instance_group_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_group_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference - load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_pool_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' - instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted - instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_group_manager_reference_model = {} # InstanceGroupManagerReference - instance_group_manager_reference_model['deleted'] = instance_group_manager_reference_deleted_model - instance_group_manager_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_reference_model['name'] = 'my-instance-group-manager' + instance_group_manager_reference_deleted_model = { + } # InstanceGroupManagerReferenceDeleted + instance_group_manager_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_group_manager_reference_model = { + } # InstanceGroupManagerReference + instance_group_manager_reference_model[ + 'deleted'] = instance_group_manager_reference_deleted_model + instance_group_manager_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_reference_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_reference_model[ + 'name'] = 'my-instance-group-manager' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' - resource_group_reference_model['id'] = '4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'id'] = '4bbce614c13444cd8fc5e7e878ef8e21' resource_group_reference_model['name'] = 'Default' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference subnet_reference_model['crn'] = 'crn:[...]' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://eu-gb.iaas.cloud.ibm.com/v1/subnets/07a7-3162c0fc-178f-46da-b4ca-d9448824056c' - subnet_reference_model['id'] = '07a7-3162c0fc-178f-46da-b4ca-d9448824056c' + subnet_reference_model[ + 'href'] = 'https://eu-gb.iaas.cloud.ibm.com/v1/subnets/07a7-3162c0fc-178f-46da-b4ca-d9448824056c' + subnet_reference_model[ + 'id'] = '07a7-3162c0fc-178f-46da-b4ca-d9448824056c' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference vpc_reference_model['crn'] = 'crn:[...]' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/e2cd90a7-8c7c-476f-b454-9ea0b5387677' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/e2cd90a7-8c7c-476f-b454-9ea0b5387677' vpc_reference_model['id'] = 'e2cd90a7-8c7c-476f-b454-9ea0b5387677' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -56126,28 +62534,39 @@ def test_instance_group_serialization(self): instance_group_model_json = {} instance_group_model_json['application_port'] = 22 instance_group_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_model_json['instance_template'] = instance_template_reference_model - instance_group_model_json['lifecycle_reasons'] = [instance_group_lifecycle_reason_model] + instance_group_model_json[ + 'instance_template'] = instance_template_reference_model + instance_group_model_json['lifecycle_reasons'] = [ + instance_group_lifecycle_reason_model + ] instance_group_model_json['lifecycle_state'] = 'stable' - instance_group_model_json['load_balancer_pool'] = load_balancer_pool_reference_model - instance_group_model_json['managers'] = [instance_group_manager_reference_model] + instance_group_model_json[ + 'load_balancer_pool'] = load_balancer_pool_reference_model + instance_group_model_json['managers'] = [ + instance_group_manager_reference_model + ] instance_group_model_json['membership_count'] = 10 instance_group_model_json['name'] = 'my-instance-group' - instance_group_model_json['resource_group'] = resource_group_reference_model + instance_group_model_json[ + 'resource_group'] = resource_group_reference_model instance_group_model_json['status'] = 'deleting' instance_group_model_json['subnets'] = [subnet_reference_model] instance_group_model_json['updated_at'] = '2019-01-01T12:00:00Z' instance_group_model_json['vpc'] = vpc_reference_model # Construct a model instance of InstanceGroup by calling from_dict on the json representation - instance_group_model = InstanceGroup.from_dict(instance_group_model_json) + instance_group_model = InstanceGroup.from_dict( + instance_group_model_json) assert instance_group_model != False # Construct a model instance of InstanceGroup by calling from_dict on the json representation - instance_group_model_dict = InstanceGroup.from_dict(instance_group_model_json).__dict__ + instance_group_model_dict = InstanceGroup.from_dict( + instance_group_model_json).__dict__ instance_group_model2 = InstanceGroup(**instance_group_model_dict) # Verify the model instances are equivalent @@ -56170,65 +62589,98 @@ def test_instance_group_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_collection_first_model = {} # InstanceGroupCollectionFirst - instance_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20' + instance_group_collection_first_model = { + } # InstanceGroupCollectionFirst + instance_group_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20' - instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted - instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_template_reference_deleted_model = { + } # InstanceTemplateReferenceDeleted + instance_template_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_template_reference_model = {} # InstanceTemplateReference - instance_template_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model['deleted'] = instance_template_reference_deleted_model - instance_template_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model[ + 'deleted'] = instance_template_reference_deleted_model + instance_template_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' instance_template_reference_model['name'] = 'my-instance-template' - instance_group_lifecycle_reason_model = {} # InstanceGroupLifecycleReason - instance_group_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - instance_group_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - instance_group_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + instance_group_lifecycle_reason_model = { + } # InstanceGroupLifecycleReason + instance_group_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + instance_group_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_group_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference - load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_pool_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' - instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted - instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_group_manager_reference_model = {} # InstanceGroupManagerReference - instance_group_manager_reference_model['deleted'] = instance_group_manager_reference_deleted_model - instance_group_manager_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_reference_model['name'] = 'my-instance-group-manager' + instance_group_manager_reference_deleted_model = { + } # InstanceGroupManagerReferenceDeleted + instance_group_manager_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_group_manager_reference_model = { + } # InstanceGroupManagerReference + instance_group_manager_reference_model[ + 'deleted'] = instance_group_manager_reference_deleted_model + instance_group_manager_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_reference_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_reference_model[ + 'name'] = 'my-instance-group-manager' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -56236,14 +62688,22 @@ def test_instance_group_collection_serialization(self): instance_group_model = {} # InstanceGroup instance_group_model['application_port'] = 22 instance_group_model['created_at'] = '2019-01-01T12:00:00Z' - instance_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_model['instance_template'] = instance_template_reference_model - instance_group_model['lifecycle_reasons'] = [instance_group_lifecycle_reason_model] + instance_group_model[ + 'instance_template'] = instance_template_reference_model + instance_group_model['lifecycle_reasons'] = [ + instance_group_lifecycle_reason_model + ] instance_group_model['lifecycle_state'] = 'stable' - instance_group_model['load_balancer_pool'] = load_balancer_pool_reference_model - instance_group_model['managers'] = [instance_group_manager_reference_model] + instance_group_model[ + 'load_balancer_pool'] = load_balancer_pool_reference_model + instance_group_model['managers'] = [ + instance_group_manager_reference_model + ] instance_group_model['membership_count'] = 10 instance_group_model['name'] = 'my-instance-group' instance_group_model['resource_group'] = resource_group_reference_model @@ -56253,29 +62713,38 @@ def test_instance_group_collection_serialization(self): instance_group_model['vpc'] = vpc_reference_model instance_group_collection_next_model = {} # InstanceGroupCollectionNext - instance_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a InstanceGroupCollection model instance_group_collection_model_json = {} - instance_group_collection_model_json['first'] = instance_group_collection_first_model - instance_group_collection_model_json['instance_groups'] = [instance_group_model] + instance_group_collection_model_json[ + 'first'] = instance_group_collection_first_model + instance_group_collection_model_json['instance_groups'] = [ + instance_group_model + ] instance_group_collection_model_json['limit'] = 20 - instance_group_collection_model_json['next'] = instance_group_collection_next_model + instance_group_collection_model_json[ + 'next'] = instance_group_collection_next_model instance_group_collection_model_json['total_count'] = 132 # Construct a model instance of InstanceGroupCollection by calling from_dict on the json representation - instance_group_collection_model = InstanceGroupCollection.from_dict(instance_group_collection_model_json) + instance_group_collection_model = InstanceGroupCollection.from_dict( + instance_group_collection_model_json) assert instance_group_collection_model != False # Construct a model instance of InstanceGroupCollection by calling from_dict on the json representation - instance_group_collection_model_dict = InstanceGroupCollection.from_dict(instance_group_collection_model_json).__dict__ - instance_group_collection_model2 = InstanceGroupCollection(**instance_group_collection_model_dict) + instance_group_collection_model_dict = InstanceGroupCollection.from_dict( + instance_group_collection_model_json).__dict__ + instance_group_collection_model2 = InstanceGroupCollection( + **instance_group_collection_model_dict) # Verify the model instances are equivalent assert instance_group_collection_model == instance_group_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_group_collection_model_json2 = instance_group_collection_model.to_dict() + instance_group_collection_model_json2 = instance_group_collection_model.to_dict( + ) assert instance_group_collection_model_json2 == instance_group_collection_model_json @@ -56291,21 +62760,26 @@ def test_instance_group_collection_first_serialization(self): # Construct a json representation of a InstanceGroupCollectionFirst model instance_group_collection_first_model_json = {} - instance_group_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20' + instance_group_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20' # Construct a model instance of InstanceGroupCollectionFirst by calling from_dict on the json representation - instance_group_collection_first_model = InstanceGroupCollectionFirst.from_dict(instance_group_collection_first_model_json) + instance_group_collection_first_model = InstanceGroupCollectionFirst.from_dict( + instance_group_collection_first_model_json) assert instance_group_collection_first_model != False # Construct a model instance of InstanceGroupCollectionFirst by calling from_dict on the json representation - instance_group_collection_first_model_dict = InstanceGroupCollectionFirst.from_dict(instance_group_collection_first_model_json).__dict__ - instance_group_collection_first_model2 = InstanceGroupCollectionFirst(**instance_group_collection_first_model_dict) + instance_group_collection_first_model_dict = InstanceGroupCollectionFirst.from_dict( + instance_group_collection_first_model_json).__dict__ + instance_group_collection_first_model2 = InstanceGroupCollectionFirst( + **instance_group_collection_first_model_dict) # Verify the model instances are equivalent assert instance_group_collection_first_model == instance_group_collection_first_model2 # Convert model instance back to dict and verify no loss of data - instance_group_collection_first_model_json2 = instance_group_collection_first_model.to_dict() + instance_group_collection_first_model_json2 = instance_group_collection_first_model.to_dict( + ) assert instance_group_collection_first_model_json2 == instance_group_collection_first_model_json @@ -56321,21 +62795,26 @@ def test_instance_group_collection_next_serialization(self): # Construct a json representation of a InstanceGroupCollectionNext model instance_group_collection_next_model_json = {} - instance_group_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of InstanceGroupCollectionNext by calling from_dict on the json representation - instance_group_collection_next_model = InstanceGroupCollectionNext.from_dict(instance_group_collection_next_model_json) + instance_group_collection_next_model = InstanceGroupCollectionNext.from_dict( + instance_group_collection_next_model_json) assert instance_group_collection_next_model != False # Construct a model instance of InstanceGroupCollectionNext by calling from_dict on the json representation - instance_group_collection_next_model_dict = InstanceGroupCollectionNext.from_dict(instance_group_collection_next_model_json).__dict__ - instance_group_collection_next_model2 = InstanceGroupCollectionNext(**instance_group_collection_next_model_dict) + instance_group_collection_next_model_dict = InstanceGroupCollectionNext.from_dict( + instance_group_collection_next_model_json).__dict__ + instance_group_collection_next_model2 = InstanceGroupCollectionNext( + **instance_group_collection_next_model_dict) # Verify the model instances are equivalent assert instance_group_collection_next_model == instance_group_collection_next_model2 # Convert model instance back to dict and verify no loss of data - instance_group_collection_next_model_json2 = instance_group_collection_next_model.to_dict() + instance_group_collection_next_model_json2 = instance_group_collection_next_model.to_dict( + ) assert instance_group_collection_next_model_json2 == instance_group_collection_next_model_json @@ -56351,23 +62830,30 @@ def test_instance_group_lifecycle_reason_serialization(self): # Construct a json representation of a InstanceGroupLifecycleReason model instance_group_lifecycle_reason_model_json = {} - instance_group_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - instance_group_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - instance_group_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + instance_group_lifecycle_reason_model_json[ + 'code'] = 'resource_suspended_by_provider' + instance_group_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_group_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of InstanceGroupLifecycleReason by calling from_dict on the json representation - instance_group_lifecycle_reason_model = InstanceGroupLifecycleReason.from_dict(instance_group_lifecycle_reason_model_json) + instance_group_lifecycle_reason_model = InstanceGroupLifecycleReason.from_dict( + instance_group_lifecycle_reason_model_json) assert instance_group_lifecycle_reason_model != False # Construct a model instance of InstanceGroupLifecycleReason by calling from_dict on the json representation - instance_group_lifecycle_reason_model_dict = InstanceGroupLifecycleReason.from_dict(instance_group_lifecycle_reason_model_json).__dict__ - instance_group_lifecycle_reason_model2 = InstanceGroupLifecycleReason(**instance_group_lifecycle_reason_model_dict) + instance_group_lifecycle_reason_model_dict = InstanceGroupLifecycleReason.from_dict( + instance_group_lifecycle_reason_model_json).__dict__ + instance_group_lifecycle_reason_model2 = InstanceGroupLifecycleReason( + **instance_group_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert instance_group_lifecycle_reason_model == instance_group_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - instance_group_lifecycle_reason_model_json2 = instance_group_lifecycle_reason_model.to_dict() + instance_group_lifecycle_reason_model_json2 = instance_group_lifecycle_reason_model.to_dict( + ) assert instance_group_lifecycle_reason_model_json2 == instance_group_lifecycle_reason_model_json @@ -56383,21 +62869,26 @@ def test_instance_group_manager_action_group_patch_serialization(self): # Construct a json representation of a InstanceGroupManagerActionGroupPatch model instance_group_manager_action_group_patch_model_json = {} - instance_group_manager_action_group_patch_model_json['membership_count'] = 10 + instance_group_manager_action_group_patch_model_json[ + 'membership_count'] = 10 # Construct a model instance of InstanceGroupManagerActionGroupPatch by calling from_dict on the json representation - instance_group_manager_action_group_patch_model = InstanceGroupManagerActionGroupPatch.from_dict(instance_group_manager_action_group_patch_model_json) + instance_group_manager_action_group_patch_model = InstanceGroupManagerActionGroupPatch.from_dict( + instance_group_manager_action_group_patch_model_json) assert instance_group_manager_action_group_patch_model != False # Construct a model instance of InstanceGroupManagerActionGroupPatch by calling from_dict on the json representation - instance_group_manager_action_group_patch_model_dict = InstanceGroupManagerActionGroupPatch.from_dict(instance_group_manager_action_group_patch_model_json).__dict__ - instance_group_manager_action_group_patch_model2 = InstanceGroupManagerActionGroupPatch(**instance_group_manager_action_group_patch_model_dict) + instance_group_manager_action_group_patch_model_dict = InstanceGroupManagerActionGroupPatch.from_dict( + instance_group_manager_action_group_patch_model_json).__dict__ + instance_group_manager_action_group_patch_model2 = InstanceGroupManagerActionGroupPatch( + **instance_group_manager_action_group_patch_model_dict) # Verify the model instances are equivalent assert instance_group_manager_action_group_patch_model == instance_group_manager_action_group_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_group_patch_model_json2 = instance_group_manager_action_group_patch_model.to_dict() + instance_group_manager_action_group_patch_model_json2 = instance_group_manager_action_group_patch_model.to_dict( + ) assert instance_group_manager_action_group_patch_model_json2 == instance_group_manager_action_group_patch_model_json @@ -56413,22 +62904,28 @@ def test_instance_group_manager_action_manager_patch_serialization(self): # Construct a json representation of a InstanceGroupManagerActionManagerPatch model instance_group_manager_action_manager_patch_model_json = {} - instance_group_manager_action_manager_patch_model_json['max_membership_count'] = 10 - instance_group_manager_action_manager_patch_model_json['min_membership_count'] = 10 + instance_group_manager_action_manager_patch_model_json[ + 'max_membership_count'] = 10 + instance_group_manager_action_manager_patch_model_json[ + 'min_membership_count'] = 10 # Construct a model instance of InstanceGroupManagerActionManagerPatch by calling from_dict on the json representation - instance_group_manager_action_manager_patch_model = InstanceGroupManagerActionManagerPatch.from_dict(instance_group_manager_action_manager_patch_model_json) + instance_group_manager_action_manager_patch_model = InstanceGroupManagerActionManagerPatch.from_dict( + instance_group_manager_action_manager_patch_model_json) assert instance_group_manager_action_manager_patch_model != False # Construct a model instance of InstanceGroupManagerActionManagerPatch by calling from_dict on the json representation - instance_group_manager_action_manager_patch_model_dict = InstanceGroupManagerActionManagerPatch.from_dict(instance_group_manager_action_manager_patch_model_json).__dict__ - instance_group_manager_action_manager_patch_model2 = InstanceGroupManagerActionManagerPatch(**instance_group_manager_action_manager_patch_model_dict) + instance_group_manager_action_manager_patch_model_dict = InstanceGroupManagerActionManagerPatch.from_dict( + instance_group_manager_action_manager_patch_model_json).__dict__ + instance_group_manager_action_manager_patch_model2 = InstanceGroupManagerActionManagerPatch( + **instance_group_manager_action_manager_patch_model_dict) # Verify the model instances are equivalent assert instance_group_manager_action_manager_patch_model == instance_group_manager_action_manager_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_manager_patch_model_json2 = instance_group_manager_action_manager_patch_model.to_dict() + instance_group_manager_action_manager_patch_model_json2 = instance_group_manager_action_manager_patch_model.to_dict( + ) assert instance_group_manager_action_manager_patch_model_json2 == instance_group_manager_action_manager_patch_model_json @@ -56444,34 +62941,47 @@ def test_instance_group_manager_action_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_action_group_patch_model = {} # InstanceGroupManagerActionGroupPatch + instance_group_manager_action_group_patch_model = { + } # InstanceGroupManagerActionGroupPatch instance_group_manager_action_group_patch_model['membership_count'] = 10 - instance_group_manager_action_manager_patch_model = {} # InstanceGroupManagerActionManagerPatch - instance_group_manager_action_manager_patch_model['max_membership_count'] = 10 - instance_group_manager_action_manager_patch_model['min_membership_count'] = 10 + instance_group_manager_action_manager_patch_model = { + } # InstanceGroupManagerActionManagerPatch + instance_group_manager_action_manager_patch_model[ + 'max_membership_count'] = 10 + instance_group_manager_action_manager_patch_model[ + 'min_membership_count'] = 10 # Construct a json representation of a InstanceGroupManagerActionPatch model instance_group_manager_action_patch_model_json = {} - instance_group_manager_action_patch_model_json['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_patch_model_json['group'] = instance_group_manager_action_group_patch_model - instance_group_manager_action_patch_model_json['manager'] = instance_group_manager_action_manager_patch_model - instance_group_manager_action_patch_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_patch_model_json['run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_patch_model_json[ + 'cron_spec'] = '30 */2 * * 1-5' + instance_group_manager_action_patch_model_json[ + 'group'] = instance_group_manager_action_group_patch_model + instance_group_manager_action_patch_model_json[ + 'manager'] = instance_group_manager_action_manager_patch_model + instance_group_manager_action_patch_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_patch_model_json[ + 'run_at'] = '2019-01-01T12:00:00Z' # Construct a model instance of InstanceGroupManagerActionPatch by calling from_dict on the json representation - instance_group_manager_action_patch_model = InstanceGroupManagerActionPatch.from_dict(instance_group_manager_action_patch_model_json) + instance_group_manager_action_patch_model = InstanceGroupManagerActionPatch.from_dict( + instance_group_manager_action_patch_model_json) assert instance_group_manager_action_patch_model != False # Construct a model instance of InstanceGroupManagerActionPatch by calling from_dict on the json representation - instance_group_manager_action_patch_model_dict = InstanceGroupManagerActionPatch.from_dict(instance_group_manager_action_patch_model_json).__dict__ - instance_group_manager_action_patch_model2 = InstanceGroupManagerActionPatch(**instance_group_manager_action_patch_model_dict) + instance_group_manager_action_patch_model_dict = InstanceGroupManagerActionPatch.from_dict( + instance_group_manager_action_patch_model_json).__dict__ + instance_group_manager_action_patch_model2 = InstanceGroupManagerActionPatch( + **instance_group_manager_action_patch_model_dict) # Verify the model instances are equivalent assert instance_group_manager_action_patch_model == instance_group_manager_action_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_patch_model_json2 = instance_group_manager_action_patch_model.to_dict() + instance_group_manager_action_patch_model_json2 = instance_group_manager_action_patch_model.to_dict( + ) assert instance_group_manager_action_patch_model_json2 == instance_group_manager_action_patch_model_json @@ -56487,30 +62997,41 @@ def test_instance_group_manager_action_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_action_reference_deleted_model = {} # InstanceGroupManagerActionReferenceDeleted - instance_group_manager_action_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_manager_action_reference_deleted_model = { + } # InstanceGroupManagerActionReferenceDeleted + instance_group_manager_action_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceGroupManagerActionReference model instance_group_manager_action_reference_model_json = {} - instance_group_manager_action_reference_model_json['deleted'] = instance_group_manager_action_reference_deleted_model - instance_group_manager_action_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_reference_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_reference_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_reference_model_json['resource_type'] = 'instance_group_manager_action' + instance_group_manager_action_reference_model_json[ + 'deleted'] = instance_group_manager_action_reference_deleted_model + instance_group_manager_action_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_reference_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_reference_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_reference_model_json[ + 'resource_type'] = 'instance_group_manager_action' # Construct a model instance of InstanceGroupManagerActionReference by calling from_dict on the json representation - instance_group_manager_action_reference_model = InstanceGroupManagerActionReference.from_dict(instance_group_manager_action_reference_model_json) + instance_group_manager_action_reference_model = InstanceGroupManagerActionReference.from_dict( + instance_group_manager_action_reference_model_json) assert instance_group_manager_action_reference_model != False # Construct a model instance of InstanceGroupManagerActionReference by calling from_dict on the json representation - instance_group_manager_action_reference_model_dict = InstanceGroupManagerActionReference.from_dict(instance_group_manager_action_reference_model_json).__dict__ - instance_group_manager_action_reference_model2 = InstanceGroupManagerActionReference(**instance_group_manager_action_reference_model_dict) + instance_group_manager_action_reference_model_dict = InstanceGroupManagerActionReference.from_dict( + instance_group_manager_action_reference_model_json).__dict__ + instance_group_manager_action_reference_model2 = InstanceGroupManagerActionReference( + **instance_group_manager_action_reference_model_dict) # Verify the model instances are equivalent assert instance_group_manager_action_reference_model == instance_group_manager_action_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_reference_model_json2 = instance_group_manager_action_reference_model.to_dict() + instance_group_manager_action_reference_model_json2 = instance_group_manager_action_reference_model.to_dict( + ) assert instance_group_manager_action_reference_model_json2 == instance_group_manager_action_reference_model_json @@ -56519,28 +63040,34 @@ class TestModel_InstanceGroupManagerActionReferenceDeleted: Test Class for InstanceGroupManagerActionReferenceDeleted """ - def test_instance_group_manager_action_reference_deleted_serialization(self): + def test_instance_group_manager_action_reference_deleted_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionReferenceDeleted """ # Construct a json representation of a InstanceGroupManagerActionReferenceDeleted model instance_group_manager_action_reference_deleted_model_json = {} - instance_group_manager_action_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_manager_action_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceGroupManagerActionReferenceDeleted by calling from_dict on the json representation - instance_group_manager_action_reference_deleted_model = InstanceGroupManagerActionReferenceDeleted.from_dict(instance_group_manager_action_reference_deleted_model_json) + instance_group_manager_action_reference_deleted_model = InstanceGroupManagerActionReferenceDeleted.from_dict( + instance_group_manager_action_reference_deleted_model_json) assert instance_group_manager_action_reference_deleted_model != False # Construct a model instance of InstanceGroupManagerActionReferenceDeleted by calling from_dict on the json representation - instance_group_manager_action_reference_deleted_model_dict = InstanceGroupManagerActionReferenceDeleted.from_dict(instance_group_manager_action_reference_deleted_model_json).__dict__ - instance_group_manager_action_reference_deleted_model2 = InstanceGroupManagerActionReferenceDeleted(**instance_group_manager_action_reference_deleted_model_dict) + instance_group_manager_action_reference_deleted_model_dict = InstanceGroupManagerActionReferenceDeleted.from_dict( + instance_group_manager_action_reference_deleted_model_json).__dict__ + instance_group_manager_action_reference_deleted_model2 = InstanceGroupManagerActionReferenceDeleted( + **instance_group_manager_action_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_group_manager_action_reference_deleted_model == instance_group_manager_action_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_reference_deleted_model_json2 = instance_group_manager_action_reference_deleted_model.to_dict() + instance_group_manager_action_reference_deleted_model_json2 = instance_group_manager_action_reference_deleted_model.to_dict( + ) assert instance_group_manager_action_reference_deleted_model_json2 == instance_group_manager_action_reference_deleted_model_json @@ -56556,52 +63083,77 @@ def test_instance_group_manager_actions_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_scheduled_action_group_model = {} # InstanceGroupManagerScheduledActionGroup - instance_group_manager_scheduled_action_group_model['membership_count'] = 10 + instance_group_manager_scheduled_action_group_model = { + } # InstanceGroupManagerScheduledActionGroup + instance_group_manager_scheduled_action_group_model[ + 'membership_count'] = 10 - instance_group_manager_action_model = {} # InstanceGroupManagerActionScheduledActionGroupTarget + instance_group_manager_action_model = { + } # InstanceGroupManagerActionScheduledActionGroupTarget instance_group_manager_action_model['auto_delete'] = True instance_group_manager_action_model['auto_delete_timeout'] = 24 - instance_group_manager_action_model['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_model['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_model['resource_type'] = 'instance_group_manager_action' + instance_group_manager_action_model[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_model[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_model[ + 'resource_type'] = 'instance_group_manager_action' instance_group_manager_action_model['status'] = 'active' - instance_group_manager_action_model['updated_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_model[ + 'updated_at'] = '2019-01-01T12:00:00Z' instance_group_manager_action_model['action_type'] = 'scheduled' instance_group_manager_action_model['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_model['last_applied_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_model['next_run_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_model['group'] = instance_group_manager_scheduled_action_group_model - - instance_group_manager_actions_collection_first_model = {} # InstanceGroupManagerActionsCollectionFirst - instance_group_manager_actions_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20' - - instance_group_manager_actions_collection_next_model = {} # InstanceGroupManagerActionsCollectionNext - instance_group_manager_actions_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_manager_action_model[ + 'last_applied_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_model[ + 'next_run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_model[ + 'group'] = instance_group_manager_scheduled_action_group_model + + instance_group_manager_actions_collection_first_model = { + } # InstanceGroupManagerActionsCollectionFirst + instance_group_manager_actions_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20' + + instance_group_manager_actions_collection_next_model = { + } # InstanceGroupManagerActionsCollectionNext + instance_group_manager_actions_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a InstanceGroupManagerActionsCollection model instance_group_manager_actions_collection_model_json = {} - instance_group_manager_actions_collection_model_json['actions'] = [instance_group_manager_action_model] - instance_group_manager_actions_collection_model_json['first'] = instance_group_manager_actions_collection_first_model + instance_group_manager_actions_collection_model_json['actions'] = [ + instance_group_manager_action_model + ] + instance_group_manager_actions_collection_model_json[ + 'first'] = instance_group_manager_actions_collection_first_model instance_group_manager_actions_collection_model_json['limit'] = 20 - instance_group_manager_actions_collection_model_json['next'] = instance_group_manager_actions_collection_next_model - instance_group_manager_actions_collection_model_json['total_count'] = 132 + instance_group_manager_actions_collection_model_json[ + 'next'] = instance_group_manager_actions_collection_next_model + instance_group_manager_actions_collection_model_json[ + 'total_count'] = 132 # Construct a model instance of InstanceGroupManagerActionsCollection by calling from_dict on the json representation - instance_group_manager_actions_collection_model = InstanceGroupManagerActionsCollection.from_dict(instance_group_manager_actions_collection_model_json) + instance_group_manager_actions_collection_model = InstanceGroupManagerActionsCollection.from_dict( + instance_group_manager_actions_collection_model_json) assert instance_group_manager_actions_collection_model != False # Construct a model instance of InstanceGroupManagerActionsCollection by calling from_dict on the json representation - instance_group_manager_actions_collection_model_dict = InstanceGroupManagerActionsCollection.from_dict(instance_group_manager_actions_collection_model_json).__dict__ - instance_group_manager_actions_collection_model2 = InstanceGroupManagerActionsCollection(**instance_group_manager_actions_collection_model_dict) + instance_group_manager_actions_collection_model_dict = InstanceGroupManagerActionsCollection.from_dict( + instance_group_manager_actions_collection_model_json).__dict__ + instance_group_manager_actions_collection_model2 = InstanceGroupManagerActionsCollection( + **instance_group_manager_actions_collection_model_dict) # Verify the model instances are equivalent assert instance_group_manager_actions_collection_model == instance_group_manager_actions_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_actions_collection_model_json2 = instance_group_manager_actions_collection_model.to_dict() + instance_group_manager_actions_collection_model_json2 = instance_group_manager_actions_collection_model.to_dict( + ) assert instance_group_manager_actions_collection_model_json2 == instance_group_manager_actions_collection_model_json @@ -56610,28 +63162,34 @@ class TestModel_InstanceGroupManagerActionsCollectionFirst: Test Class for InstanceGroupManagerActionsCollectionFirst """ - def test_instance_group_manager_actions_collection_first_serialization(self): + def test_instance_group_manager_actions_collection_first_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionsCollectionFirst """ # Construct a json representation of a InstanceGroupManagerActionsCollectionFirst model instance_group_manager_actions_collection_first_model_json = {} - instance_group_manager_actions_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20' + instance_group_manager_actions_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20' # Construct a model instance of InstanceGroupManagerActionsCollectionFirst by calling from_dict on the json representation - instance_group_manager_actions_collection_first_model = InstanceGroupManagerActionsCollectionFirst.from_dict(instance_group_manager_actions_collection_first_model_json) + instance_group_manager_actions_collection_first_model = InstanceGroupManagerActionsCollectionFirst.from_dict( + instance_group_manager_actions_collection_first_model_json) assert instance_group_manager_actions_collection_first_model != False # Construct a model instance of InstanceGroupManagerActionsCollectionFirst by calling from_dict on the json representation - instance_group_manager_actions_collection_first_model_dict = InstanceGroupManagerActionsCollectionFirst.from_dict(instance_group_manager_actions_collection_first_model_json).__dict__ - instance_group_manager_actions_collection_first_model2 = InstanceGroupManagerActionsCollectionFirst(**instance_group_manager_actions_collection_first_model_dict) + instance_group_manager_actions_collection_first_model_dict = InstanceGroupManagerActionsCollectionFirst.from_dict( + instance_group_manager_actions_collection_first_model_json).__dict__ + instance_group_manager_actions_collection_first_model2 = InstanceGroupManagerActionsCollectionFirst( + **instance_group_manager_actions_collection_first_model_dict) # Verify the model instances are equivalent assert instance_group_manager_actions_collection_first_model == instance_group_manager_actions_collection_first_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_actions_collection_first_model_json2 = instance_group_manager_actions_collection_first_model.to_dict() + instance_group_manager_actions_collection_first_model_json2 = instance_group_manager_actions_collection_first_model.to_dict( + ) assert instance_group_manager_actions_collection_first_model_json2 == instance_group_manager_actions_collection_first_model_json @@ -56647,21 +63205,26 @@ def test_instance_group_manager_actions_collection_next_serialization(self): # Construct a json representation of a InstanceGroupManagerActionsCollectionNext model instance_group_manager_actions_collection_next_model_json = {} - instance_group_manager_actions_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_manager_actions_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of InstanceGroupManagerActionsCollectionNext by calling from_dict on the json representation - instance_group_manager_actions_collection_next_model = InstanceGroupManagerActionsCollectionNext.from_dict(instance_group_manager_actions_collection_next_model_json) + instance_group_manager_actions_collection_next_model = InstanceGroupManagerActionsCollectionNext.from_dict( + instance_group_manager_actions_collection_next_model_json) assert instance_group_manager_actions_collection_next_model != False # Construct a model instance of InstanceGroupManagerActionsCollectionNext by calling from_dict on the json representation - instance_group_manager_actions_collection_next_model_dict = InstanceGroupManagerActionsCollectionNext.from_dict(instance_group_manager_actions_collection_next_model_json).__dict__ - instance_group_manager_actions_collection_next_model2 = InstanceGroupManagerActionsCollectionNext(**instance_group_manager_actions_collection_next_model_dict) + instance_group_manager_actions_collection_next_model_dict = InstanceGroupManagerActionsCollectionNext.from_dict( + instance_group_manager_actions_collection_next_model_json).__dict__ + instance_group_manager_actions_collection_next_model2 = InstanceGroupManagerActionsCollectionNext( + **instance_group_manager_actions_collection_next_model_dict) # Verify the model instances are equivalent assert instance_group_manager_actions_collection_next_model == instance_group_manager_actions_collection_next_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_actions_collection_next_model_json2 = instance_group_manager_actions_collection_next_model.to_dict() + instance_group_manager_actions_collection_next_model_json2 = instance_group_manager_actions_collection_next_model.to_dict( + ) assert instance_group_manager_actions_collection_next_model_json2 == instance_group_manager_actions_collection_next_model_json @@ -56677,22 +63240,33 @@ def test_instance_group_manager_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_collection_first_model = {} # InstanceGroupManagerCollectionFirst - instance_group_manager_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20' - - instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted - instance_group_manager_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_group_manager_policy_reference_model = {} # InstanceGroupManagerPolicyReference - instance_group_manager_policy_reference_model['deleted'] = instance_group_manager_policy_reference_deleted_model - instance_group_manager_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_reference_model['name'] = 'my-instance-group-manager-policy' + instance_group_manager_collection_first_model = { + } # InstanceGroupManagerCollectionFirst + instance_group_manager_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20' + + instance_group_manager_policy_reference_deleted_model = { + } # InstanceGroupManagerPolicyReferenceDeleted + instance_group_manager_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_group_manager_policy_reference_model = { + } # InstanceGroupManagerPolicyReference + instance_group_manager_policy_reference_model[ + 'deleted'] = instance_group_manager_policy_reference_deleted_model + instance_group_manager_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_reference_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_reference_model[ + 'name'] = 'my-instance-group-manager-policy' instance_group_manager_model = {} # InstanceGroupManagerAutoScale instance_group_manager_model['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_manager_model['management_enabled'] = True instance_group_manager_model['name'] = 'my-instance-group-manager' instance_group_manager_model['updated_at'] = '2019-01-01T12:00:00Z' @@ -56701,32 +63275,44 @@ def test_instance_group_manager_collection_serialization(self): instance_group_manager_model['manager_type'] = 'autoscale' instance_group_manager_model['max_membership_count'] = 10 instance_group_manager_model['min_membership_count'] = 10 - instance_group_manager_model['policies'] = [instance_group_manager_policy_reference_model] + instance_group_manager_model['policies'] = [ + instance_group_manager_policy_reference_model + ] - instance_group_manager_collection_next_model = {} # InstanceGroupManagerCollectionNext - instance_group_manager_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_manager_collection_next_model = { + } # InstanceGroupManagerCollectionNext + instance_group_manager_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a InstanceGroupManagerCollection model instance_group_manager_collection_model_json = {} - instance_group_manager_collection_model_json['first'] = instance_group_manager_collection_first_model + instance_group_manager_collection_model_json[ + 'first'] = instance_group_manager_collection_first_model instance_group_manager_collection_model_json['limit'] = 20 - instance_group_manager_collection_model_json['managers'] = [instance_group_manager_model] - instance_group_manager_collection_model_json['next'] = instance_group_manager_collection_next_model + instance_group_manager_collection_model_json['managers'] = [ + instance_group_manager_model + ] + instance_group_manager_collection_model_json[ + 'next'] = instance_group_manager_collection_next_model instance_group_manager_collection_model_json['total_count'] = 132 # Construct a model instance of InstanceGroupManagerCollection by calling from_dict on the json representation - instance_group_manager_collection_model = InstanceGroupManagerCollection.from_dict(instance_group_manager_collection_model_json) + instance_group_manager_collection_model = InstanceGroupManagerCollection.from_dict( + instance_group_manager_collection_model_json) assert instance_group_manager_collection_model != False # Construct a model instance of InstanceGroupManagerCollection by calling from_dict on the json representation - instance_group_manager_collection_model_dict = InstanceGroupManagerCollection.from_dict(instance_group_manager_collection_model_json).__dict__ - instance_group_manager_collection_model2 = InstanceGroupManagerCollection(**instance_group_manager_collection_model_dict) + instance_group_manager_collection_model_dict = InstanceGroupManagerCollection.from_dict( + instance_group_manager_collection_model_json).__dict__ + instance_group_manager_collection_model2 = InstanceGroupManagerCollection( + **instance_group_manager_collection_model_dict) # Verify the model instances are equivalent assert instance_group_manager_collection_model == instance_group_manager_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_collection_model_json2 = instance_group_manager_collection_model.to_dict() + instance_group_manager_collection_model_json2 = instance_group_manager_collection_model.to_dict( + ) assert instance_group_manager_collection_model_json2 == instance_group_manager_collection_model_json @@ -56742,21 +63328,26 @@ def test_instance_group_manager_collection_first_serialization(self): # Construct a json representation of a InstanceGroupManagerCollectionFirst model instance_group_manager_collection_first_model_json = {} - instance_group_manager_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20' + instance_group_manager_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20' # Construct a model instance of InstanceGroupManagerCollectionFirst by calling from_dict on the json representation - instance_group_manager_collection_first_model = InstanceGroupManagerCollectionFirst.from_dict(instance_group_manager_collection_first_model_json) + instance_group_manager_collection_first_model = InstanceGroupManagerCollectionFirst.from_dict( + instance_group_manager_collection_first_model_json) assert instance_group_manager_collection_first_model != False # Construct a model instance of InstanceGroupManagerCollectionFirst by calling from_dict on the json representation - instance_group_manager_collection_first_model_dict = InstanceGroupManagerCollectionFirst.from_dict(instance_group_manager_collection_first_model_json).__dict__ - instance_group_manager_collection_first_model2 = InstanceGroupManagerCollectionFirst(**instance_group_manager_collection_first_model_dict) + instance_group_manager_collection_first_model_dict = InstanceGroupManagerCollectionFirst.from_dict( + instance_group_manager_collection_first_model_json).__dict__ + instance_group_manager_collection_first_model2 = InstanceGroupManagerCollectionFirst( + **instance_group_manager_collection_first_model_dict) # Verify the model instances are equivalent assert instance_group_manager_collection_first_model == instance_group_manager_collection_first_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_collection_first_model_json2 = instance_group_manager_collection_first_model.to_dict() + instance_group_manager_collection_first_model_json2 = instance_group_manager_collection_first_model.to_dict( + ) assert instance_group_manager_collection_first_model_json2 == instance_group_manager_collection_first_model_json @@ -56772,21 +63363,26 @@ def test_instance_group_manager_collection_next_serialization(self): # Construct a json representation of a InstanceGroupManagerCollectionNext model instance_group_manager_collection_next_model_json = {} - instance_group_manager_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_manager_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of InstanceGroupManagerCollectionNext by calling from_dict on the json representation - instance_group_manager_collection_next_model = InstanceGroupManagerCollectionNext.from_dict(instance_group_manager_collection_next_model_json) + instance_group_manager_collection_next_model = InstanceGroupManagerCollectionNext.from_dict( + instance_group_manager_collection_next_model_json) assert instance_group_manager_collection_next_model != False # Construct a model instance of InstanceGroupManagerCollectionNext by calling from_dict on the json representation - instance_group_manager_collection_next_model_dict = InstanceGroupManagerCollectionNext.from_dict(instance_group_manager_collection_next_model_json).__dict__ - instance_group_manager_collection_next_model2 = InstanceGroupManagerCollectionNext(**instance_group_manager_collection_next_model_dict) + instance_group_manager_collection_next_model_dict = InstanceGroupManagerCollectionNext.from_dict( + instance_group_manager_collection_next_model_json).__dict__ + instance_group_manager_collection_next_model2 = InstanceGroupManagerCollectionNext( + **instance_group_manager_collection_next_model_dict) # Verify the model instances are equivalent assert instance_group_manager_collection_next_model == instance_group_manager_collection_next_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_collection_next_model_json2 = instance_group_manager_collection_next_model.to_dict() + instance_group_manager_collection_next_model_json2 = instance_group_manager_collection_next_model.to_dict( + ) assert instance_group_manager_collection_next_model_json2 == instance_group_manager_collection_next_model_json @@ -56807,21 +63403,26 @@ def test_instance_group_manager_patch_serialization(self): instance_group_manager_patch_model_json['management_enabled'] = True instance_group_manager_patch_model_json['max_membership_count'] = 10 instance_group_manager_patch_model_json['min_membership_count'] = 10 - instance_group_manager_patch_model_json['name'] = 'my-instance-group-manager' + instance_group_manager_patch_model_json[ + 'name'] = 'my-instance-group-manager' # Construct a model instance of InstanceGroupManagerPatch by calling from_dict on the json representation - instance_group_manager_patch_model = InstanceGroupManagerPatch.from_dict(instance_group_manager_patch_model_json) + instance_group_manager_patch_model = InstanceGroupManagerPatch.from_dict( + instance_group_manager_patch_model_json) assert instance_group_manager_patch_model != False # Construct a model instance of InstanceGroupManagerPatch by calling from_dict on the json representation - instance_group_manager_patch_model_dict = InstanceGroupManagerPatch.from_dict(instance_group_manager_patch_model_json).__dict__ - instance_group_manager_patch_model2 = InstanceGroupManagerPatch(**instance_group_manager_patch_model_dict) + instance_group_manager_patch_model_dict = InstanceGroupManagerPatch.from_dict( + instance_group_manager_patch_model_json).__dict__ + instance_group_manager_patch_model2 = InstanceGroupManagerPatch( + **instance_group_manager_patch_model_dict) # Verify the model instances are equivalent assert instance_group_manager_patch_model == instance_group_manager_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_patch_model_json2 = instance_group_manager_patch_model.to_dict() + instance_group_manager_patch_model_json2 = instance_group_manager_patch_model.to_dict( + ) assert instance_group_manager_patch_model_json2 == instance_group_manager_patch_model_json @@ -56837,43 +63438,61 @@ def test_instance_group_manager_policy_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_policy_collection_first_model = {} # InstanceGroupManagerPolicyCollectionFirst - instance_group_manager_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20' - - instance_group_manager_policy_collection_next_model = {} # InstanceGroupManagerPolicyCollectionNext - instance_group_manager_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - - instance_group_manager_policy_model = {} # InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy - instance_group_manager_policy_model['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_model['name'] = 'my-instance-group-manager-policy' - instance_group_manager_policy_model['updated_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_policy_collection_first_model = { + } # InstanceGroupManagerPolicyCollectionFirst + instance_group_manager_policy_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20' + + instance_group_manager_policy_collection_next_model = { + } # InstanceGroupManagerPolicyCollectionNext + instance_group_manager_policy_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + + instance_group_manager_policy_model = { + } # InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy + instance_group_manager_policy_model[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_policy_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_model[ + 'name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_model[ + 'updated_at'] = '2019-01-01T12:00:00Z' instance_group_manager_policy_model['metric_type'] = 'cpu' instance_group_manager_policy_model['metric_value'] = 38 instance_group_manager_policy_model['policy_type'] = 'target' # Construct a json representation of a InstanceGroupManagerPolicyCollection model instance_group_manager_policy_collection_model_json = {} - instance_group_manager_policy_collection_model_json['first'] = instance_group_manager_policy_collection_first_model + instance_group_manager_policy_collection_model_json[ + 'first'] = instance_group_manager_policy_collection_first_model instance_group_manager_policy_collection_model_json['limit'] = 20 - instance_group_manager_policy_collection_model_json['next'] = instance_group_manager_policy_collection_next_model - instance_group_manager_policy_collection_model_json['policies'] = [instance_group_manager_policy_model] + instance_group_manager_policy_collection_model_json[ + 'next'] = instance_group_manager_policy_collection_next_model + instance_group_manager_policy_collection_model_json['policies'] = [ + instance_group_manager_policy_model + ] instance_group_manager_policy_collection_model_json['total_count'] = 132 # Construct a model instance of InstanceGroupManagerPolicyCollection by calling from_dict on the json representation - instance_group_manager_policy_collection_model = InstanceGroupManagerPolicyCollection.from_dict(instance_group_manager_policy_collection_model_json) + instance_group_manager_policy_collection_model = InstanceGroupManagerPolicyCollection.from_dict( + instance_group_manager_policy_collection_model_json) assert instance_group_manager_policy_collection_model != False # Construct a model instance of InstanceGroupManagerPolicyCollection by calling from_dict on the json representation - instance_group_manager_policy_collection_model_dict = InstanceGroupManagerPolicyCollection.from_dict(instance_group_manager_policy_collection_model_json).__dict__ - instance_group_manager_policy_collection_model2 = InstanceGroupManagerPolicyCollection(**instance_group_manager_policy_collection_model_dict) + instance_group_manager_policy_collection_model_dict = InstanceGroupManagerPolicyCollection.from_dict( + instance_group_manager_policy_collection_model_json).__dict__ + instance_group_manager_policy_collection_model2 = InstanceGroupManagerPolicyCollection( + **instance_group_manager_policy_collection_model_dict) # Verify the model instances are equivalent assert instance_group_manager_policy_collection_model == instance_group_manager_policy_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_collection_model_json2 = instance_group_manager_policy_collection_model.to_dict() + instance_group_manager_policy_collection_model_json2 = instance_group_manager_policy_collection_model.to_dict( + ) assert instance_group_manager_policy_collection_model_json2 == instance_group_manager_policy_collection_model_json @@ -56889,21 +63508,26 @@ def test_instance_group_manager_policy_collection_first_serialization(self): # Construct a json representation of a InstanceGroupManagerPolicyCollectionFirst model instance_group_manager_policy_collection_first_model_json = {} - instance_group_manager_policy_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20' + instance_group_manager_policy_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20' # Construct a model instance of InstanceGroupManagerPolicyCollectionFirst by calling from_dict on the json representation - instance_group_manager_policy_collection_first_model = InstanceGroupManagerPolicyCollectionFirst.from_dict(instance_group_manager_policy_collection_first_model_json) + instance_group_manager_policy_collection_first_model = InstanceGroupManagerPolicyCollectionFirst.from_dict( + instance_group_manager_policy_collection_first_model_json) assert instance_group_manager_policy_collection_first_model != False # Construct a model instance of InstanceGroupManagerPolicyCollectionFirst by calling from_dict on the json representation - instance_group_manager_policy_collection_first_model_dict = InstanceGroupManagerPolicyCollectionFirst.from_dict(instance_group_manager_policy_collection_first_model_json).__dict__ - instance_group_manager_policy_collection_first_model2 = InstanceGroupManagerPolicyCollectionFirst(**instance_group_manager_policy_collection_first_model_dict) + instance_group_manager_policy_collection_first_model_dict = InstanceGroupManagerPolicyCollectionFirst.from_dict( + instance_group_manager_policy_collection_first_model_json).__dict__ + instance_group_manager_policy_collection_first_model2 = InstanceGroupManagerPolicyCollectionFirst( + **instance_group_manager_policy_collection_first_model_dict) # Verify the model instances are equivalent assert instance_group_manager_policy_collection_first_model == instance_group_manager_policy_collection_first_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_collection_first_model_json2 = instance_group_manager_policy_collection_first_model.to_dict() + instance_group_manager_policy_collection_first_model_json2 = instance_group_manager_policy_collection_first_model.to_dict( + ) assert instance_group_manager_policy_collection_first_model_json2 == instance_group_manager_policy_collection_first_model_json @@ -56919,21 +63543,26 @@ def test_instance_group_manager_policy_collection_next_serialization(self): # Construct a json representation of a InstanceGroupManagerPolicyCollectionNext model instance_group_manager_policy_collection_next_model_json = {} - instance_group_manager_policy_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_manager_policy_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of InstanceGroupManagerPolicyCollectionNext by calling from_dict on the json representation - instance_group_manager_policy_collection_next_model = InstanceGroupManagerPolicyCollectionNext.from_dict(instance_group_manager_policy_collection_next_model_json) + instance_group_manager_policy_collection_next_model = InstanceGroupManagerPolicyCollectionNext.from_dict( + instance_group_manager_policy_collection_next_model_json) assert instance_group_manager_policy_collection_next_model != False # Construct a model instance of InstanceGroupManagerPolicyCollectionNext by calling from_dict on the json representation - instance_group_manager_policy_collection_next_model_dict = InstanceGroupManagerPolicyCollectionNext.from_dict(instance_group_manager_policy_collection_next_model_json).__dict__ - instance_group_manager_policy_collection_next_model2 = InstanceGroupManagerPolicyCollectionNext(**instance_group_manager_policy_collection_next_model_dict) + instance_group_manager_policy_collection_next_model_dict = InstanceGroupManagerPolicyCollectionNext.from_dict( + instance_group_manager_policy_collection_next_model_json).__dict__ + instance_group_manager_policy_collection_next_model2 = InstanceGroupManagerPolicyCollectionNext( + **instance_group_manager_policy_collection_next_model_dict) # Verify the model instances are equivalent assert instance_group_manager_policy_collection_next_model == instance_group_manager_policy_collection_next_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_collection_next_model_json2 = instance_group_manager_policy_collection_next_model.to_dict() + instance_group_manager_policy_collection_next_model_json2 = instance_group_manager_policy_collection_next_model.to_dict( + ) assert instance_group_manager_policy_collection_next_model_json2 == instance_group_manager_policy_collection_next_model_json @@ -56951,21 +63580,26 @@ def test_instance_group_manager_policy_patch_serialization(self): instance_group_manager_policy_patch_model_json = {} instance_group_manager_policy_patch_model_json['metric_type'] = 'cpu' instance_group_manager_policy_patch_model_json['metric_value'] = 38 - instance_group_manager_policy_patch_model_json['name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_patch_model_json[ + 'name'] = 'my-instance-group-manager-policy' # Construct a model instance of InstanceGroupManagerPolicyPatch by calling from_dict on the json representation - instance_group_manager_policy_patch_model = InstanceGroupManagerPolicyPatch.from_dict(instance_group_manager_policy_patch_model_json) + instance_group_manager_policy_patch_model = InstanceGroupManagerPolicyPatch.from_dict( + instance_group_manager_policy_patch_model_json) assert instance_group_manager_policy_patch_model != False # Construct a model instance of InstanceGroupManagerPolicyPatch by calling from_dict on the json representation - instance_group_manager_policy_patch_model_dict = InstanceGroupManagerPolicyPatch.from_dict(instance_group_manager_policy_patch_model_json).__dict__ - instance_group_manager_policy_patch_model2 = InstanceGroupManagerPolicyPatch(**instance_group_manager_policy_patch_model_dict) + instance_group_manager_policy_patch_model_dict = InstanceGroupManagerPolicyPatch.from_dict( + instance_group_manager_policy_patch_model_json).__dict__ + instance_group_manager_policy_patch_model2 = InstanceGroupManagerPolicyPatch( + **instance_group_manager_policy_patch_model_dict) # Verify the model instances are equivalent assert instance_group_manager_policy_patch_model == instance_group_manager_policy_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_patch_model_json2 = instance_group_manager_policy_patch_model.to_dict() + instance_group_manager_policy_patch_model_json2 = instance_group_manager_policy_patch_model.to_dict( + ) assert instance_group_manager_policy_patch_model_json2 == instance_group_manager_policy_patch_model_json @@ -56981,29 +63615,39 @@ def test_instance_group_manager_policy_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted - instance_group_manager_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_manager_policy_reference_deleted_model = { + } # InstanceGroupManagerPolicyReferenceDeleted + instance_group_manager_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceGroupManagerPolicyReference model instance_group_manager_policy_reference_model_json = {} - instance_group_manager_policy_reference_model_json['deleted'] = instance_group_manager_policy_reference_deleted_model - instance_group_manager_policy_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_reference_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_reference_model_json['name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_reference_model_json[ + 'deleted'] = instance_group_manager_policy_reference_deleted_model + instance_group_manager_policy_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_reference_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_reference_model_json[ + 'name'] = 'my-instance-group-manager-policy' # Construct a model instance of InstanceGroupManagerPolicyReference by calling from_dict on the json representation - instance_group_manager_policy_reference_model = InstanceGroupManagerPolicyReference.from_dict(instance_group_manager_policy_reference_model_json) + instance_group_manager_policy_reference_model = InstanceGroupManagerPolicyReference.from_dict( + instance_group_manager_policy_reference_model_json) assert instance_group_manager_policy_reference_model != False # Construct a model instance of InstanceGroupManagerPolicyReference by calling from_dict on the json representation - instance_group_manager_policy_reference_model_dict = InstanceGroupManagerPolicyReference.from_dict(instance_group_manager_policy_reference_model_json).__dict__ - instance_group_manager_policy_reference_model2 = InstanceGroupManagerPolicyReference(**instance_group_manager_policy_reference_model_dict) + instance_group_manager_policy_reference_model_dict = InstanceGroupManagerPolicyReference.from_dict( + instance_group_manager_policy_reference_model_json).__dict__ + instance_group_manager_policy_reference_model2 = InstanceGroupManagerPolicyReference( + **instance_group_manager_policy_reference_model_dict) # Verify the model instances are equivalent assert instance_group_manager_policy_reference_model == instance_group_manager_policy_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_reference_model_json2 = instance_group_manager_policy_reference_model.to_dict() + instance_group_manager_policy_reference_model_json2 = instance_group_manager_policy_reference_model.to_dict( + ) assert instance_group_manager_policy_reference_model_json2 == instance_group_manager_policy_reference_model_json @@ -57012,28 +63656,34 @@ class TestModel_InstanceGroupManagerPolicyReferenceDeleted: Test Class for InstanceGroupManagerPolicyReferenceDeleted """ - def test_instance_group_manager_policy_reference_deleted_serialization(self): + def test_instance_group_manager_policy_reference_deleted_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerPolicyReferenceDeleted """ # Construct a json representation of a InstanceGroupManagerPolicyReferenceDeleted model instance_group_manager_policy_reference_deleted_model_json = {} - instance_group_manager_policy_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_manager_policy_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceGroupManagerPolicyReferenceDeleted by calling from_dict on the json representation - instance_group_manager_policy_reference_deleted_model = InstanceGroupManagerPolicyReferenceDeleted.from_dict(instance_group_manager_policy_reference_deleted_model_json) + instance_group_manager_policy_reference_deleted_model = InstanceGroupManagerPolicyReferenceDeleted.from_dict( + instance_group_manager_policy_reference_deleted_model_json) assert instance_group_manager_policy_reference_deleted_model != False # Construct a model instance of InstanceGroupManagerPolicyReferenceDeleted by calling from_dict on the json representation - instance_group_manager_policy_reference_deleted_model_dict = InstanceGroupManagerPolicyReferenceDeleted.from_dict(instance_group_manager_policy_reference_deleted_model_json).__dict__ - instance_group_manager_policy_reference_deleted_model2 = InstanceGroupManagerPolicyReferenceDeleted(**instance_group_manager_policy_reference_deleted_model_dict) + instance_group_manager_policy_reference_deleted_model_dict = InstanceGroupManagerPolicyReferenceDeleted.from_dict( + instance_group_manager_policy_reference_deleted_model_json).__dict__ + instance_group_manager_policy_reference_deleted_model2 = InstanceGroupManagerPolicyReferenceDeleted( + **instance_group_manager_policy_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_group_manager_policy_reference_deleted_model == instance_group_manager_policy_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_reference_deleted_model_json2 = instance_group_manager_policy_reference_deleted_model.to_dict() + instance_group_manager_policy_reference_deleted_model_json2 = instance_group_manager_policy_reference_deleted_model.to_dict( + ) assert instance_group_manager_policy_reference_deleted_model_json2 == instance_group_manager_policy_reference_deleted_model_json @@ -57049,29 +63699,39 @@ def test_instance_group_manager_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted - instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_manager_reference_deleted_model = { + } # InstanceGroupManagerReferenceDeleted + instance_group_manager_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceGroupManagerReference model instance_group_manager_reference_model_json = {} - instance_group_manager_reference_model_json['deleted'] = instance_group_manager_reference_deleted_model - instance_group_manager_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_reference_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_reference_model_json['name'] = 'my-instance-group-manager' + instance_group_manager_reference_model_json[ + 'deleted'] = instance_group_manager_reference_deleted_model + instance_group_manager_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_reference_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_reference_model_json[ + 'name'] = 'my-instance-group-manager' # Construct a model instance of InstanceGroupManagerReference by calling from_dict on the json representation - instance_group_manager_reference_model = InstanceGroupManagerReference.from_dict(instance_group_manager_reference_model_json) + instance_group_manager_reference_model = InstanceGroupManagerReference.from_dict( + instance_group_manager_reference_model_json) assert instance_group_manager_reference_model != False # Construct a model instance of InstanceGroupManagerReference by calling from_dict on the json representation - instance_group_manager_reference_model_dict = InstanceGroupManagerReference.from_dict(instance_group_manager_reference_model_json).__dict__ - instance_group_manager_reference_model2 = InstanceGroupManagerReference(**instance_group_manager_reference_model_dict) + instance_group_manager_reference_model_dict = InstanceGroupManagerReference.from_dict( + instance_group_manager_reference_model_json).__dict__ + instance_group_manager_reference_model2 = InstanceGroupManagerReference( + **instance_group_manager_reference_model_dict) # Verify the model instances are equivalent assert instance_group_manager_reference_model == instance_group_manager_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_reference_model_json2 = instance_group_manager_reference_model.to_dict() + instance_group_manager_reference_model_json2 = instance_group_manager_reference_model.to_dict( + ) assert instance_group_manager_reference_model_json2 == instance_group_manager_reference_model_json @@ -57087,21 +63747,26 @@ def test_instance_group_manager_reference_deleted_serialization(self): # Construct a json representation of a InstanceGroupManagerReferenceDeleted model instance_group_manager_reference_deleted_model_json = {} - instance_group_manager_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_manager_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceGroupManagerReferenceDeleted by calling from_dict on the json representation - instance_group_manager_reference_deleted_model = InstanceGroupManagerReferenceDeleted.from_dict(instance_group_manager_reference_deleted_model_json) + instance_group_manager_reference_deleted_model = InstanceGroupManagerReferenceDeleted.from_dict( + instance_group_manager_reference_deleted_model_json) assert instance_group_manager_reference_deleted_model != False # Construct a model instance of InstanceGroupManagerReferenceDeleted by calling from_dict on the json representation - instance_group_manager_reference_deleted_model_dict = InstanceGroupManagerReferenceDeleted.from_dict(instance_group_manager_reference_deleted_model_json).__dict__ - instance_group_manager_reference_deleted_model2 = InstanceGroupManagerReferenceDeleted(**instance_group_manager_reference_deleted_model_dict) + instance_group_manager_reference_deleted_model_dict = InstanceGroupManagerReferenceDeleted.from_dict( + instance_group_manager_reference_deleted_model_json).__dict__ + instance_group_manager_reference_deleted_model2 = InstanceGroupManagerReferenceDeleted( + **instance_group_manager_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_group_manager_reference_deleted_model == instance_group_manager_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_reference_deleted_model_json2 = instance_group_manager_reference_deleted_model.to_dict() + instance_group_manager_reference_deleted_model_json2 = instance_group_manager_reference_deleted_model.to_dict( + ) assert instance_group_manager_reference_deleted_model_json2 == instance_group_manager_reference_deleted_model_json @@ -57117,21 +63782,26 @@ def test_instance_group_manager_scheduled_action_group_serialization(self): # Construct a json representation of a InstanceGroupManagerScheduledActionGroup model instance_group_manager_scheduled_action_group_model_json = {} - instance_group_manager_scheduled_action_group_model_json['membership_count'] = 10 + instance_group_manager_scheduled_action_group_model_json[ + 'membership_count'] = 10 # Construct a model instance of InstanceGroupManagerScheduledActionGroup by calling from_dict on the json representation - instance_group_manager_scheduled_action_group_model = InstanceGroupManagerScheduledActionGroup.from_dict(instance_group_manager_scheduled_action_group_model_json) + instance_group_manager_scheduled_action_group_model = InstanceGroupManagerScheduledActionGroup.from_dict( + instance_group_manager_scheduled_action_group_model_json) assert instance_group_manager_scheduled_action_group_model != False # Construct a model instance of InstanceGroupManagerScheduledActionGroup by calling from_dict on the json representation - instance_group_manager_scheduled_action_group_model_dict = InstanceGroupManagerScheduledActionGroup.from_dict(instance_group_manager_scheduled_action_group_model_json).__dict__ - instance_group_manager_scheduled_action_group_model2 = InstanceGroupManagerScheduledActionGroup(**instance_group_manager_scheduled_action_group_model_dict) + instance_group_manager_scheduled_action_group_model_dict = InstanceGroupManagerScheduledActionGroup.from_dict( + instance_group_manager_scheduled_action_group_model_json).__dict__ + instance_group_manager_scheduled_action_group_model2 = InstanceGroupManagerScheduledActionGroup( + **instance_group_manager_scheduled_action_group_model_dict) # Verify the model instances are equivalent assert instance_group_manager_scheduled_action_group_model == instance_group_manager_scheduled_action_group_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_scheduled_action_group_model_json2 = instance_group_manager_scheduled_action_group_model.to_dict() + instance_group_manager_scheduled_action_group_model_json2 = instance_group_manager_scheduled_action_group_model.to_dict( + ) assert instance_group_manager_scheduled_action_group_model_json2 == instance_group_manager_scheduled_action_group_model_json @@ -57140,28 +63810,36 @@ class TestModel_InstanceGroupManagerScheduledActionGroupPrototype: Test Class for InstanceGroupManagerScheduledActionGroupPrototype """ - def test_instance_group_manager_scheduled_action_group_prototype_serialization(self): + def test_instance_group_manager_scheduled_action_group_prototype_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerScheduledActionGroupPrototype """ # Construct a json representation of a InstanceGroupManagerScheduledActionGroupPrototype model instance_group_manager_scheduled_action_group_prototype_model_json = {} - instance_group_manager_scheduled_action_group_prototype_model_json['membership_count'] = 10 + instance_group_manager_scheduled_action_group_prototype_model_json[ + 'membership_count'] = 10 # Construct a model instance of InstanceGroupManagerScheduledActionGroupPrototype by calling from_dict on the json representation - instance_group_manager_scheduled_action_group_prototype_model = InstanceGroupManagerScheduledActionGroupPrototype.from_dict(instance_group_manager_scheduled_action_group_prototype_model_json) + instance_group_manager_scheduled_action_group_prototype_model = InstanceGroupManagerScheduledActionGroupPrototype.from_dict( + instance_group_manager_scheduled_action_group_prototype_model_json) assert instance_group_manager_scheduled_action_group_prototype_model != False # Construct a model instance of InstanceGroupManagerScheduledActionGroupPrototype by calling from_dict on the json representation - instance_group_manager_scheduled_action_group_prototype_model_dict = InstanceGroupManagerScheduledActionGroupPrototype.from_dict(instance_group_manager_scheduled_action_group_prototype_model_json).__dict__ - instance_group_manager_scheduled_action_group_prototype_model2 = InstanceGroupManagerScheduledActionGroupPrototype(**instance_group_manager_scheduled_action_group_prototype_model_dict) + instance_group_manager_scheduled_action_group_prototype_model_dict = InstanceGroupManagerScheduledActionGroupPrototype.from_dict( + instance_group_manager_scheduled_action_group_prototype_model_json + ).__dict__ + instance_group_manager_scheduled_action_group_prototype_model2 = InstanceGroupManagerScheduledActionGroupPrototype( + ** + instance_group_manager_scheduled_action_group_prototype_model_dict) # Verify the model instances are equivalent assert instance_group_manager_scheduled_action_group_prototype_model == instance_group_manager_scheduled_action_group_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_scheduled_action_group_prototype_model_json2 = instance_group_manager_scheduled_action_group_prototype_model.to_dict() + instance_group_manager_scheduled_action_group_prototype_model_json2 = instance_group_manager_scheduled_action_group_prototype_model.to_dict( + ) assert instance_group_manager_scheduled_action_group_prototype_model_json2 == instance_group_manager_scheduled_action_group_prototype_model_json @@ -57178,59 +63856,88 @@ def test_instance_group_membership_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['deleted'] = instance_reference_deleted_model - instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['name'] = 'my-instance' - instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted - instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_template_reference_deleted_model = { + } # InstanceTemplateReferenceDeleted + instance_template_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_template_reference_model = {} # InstanceTemplateReference - instance_template_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model['deleted'] = instance_template_reference_deleted_model - instance_template_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model[ + 'deleted'] = instance_template_reference_deleted_model + instance_template_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' instance_template_reference_model['name'] = 'my-instance-template' - load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted - load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_member_reference_deleted_model = { + } # LoadBalancerPoolMemberReferenceDeleted + load_balancer_pool_member_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference - load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model - load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model = { + } # LoadBalancerPoolMemberReference + load_balancer_pool_member_reference_model[ + 'deleted'] = load_balancer_pool_member_reference_deleted_model + load_balancer_pool_member_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a InstanceGroupMembership model instance_group_membership_model_json = {} - instance_group_membership_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_group_membership_model_json['delete_instance_on_membership_delete'] = True - instance_group_membership_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed' - instance_group_membership_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_membership_model_json['instance'] = instance_reference_model - instance_group_membership_model_json['instance_template'] = instance_template_reference_model - instance_group_membership_model_json['name'] = 'my-instance-group-membership' - instance_group_membership_model_json['pool_member'] = load_balancer_pool_member_reference_model + instance_group_membership_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_membership_model_json[ + 'delete_instance_on_membership_delete'] = True + instance_group_membership_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed' + instance_group_membership_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_membership_model_json[ + 'instance'] = instance_reference_model + instance_group_membership_model_json[ + 'instance_template'] = instance_template_reference_model + instance_group_membership_model_json[ + 'name'] = 'my-instance-group-membership' + instance_group_membership_model_json[ + 'pool_member'] = load_balancer_pool_member_reference_model instance_group_membership_model_json['status'] = 'deleting' - instance_group_membership_model_json['updated_at'] = '2019-01-01T12:00:00Z' + instance_group_membership_model_json[ + 'updated_at'] = '2019-01-01T12:00:00Z' # Construct a model instance of InstanceGroupMembership by calling from_dict on the json representation - instance_group_membership_model = InstanceGroupMembership.from_dict(instance_group_membership_model_json) + instance_group_membership_model = InstanceGroupMembership.from_dict( + instance_group_membership_model_json) assert instance_group_membership_model != False # Construct a model instance of InstanceGroupMembership by calling from_dict on the json representation - instance_group_membership_model_dict = InstanceGroupMembership.from_dict(instance_group_membership_model_json).__dict__ - instance_group_membership_model2 = InstanceGroupMembership(**instance_group_membership_model_dict) + instance_group_membership_model_dict = InstanceGroupMembership.from_dict( + instance_group_membership_model_json).__dict__ + instance_group_membership_model2 = InstanceGroupMembership( + **instance_group_membership_model_dict) # Verify the model instances are equivalent assert instance_group_membership_model == instance_group_membership_model2 # Convert model instance back to dict and verify no loss of data - instance_group_membership_model_json2 = instance_group_membership_model.to_dict() + instance_group_membership_model_json2 = instance_group_membership_model.to_dict( + ) assert instance_group_membership_model_json2 == instance_group_membership_model_json @@ -57246,73 +63953,106 @@ def test_instance_group_membership_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_membership_collection_first_model = {} # InstanceGroupMembershipCollectionFirst - instance_group_membership_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20' + instance_group_membership_collection_first_model = { + } # InstanceGroupMembershipCollectionFirst + instance_group_membership_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20' instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['deleted'] = instance_reference_deleted_model - instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['name'] = 'my-instance' - instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted - instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_template_reference_deleted_model = { + } # InstanceTemplateReferenceDeleted + instance_template_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_template_reference_model = {} # InstanceTemplateReference - instance_template_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model['deleted'] = instance_template_reference_deleted_model - instance_template_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model[ + 'deleted'] = instance_template_reference_deleted_model + instance_template_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' instance_template_reference_model['name'] = 'my-instance-template' - load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted - load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_member_reference_deleted_model = { + } # LoadBalancerPoolMemberReferenceDeleted + load_balancer_pool_member_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference - load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model - load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model = { + } # LoadBalancerPoolMemberReference + load_balancer_pool_member_reference_model[ + 'deleted'] = load_balancer_pool_member_reference_deleted_model + load_balancer_pool_member_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' instance_group_membership_model = {} # InstanceGroupMembership instance_group_membership_model['created_at'] = '2019-01-01T12:00:00Z' - instance_group_membership_model['delete_instance_on_membership_delete'] = True - instance_group_membership_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed' - instance_group_membership_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_membership_model[ + 'delete_instance_on_membership_delete'] = True + instance_group_membership_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed' + instance_group_membership_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_membership_model['instance'] = instance_reference_model - instance_group_membership_model['instance_template'] = instance_template_reference_model + instance_group_membership_model[ + 'instance_template'] = instance_template_reference_model instance_group_membership_model['name'] = 'my-instance-group-membership' - instance_group_membership_model['pool_member'] = load_balancer_pool_member_reference_model + instance_group_membership_model[ + 'pool_member'] = load_balancer_pool_member_reference_model instance_group_membership_model['status'] = 'deleting' instance_group_membership_model['updated_at'] = '2019-01-01T12:00:00Z' - instance_group_membership_collection_next_model = {} # InstanceGroupMembershipCollectionNext - instance_group_membership_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_membership_collection_next_model = { + } # InstanceGroupMembershipCollectionNext + instance_group_membership_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a InstanceGroupMembershipCollection model instance_group_membership_collection_model_json = {} - instance_group_membership_collection_model_json['first'] = instance_group_membership_collection_first_model + instance_group_membership_collection_model_json[ + 'first'] = instance_group_membership_collection_first_model instance_group_membership_collection_model_json['limit'] = 20 - instance_group_membership_collection_model_json['memberships'] = [instance_group_membership_model] - instance_group_membership_collection_model_json['next'] = instance_group_membership_collection_next_model + instance_group_membership_collection_model_json['memberships'] = [ + instance_group_membership_model + ] + instance_group_membership_collection_model_json[ + 'next'] = instance_group_membership_collection_next_model instance_group_membership_collection_model_json['total_count'] = 132 # Construct a model instance of InstanceGroupMembershipCollection by calling from_dict on the json representation - instance_group_membership_collection_model = InstanceGroupMembershipCollection.from_dict(instance_group_membership_collection_model_json) + instance_group_membership_collection_model = InstanceGroupMembershipCollection.from_dict( + instance_group_membership_collection_model_json) assert instance_group_membership_collection_model != False # Construct a model instance of InstanceGroupMembershipCollection by calling from_dict on the json representation - instance_group_membership_collection_model_dict = InstanceGroupMembershipCollection.from_dict(instance_group_membership_collection_model_json).__dict__ - instance_group_membership_collection_model2 = InstanceGroupMembershipCollection(**instance_group_membership_collection_model_dict) + instance_group_membership_collection_model_dict = InstanceGroupMembershipCollection.from_dict( + instance_group_membership_collection_model_json).__dict__ + instance_group_membership_collection_model2 = InstanceGroupMembershipCollection( + **instance_group_membership_collection_model_dict) # Verify the model instances are equivalent assert instance_group_membership_collection_model == instance_group_membership_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_group_membership_collection_model_json2 = instance_group_membership_collection_model.to_dict() + instance_group_membership_collection_model_json2 = instance_group_membership_collection_model.to_dict( + ) assert instance_group_membership_collection_model_json2 == instance_group_membership_collection_model_json @@ -57328,21 +64068,26 @@ def test_instance_group_membership_collection_first_serialization(self): # Construct a json representation of a InstanceGroupMembershipCollectionFirst model instance_group_membership_collection_first_model_json = {} - instance_group_membership_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20' + instance_group_membership_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20' # Construct a model instance of InstanceGroupMembershipCollectionFirst by calling from_dict on the json representation - instance_group_membership_collection_first_model = InstanceGroupMembershipCollectionFirst.from_dict(instance_group_membership_collection_first_model_json) + instance_group_membership_collection_first_model = InstanceGroupMembershipCollectionFirst.from_dict( + instance_group_membership_collection_first_model_json) assert instance_group_membership_collection_first_model != False # Construct a model instance of InstanceGroupMembershipCollectionFirst by calling from_dict on the json representation - instance_group_membership_collection_first_model_dict = InstanceGroupMembershipCollectionFirst.from_dict(instance_group_membership_collection_first_model_json).__dict__ - instance_group_membership_collection_first_model2 = InstanceGroupMembershipCollectionFirst(**instance_group_membership_collection_first_model_dict) + instance_group_membership_collection_first_model_dict = InstanceGroupMembershipCollectionFirst.from_dict( + instance_group_membership_collection_first_model_json).__dict__ + instance_group_membership_collection_first_model2 = InstanceGroupMembershipCollectionFirst( + **instance_group_membership_collection_first_model_dict) # Verify the model instances are equivalent assert instance_group_membership_collection_first_model == instance_group_membership_collection_first_model2 # Convert model instance back to dict and verify no loss of data - instance_group_membership_collection_first_model_json2 = instance_group_membership_collection_first_model.to_dict() + instance_group_membership_collection_first_model_json2 = instance_group_membership_collection_first_model.to_dict( + ) assert instance_group_membership_collection_first_model_json2 == instance_group_membership_collection_first_model_json @@ -57358,21 +64103,26 @@ def test_instance_group_membership_collection_next_serialization(self): # Construct a json representation of a InstanceGroupMembershipCollectionNext model instance_group_membership_collection_next_model_json = {} - instance_group_membership_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_group_membership_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of InstanceGroupMembershipCollectionNext by calling from_dict on the json representation - instance_group_membership_collection_next_model = InstanceGroupMembershipCollectionNext.from_dict(instance_group_membership_collection_next_model_json) + instance_group_membership_collection_next_model = InstanceGroupMembershipCollectionNext.from_dict( + instance_group_membership_collection_next_model_json) assert instance_group_membership_collection_next_model != False # Construct a model instance of InstanceGroupMembershipCollectionNext by calling from_dict on the json representation - instance_group_membership_collection_next_model_dict = InstanceGroupMembershipCollectionNext.from_dict(instance_group_membership_collection_next_model_json).__dict__ - instance_group_membership_collection_next_model2 = InstanceGroupMembershipCollectionNext(**instance_group_membership_collection_next_model_dict) + instance_group_membership_collection_next_model_dict = InstanceGroupMembershipCollectionNext.from_dict( + instance_group_membership_collection_next_model_json).__dict__ + instance_group_membership_collection_next_model2 = InstanceGroupMembershipCollectionNext( + **instance_group_membership_collection_next_model_dict) # Verify the model instances are equivalent assert instance_group_membership_collection_next_model == instance_group_membership_collection_next_model2 # Convert model instance back to dict and verify no loss of data - instance_group_membership_collection_next_model_json2 = instance_group_membership_collection_next_model.to_dict() + instance_group_membership_collection_next_model_json2 = instance_group_membership_collection_next_model.to_dict( + ) assert instance_group_membership_collection_next_model_json2 == instance_group_membership_collection_next_model_json @@ -57388,21 +64138,26 @@ def test_instance_group_membership_patch_serialization(self): # Construct a json representation of a InstanceGroupMembershipPatch model instance_group_membership_patch_model_json = {} - instance_group_membership_patch_model_json['name'] = 'my-instance-group-membership' + instance_group_membership_patch_model_json[ + 'name'] = 'my-instance-group-membership' # Construct a model instance of InstanceGroupMembershipPatch by calling from_dict on the json representation - instance_group_membership_patch_model = InstanceGroupMembershipPatch.from_dict(instance_group_membership_patch_model_json) + instance_group_membership_patch_model = InstanceGroupMembershipPatch.from_dict( + instance_group_membership_patch_model_json) assert instance_group_membership_patch_model != False # Construct a model instance of InstanceGroupMembershipPatch by calling from_dict on the json representation - instance_group_membership_patch_model_dict = InstanceGroupMembershipPatch.from_dict(instance_group_membership_patch_model_json).__dict__ - instance_group_membership_patch_model2 = InstanceGroupMembershipPatch(**instance_group_membership_patch_model_dict) + instance_group_membership_patch_model_dict = InstanceGroupMembershipPatch.from_dict( + instance_group_membership_patch_model_json).__dict__ + instance_group_membership_patch_model2 = InstanceGroupMembershipPatch( + **instance_group_membership_patch_model_dict) # Verify the model instances are equivalent assert instance_group_membership_patch_model == instance_group_membership_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_group_membership_patch_model_json2 = instance_group_membership_patch_model.to_dict() + instance_group_membership_patch_model_json2 = instance_group_membership_patch_model.to_dict( + ) assert instance_group_membership_patch_model_json2 == instance_group_membership_patch_model_json @@ -57419,34 +64174,45 @@ def test_instance_group_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_template_identity_model = {} # InstanceTemplateIdentityById - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' load_balancer_identity_model = {} # LoadBalancerIdentityById - load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_model[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - load_balancer_pool_identity_model = {} # LoadBalancerPoolIdentityLoadBalancerPoolIdentityById - load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_model = { + } # LoadBalancerPoolIdentityLoadBalancerPoolIdentityById + load_balancer_pool_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a InstanceGroupPatch model instance_group_patch_model_json = {} instance_group_patch_model_json['application_port'] = 22 - instance_group_patch_model_json['instance_template'] = instance_template_identity_model - instance_group_patch_model_json['load_balancer'] = load_balancer_identity_model - instance_group_patch_model_json['load_balancer_pool'] = load_balancer_pool_identity_model + instance_group_patch_model_json[ + 'instance_template'] = instance_template_identity_model + instance_group_patch_model_json[ + 'load_balancer'] = load_balancer_identity_model + instance_group_patch_model_json[ + 'load_balancer_pool'] = load_balancer_pool_identity_model instance_group_patch_model_json['membership_count'] = 10 instance_group_patch_model_json['name'] = 'my-instance-group' instance_group_patch_model_json['subnets'] = [subnet_identity_model] # Construct a model instance of InstanceGroupPatch by calling from_dict on the json representation - instance_group_patch_model = InstanceGroupPatch.from_dict(instance_group_patch_model_json) + instance_group_patch_model = InstanceGroupPatch.from_dict( + instance_group_patch_model_json) assert instance_group_patch_model != False # Construct a model instance of InstanceGroupPatch by calling from_dict on the json representation - instance_group_patch_model_dict = InstanceGroupPatch.from_dict(instance_group_patch_model_json).__dict__ - instance_group_patch_model2 = InstanceGroupPatch(**instance_group_patch_model_dict) + instance_group_patch_model_dict = InstanceGroupPatch.from_dict( + instance_group_patch_model_json).__dict__ + instance_group_patch_model2 = InstanceGroupPatch( + **instance_group_patch_model_dict) # Verify the model instances are equivalent assert instance_group_patch_model == instance_group_patch_model2 @@ -57468,30 +64234,40 @@ def test_instance_group_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted - instance_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_reference_deleted_model = { + } # InstanceGroupReferenceDeleted + instance_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceGroupReference model instance_group_reference_model_json = {} - instance_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_reference_model_json['deleted'] = instance_group_reference_deleted_model - instance_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_reference_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model_json[ + 'deleted'] = instance_group_reference_deleted_model + instance_group_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_reference_model_json['name'] = 'my-instance-group' # Construct a model instance of InstanceGroupReference by calling from_dict on the json representation - instance_group_reference_model = InstanceGroupReference.from_dict(instance_group_reference_model_json) + instance_group_reference_model = InstanceGroupReference.from_dict( + instance_group_reference_model_json) assert instance_group_reference_model != False # Construct a model instance of InstanceGroupReference by calling from_dict on the json representation - instance_group_reference_model_dict = InstanceGroupReference.from_dict(instance_group_reference_model_json).__dict__ - instance_group_reference_model2 = InstanceGroupReference(**instance_group_reference_model_dict) + instance_group_reference_model_dict = InstanceGroupReference.from_dict( + instance_group_reference_model_json).__dict__ + instance_group_reference_model2 = InstanceGroupReference( + **instance_group_reference_model_dict) # Verify the model instances are equivalent assert instance_group_reference_model == instance_group_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_group_reference_model_json2 = instance_group_reference_model.to_dict() + instance_group_reference_model_json2 = instance_group_reference_model.to_dict( + ) assert instance_group_reference_model_json2 == instance_group_reference_model_json @@ -57507,21 +64283,26 @@ def test_instance_group_reference_deleted_serialization(self): # Construct a json representation of a InstanceGroupReferenceDeleted model instance_group_reference_deleted_model_json = {} - instance_group_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceGroupReferenceDeleted by calling from_dict on the json representation - instance_group_reference_deleted_model = InstanceGroupReferenceDeleted.from_dict(instance_group_reference_deleted_model_json) + instance_group_reference_deleted_model = InstanceGroupReferenceDeleted.from_dict( + instance_group_reference_deleted_model_json) assert instance_group_reference_deleted_model != False # Construct a model instance of InstanceGroupReferenceDeleted by calling from_dict on the json representation - instance_group_reference_deleted_model_dict = InstanceGroupReferenceDeleted.from_dict(instance_group_reference_deleted_model_json).__dict__ - instance_group_reference_deleted_model2 = InstanceGroupReferenceDeleted(**instance_group_reference_deleted_model_dict) + instance_group_reference_deleted_model_dict = InstanceGroupReferenceDeleted.from_dict( + instance_group_reference_deleted_model_json).__dict__ + instance_group_reference_deleted_model2 = InstanceGroupReferenceDeleted( + **instance_group_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_group_reference_deleted_model == instance_group_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_group_reference_deleted_model_json2 = instance_group_reference_deleted_model.to_dict() + instance_group_reference_deleted_model_json2 = instance_group_reference_deleted_model.to_dict( + ) assert instance_group_reference_deleted_model_json2 == instance_group_reference_deleted_model_json @@ -57538,22 +64319,28 @@ def test_instance_health_reason_serialization(self): # Construct a json representation of a InstanceHealthReason model instance_health_reason_model_json = {} instance_health_reason_model_json['code'] = 'reservation_expired' - instance_health_reason_model_json['message'] = 'The reservation cannot be used because it has expired.' - instance_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons' + instance_health_reason_model_json[ + 'message'] = 'The reservation cannot be used because it has expired.' + instance_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-virtual-server-health-status-reasons' # Construct a model instance of InstanceHealthReason by calling from_dict on the json representation - instance_health_reason_model = InstanceHealthReason.from_dict(instance_health_reason_model_json) + instance_health_reason_model = InstanceHealthReason.from_dict( + instance_health_reason_model_json) assert instance_health_reason_model != False # Construct a model instance of InstanceHealthReason by calling from_dict on the json representation - instance_health_reason_model_dict = InstanceHealthReason.from_dict(instance_health_reason_model_json).__dict__ - instance_health_reason_model2 = InstanceHealthReason(**instance_health_reason_model_dict) + instance_health_reason_model_dict = InstanceHealthReason.from_dict( + instance_health_reason_model_json).__dict__ + instance_health_reason_model2 = InstanceHealthReason( + **instance_health_reason_model_dict) # Verify the model instances are equivalent assert instance_health_reason_model == instance_health_reason_model2 # Convert model instance back to dict and verify no loss of data - instance_health_reason_model_json2 = instance_health_reason_model.to_dict() + instance_health_reason_model_json2 = instance_health_reason_model.to_dict( + ) assert instance_health_reason_model_json2 == instance_health_reason_model_json @@ -57571,50 +64358,67 @@ def test_instance_initialization_serialization(self): trusted_profile_reference_model = {} # TrustedProfileReference trusted_profile_reference_model['crn'] = 'crn:[...]' - trusted_profile_reference_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_reference_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' trusted_profile_reference_model['resource_type'] = 'trusted_profile' - instance_initialization_default_trusted_profile_model = {} # InstanceInitializationDefaultTrustedProfile - instance_initialization_default_trusted_profile_model['auto_link'] = True - instance_initialization_default_trusted_profile_model['target'] = trusted_profile_reference_model + instance_initialization_default_trusted_profile_model = { + } # InstanceInitializationDefaultTrustedProfile + instance_initialization_default_trusted_profile_model[ + 'auto_link'] = True + instance_initialization_default_trusted_profile_model[ + 'target'] = trusted_profile_reference_model key_reference_deleted_model = {} # KeyReferenceDeleted - key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + key_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' key_reference_model = {} # KeyReference key_reference_model['crn'] = 'crn:[...]' key_reference_model['deleted'] = key_reference_deleted_model - key_reference_model['fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E' - key_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/82679077-ac3b-4c10-be16-63e9c21f0f45' + key_reference_model[ + 'fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E' + key_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['id'] = '82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['name'] = 'my-key-1' key_identity_by_fingerprint_model = {} # KeyIdentityByFingerprint - key_identity_by_fingerprint_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' + key_identity_by_fingerprint_model[ + 'fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' - instance_initialization_password_model = {} # InstanceInitializationPassword - instance_initialization_password_model['encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' - instance_initialization_password_model['encryption_key'] = key_identity_by_fingerprint_model + instance_initialization_password_model = { + } # InstanceInitializationPassword + instance_initialization_password_model[ + 'encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' + instance_initialization_password_model[ + 'encryption_key'] = key_identity_by_fingerprint_model # Construct a json representation of a InstanceInitialization model instance_initialization_model_json = {} - instance_initialization_model_json['default_trusted_profile'] = instance_initialization_default_trusted_profile_model + instance_initialization_model_json[ + 'default_trusted_profile'] = instance_initialization_default_trusted_profile_model instance_initialization_model_json['keys'] = [key_reference_model] - instance_initialization_model_json['password'] = instance_initialization_password_model + instance_initialization_model_json[ + 'password'] = instance_initialization_password_model # Construct a model instance of InstanceInitialization by calling from_dict on the json representation - instance_initialization_model = InstanceInitialization.from_dict(instance_initialization_model_json) + instance_initialization_model = InstanceInitialization.from_dict( + instance_initialization_model_json) assert instance_initialization_model != False # Construct a model instance of InstanceInitialization by calling from_dict on the json representation - instance_initialization_model_dict = InstanceInitialization.from_dict(instance_initialization_model_json).__dict__ - instance_initialization_model2 = InstanceInitialization(**instance_initialization_model_dict) + instance_initialization_model_dict = InstanceInitialization.from_dict( + instance_initialization_model_json).__dict__ + instance_initialization_model2 = InstanceInitialization( + **instance_initialization_model_dict) # Verify the model instances are equivalent assert instance_initialization_model == instance_initialization_model2 # Convert model instance back to dict and verify no loss of data - instance_initialization_model_json2 = instance_initialization_model.to_dict() + instance_initialization_model_json2 = instance_initialization_model.to_dict( + ) assert instance_initialization_model_json2 == instance_initialization_model_json @@ -57623,7 +64427,8 @@ class TestModel_InstanceInitializationDefaultTrustedProfile: Test Class for InstanceInitializationDefaultTrustedProfile """ - def test_instance_initialization_default_trusted_profile_serialization(self): + def test_instance_initialization_default_trusted_profile_serialization( + self): """ Test serialization/deserialization for InstanceInitializationDefaultTrustedProfile """ @@ -57631,28 +64436,36 @@ def test_instance_initialization_default_trusted_profile_serialization(self): # Construct dict forms of any model objects needed in order to build this model. trusted_profile_reference_model = {} # TrustedProfileReference - trusted_profile_reference_model['crn'] = 'crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - trusted_profile_reference_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_reference_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' trusted_profile_reference_model['resource_type'] = 'trusted_profile' # Construct a json representation of a InstanceInitializationDefaultTrustedProfile model instance_initialization_default_trusted_profile_model_json = {} - instance_initialization_default_trusted_profile_model_json['auto_link'] = True - instance_initialization_default_trusted_profile_model_json['target'] = trusted_profile_reference_model + instance_initialization_default_trusted_profile_model_json[ + 'auto_link'] = True + instance_initialization_default_trusted_profile_model_json[ + 'target'] = trusted_profile_reference_model # Construct a model instance of InstanceInitializationDefaultTrustedProfile by calling from_dict on the json representation - instance_initialization_default_trusted_profile_model = InstanceInitializationDefaultTrustedProfile.from_dict(instance_initialization_default_trusted_profile_model_json) + instance_initialization_default_trusted_profile_model = InstanceInitializationDefaultTrustedProfile.from_dict( + instance_initialization_default_trusted_profile_model_json) assert instance_initialization_default_trusted_profile_model != False # Construct a model instance of InstanceInitializationDefaultTrustedProfile by calling from_dict on the json representation - instance_initialization_default_trusted_profile_model_dict = InstanceInitializationDefaultTrustedProfile.from_dict(instance_initialization_default_trusted_profile_model_json).__dict__ - instance_initialization_default_trusted_profile_model2 = InstanceInitializationDefaultTrustedProfile(**instance_initialization_default_trusted_profile_model_dict) + instance_initialization_default_trusted_profile_model_dict = InstanceInitializationDefaultTrustedProfile.from_dict( + instance_initialization_default_trusted_profile_model_json).__dict__ + instance_initialization_default_trusted_profile_model2 = InstanceInitializationDefaultTrustedProfile( + **instance_initialization_default_trusted_profile_model_dict) # Verify the model instances are equivalent assert instance_initialization_default_trusted_profile_model == instance_initialization_default_trusted_profile_model2 # Convert model instance back to dict and verify no loss of data - instance_initialization_default_trusted_profile_model_json2 = instance_initialization_default_trusted_profile_model.to_dict() + instance_initialization_default_trusted_profile_model_json2 = instance_initialization_default_trusted_profile_model.to_dict( + ) assert instance_initialization_default_trusted_profile_model_json2 == instance_initialization_default_trusted_profile_model_json @@ -57669,26 +64482,33 @@ def test_instance_initialization_password_serialization(self): # Construct dict forms of any model objects needed in order to build this model. key_identity_by_fingerprint_model = {} # KeyIdentityByFingerprint - key_identity_by_fingerprint_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' + key_identity_by_fingerprint_model[ + 'fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' # Construct a json representation of a InstanceInitializationPassword model instance_initialization_password_model_json = {} - instance_initialization_password_model_json['encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' - instance_initialization_password_model_json['encryption_key'] = key_identity_by_fingerprint_model + instance_initialization_password_model_json[ + 'encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' + instance_initialization_password_model_json[ + 'encryption_key'] = key_identity_by_fingerprint_model # Construct a model instance of InstanceInitializationPassword by calling from_dict on the json representation - instance_initialization_password_model = InstanceInitializationPassword.from_dict(instance_initialization_password_model_json) + instance_initialization_password_model = InstanceInitializationPassword.from_dict( + instance_initialization_password_model_json) assert instance_initialization_password_model != False # Construct a model instance of InstanceInitializationPassword by calling from_dict on the json representation - instance_initialization_password_model_dict = InstanceInitializationPassword.from_dict(instance_initialization_password_model_json).__dict__ - instance_initialization_password_model2 = InstanceInitializationPassword(**instance_initialization_password_model_dict) + instance_initialization_password_model_dict = InstanceInitializationPassword.from_dict( + instance_initialization_password_model_json).__dict__ + instance_initialization_password_model2 = InstanceInitializationPassword( + **instance_initialization_password_model_dict) # Verify the model instances are equivalent assert instance_initialization_password_model == instance_initialization_password_model2 # Convert model instance back to dict and verify no loss of data - instance_initialization_password_model_json2 = instance_initialization_password_model.to_dict() + instance_initialization_password_model_json2 = instance_initialization_password_model.to_dict( + ) assert instance_initialization_password_model_json2 == instance_initialization_password_model_json @@ -57704,23 +64524,30 @@ def test_instance_lifecycle_reason_serialization(self): # Construct a json representation of a InstanceLifecycleReason model instance_lifecycle_reason_model_json = {} - instance_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - instance_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - instance_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + instance_lifecycle_reason_model_json[ + 'code'] = 'resource_suspended_by_provider' + instance_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of InstanceLifecycleReason by calling from_dict on the json representation - instance_lifecycle_reason_model = InstanceLifecycleReason.from_dict(instance_lifecycle_reason_model_json) + instance_lifecycle_reason_model = InstanceLifecycleReason.from_dict( + instance_lifecycle_reason_model_json) assert instance_lifecycle_reason_model != False # Construct a model instance of InstanceLifecycleReason by calling from_dict on the json representation - instance_lifecycle_reason_model_dict = InstanceLifecycleReason.from_dict(instance_lifecycle_reason_model_json).__dict__ - instance_lifecycle_reason_model2 = InstanceLifecycleReason(**instance_lifecycle_reason_model_dict) + instance_lifecycle_reason_model_dict = InstanceLifecycleReason.from_dict( + instance_lifecycle_reason_model_json).__dict__ + instance_lifecycle_reason_model2 = InstanceLifecycleReason( + **instance_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert instance_lifecycle_reason_model == instance_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - instance_lifecycle_reason_model_json2 = instance_lifecycle_reason_model.to_dict() + instance_lifecycle_reason_model_json2 = instance_lifecycle_reason_model.to_dict( + ) assert instance_lifecycle_reason_model_json2 == instance_lifecycle_reason_model_json @@ -57741,18 +64568,22 @@ def test_instance_metadata_service_serialization(self): instance_metadata_service_model_json['response_hop_limit'] = 1 # Construct a model instance of InstanceMetadataService by calling from_dict on the json representation - instance_metadata_service_model = InstanceMetadataService.from_dict(instance_metadata_service_model_json) + instance_metadata_service_model = InstanceMetadataService.from_dict( + instance_metadata_service_model_json) assert instance_metadata_service_model != False # Construct a model instance of InstanceMetadataService by calling from_dict on the json representation - instance_metadata_service_model_dict = InstanceMetadataService.from_dict(instance_metadata_service_model_json).__dict__ - instance_metadata_service_model2 = InstanceMetadataService(**instance_metadata_service_model_dict) + instance_metadata_service_model_dict = InstanceMetadataService.from_dict( + instance_metadata_service_model_json).__dict__ + instance_metadata_service_model2 = InstanceMetadataService( + **instance_metadata_service_model_dict) # Verify the model instances are equivalent assert instance_metadata_service_model == instance_metadata_service_model2 # Convert model instance back to dict and verify no loss of data - instance_metadata_service_model_json2 = instance_metadata_service_model.to_dict() + instance_metadata_service_model_json2 = instance_metadata_service_model.to_dict( + ) assert instance_metadata_service_model_json2 == instance_metadata_service_model_json @@ -57773,18 +64604,22 @@ def test_instance_metadata_service_patch_serialization(self): instance_metadata_service_patch_model_json['response_hop_limit'] = 1 # Construct a model instance of InstanceMetadataServicePatch by calling from_dict on the json representation - instance_metadata_service_patch_model = InstanceMetadataServicePatch.from_dict(instance_metadata_service_patch_model_json) + instance_metadata_service_patch_model = InstanceMetadataServicePatch.from_dict( + instance_metadata_service_patch_model_json) assert instance_metadata_service_patch_model != False # Construct a model instance of InstanceMetadataServicePatch by calling from_dict on the json representation - instance_metadata_service_patch_model_dict = InstanceMetadataServicePatch.from_dict(instance_metadata_service_patch_model_json).__dict__ - instance_metadata_service_patch_model2 = InstanceMetadataServicePatch(**instance_metadata_service_patch_model_dict) + instance_metadata_service_patch_model_dict = InstanceMetadataServicePatch.from_dict( + instance_metadata_service_patch_model_json).__dict__ + instance_metadata_service_patch_model2 = InstanceMetadataServicePatch( + **instance_metadata_service_patch_model_dict) # Verify the model instances are equivalent assert instance_metadata_service_patch_model == instance_metadata_service_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_metadata_service_patch_model_json2 = instance_metadata_service_patch_model.to_dict() + instance_metadata_service_patch_model_json2 = instance_metadata_service_patch_model.to_dict( + ) assert instance_metadata_service_patch_model_json2 == instance_metadata_service_patch_model_json @@ -57805,18 +64640,22 @@ def test_instance_metadata_service_prototype_serialization(self): instance_metadata_service_prototype_model_json['response_hop_limit'] = 2 # Construct a model instance of InstanceMetadataServicePrototype by calling from_dict on the json representation - instance_metadata_service_prototype_model = InstanceMetadataServicePrototype.from_dict(instance_metadata_service_prototype_model_json) + instance_metadata_service_prototype_model = InstanceMetadataServicePrototype.from_dict( + instance_metadata_service_prototype_model_json) assert instance_metadata_service_prototype_model != False # Construct a model instance of InstanceMetadataServicePrototype by calling from_dict on the json representation - instance_metadata_service_prototype_model_dict = InstanceMetadataServicePrototype.from_dict(instance_metadata_service_prototype_model_json).__dict__ - instance_metadata_service_prototype_model2 = InstanceMetadataServicePrototype(**instance_metadata_service_prototype_model_dict) + instance_metadata_service_prototype_model_dict = InstanceMetadataServicePrototype.from_dict( + instance_metadata_service_prototype_model_json).__dict__ + instance_metadata_service_prototype_model2 = InstanceMetadataServicePrototype( + **instance_metadata_service_prototype_model_dict) # Verify the model instances are equivalent assert instance_metadata_service_prototype_model == instance_metadata_service_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_metadata_service_prototype_model_json2 = instance_metadata_service_prototype_model.to_dict() + instance_metadata_service_prototype_model_json2 = instance_metadata_service_prototype_model.to_dict( + ) assert instance_metadata_service_prototype_model_json2 == instance_metadata_service_prototype_model_json @@ -57833,61 +64672,86 @@ def test_instance_network_attachment_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5/reserved_ips/5e2c7f65-6393-4345-a5b7-3d13242ae68d' - reserved_ip_reference_model['id'] = '5e2c7f65-6393-4345-a5b7-3d13242ae68d' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5/reserved_ips/5e2c7f65-6393-4345-a5b7-3d13242ae68d' + reserved_ip_reference_model[ + 'id'] = '5e2c7f65-6393-4345-a5b7-3d13242ae68d' reserved_ip_reference_model['name'] = 'my-reserved-ip-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference subnet_reference_model['crn'] = 'crn:[...]' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' - subnet_reference_model['id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + subnet_reference_model[ + 'id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - virtual_network_interface_reference_attachment_context_model = {} # VirtualNetworkInterfaceReferenceAttachmentContext - virtual_network_interface_reference_attachment_context_model['crn'] = 'crn:[...]' - virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' - virtual_network_interface_reference_attachment_context_model['id'] = '0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' - virtual_network_interface_reference_attachment_context_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model['resource_type'] = 'virtual_network_interface' + virtual_network_interface_reference_attachment_context_model = { + } # VirtualNetworkInterfaceReferenceAttachmentContext + virtual_network_interface_reference_attachment_context_model[ + 'crn'] = 'crn:[...]' + virtual_network_interface_reference_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model[ + 'id'] = '0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model[ + 'resource_type'] = 'virtual_network_interface' # Construct a json representation of a InstanceNetworkAttachment model instance_network_attachment_model_json = {} - instance_network_attachment_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_network_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - instance_network_attachment_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_network_attachment_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_model_json[ + 'id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' instance_network_attachment_model_json['lifecycle_state'] = 'stable' - instance_network_attachment_model_json['name'] = 'my-instance-network-attachment' + instance_network_attachment_model_json[ + 'name'] = 'my-instance-network-attachment' instance_network_attachment_model_json['port_speed'] = 1000 - instance_network_attachment_model_json['primary_ip'] = reserved_ip_reference_model - instance_network_attachment_model_json['resource_type'] = 'instance_network_attachment' - instance_network_attachment_model_json['subnet'] = subnet_reference_model + instance_network_attachment_model_json[ + 'primary_ip'] = reserved_ip_reference_model + instance_network_attachment_model_json[ + 'resource_type'] = 'instance_network_attachment' + instance_network_attachment_model_json[ + 'subnet'] = subnet_reference_model instance_network_attachment_model_json['type'] = 'primary' - instance_network_attachment_model_json['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model + instance_network_attachment_model_json[ + 'virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model # Construct a model instance of InstanceNetworkAttachment by calling from_dict on the json representation - instance_network_attachment_model = InstanceNetworkAttachment.from_dict(instance_network_attachment_model_json) + instance_network_attachment_model = InstanceNetworkAttachment.from_dict( + instance_network_attachment_model_json) assert instance_network_attachment_model != False # Construct a model instance of InstanceNetworkAttachment by calling from_dict on the json representation - instance_network_attachment_model_dict = InstanceNetworkAttachment.from_dict(instance_network_attachment_model_json).__dict__ - instance_network_attachment_model2 = InstanceNetworkAttachment(**instance_network_attachment_model_dict) + instance_network_attachment_model_dict = InstanceNetworkAttachment.from_dict( + instance_network_attachment_model_json).__dict__ + instance_network_attachment_model2 = InstanceNetworkAttachment( + **instance_network_attachment_model_dict) # Verify the model instances are equivalent assert instance_network_attachment_model == instance_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_model_json2 = instance_network_attachment_model.to_dict() + instance_network_attachment_model_json2 = instance_network_attachment_model.to_dict( + ) assert instance_network_attachment_model_json2 == instance_network_attachment_model_json @@ -57904,64 +64768,89 @@ def test_instance_network_attachment_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5/reserved_ips/5e2c7f65-6393-4345-a5b7-3d13242ae68d' - reserved_ip_reference_model['id'] = '5e2c7f65-6393-4345-a5b7-3d13242ae68d' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5/reserved_ips/5e2c7f65-6393-4345-a5b7-3d13242ae68d' + reserved_ip_reference_model[ + 'id'] = '5e2c7f65-6393-4345-a5b7-3d13242ae68d' reserved_ip_reference_model['name'] = 'my-reserved-ip-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference subnet_reference_model['crn'] = 'crn:[...]' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' - subnet_reference_model['id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + subnet_reference_model[ + 'id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - virtual_network_interface_reference_attachment_context_model = {} # VirtualNetworkInterfaceReferenceAttachmentContext - virtual_network_interface_reference_attachment_context_model['crn'] = 'crn:[...]' - virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' - virtual_network_interface_reference_attachment_context_model['id'] = '0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' - virtual_network_interface_reference_attachment_context_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model['resource_type'] = 'virtual_network_interface' + virtual_network_interface_reference_attachment_context_model = { + } # VirtualNetworkInterfaceReferenceAttachmentContext + virtual_network_interface_reference_attachment_context_model[ + 'crn'] = 'crn:[...]' + virtual_network_interface_reference_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model[ + 'id'] = '0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model[ + 'resource_type'] = 'virtual_network_interface' instance_network_attachment_model = {} # InstanceNetworkAttachment - instance_network_attachment_model['created_at'] = '2023-09-30T23:42:32.993000Z' - instance_network_attachment_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/123a490a-9e64-4254-a93b-9a3af3ede270/network_attachments/2be851a6-930e-4724-980d-f03e31b00295' - instance_network_attachment_model['id'] = '2be851a6-930e-4724-980d-f03e31b00295' + instance_network_attachment_model[ + 'created_at'] = '2023-09-30T23:42:32.993000Z' + instance_network_attachment_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/123a490a-9e64-4254-a93b-9a3af3ede270/network_attachments/2be851a6-930e-4724-980d-f03e31b00295' + instance_network_attachment_model[ + 'id'] = '2be851a6-930e-4724-980d-f03e31b00295' instance_network_attachment_model['lifecycle_state'] = 'stable' - instance_network_attachment_model['name'] = 'my-instance-network-attachment' + instance_network_attachment_model[ + 'name'] = 'my-instance-network-attachment' instance_network_attachment_model['port_speed'] = 1000 - instance_network_attachment_model['primary_ip'] = reserved_ip_reference_model - instance_network_attachment_model['resource_type'] = 'instance_network_attachment' + instance_network_attachment_model[ + 'primary_ip'] = reserved_ip_reference_model + instance_network_attachment_model[ + 'resource_type'] = 'instance_network_attachment' instance_network_attachment_model['subnet'] = subnet_reference_model instance_network_attachment_model['type'] = 'primary' - instance_network_attachment_model['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model + instance_network_attachment_model[ + 'virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model # Construct a json representation of a InstanceNetworkAttachmentCollection model instance_network_attachment_collection_model_json = {} - instance_network_attachment_collection_model_json['network_attachments'] = [instance_network_attachment_model] + instance_network_attachment_collection_model_json[ + 'network_attachments'] = [instance_network_attachment_model] # Construct a model instance of InstanceNetworkAttachmentCollection by calling from_dict on the json representation - instance_network_attachment_collection_model = InstanceNetworkAttachmentCollection.from_dict(instance_network_attachment_collection_model_json) + instance_network_attachment_collection_model = InstanceNetworkAttachmentCollection.from_dict( + instance_network_attachment_collection_model_json) assert instance_network_attachment_collection_model != False # Construct a model instance of InstanceNetworkAttachmentCollection by calling from_dict on the json representation - instance_network_attachment_collection_model_dict = InstanceNetworkAttachmentCollection.from_dict(instance_network_attachment_collection_model_json).__dict__ - instance_network_attachment_collection_model2 = InstanceNetworkAttachmentCollection(**instance_network_attachment_collection_model_dict) + instance_network_attachment_collection_model_dict = InstanceNetworkAttachmentCollection.from_dict( + instance_network_attachment_collection_model_json).__dict__ + instance_network_attachment_collection_model2 = InstanceNetworkAttachmentCollection( + **instance_network_attachment_collection_model_dict) # Verify the model instances are equivalent assert instance_network_attachment_collection_model == instance_network_attachment_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_collection_model_json2 = instance_network_attachment_collection_model.to_dict() + instance_network_attachment_collection_model_json2 = instance_network_attachment_collection_model.to_dict( + ) assert instance_network_attachment_collection_model_json2 == instance_network_attachment_collection_model_json @@ -57977,21 +64866,26 @@ def test_instance_network_attachment_patch_serialization(self): # Construct a json representation of a InstanceNetworkAttachmentPatch model instance_network_attachment_patch_model_json = {} - instance_network_attachment_patch_model_json['name'] = 'my-instance-network-attachment-updated' + instance_network_attachment_patch_model_json[ + 'name'] = 'my-instance-network-attachment-updated' # Construct a model instance of InstanceNetworkAttachmentPatch by calling from_dict on the json representation - instance_network_attachment_patch_model = InstanceNetworkAttachmentPatch.from_dict(instance_network_attachment_patch_model_json) + instance_network_attachment_patch_model = InstanceNetworkAttachmentPatch.from_dict( + instance_network_attachment_patch_model_json) assert instance_network_attachment_patch_model != False # Construct a model instance of InstanceNetworkAttachmentPatch by calling from_dict on the json representation - instance_network_attachment_patch_model_dict = InstanceNetworkAttachmentPatch.from_dict(instance_network_attachment_patch_model_json).__dict__ - instance_network_attachment_patch_model2 = InstanceNetworkAttachmentPatch(**instance_network_attachment_patch_model_dict) + instance_network_attachment_patch_model_dict = InstanceNetworkAttachmentPatch.from_dict( + instance_network_attachment_patch_model_json).__dict__ + instance_network_attachment_patch_model2 = InstanceNetworkAttachmentPatch( + **instance_network_attachment_patch_model_dict) # Verify the model instances are equivalent assert instance_network_attachment_patch_model == instance_network_attachment_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_patch_model_json2 = instance_network_attachment_patch_model.to_dict() + instance_network_attachment_patch_model_json2 = instance_network_attachment_patch_model.to_dict( + ) assert instance_network_attachment_patch_model_json2 == instance_network_attachment_patch_model_json @@ -58007,54 +64901,78 @@ def test_instance_network_attachment_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a json representation of a InstanceNetworkAttachmentPrototype model instance_network_attachment_prototype_model_json = {} - instance_network_attachment_prototype_model_json['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model_json['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_model_json[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model_json[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a model instance of InstanceNetworkAttachmentPrototype by calling from_dict on the json representation - instance_network_attachment_prototype_model = InstanceNetworkAttachmentPrototype.from_dict(instance_network_attachment_prototype_model_json) + instance_network_attachment_prototype_model = InstanceNetworkAttachmentPrototype.from_dict( + instance_network_attachment_prototype_model_json) assert instance_network_attachment_prototype_model != False # Construct a model instance of InstanceNetworkAttachmentPrototype by calling from_dict on the json representation - instance_network_attachment_prototype_model_dict = InstanceNetworkAttachmentPrototype.from_dict(instance_network_attachment_prototype_model_json).__dict__ - instance_network_attachment_prototype_model2 = InstanceNetworkAttachmentPrototype(**instance_network_attachment_prototype_model_dict) + instance_network_attachment_prototype_model_dict = InstanceNetworkAttachmentPrototype.from_dict( + instance_network_attachment_prototype_model_json).__dict__ + instance_network_attachment_prototype_model2 = InstanceNetworkAttachmentPrototype( + **instance_network_attachment_prototype_model_dict) # Verify the model instances are equivalent assert instance_network_attachment_prototype_model == instance_network_attachment_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_prototype_model_json2 = instance_network_attachment_prototype_model.to_dict() + instance_network_attachment_prototype_model_json2 = instance_network_attachment_prototype_model.to_dict( + ) assert instance_network_attachment_prototype_model_json2 == instance_network_attachment_prototype_model_json @@ -58070,54 +64988,75 @@ def test_instance_network_attachment_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_network_attachment_reference_deleted_model = {} # InstanceNetworkAttachmentReferenceDeleted - instance_network_attachment_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_network_attachment_reference_deleted_model = { + } # InstanceNetworkAttachmentReferenceDeleted + instance_network_attachment_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.240.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a InstanceNetworkAttachmentReference model instance_network_attachment_reference_model_json = {} - instance_network_attachment_reference_model_json['deleted'] = instance_network_attachment_reference_deleted_model - instance_network_attachment_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - instance_network_attachment_reference_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - instance_network_attachment_reference_model_json['name'] = 'my-instance-network-attachment' - instance_network_attachment_reference_model_json['primary_ip'] = reserved_ip_reference_model - instance_network_attachment_reference_model_json['resource_type'] = 'instance_network_attachment' - instance_network_attachment_reference_model_json['subnet'] = subnet_reference_model + instance_network_attachment_reference_model_json[ + 'deleted'] = instance_network_attachment_reference_deleted_model + instance_network_attachment_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_reference_model_json[ + 'id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + instance_network_attachment_reference_model_json[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + instance_network_attachment_reference_model_json[ + 'resource_type'] = 'instance_network_attachment' + instance_network_attachment_reference_model_json[ + 'subnet'] = subnet_reference_model # Construct a model instance of InstanceNetworkAttachmentReference by calling from_dict on the json representation - instance_network_attachment_reference_model = InstanceNetworkAttachmentReference.from_dict(instance_network_attachment_reference_model_json) + instance_network_attachment_reference_model = InstanceNetworkAttachmentReference.from_dict( + instance_network_attachment_reference_model_json) assert instance_network_attachment_reference_model != False # Construct a model instance of InstanceNetworkAttachmentReference by calling from_dict on the json representation - instance_network_attachment_reference_model_dict = InstanceNetworkAttachmentReference.from_dict(instance_network_attachment_reference_model_json).__dict__ - instance_network_attachment_reference_model2 = InstanceNetworkAttachmentReference(**instance_network_attachment_reference_model_dict) + instance_network_attachment_reference_model_dict = InstanceNetworkAttachmentReference.from_dict( + instance_network_attachment_reference_model_json).__dict__ + instance_network_attachment_reference_model2 = InstanceNetworkAttachmentReference( + **instance_network_attachment_reference_model_dict) # Verify the model instances are equivalent assert instance_network_attachment_reference_model == instance_network_attachment_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_reference_model_json2 = instance_network_attachment_reference_model.to_dict() + instance_network_attachment_reference_model_json2 = instance_network_attachment_reference_model.to_dict( + ) assert instance_network_attachment_reference_model_json2 == instance_network_attachment_reference_model_json @@ -58133,21 +65072,26 @@ def test_instance_network_attachment_reference_deleted_serialization(self): # Construct a json representation of a InstanceNetworkAttachmentReferenceDeleted model instance_network_attachment_reference_deleted_model_json = {} - instance_network_attachment_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_network_attachment_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceNetworkAttachmentReferenceDeleted by calling from_dict on the json representation - instance_network_attachment_reference_deleted_model = InstanceNetworkAttachmentReferenceDeleted.from_dict(instance_network_attachment_reference_deleted_model_json) + instance_network_attachment_reference_deleted_model = InstanceNetworkAttachmentReferenceDeleted.from_dict( + instance_network_attachment_reference_deleted_model_json) assert instance_network_attachment_reference_deleted_model != False # Construct a model instance of InstanceNetworkAttachmentReferenceDeleted by calling from_dict on the json representation - instance_network_attachment_reference_deleted_model_dict = InstanceNetworkAttachmentReferenceDeleted.from_dict(instance_network_attachment_reference_deleted_model_json).__dict__ - instance_network_attachment_reference_deleted_model2 = InstanceNetworkAttachmentReferenceDeleted(**instance_network_attachment_reference_deleted_model_dict) + instance_network_attachment_reference_deleted_model_dict = InstanceNetworkAttachmentReferenceDeleted.from_dict( + instance_network_attachment_reference_deleted_model_json).__dict__ + instance_network_attachment_reference_deleted_model2 = InstanceNetworkAttachmentReferenceDeleted( + **instance_network_attachment_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_network_attachment_reference_deleted_model == instance_network_attachment_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_reference_deleted_model_json2 = instance_network_attachment_reference_deleted_model.to_dict() + instance_network_attachment_reference_deleted_model_json2 = instance_network_attachment_reference_deleted_model.to_dict( + ) assert instance_network_attachment_reference_deleted_model_json2 == instance_network_attachment_reference_deleted_model_json @@ -58163,43 +65107,60 @@ def test_instance_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_patch_model = {} # InstanceAvailabilityPolicyPatch + instance_availability_policy_patch_model = { + } # InstanceAvailabilityPolicyPatch instance_availability_policy_patch_model['host_failure'] = 'restart' - instance_metadata_service_patch_model = {} # InstanceMetadataServicePatch + instance_metadata_service_patch_model = { + } # InstanceMetadataServicePatch instance_metadata_service_patch_model['enabled'] = True instance_metadata_service_patch_model['protocol'] = 'http' instance_metadata_service_patch_model['response_hop_limit'] = 1 - instance_placement_target_patch_model = {} # InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_patch_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_patch_model = { + } # InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_patch_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_patch_profile_model = {} # InstancePatchProfileInstanceProfileIdentityByName + instance_patch_profile_model = { + } # InstancePatchProfileInstanceProfileIdentityByName instance_patch_profile_model['name'] = 'bx2-4x16' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_patch_model = {} # InstanceReservationAffinityPatch + instance_reservation_affinity_patch_model = { + } # InstanceReservationAffinityPatch instance_reservation_affinity_patch_model['policy'] = 'disabled' - instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_patch_model['pool'] = [ + reservation_identity_model + ] # Construct a json representation of a InstancePatch model instance_patch_model_json = {} - instance_patch_model_json['availability_policy'] = instance_availability_policy_patch_model - instance_patch_model_json['metadata_service'] = instance_metadata_service_patch_model + instance_patch_model_json[ + 'availability_policy'] = instance_availability_policy_patch_model + instance_patch_model_json['confidential_compute_mode'] = 'disabled' + instance_patch_model_json['enable_secure_boot'] = True + instance_patch_model_json[ + 'metadata_service'] = instance_metadata_service_patch_model instance_patch_model_json['name'] = 'my-instance' - instance_patch_model_json['placement_target'] = instance_placement_target_patch_model + instance_patch_model_json[ + 'placement_target'] = instance_placement_target_patch_model instance_patch_model_json['profile'] = instance_patch_profile_model - instance_patch_model_json['reservation_affinity'] = instance_reservation_affinity_patch_model + instance_patch_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_patch_model instance_patch_model_json['total_volume_bandwidth'] = 500 # Construct a model instance of InstancePatch by calling from_dict on the json representation - instance_patch_model = InstancePatch.from_dict(instance_patch_model_json) + instance_patch_model = InstancePatch.from_dict( + instance_patch_model_json) assert instance_patch_model != False # Construct a model instance of InstancePatch by calling from_dict on the json representation - instance_patch_model_dict = InstancePatch.from_dict(instance_patch_model_json).__dict__ + instance_patch_model_dict = InstancePatch.from_dict( + instance_patch_model_json).__dict__ instance_patch_model2 = InstancePatch(**instance_patch_model_dict) # Verify the model instances are equivalent @@ -58226,7 +65187,17 @@ def test_instance_profile_serialization(self): instance_profile_bandwidth_model['type'] = 'fixed' instance_profile_bandwidth_model['value'] = 20000 - instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed + instance_profile_supported_confidential_compute_modes_model = { + } # InstanceProfileSupportedConfidentialComputeModes + instance_profile_supported_confidential_compute_modes_model[ + 'default'] = 'disabled' + instance_profile_supported_confidential_compute_modes_model[ + 'type'] = 'enum' + instance_profile_supported_confidential_compute_modes_model[ + 'values'] = ['disabled', 'sgx'] + + instance_profile_disk_quantity_model = { + } # InstanceProfileDiskQuantityFixed instance_profile_disk_quantity_model['type'] = 'fixed' instance_profile_disk_quantity_model['value'] = 4 @@ -58234,21 +65205,25 @@ def test_instance_profile_serialization(self): instance_profile_disk_size_model['type'] = 'fixed' instance_profile_disk_size_model['value'] = 100 - instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces + instance_profile_disk_supported_interfaces_model = { + } # InstanceProfileDiskSupportedInterfaces instance_profile_disk_supported_interfaces_model['default'] = 'nvme' instance_profile_disk_supported_interfaces_model['type'] = 'enum' instance_profile_disk_supported_interfaces_model['values'] = ['nvme'] instance_profile_disk_model = {} # InstanceProfileDisk - instance_profile_disk_model['quantity'] = instance_profile_disk_quantity_model + instance_profile_disk_model[ + 'quantity'] = instance_profile_disk_quantity_model instance_profile_disk_model['size'] = instance_profile_disk_size_model - instance_profile_disk_model['supported_interface_types'] = instance_profile_disk_supported_interfaces_model + instance_profile_disk_model[ + 'supported_interface_types'] = instance_profile_disk_supported_interfaces_model instance_profile_gpu_model = {} # InstanceProfileGPUFixed instance_profile_gpu_model['type'] = 'fixed' instance_profile_gpu_model['value'] = 2 - instance_profile_gpu_manufacturer_model = {} # InstanceProfileGPUManufacturer + instance_profile_gpu_manufacturer_model = { + } # InstanceProfileGPUManufacturer instance_profile_gpu_manufacturer_model['type'] = 'enum' instance_profile_gpu_manufacturer_model['values'] = ['nvidia'] @@ -58264,12 +65239,14 @@ def test_instance_profile_serialization(self): instance_profile_memory_model['type'] = 'fixed' instance_profile_memory_model['value'] = 16 - instance_profile_network_attachment_count_model = {} # InstanceProfileNetworkAttachmentCountRange + instance_profile_network_attachment_count_model = { + } # InstanceProfileNetworkAttachmentCountRange instance_profile_network_attachment_count_model['max'] = 5 instance_profile_network_attachment_count_model['min'] = 1 instance_profile_network_attachment_count_model['type'] = 'range' - instance_profile_network_interface_count_model = {} # InstanceProfileNetworkInterfaceCountRange + instance_profile_network_interface_count_model = { + } # InstanceProfileNetworkInterfaceCountRange instance_profile_network_interface_count_model['max'] = 5 instance_profile_network_interface_count_model['min'] = 1 instance_profile_network_interface_count_model['type'] = 'range' @@ -58278,7 +65255,8 @@ def test_instance_profile_serialization(self): instance_profile_numa_count_model['type'] = 'fixed' instance_profile_numa_count_model['value'] = 2 - instance_profile_os_architecture_model = {} # InstanceProfileOSArchitecture + instance_profile_os_architecture_model = { + } # InstanceProfileOSArchitecture instance_profile_os_architecture_model['default'] = 'testString' instance_profile_os_architecture_model['type'] = 'enum' instance_profile_os_architecture_model['values'] = ['amd64'] @@ -58287,15 +65265,26 @@ def test_instance_profile_serialization(self): instance_profile_port_speed_model['type'] = 'fixed' instance_profile_port_speed_model['value'] = 1000 - instance_profile_reservation_terms_model = {} # InstanceProfileReservationTerms + instance_profile_reservation_terms_model = { + } # InstanceProfileReservationTerms instance_profile_reservation_terms_model['type'] = 'enum' - instance_profile_reservation_terms_model['values'] = ['one_year', 'three_year'] - - instance_profile_volume_bandwidth_model = {} # InstanceProfileVolumeBandwidthFixed + instance_profile_reservation_terms_model['values'] = [ + 'one_year', 'three_year' + ] + + instance_profile_supported_secure_boot_modes_model = { + } # InstanceProfileSupportedSecureBootModes + instance_profile_supported_secure_boot_modes_model['default'] = True + instance_profile_supported_secure_boot_modes_model['type'] = 'enum' + instance_profile_supported_secure_boot_modes_model['values'] = [True] + + instance_profile_volume_bandwidth_model = { + } # InstanceProfileVolumeBandwidthFixed instance_profile_volume_bandwidth_model['type'] = 'fixed' instance_profile_volume_bandwidth_model['value'] = 20000 - instance_profile_vcpu_architecture_model = {} # InstanceProfileVCPUArchitecture + instance_profile_vcpu_architecture_model = { + } # InstanceProfileVCPUArchitecture instance_profile_vcpu_architecture_model['default'] = 'testString' instance_profile_vcpu_architecture_model['type'] = 'fixed' instance_profile_vcpu_architecture_model['value'] = 'amd64' @@ -58304,42 +65293,63 @@ def test_instance_profile_serialization(self): instance_profile_vcpu_model['type'] = 'fixed' instance_profile_vcpu_model['value'] = 16 - instance_profile_vcpu_manufacturer_model = {} # InstanceProfileVCPUManufacturer + instance_profile_vcpu_manufacturer_model = { + } # InstanceProfileVCPUManufacturer instance_profile_vcpu_manufacturer_model['default'] = 'testString' instance_profile_vcpu_manufacturer_model['type'] = 'fixed' instance_profile_vcpu_manufacturer_model['value'] = 'intel' # Construct a json representation of a InstanceProfile model instance_profile_model_json = {} - instance_profile_model_json['bandwidth'] = instance_profile_bandwidth_model + instance_profile_model_json[ + 'bandwidth'] = instance_profile_bandwidth_model + instance_profile_model_json[ + 'confidential_compute_modes'] = instance_profile_supported_confidential_compute_modes_model instance_profile_model_json['disks'] = [instance_profile_disk_model] instance_profile_model_json['family'] = 'balanced' instance_profile_model_json['gpu_count'] = instance_profile_gpu_model - instance_profile_model_json['gpu_manufacturer'] = instance_profile_gpu_manufacturer_model - instance_profile_model_json['gpu_memory'] = instance_profile_gpu_memory_model - instance_profile_model_json['gpu_model'] = instance_profile_gpu_model_model - instance_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_model_json[ + 'gpu_manufacturer'] = instance_profile_gpu_manufacturer_model + instance_profile_model_json[ + 'gpu_memory'] = instance_profile_gpu_memory_model + instance_profile_model_json[ + 'gpu_model'] = instance_profile_gpu_model_model + instance_profile_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_model_json['memory'] = instance_profile_memory_model instance_profile_model_json['name'] = 'bx2-4x16' - instance_profile_model_json['network_attachment_count'] = instance_profile_network_attachment_count_model - instance_profile_model_json['network_interface_count'] = instance_profile_network_interface_count_model - instance_profile_model_json['numa_count'] = instance_profile_numa_count_model - instance_profile_model_json['os_architecture'] = instance_profile_os_architecture_model - instance_profile_model_json['port_speed'] = instance_profile_port_speed_model - instance_profile_model_json['reservation_terms'] = instance_profile_reservation_terms_model + instance_profile_model_json[ + 'network_attachment_count'] = instance_profile_network_attachment_count_model + instance_profile_model_json[ + 'network_interface_count'] = instance_profile_network_interface_count_model + instance_profile_model_json[ + 'numa_count'] = instance_profile_numa_count_model + instance_profile_model_json[ + 'os_architecture'] = instance_profile_os_architecture_model + instance_profile_model_json[ + 'port_speed'] = instance_profile_port_speed_model + instance_profile_model_json[ + 'reservation_terms'] = instance_profile_reservation_terms_model instance_profile_model_json['resource_type'] = 'instance_profile' + instance_profile_model_json[ + 'secure_boot_modes'] = instance_profile_supported_secure_boot_modes_model instance_profile_model_json['status'] = 'current' - instance_profile_model_json['total_volume_bandwidth'] = instance_profile_volume_bandwidth_model - instance_profile_model_json['vcpu_architecture'] = instance_profile_vcpu_architecture_model + instance_profile_model_json[ + 'total_volume_bandwidth'] = instance_profile_volume_bandwidth_model + instance_profile_model_json[ + 'vcpu_architecture'] = instance_profile_vcpu_architecture_model instance_profile_model_json['vcpu_count'] = instance_profile_vcpu_model - instance_profile_model_json['vcpu_manufacturer'] = instance_profile_vcpu_manufacturer_model + instance_profile_model_json[ + 'vcpu_manufacturer'] = instance_profile_vcpu_manufacturer_model # Construct a model instance of InstanceProfile by calling from_dict on the json representation - instance_profile_model = InstanceProfile.from_dict(instance_profile_model_json) + instance_profile_model = InstanceProfile.from_dict( + instance_profile_model_json) assert instance_profile_model != False # Construct a model instance of InstanceProfile by calling from_dict on the json representation - instance_profile_model_dict = InstanceProfile.from_dict(instance_profile_model_json).__dict__ + instance_profile_model_dict = InstanceProfile.from_dict( + instance_profile_model_json).__dict__ instance_profile_model2 = InstanceProfile(**instance_profile_model_dict) # Verify the model instances are equivalent @@ -58366,7 +65376,17 @@ def test_instance_profile_collection_serialization(self): instance_profile_bandwidth_model['type'] = 'fixed' instance_profile_bandwidth_model['value'] = 20000 - instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed + instance_profile_supported_confidential_compute_modes_model = { + } # InstanceProfileSupportedConfidentialComputeModes + instance_profile_supported_confidential_compute_modes_model[ + 'default'] = 'disabled' + instance_profile_supported_confidential_compute_modes_model[ + 'type'] = 'enum' + instance_profile_supported_confidential_compute_modes_model[ + 'values'] = ['disabled', 'sgx'] + + instance_profile_disk_quantity_model = { + } # InstanceProfileDiskQuantityFixed instance_profile_disk_quantity_model['type'] = 'fixed' instance_profile_disk_quantity_model['value'] = 4 @@ -58374,21 +65394,25 @@ def test_instance_profile_collection_serialization(self): instance_profile_disk_size_model['type'] = 'fixed' instance_profile_disk_size_model['value'] = 100 - instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces + instance_profile_disk_supported_interfaces_model = { + } # InstanceProfileDiskSupportedInterfaces instance_profile_disk_supported_interfaces_model['default'] = 'nvme' instance_profile_disk_supported_interfaces_model['type'] = 'enum' instance_profile_disk_supported_interfaces_model['values'] = ['nvme'] instance_profile_disk_model = {} # InstanceProfileDisk - instance_profile_disk_model['quantity'] = instance_profile_disk_quantity_model + instance_profile_disk_model[ + 'quantity'] = instance_profile_disk_quantity_model instance_profile_disk_model['size'] = instance_profile_disk_size_model - instance_profile_disk_model['supported_interface_types'] = instance_profile_disk_supported_interfaces_model + instance_profile_disk_model[ + 'supported_interface_types'] = instance_profile_disk_supported_interfaces_model instance_profile_gpu_model = {} # InstanceProfileGPUFixed instance_profile_gpu_model['type'] = 'fixed' instance_profile_gpu_model['value'] = 2 - instance_profile_gpu_manufacturer_model = {} # InstanceProfileGPUManufacturer + instance_profile_gpu_manufacturer_model = { + } # InstanceProfileGPUManufacturer instance_profile_gpu_manufacturer_model['type'] = 'enum' instance_profile_gpu_manufacturer_model['values'] = ['nvidia'] @@ -58404,12 +65428,14 @@ def test_instance_profile_collection_serialization(self): instance_profile_memory_model['type'] = 'fixed' instance_profile_memory_model['value'] = 16 - instance_profile_network_attachment_count_model = {} # InstanceProfileNetworkAttachmentCountRange + instance_profile_network_attachment_count_model = { + } # InstanceProfileNetworkAttachmentCountRange instance_profile_network_attachment_count_model['max'] = 5 instance_profile_network_attachment_count_model['min'] = 1 instance_profile_network_attachment_count_model['type'] = 'range' - instance_profile_network_interface_count_model = {} # InstanceProfileNetworkInterfaceCountRange + instance_profile_network_interface_count_model = { + } # InstanceProfileNetworkInterfaceCountRange instance_profile_network_interface_count_model['max'] = 5 instance_profile_network_interface_count_model['min'] = 1 instance_profile_network_interface_count_model['type'] = 'range' @@ -58418,7 +65444,8 @@ def test_instance_profile_collection_serialization(self): instance_profile_numa_count_model['type'] = 'fixed' instance_profile_numa_count_model['value'] = 2 - instance_profile_os_architecture_model = {} # InstanceProfileOSArchitecture + instance_profile_os_architecture_model = { + } # InstanceProfileOSArchitecture instance_profile_os_architecture_model['default'] = 'testString' instance_profile_os_architecture_model['type'] = 'enum' instance_profile_os_architecture_model['values'] = ['amd64'] @@ -58427,15 +65454,26 @@ def test_instance_profile_collection_serialization(self): instance_profile_port_speed_model['type'] = 'fixed' instance_profile_port_speed_model['value'] = 1000 - instance_profile_reservation_terms_model = {} # InstanceProfileReservationTerms + instance_profile_reservation_terms_model = { + } # InstanceProfileReservationTerms instance_profile_reservation_terms_model['type'] = 'enum' - instance_profile_reservation_terms_model['values'] = ['one_year', 'three_year'] - - instance_profile_volume_bandwidth_model = {} # InstanceProfileVolumeBandwidthFixed + instance_profile_reservation_terms_model['values'] = [ + 'one_year', 'three_year' + ] + + instance_profile_supported_secure_boot_modes_model = { + } # InstanceProfileSupportedSecureBootModes + instance_profile_supported_secure_boot_modes_model['default'] = True + instance_profile_supported_secure_boot_modes_model['type'] = 'enum' + instance_profile_supported_secure_boot_modes_model['values'] = [True] + + instance_profile_volume_bandwidth_model = { + } # InstanceProfileVolumeBandwidthFixed instance_profile_volume_bandwidth_model['type'] = 'fixed' instance_profile_volume_bandwidth_model['value'] = 20000 - instance_profile_vcpu_architecture_model = {} # InstanceProfileVCPUArchitecture + instance_profile_vcpu_architecture_model = { + } # InstanceProfileVCPUArchitecture instance_profile_vcpu_architecture_model['default'] = 'testString' instance_profile_vcpu_architecture_model['type'] = 'fixed' instance_profile_vcpu_architecture_model['value'] = 'amd64' @@ -58444,52 +65482,72 @@ def test_instance_profile_collection_serialization(self): instance_profile_vcpu_model['type'] = 'fixed' instance_profile_vcpu_model['value'] = 16 - instance_profile_vcpu_manufacturer_model = {} # InstanceProfileVCPUManufacturer + instance_profile_vcpu_manufacturer_model = { + } # InstanceProfileVCPUManufacturer instance_profile_vcpu_manufacturer_model['default'] = 'testString' instance_profile_vcpu_manufacturer_model['type'] = 'fixed' instance_profile_vcpu_manufacturer_model['value'] = 'intel' instance_profile_model = {} # InstanceProfile instance_profile_model['bandwidth'] = instance_profile_bandwidth_model + instance_profile_model[ + 'confidential_compute_modes'] = instance_profile_supported_confidential_compute_modes_model instance_profile_model['disks'] = [instance_profile_disk_model] instance_profile_model['family'] = 'balanced' instance_profile_model['gpu_count'] = instance_profile_gpu_model - instance_profile_model['gpu_manufacturer'] = instance_profile_gpu_manufacturer_model + instance_profile_model[ + 'gpu_manufacturer'] = instance_profile_gpu_manufacturer_model instance_profile_model['gpu_memory'] = instance_profile_gpu_memory_model instance_profile_model['gpu_model'] = instance_profile_gpu_model_model - instance_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_model['memory'] = instance_profile_memory_model instance_profile_model['name'] = 'bx2-4x16' - instance_profile_model['network_attachment_count'] = instance_profile_network_attachment_count_model - instance_profile_model['network_interface_count'] = instance_profile_network_interface_count_model + instance_profile_model[ + 'network_attachment_count'] = instance_profile_network_attachment_count_model + instance_profile_model[ + 'network_interface_count'] = instance_profile_network_interface_count_model instance_profile_model['numa_count'] = instance_profile_numa_count_model - instance_profile_model['os_architecture'] = instance_profile_os_architecture_model + instance_profile_model[ + 'os_architecture'] = instance_profile_os_architecture_model instance_profile_model['port_speed'] = instance_profile_port_speed_model - instance_profile_model['reservation_terms'] = instance_profile_reservation_terms_model + instance_profile_model[ + 'reservation_terms'] = instance_profile_reservation_terms_model instance_profile_model['resource_type'] = 'instance_profile' + instance_profile_model[ + 'secure_boot_modes'] = instance_profile_supported_secure_boot_modes_model instance_profile_model['status'] = 'current' - instance_profile_model['total_volume_bandwidth'] = instance_profile_volume_bandwidth_model - instance_profile_model['vcpu_architecture'] = instance_profile_vcpu_architecture_model + instance_profile_model[ + 'total_volume_bandwidth'] = instance_profile_volume_bandwidth_model + instance_profile_model[ + 'vcpu_architecture'] = instance_profile_vcpu_architecture_model instance_profile_model['vcpu_count'] = instance_profile_vcpu_model - instance_profile_model['vcpu_manufacturer'] = instance_profile_vcpu_manufacturer_model + instance_profile_model[ + 'vcpu_manufacturer'] = instance_profile_vcpu_manufacturer_model # Construct a json representation of a InstanceProfileCollection model instance_profile_collection_model_json = {} - instance_profile_collection_model_json['profiles'] = [instance_profile_model] + instance_profile_collection_model_json['profiles'] = [ + instance_profile_model + ] # Construct a model instance of InstanceProfileCollection by calling from_dict on the json representation - instance_profile_collection_model = InstanceProfileCollection.from_dict(instance_profile_collection_model_json) + instance_profile_collection_model = InstanceProfileCollection.from_dict( + instance_profile_collection_model_json) assert instance_profile_collection_model != False # Construct a model instance of InstanceProfileCollection by calling from_dict on the json representation - instance_profile_collection_model_dict = InstanceProfileCollection.from_dict(instance_profile_collection_model_json).__dict__ - instance_profile_collection_model2 = InstanceProfileCollection(**instance_profile_collection_model_dict) + instance_profile_collection_model_dict = InstanceProfileCollection.from_dict( + instance_profile_collection_model_json).__dict__ + instance_profile_collection_model2 = InstanceProfileCollection( + **instance_profile_collection_model_dict) # Verify the model instances are equivalent assert instance_profile_collection_model == instance_profile_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_collection_model_json2 = instance_profile_collection_model.to_dict() + instance_profile_collection_model_json2 = instance_profile_collection_model.to_dict( + ) assert instance_profile_collection_model_json2 == instance_profile_collection_model_json @@ -58505,7 +65563,8 @@ def test_instance_profile_disk_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed + instance_profile_disk_quantity_model = { + } # InstanceProfileDiskQuantityFixed instance_profile_disk_quantity_model['type'] = 'fixed' instance_profile_disk_quantity_model['value'] = 4 @@ -58513,30 +65572,38 @@ def test_instance_profile_disk_serialization(self): instance_profile_disk_size_model['type'] = 'fixed' instance_profile_disk_size_model['value'] = 100 - instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces + instance_profile_disk_supported_interfaces_model = { + } # InstanceProfileDiskSupportedInterfaces instance_profile_disk_supported_interfaces_model['default'] = 'nvme' instance_profile_disk_supported_interfaces_model['type'] = 'enum' instance_profile_disk_supported_interfaces_model['values'] = ['nvme'] # Construct a json representation of a InstanceProfileDisk model instance_profile_disk_model_json = {} - instance_profile_disk_model_json['quantity'] = instance_profile_disk_quantity_model - instance_profile_disk_model_json['size'] = instance_profile_disk_size_model - instance_profile_disk_model_json['supported_interface_types'] = instance_profile_disk_supported_interfaces_model + instance_profile_disk_model_json[ + 'quantity'] = instance_profile_disk_quantity_model + instance_profile_disk_model_json[ + 'size'] = instance_profile_disk_size_model + instance_profile_disk_model_json[ + 'supported_interface_types'] = instance_profile_disk_supported_interfaces_model # Construct a model instance of InstanceProfileDisk by calling from_dict on the json representation - instance_profile_disk_model = InstanceProfileDisk.from_dict(instance_profile_disk_model_json) + instance_profile_disk_model = InstanceProfileDisk.from_dict( + instance_profile_disk_model_json) assert instance_profile_disk_model != False # Construct a model instance of InstanceProfileDisk by calling from_dict on the json representation - instance_profile_disk_model_dict = InstanceProfileDisk.from_dict(instance_profile_disk_model_json).__dict__ - instance_profile_disk_model2 = InstanceProfileDisk(**instance_profile_disk_model_dict) + instance_profile_disk_model_dict = InstanceProfileDisk.from_dict( + instance_profile_disk_model_json).__dict__ + instance_profile_disk_model2 = InstanceProfileDisk( + **instance_profile_disk_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_model == instance_profile_disk_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_model_json2 = instance_profile_disk_model.to_dict() + instance_profile_disk_model_json2 = instance_profile_disk_model.to_dict( + ) assert instance_profile_disk_model_json2 == instance_profile_disk_model_json @@ -58552,23 +65619,30 @@ def test_instance_profile_disk_supported_interfaces_serialization(self): # Construct a json representation of a InstanceProfileDiskSupportedInterfaces model instance_profile_disk_supported_interfaces_model_json = {} - instance_profile_disk_supported_interfaces_model_json['default'] = 'nvme' + instance_profile_disk_supported_interfaces_model_json[ + 'default'] = 'nvme' instance_profile_disk_supported_interfaces_model_json['type'] = 'enum' - instance_profile_disk_supported_interfaces_model_json['values'] = ['nvme'] + instance_profile_disk_supported_interfaces_model_json['values'] = [ + 'nvme' + ] # Construct a model instance of InstanceProfileDiskSupportedInterfaces by calling from_dict on the json representation - instance_profile_disk_supported_interfaces_model = InstanceProfileDiskSupportedInterfaces.from_dict(instance_profile_disk_supported_interfaces_model_json) + instance_profile_disk_supported_interfaces_model = InstanceProfileDiskSupportedInterfaces.from_dict( + instance_profile_disk_supported_interfaces_model_json) assert instance_profile_disk_supported_interfaces_model != False # Construct a model instance of InstanceProfileDiskSupportedInterfaces by calling from_dict on the json representation - instance_profile_disk_supported_interfaces_model_dict = InstanceProfileDiskSupportedInterfaces.from_dict(instance_profile_disk_supported_interfaces_model_json).__dict__ - instance_profile_disk_supported_interfaces_model2 = InstanceProfileDiskSupportedInterfaces(**instance_profile_disk_supported_interfaces_model_dict) + instance_profile_disk_supported_interfaces_model_dict = InstanceProfileDiskSupportedInterfaces.from_dict( + instance_profile_disk_supported_interfaces_model_json).__dict__ + instance_profile_disk_supported_interfaces_model2 = InstanceProfileDiskSupportedInterfaces( + **instance_profile_disk_supported_interfaces_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_supported_interfaces_model == instance_profile_disk_supported_interfaces_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_supported_interfaces_model_json2 = instance_profile_disk_supported_interfaces_model.to_dict() + instance_profile_disk_supported_interfaces_model_json2 = instance_profile_disk_supported_interfaces_model.to_dict( + ) assert instance_profile_disk_supported_interfaces_model_json2 == instance_profile_disk_supported_interfaces_model_json @@ -58588,18 +65662,22 @@ def test_instance_profile_gpu_manufacturer_serialization(self): instance_profile_gpu_manufacturer_model_json['values'] = ['nvidia'] # Construct a model instance of InstanceProfileGPUManufacturer by calling from_dict on the json representation - instance_profile_gpu_manufacturer_model = InstanceProfileGPUManufacturer.from_dict(instance_profile_gpu_manufacturer_model_json) + instance_profile_gpu_manufacturer_model = InstanceProfileGPUManufacturer.from_dict( + instance_profile_gpu_manufacturer_model_json) assert instance_profile_gpu_manufacturer_model != False # Construct a model instance of InstanceProfileGPUManufacturer by calling from_dict on the json representation - instance_profile_gpu_manufacturer_model_dict = InstanceProfileGPUManufacturer.from_dict(instance_profile_gpu_manufacturer_model_json).__dict__ - instance_profile_gpu_manufacturer_model2 = InstanceProfileGPUManufacturer(**instance_profile_gpu_manufacturer_model_dict) + instance_profile_gpu_manufacturer_model_dict = InstanceProfileGPUManufacturer.from_dict( + instance_profile_gpu_manufacturer_model_json).__dict__ + instance_profile_gpu_manufacturer_model2 = InstanceProfileGPUManufacturer( + **instance_profile_gpu_manufacturer_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_manufacturer_model == instance_profile_gpu_manufacturer_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_manufacturer_model_json2 = instance_profile_gpu_manufacturer_model.to_dict() + instance_profile_gpu_manufacturer_model_json2 = instance_profile_gpu_manufacturer_model.to_dict( + ) assert instance_profile_gpu_manufacturer_model_json2 == instance_profile_gpu_manufacturer_model_json @@ -58619,18 +65697,22 @@ def test_instance_profile_gpu_model_serialization(self): instance_profile_gpu_model_model_json['values'] = ['Tesla V100'] # Construct a model instance of InstanceProfileGPUModel by calling from_dict on the json representation - instance_profile_gpu_model_model = InstanceProfileGPUModel.from_dict(instance_profile_gpu_model_model_json) + instance_profile_gpu_model_model = InstanceProfileGPUModel.from_dict( + instance_profile_gpu_model_model_json) assert instance_profile_gpu_model_model != False # Construct a model instance of InstanceProfileGPUModel by calling from_dict on the json representation - instance_profile_gpu_model_model_dict = InstanceProfileGPUModel.from_dict(instance_profile_gpu_model_model_json).__dict__ - instance_profile_gpu_model_model2 = InstanceProfileGPUModel(**instance_profile_gpu_model_model_dict) + instance_profile_gpu_model_model_dict = InstanceProfileGPUModel.from_dict( + instance_profile_gpu_model_model_json).__dict__ + instance_profile_gpu_model_model2 = InstanceProfileGPUModel( + **instance_profile_gpu_model_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_model_model == instance_profile_gpu_model_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_model_model_json2 = instance_profile_gpu_model_model.to_dict() + instance_profile_gpu_model_model_json2 = instance_profile_gpu_model_model.to_dict( + ) assert instance_profile_gpu_model_model_json2 == instance_profile_gpu_model_model_json @@ -58651,18 +65733,22 @@ def test_instance_profile_os_architecture_serialization(self): instance_profile_os_architecture_model_json['values'] = ['amd64'] # Construct a model instance of InstanceProfileOSArchitecture by calling from_dict on the json representation - instance_profile_os_architecture_model = InstanceProfileOSArchitecture.from_dict(instance_profile_os_architecture_model_json) + instance_profile_os_architecture_model = InstanceProfileOSArchitecture.from_dict( + instance_profile_os_architecture_model_json) assert instance_profile_os_architecture_model != False # Construct a model instance of InstanceProfileOSArchitecture by calling from_dict on the json representation - instance_profile_os_architecture_model_dict = InstanceProfileOSArchitecture.from_dict(instance_profile_os_architecture_model_json).__dict__ - instance_profile_os_architecture_model2 = InstanceProfileOSArchitecture(**instance_profile_os_architecture_model_dict) + instance_profile_os_architecture_model_dict = InstanceProfileOSArchitecture.from_dict( + instance_profile_os_architecture_model_json).__dict__ + instance_profile_os_architecture_model2 = InstanceProfileOSArchitecture( + **instance_profile_os_architecture_model_dict) # Verify the model instances are equivalent assert instance_profile_os_architecture_model == instance_profile_os_architecture_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_os_architecture_model_json2 = instance_profile_os_architecture_model.to_dict() + instance_profile_os_architecture_model_json2 = instance_profile_os_architecture_model.to_dict( + ) assert instance_profile_os_architecture_model_json2 == instance_profile_os_architecture_model_json @@ -58678,23 +65764,29 @@ def test_instance_profile_reference_serialization(self): # Construct a json representation of a InstanceProfileReference model instance_profile_reference_model_json = {} - instance_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' instance_profile_reference_model_json['name'] = 'bx2-4x16' - instance_profile_reference_model_json['resource_type'] = 'instance_profile' + instance_profile_reference_model_json[ + 'resource_type'] = 'instance_profile' # Construct a model instance of InstanceProfileReference by calling from_dict on the json representation - instance_profile_reference_model = InstanceProfileReference.from_dict(instance_profile_reference_model_json) + instance_profile_reference_model = InstanceProfileReference.from_dict( + instance_profile_reference_model_json) assert instance_profile_reference_model != False # Construct a model instance of InstanceProfileReference by calling from_dict on the json representation - instance_profile_reference_model_dict = InstanceProfileReference.from_dict(instance_profile_reference_model_json).__dict__ - instance_profile_reference_model2 = InstanceProfileReference(**instance_profile_reference_model_dict) + instance_profile_reference_model_dict = InstanceProfileReference.from_dict( + instance_profile_reference_model_json).__dict__ + instance_profile_reference_model2 = InstanceProfileReference( + **instance_profile_reference_model_dict) # Verify the model instances are equivalent assert instance_profile_reference_model == instance_profile_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_reference_model_json2 = instance_profile_reference_model.to_dict() + instance_profile_reference_model_json2 = instance_profile_reference_model.to_dict( + ) assert instance_profile_reference_model_json2 == instance_profile_reference_model_json @@ -58711,24 +65803,110 @@ def test_instance_profile_reservation_terms_serialization(self): # Construct a json representation of a InstanceProfileReservationTerms model instance_profile_reservation_terms_model_json = {} instance_profile_reservation_terms_model_json['type'] = 'enum' - instance_profile_reservation_terms_model_json['values'] = ['one_year', 'three_year'] + instance_profile_reservation_terms_model_json['values'] = [ + 'one_year', 'three_year' + ] # Construct a model instance of InstanceProfileReservationTerms by calling from_dict on the json representation - instance_profile_reservation_terms_model = InstanceProfileReservationTerms.from_dict(instance_profile_reservation_terms_model_json) + instance_profile_reservation_terms_model = InstanceProfileReservationTerms.from_dict( + instance_profile_reservation_terms_model_json) assert instance_profile_reservation_terms_model != False # Construct a model instance of InstanceProfileReservationTerms by calling from_dict on the json representation - instance_profile_reservation_terms_model_dict = InstanceProfileReservationTerms.from_dict(instance_profile_reservation_terms_model_json).__dict__ - instance_profile_reservation_terms_model2 = InstanceProfileReservationTerms(**instance_profile_reservation_terms_model_dict) + instance_profile_reservation_terms_model_dict = InstanceProfileReservationTerms.from_dict( + instance_profile_reservation_terms_model_json).__dict__ + instance_profile_reservation_terms_model2 = InstanceProfileReservationTerms( + **instance_profile_reservation_terms_model_dict) # Verify the model instances are equivalent assert instance_profile_reservation_terms_model == instance_profile_reservation_terms_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_reservation_terms_model_json2 = instance_profile_reservation_terms_model.to_dict() + instance_profile_reservation_terms_model_json2 = instance_profile_reservation_terms_model.to_dict( + ) assert instance_profile_reservation_terms_model_json2 == instance_profile_reservation_terms_model_json +class TestModel_InstanceProfileSupportedConfidentialComputeModes: + """ + Test Class for InstanceProfileSupportedConfidentialComputeModes + """ + + def test_instance_profile_supported_confidential_compute_modes_serialization( + self): + """ + Test serialization/deserialization for InstanceProfileSupportedConfidentialComputeModes + """ + + # Construct a json representation of a InstanceProfileSupportedConfidentialComputeModes model + instance_profile_supported_confidential_compute_modes_model_json = {} + instance_profile_supported_confidential_compute_modes_model_json[ + 'default'] = 'disabled' + instance_profile_supported_confidential_compute_modes_model_json[ + 'type'] = 'enum' + instance_profile_supported_confidential_compute_modes_model_json[ + 'values'] = ['disabled', 'sgx'] + + # Construct a model instance of InstanceProfileSupportedConfidentialComputeModes by calling from_dict on the json representation + instance_profile_supported_confidential_compute_modes_model = InstanceProfileSupportedConfidentialComputeModes.from_dict( + instance_profile_supported_confidential_compute_modes_model_json) + assert instance_profile_supported_confidential_compute_modes_model != False + + # Construct a model instance of InstanceProfileSupportedConfidentialComputeModes by calling from_dict on the json representation + instance_profile_supported_confidential_compute_modes_model_dict = InstanceProfileSupportedConfidentialComputeModes.from_dict( + instance_profile_supported_confidential_compute_modes_model_json + ).__dict__ + instance_profile_supported_confidential_compute_modes_model2 = InstanceProfileSupportedConfidentialComputeModes( + **instance_profile_supported_confidential_compute_modes_model_dict) + + # Verify the model instances are equivalent + assert instance_profile_supported_confidential_compute_modes_model == instance_profile_supported_confidential_compute_modes_model2 + + # Convert model instance back to dict and verify no loss of data + instance_profile_supported_confidential_compute_modes_model_json2 = instance_profile_supported_confidential_compute_modes_model.to_dict( + ) + assert instance_profile_supported_confidential_compute_modes_model_json2 == instance_profile_supported_confidential_compute_modes_model_json + + +class TestModel_InstanceProfileSupportedSecureBootModes: + """ + Test Class for InstanceProfileSupportedSecureBootModes + """ + + def test_instance_profile_supported_secure_boot_modes_serialization(self): + """ + Test serialization/deserialization for InstanceProfileSupportedSecureBootModes + """ + + # Construct a json representation of a InstanceProfileSupportedSecureBootModes model + instance_profile_supported_secure_boot_modes_model_json = {} + instance_profile_supported_secure_boot_modes_model_json[ + 'default'] = True + instance_profile_supported_secure_boot_modes_model_json['type'] = 'enum' + instance_profile_supported_secure_boot_modes_model_json['values'] = [ + True + ] + + # Construct a model instance of InstanceProfileSupportedSecureBootModes by calling from_dict on the json representation + instance_profile_supported_secure_boot_modes_model = InstanceProfileSupportedSecureBootModes.from_dict( + instance_profile_supported_secure_boot_modes_model_json) + assert instance_profile_supported_secure_boot_modes_model != False + + # Construct a model instance of InstanceProfileSupportedSecureBootModes by calling from_dict on the json representation + instance_profile_supported_secure_boot_modes_model_dict = InstanceProfileSupportedSecureBootModes.from_dict( + instance_profile_supported_secure_boot_modes_model_json).__dict__ + instance_profile_supported_secure_boot_modes_model2 = InstanceProfileSupportedSecureBootModes( + **instance_profile_supported_secure_boot_modes_model_dict) + + # Verify the model instances are equivalent + assert instance_profile_supported_secure_boot_modes_model == instance_profile_supported_secure_boot_modes_model2 + + # Convert model instance back to dict and verify no loss of data + instance_profile_supported_secure_boot_modes_model_json2 = instance_profile_supported_secure_boot_modes_model.to_dict( + ) + assert instance_profile_supported_secure_boot_modes_model_json2 == instance_profile_supported_secure_boot_modes_model_json + + class TestModel_InstanceProfileVCPUArchitecture: """ Test Class for InstanceProfileVCPUArchitecture @@ -58746,18 +65924,22 @@ def test_instance_profile_vcpu_architecture_serialization(self): instance_profile_vcpu_architecture_model_json['value'] = 'amd64' # Construct a model instance of InstanceProfileVCPUArchitecture by calling from_dict on the json representation - instance_profile_vcpu_architecture_model = InstanceProfileVCPUArchitecture.from_dict(instance_profile_vcpu_architecture_model_json) + instance_profile_vcpu_architecture_model = InstanceProfileVCPUArchitecture.from_dict( + instance_profile_vcpu_architecture_model_json) assert instance_profile_vcpu_architecture_model != False # Construct a model instance of InstanceProfileVCPUArchitecture by calling from_dict on the json representation - instance_profile_vcpu_architecture_model_dict = InstanceProfileVCPUArchitecture.from_dict(instance_profile_vcpu_architecture_model_json).__dict__ - instance_profile_vcpu_architecture_model2 = InstanceProfileVCPUArchitecture(**instance_profile_vcpu_architecture_model_dict) + instance_profile_vcpu_architecture_model_dict = InstanceProfileVCPUArchitecture.from_dict( + instance_profile_vcpu_architecture_model_json).__dict__ + instance_profile_vcpu_architecture_model2 = InstanceProfileVCPUArchitecture( + **instance_profile_vcpu_architecture_model_dict) # Verify the model instances are equivalent assert instance_profile_vcpu_architecture_model == instance_profile_vcpu_architecture_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_vcpu_architecture_model_json2 = instance_profile_vcpu_architecture_model.to_dict() + instance_profile_vcpu_architecture_model_json2 = instance_profile_vcpu_architecture_model.to_dict( + ) assert instance_profile_vcpu_architecture_model_json2 == instance_profile_vcpu_architecture_model_json @@ -58778,18 +65960,22 @@ def test_instance_profile_vcpu_manufacturer_serialization(self): instance_profile_vcpu_manufacturer_model_json['value'] = 'intel' # Construct a model instance of InstanceProfileVCPUManufacturer by calling from_dict on the json representation - instance_profile_vcpu_manufacturer_model = InstanceProfileVCPUManufacturer.from_dict(instance_profile_vcpu_manufacturer_model_json) + instance_profile_vcpu_manufacturer_model = InstanceProfileVCPUManufacturer.from_dict( + instance_profile_vcpu_manufacturer_model_json) assert instance_profile_vcpu_manufacturer_model != False # Construct a model instance of InstanceProfileVCPUManufacturer by calling from_dict on the json representation - instance_profile_vcpu_manufacturer_model_dict = InstanceProfileVCPUManufacturer.from_dict(instance_profile_vcpu_manufacturer_model_json).__dict__ - instance_profile_vcpu_manufacturer_model2 = InstanceProfileVCPUManufacturer(**instance_profile_vcpu_manufacturer_model_dict) + instance_profile_vcpu_manufacturer_model_dict = InstanceProfileVCPUManufacturer.from_dict( + instance_profile_vcpu_manufacturer_model_json).__dict__ + instance_profile_vcpu_manufacturer_model2 = InstanceProfileVCPUManufacturer( + **instance_profile_vcpu_manufacturer_model_dict) # Verify the model instances are equivalent assert instance_profile_vcpu_manufacturer_model == instance_profile_vcpu_manufacturer_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_vcpu_manufacturer_model_json2 = instance_profile_vcpu_manufacturer_model.to_dict() + instance_profile_vcpu_manufacturer_model_json2 = instance_profile_vcpu_manufacturer_model.to_dict( + ) assert instance_profile_vcpu_manufacturer_model_json2 == instance_profile_vcpu_manufacturer_model_json @@ -58806,23 +65992,31 @@ def test_instance_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceReference model instance_reference_model_json = {} - instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - instance_reference_model_json['deleted'] = instance_reference_deleted_model - instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model_json['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model_json[ + 'deleted'] = instance_reference_deleted_model + instance_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model_json[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model_json['name'] = 'my-instance' # Construct a model instance of InstanceReference by calling from_dict on the json representation - instance_reference_model = InstanceReference.from_dict(instance_reference_model_json) + instance_reference_model = InstanceReference.from_dict( + instance_reference_model_json) assert instance_reference_model != False # Construct a model instance of InstanceReference by calling from_dict on the json representation - instance_reference_model_dict = InstanceReference.from_dict(instance_reference_model_json).__dict__ - instance_reference_model2 = InstanceReference(**instance_reference_model_dict) + instance_reference_model_dict = InstanceReference.from_dict( + instance_reference_model_json).__dict__ + instance_reference_model2 = InstanceReference( + **instance_reference_model_dict) # Verify the model instances are equivalent assert instance_reference_model == instance_reference_model2 @@ -58844,21 +66038,26 @@ def test_instance_reference_deleted_serialization(self): # Construct a json representation of a InstanceReferenceDeleted model instance_reference_deleted_model_json = {} - instance_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceReferenceDeleted by calling from_dict on the json representation - instance_reference_deleted_model = InstanceReferenceDeleted.from_dict(instance_reference_deleted_model_json) + instance_reference_deleted_model = InstanceReferenceDeleted.from_dict( + instance_reference_deleted_model_json) assert instance_reference_deleted_model != False # Construct a model instance of InstanceReferenceDeleted by calling from_dict on the json representation - instance_reference_deleted_model_dict = InstanceReferenceDeleted.from_dict(instance_reference_deleted_model_json).__dict__ - instance_reference_deleted_model2 = InstanceReferenceDeleted(**instance_reference_deleted_model_dict) + instance_reference_deleted_model_dict = InstanceReferenceDeleted.from_dict( + instance_reference_deleted_model_json).__dict__ + instance_reference_deleted_model2 = InstanceReferenceDeleted( + **instance_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_reference_deleted_model == instance_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_reference_deleted_model_json2 = instance_reference_deleted_model.to_dict() + instance_reference_deleted_model_json2 = instance_reference_deleted_model.to_dict( + ) assert instance_reference_deleted_model_json2 == instance_reference_deleted_model_json @@ -58875,34 +66074,45 @@ def test_instance_reservation_affinity_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reservation_reference_deleted_model = {} # ReservationReferenceDeleted - reservation_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reservation_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reservation_reference_model = {} # ReservationReference - reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model['deleted'] = reservation_reference_deleted_model - reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'deleted'] = reservation_reference_deleted_model + reservation_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['name'] = 'my-reservation' reservation_reference_model['resource_type'] = 'reservation' # Construct a json representation of a InstanceReservationAffinity model instance_reservation_affinity_model_json = {} instance_reservation_affinity_model_json['policy'] = 'disabled' - instance_reservation_affinity_model_json['pool'] = [reservation_reference_model] + instance_reservation_affinity_model_json['pool'] = [ + reservation_reference_model + ] # Construct a model instance of InstanceReservationAffinity by calling from_dict on the json representation - instance_reservation_affinity_model = InstanceReservationAffinity.from_dict(instance_reservation_affinity_model_json) + instance_reservation_affinity_model = InstanceReservationAffinity.from_dict( + instance_reservation_affinity_model_json) assert instance_reservation_affinity_model != False # Construct a model instance of InstanceReservationAffinity by calling from_dict on the json representation - instance_reservation_affinity_model_dict = InstanceReservationAffinity.from_dict(instance_reservation_affinity_model_json).__dict__ - instance_reservation_affinity_model2 = InstanceReservationAffinity(**instance_reservation_affinity_model_dict) + instance_reservation_affinity_model_dict = InstanceReservationAffinity.from_dict( + instance_reservation_affinity_model_json).__dict__ + instance_reservation_affinity_model2 = InstanceReservationAffinity( + **instance_reservation_affinity_model_dict) # Verify the model instances are equivalent assert instance_reservation_affinity_model == instance_reservation_affinity_model2 # Convert model instance back to dict and verify no loss of data - instance_reservation_affinity_model_json2 = instance_reservation_affinity_model.to_dict() + instance_reservation_affinity_model_json2 = instance_reservation_affinity_model.to_dict( + ) assert instance_reservation_affinity_model_json2 == instance_reservation_affinity_model_json @@ -58919,26 +66129,33 @@ def test_instance_reservation_affinity_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a json representation of a InstanceReservationAffinityPatch model instance_reservation_affinity_patch_model_json = {} instance_reservation_affinity_patch_model_json['policy'] = 'disabled' - instance_reservation_affinity_patch_model_json['pool'] = [reservation_identity_model] + instance_reservation_affinity_patch_model_json['pool'] = [ + reservation_identity_model + ] # Construct a model instance of InstanceReservationAffinityPatch by calling from_dict on the json representation - instance_reservation_affinity_patch_model = InstanceReservationAffinityPatch.from_dict(instance_reservation_affinity_patch_model_json) + instance_reservation_affinity_patch_model = InstanceReservationAffinityPatch.from_dict( + instance_reservation_affinity_patch_model_json) assert instance_reservation_affinity_patch_model != False # Construct a model instance of InstanceReservationAffinityPatch by calling from_dict on the json representation - instance_reservation_affinity_patch_model_dict = InstanceReservationAffinityPatch.from_dict(instance_reservation_affinity_patch_model_json).__dict__ - instance_reservation_affinity_patch_model2 = InstanceReservationAffinityPatch(**instance_reservation_affinity_patch_model_dict) + instance_reservation_affinity_patch_model_dict = InstanceReservationAffinityPatch.from_dict( + instance_reservation_affinity_patch_model_json).__dict__ + instance_reservation_affinity_patch_model2 = InstanceReservationAffinityPatch( + **instance_reservation_affinity_patch_model_dict) # Verify the model instances are equivalent assert instance_reservation_affinity_patch_model == instance_reservation_affinity_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_reservation_affinity_patch_model_json2 = instance_reservation_affinity_patch_model.to_dict() + instance_reservation_affinity_patch_model_json2 = instance_reservation_affinity_patch_model.to_dict( + ) assert instance_reservation_affinity_patch_model_json2 == instance_reservation_affinity_patch_model_json @@ -58955,26 +66172,34 @@ def test_instance_reservation_affinity_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a json representation of a InstanceReservationAffinityPrototype model instance_reservation_affinity_prototype_model_json = {} - instance_reservation_affinity_prototype_model_json['policy'] = 'disabled' - instance_reservation_affinity_prototype_model_json['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model_json[ + 'policy'] = 'disabled' + instance_reservation_affinity_prototype_model_json['pool'] = [ + reservation_identity_model + ] # Construct a model instance of InstanceReservationAffinityPrototype by calling from_dict on the json representation - instance_reservation_affinity_prototype_model = InstanceReservationAffinityPrototype.from_dict(instance_reservation_affinity_prototype_model_json) + instance_reservation_affinity_prototype_model = InstanceReservationAffinityPrototype.from_dict( + instance_reservation_affinity_prototype_model_json) assert instance_reservation_affinity_prototype_model != False # Construct a model instance of InstanceReservationAffinityPrototype by calling from_dict on the json representation - instance_reservation_affinity_prototype_model_dict = InstanceReservationAffinityPrototype.from_dict(instance_reservation_affinity_prototype_model_json).__dict__ - instance_reservation_affinity_prototype_model2 = InstanceReservationAffinityPrototype(**instance_reservation_affinity_prototype_model_dict) + instance_reservation_affinity_prototype_model_dict = InstanceReservationAffinityPrototype.from_dict( + instance_reservation_affinity_prototype_model_json).__dict__ + instance_reservation_affinity_prototype_model2 = InstanceReservationAffinityPrototype( + **instance_reservation_affinity_prototype_model_dict) # Verify the model instances are equivalent assert instance_reservation_affinity_prototype_model == instance_reservation_affinity_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_reservation_affinity_prototype_model_json2 = instance_reservation_affinity_prototype_model.to_dict() + instance_reservation_affinity_prototype_model_json2 = instance_reservation_affinity_prototype_model.to_dict( + ) assert instance_reservation_affinity_prototype_model_json2 == instance_reservation_affinity_prototype_model_json @@ -58991,22 +66216,28 @@ def test_instance_status_reason_serialization(self): # Construct a json representation of a InstanceStatusReason model instance_status_reason_model_json = {} instance_status_reason_model_json['code'] = 'cannot_start_storage' - instance_status_reason_model_json['message'] = 'The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted' - instance_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + instance_status_reason_model_json[ + 'message'] = 'The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted' + instance_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' # Construct a model instance of InstanceStatusReason by calling from_dict on the json representation - instance_status_reason_model = InstanceStatusReason.from_dict(instance_status_reason_model_json) + instance_status_reason_model = InstanceStatusReason.from_dict( + instance_status_reason_model_json) assert instance_status_reason_model != False # Construct a model instance of InstanceStatusReason by calling from_dict on the json representation - instance_status_reason_model_dict = InstanceStatusReason.from_dict(instance_status_reason_model_json).__dict__ - instance_status_reason_model2 = InstanceStatusReason(**instance_status_reason_model_dict) + instance_status_reason_model_dict = InstanceStatusReason.from_dict( + instance_status_reason_model_json).__dict__ + instance_status_reason_model2 = InstanceStatusReason( + **instance_status_reason_model_dict) # Verify the model instances are equivalent assert instance_status_reason_model == instance_status_reason_model2 # Convert model instance back to dict and verify no loss of data - instance_status_reason_model_json2 = instance_status_reason_model.to_dict() + instance_status_reason_model_json2 = instance_status_reason_model.to_dict( + ) assert instance_status_reason_model_json2 == instance_status_reason_model_json @@ -59022,61 +66253,84 @@ def test_instance_template_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_template_collection_first_model = {} # InstanceTemplateCollectionFirst - instance_template_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20' + instance_template_collection_first_model = { + } # InstanceTemplateCollectionFirst + instance_template_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20' - instance_template_collection_next_model = {} # InstanceTemplateCollectionNext - instance_template_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_template_collection_next_model = { + } # InstanceTemplateCollectionNext + instance_template_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -59084,19 +66338,27 @@ def test_instance_template_collection_serialization(self): resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -59104,82 +66366,128 @@ def test_instance_template_collection_serialization(self): zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model - - instance_template_model = {} # InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment - instance_template_model['availability_policy'] = instance_availability_policy_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + + instance_template_model = { + } # InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment + instance_template_model[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_model['confidential_compute_mode'] = 'disabled' instance_template_model['created_at'] = '2019-01-01T12:00:00Z' - instance_template_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_model['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_model[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_model['enable_secure_boot'] = True + instance_template_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' instance_template_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' instance_template_model['keys'] = [key_identity_model] - instance_template_model['metadata_service'] = instance_metadata_service_prototype_model + instance_template_model[ + 'metadata_service'] = instance_metadata_service_prototype_model instance_template_model['name'] = 'my-instance-template' - instance_template_model['placement_target'] = instance_placement_target_prototype_model + instance_template_model[ + 'placement_target'] = instance_placement_target_prototype_model instance_template_model['profile'] = instance_profile_identity_model - instance_template_model['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_model['resource_group'] = resource_group_reference_model + instance_template_model[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_model[ + 'resource_group'] = resource_group_reference_model instance_template_model['total_volume_bandwidth'] = 500 instance_template_model['user_data'] = 'testString' - instance_template_model['volume_attachments'] = [volume_attachment_prototype_model] + instance_template_model['volume_attachments'] = [ + volume_attachment_prototype_model + ] instance_template_model['vpc'] = vpc_identity_model - instance_template_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_model[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model instance_template_model['image'] = image_identity_model instance_template_model['zone'] = zone_identity_model - instance_template_model['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_model['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_model['network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_model[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a json representation of a InstanceTemplateCollection model instance_template_collection_model_json = {} - instance_template_collection_model_json['first'] = instance_template_collection_first_model + instance_template_collection_model_json[ + 'first'] = instance_template_collection_first_model instance_template_collection_model_json['limit'] = 20 - instance_template_collection_model_json['next'] = instance_template_collection_next_model - instance_template_collection_model_json['templates'] = [instance_template_model] + instance_template_collection_model_json[ + 'next'] = instance_template_collection_next_model + instance_template_collection_model_json['templates'] = [ + instance_template_model + ] instance_template_collection_model_json['total_count'] = 132 # Construct a model instance of InstanceTemplateCollection by calling from_dict on the json representation - instance_template_collection_model = InstanceTemplateCollection.from_dict(instance_template_collection_model_json) + instance_template_collection_model = InstanceTemplateCollection.from_dict( + instance_template_collection_model_json) assert instance_template_collection_model != False # Construct a model instance of InstanceTemplateCollection by calling from_dict on the json representation - instance_template_collection_model_dict = InstanceTemplateCollection.from_dict(instance_template_collection_model_json).__dict__ - instance_template_collection_model2 = InstanceTemplateCollection(**instance_template_collection_model_dict) + instance_template_collection_model_dict = InstanceTemplateCollection.from_dict( + instance_template_collection_model_json).__dict__ + instance_template_collection_model2 = InstanceTemplateCollection( + **instance_template_collection_model_dict) # Verify the model instances are equivalent assert instance_template_collection_model == instance_template_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_template_collection_model_json2 = instance_template_collection_model.to_dict() + instance_template_collection_model_json2 = instance_template_collection_model.to_dict( + ) assert instance_template_collection_model_json2 == instance_template_collection_model_json @@ -59195,21 +66503,26 @@ def test_instance_template_collection_first_serialization(self): # Construct a json representation of a InstanceTemplateCollectionFirst model instance_template_collection_first_model_json = {} - instance_template_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20' + instance_template_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20' # Construct a model instance of InstanceTemplateCollectionFirst by calling from_dict on the json representation - instance_template_collection_first_model = InstanceTemplateCollectionFirst.from_dict(instance_template_collection_first_model_json) + instance_template_collection_first_model = InstanceTemplateCollectionFirst.from_dict( + instance_template_collection_first_model_json) assert instance_template_collection_first_model != False # Construct a model instance of InstanceTemplateCollectionFirst by calling from_dict on the json representation - instance_template_collection_first_model_dict = InstanceTemplateCollectionFirst.from_dict(instance_template_collection_first_model_json).__dict__ - instance_template_collection_first_model2 = InstanceTemplateCollectionFirst(**instance_template_collection_first_model_dict) + instance_template_collection_first_model_dict = InstanceTemplateCollectionFirst.from_dict( + instance_template_collection_first_model_json).__dict__ + instance_template_collection_first_model2 = InstanceTemplateCollectionFirst( + **instance_template_collection_first_model_dict) # Verify the model instances are equivalent assert instance_template_collection_first_model == instance_template_collection_first_model2 # Convert model instance back to dict and verify no loss of data - instance_template_collection_first_model_json2 = instance_template_collection_first_model.to_dict() + instance_template_collection_first_model_json2 = instance_template_collection_first_model.to_dict( + ) assert instance_template_collection_first_model_json2 == instance_template_collection_first_model_json @@ -59225,21 +66538,26 @@ def test_instance_template_collection_next_serialization(self): # Construct a json representation of a InstanceTemplateCollectionNext model instance_template_collection_next_model_json = {} - instance_template_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + instance_template_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of InstanceTemplateCollectionNext by calling from_dict on the json representation - instance_template_collection_next_model = InstanceTemplateCollectionNext.from_dict(instance_template_collection_next_model_json) + instance_template_collection_next_model = InstanceTemplateCollectionNext.from_dict( + instance_template_collection_next_model_json) assert instance_template_collection_next_model != False # Construct a model instance of InstanceTemplateCollectionNext by calling from_dict on the json representation - instance_template_collection_next_model_dict = InstanceTemplateCollectionNext.from_dict(instance_template_collection_next_model_json).__dict__ - instance_template_collection_next_model2 = InstanceTemplateCollectionNext(**instance_template_collection_next_model_dict) + instance_template_collection_next_model_dict = InstanceTemplateCollectionNext.from_dict( + instance_template_collection_next_model_json).__dict__ + instance_template_collection_next_model2 = InstanceTemplateCollectionNext( + **instance_template_collection_next_model_dict) # Verify the model instances are equivalent assert instance_template_collection_next_model == instance_template_collection_next_model2 # Convert model instance back to dict and verify no loss of data - instance_template_collection_next_model_json2 = instance_template_collection_next_model.to_dict() + instance_template_collection_next_model_json2 = instance_template_collection_next_model.to_dict( + ) assert instance_template_collection_next_model_json2 == instance_template_collection_next_model_json @@ -59258,18 +66576,22 @@ def test_instance_template_patch_serialization(self): instance_template_patch_model_json['name'] = 'my-instance-template' # Construct a model instance of InstanceTemplatePatch by calling from_dict on the json representation - instance_template_patch_model = InstanceTemplatePatch.from_dict(instance_template_patch_model_json) + instance_template_patch_model = InstanceTemplatePatch.from_dict( + instance_template_patch_model_json) assert instance_template_patch_model != False # Construct a model instance of InstanceTemplatePatch by calling from_dict on the json representation - instance_template_patch_model_dict = InstanceTemplatePatch.from_dict(instance_template_patch_model_json).__dict__ - instance_template_patch_model2 = InstanceTemplatePatch(**instance_template_patch_model_dict) + instance_template_patch_model_dict = InstanceTemplatePatch.from_dict( + instance_template_patch_model_json).__dict__ + instance_template_patch_model2 = InstanceTemplatePatch( + **instance_template_patch_model_dict) # Verify the model instances are equivalent assert instance_template_patch_model == instance_template_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_template_patch_model_json2 = instance_template_patch_model.to_dict() + instance_template_patch_model_json2 = instance_template_patch_model.to_dict( + ) assert instance_template_patch_model_json2 == instance_template_patch_model_json @@ -59285,30 +66607,40 @@ def test_instance_template_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted - instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_template_reference_deleted_model = { + } # InstanceTemplateReferenceDeleted + instance_template_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceTemplateReference model instance_template_reference_model_json = {} - instance_template_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model_json['deleted'] = instance_template_reference_deleted_model - instance_template_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_reference_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model_json[ + 'deleted'] = instance_template_reference_deleted_model + instance_template_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_reference_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' instance_template_reference_model_json['name'] = 'my-instance-template' # Construct a model instance of InstanceTemplateReference by calling from_dict on the json representation - instance_template_reference_model = InstanceTemplateReference.from_dict(instance_template_reference_model_json) + instance_template_reference_model = InstanceTemplateReference.from_dict( + instance_template_reference_model_json) assert instance_template_reference_model != False # Construct a model instance of InstanceTemplateReference by calling from_dict on the json representation - instance_template_reference_model_dict = InstanceTemplateReference.from_dict(instance_template_reference_model_json).__dict__ - instance_template_reference_model2 = InstanceTemplateReference(**instance_template_reference_model_dict) + instance_template_reference_model_dict = InstanceTemplateReference.from_dict( + instance_template_reference_model_json).__dict__ + instance_template_reference_model2 = InstanceTemplateReference( + **instance_template_reference_model_dict) # Verify the model instances are equivalent assert instance_template_reference_model == instance_template_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_template_reference_model_json2 = instance_template_reference_model.to_dict() + instance_template_reference_model_json2 = instance_template_reference_model.to_dict( + ) assert instance_template_reference_model_json2 == instance_template_reference_model_json @@ -59324,21 +66656,26 @@ def test_instance_template_reference_deleted_serialization(self): # Construct a json representation of a InstanceTemplateReferenceDeleted model instance_template_reference_deleted_model_json = {} - instance_template_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_template_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of InstanceTemplateReferenceDeleted by calling from_dict on the json representation - instance_template_reference_deleted_model = InstanceTemplateReferenceDeleted.from_dict(instance_template_reference_deleted_model_json) + instance_template_reference_deleted_model = InstanceTemplateReferenceDeleted.from_dict( + instance_template_reference_deleted_model_json) assert instance_template_reference_deleted_model != False # Construct a model instance of InstanceTemplateReferenceDeleted by calling from_dict on the json representation - instance_template_reference_deleted_model_dict = InstanceTemplateReferenceDeleted.from_dict(instance_template_reference_deleted_model_json).__dict__ - instance_template_reference_deleted_model2 = InstanceTemplateReferenceDeleted(**instance_template_reference_deleted_model_dict) + instance_template_reference_deleted_model_dict = InstanceTemplateReferenceDeleted.from_dict( + instance_template_reference_deleted_model_json).__dict__ + instance_template_reference_deleted_model2 = InstanceTemplateReferenceDeleted( + **instance_template_reference_deleted_model_dict) # Verify the model instances are equivalent assert instance_template_reference_deleted_model == instance_template_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - instance_template_reference_deleted_model_json2 = instance_template_reference_deleted_model.to_dict() + instance_template_reference_deleted_model_json2 = instance_template_reference_deleted_model.to_dict( + ) assert instance_template_reference_deleted_model_json2 == instance_template_reference_deleted_model_json @@ -59363,7 +66700,8 @@ def test_instance_vcpu_serialization(self): assert instance_vcpu_model != False # Construct a model instance of InstanceVCPU by calling from_dict on the json representation - instance_vcpu_model_dict = InstanceVCPU.from_dict(instance_vcpu_model_json).__dict__ + instance_vcpu_model_dict = InstanceVCPU.from_dict( + instance_vcpu_model_json).__dict__ instance_vcpu_model2 = InstanceVCPU(**instance_vcpu_model_dict) # Verify the model instances are equivalent @@ -59387,20 +66725,26 @@ def test_key_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771' - resource_group_reference_model['id'] = '3fad3f2204eb4998c3964d254ffcd771' + resource_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771' + resource_group_reference_model[ + 'id'] = '3fad3f2204eb4998c3964d254ffcd771' resource_group_reference_model['name'] = 'Default' # Construct a json representation of a Key model key_model_json = {} key_model_json['created_at'] = '2019-01-01T12:00:00Z' - key_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' - key_model_json['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' - key_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_model_json[ + 'fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' + key_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' key_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' key_model_json['length'] = 2048 key_model_json['name'] = 'my-key' - key_model_json['public_key'] = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En' + key_model_json[ + 'public_key'] = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En' key_model_json['resource_group'] = resource_group_reference_model key_model_json['type'] = 'ed25519' @@ -59433,27 +66777,34 @@ def test_key_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. key_collection_first_model = {} # KeyCollectionFirst - key_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?limit=50' + key_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?limit=50' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771' - resource_group_reference_model['id'] = '3fad3f2204eb4998c3964d254ffcd771' + resource_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771' + resource_group_reference_model[ + 'id'] = '3fad3f2204eb4998c3964d254ffcd771' resource_group_reference_model['name'] = 'Default' key_model = {} # Key key_model['created_at'] = '2019-01-29T03:48:11Z' key_model['crn'] = 'crn:[...]' - key_model['fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E' - key_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/82679077-ac3b-4c10-be16-63e9c21f0f45' + key_model[ + 'fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E' + key_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/82679077-ac3b-4c10-be16-63e9c21f0f45' key_model['id'] = '82679077-ac3b-4c10-be16-63e9c21f0f45' key_model['length'] = 2048 key_model['name'] = 'my-key-1' - key_model['public_key'] = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En' + key_model[ + 'public_key'] = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En' key_model['resource_group'] = resource_group_reference_model key_model['type'] = 'rsa' key_collection_next_model = {} # KeyCollectionNext - key_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + key_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a KeyCollection model key_collection_model_json = {} @@ -59464,11 +66815,13 @@ def test_key_collection_serialization(self): key_collection_model_json['total_count'] = 132 # Construct a model instance of KeyCollection by calling from_dict on the json representation - key_collection_model = KeyCollection.from_dict(key_collection_model_json) + key_collection_model = KeyCollection.from_dict( + key_collection_model_json) assert key_collection_model != False # Construct a model instance of KeyCollection by calling from_dict on the json representation - key_collection_model_dict = KeyCollection.from_dict(key_collection_model_json).__dict__ + key_collection_model_dict = KeyCollection.from_dict( + key_collection_model_json).__dict__ key_collection_model2 = KeyCollection(**key_collection_model_dict) # Verify the model instances are equivalent @@ -59491,15 +66844,19 @@ def test_key_collection_first_serialization(self): # Construct a json representation of a KeyCollectionFirst model key_collection_first_model_json = {} - key_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20' + key_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20' # Construct a model instance of KeyCollectionFirst by calling from_dict on the json representation - key_collection_first_model = KeyCollectionFirst.from_dict(key_collection_first_model_json) + key_collection_first_model = KeyCollectionFirst.from_dict( + key_collection_first_model_json) assert key_collection_first_model != False # Construct a model instance of KeyCollectionFirst by calling from_dict on the json representation - key_collection_first_model_dict = KeyCollectionFirst.from_dict(key_collection_first_model_json).__dict__ - key_collection_first_model2 = KeyCollectionFirst(**key_collection_first_model_dict) + key_collection_first_model_dict = KeyCollectionFirst.from_dict( + key_collection_first_model_json).__dict__ + key_collection_first_model2 = KeyCollectionFirst( + **key_collection_first_model_dict) # Verify the model instances are equivalent assert key_collection_first_model == key_collection_first_model2 @@ -59521,15 +66878,19 @@ def test_key_collection_next_serialization(self): # Construct a json representation of a KeyCollectionNext model key_collection_next_model_json = {} - key_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + key_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of KeyCollectionNext by calling from_dict on the json representation - key_collection_next_model = KeyCollectionNext.from_dict(key_collection_next_model_json) + key_collection_next_model = KeyCollectionNext.from_dict( + key_collection_next_model_json) assert key_collection_next_model != False # Construct a model instance of KeyCollectionNext by calling from_dict on the json representation - key_collection_next_model_dict = KeyCollectionNext.from_dict(key_collection_next_model_json).__dict__ - key_collection_next_model2 = KeyCollectionNext(**key_collection_next_model_dict) + key_collection_next_model_dict = KeyCollectionNext.from_dict( + key_collection_next_model_json).__dict__ + key_collection_next_model2 = KeyCollectionNext( + **key_collection_next_model_dict) # Verify the model instances are equivalent assert key_collection_next_model == key_collection_next_model2 @@ -59582,14 +66943,18 @@ def test_key_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. key_reference_deleted_model = {} # KeyReferenceDeleted - key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + key_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a KeyReference model key_reference_model_json = {} - key_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model_json['deleted'] = key_reference_deleted_model - key_reference_model_json['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' - key_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_reference_model_json[ + 'fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' + key_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model_json['name'] = 'my-key' @@ -59598,7 +66963,8 @@ def test_key_reference_serialization(self): assert key_reference_model != False # Construct a model instance of KeyReference by calling from_dict on the json representation - key_reference_model_dict = KeyReference.from_dict(key_reference_model_json).__dict__ + key_reference_model_dict = KeyReference.from_dict( + key_reference_model_json).__dict__ key_reference_model2 = KeyReference(**key_reference_model_dict) # Verify the model instances are equivalent @@ -59621,21 +66987,26 @@ def test_key_reference_deleted_serialization(self): # Construct a json representation of a KeyReferenceDeleted model key_reference_deleted_model_json = {} - key_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + key_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of KeyReferenceDeleted by calling from_dict on the json representation - key_reference_deleted_model = KeyReferenceDeleted.from_dict(key_reference_deleted_model_json) + key_reference_deleted_model = KeyReferenceDeleted.from_dict( + key_reference_deleted_model_json) assert key_reference_deleted_model != False # Construct a model instance of KeyReferenceDeleted by calling from_dict on the json representation - key_reference_deleted_model_dict = KeyReferenceDeleted.from_dict(key_reference_deleted_model_json).__dict__ - key_reference_deleted_model2 = KeyReferenceDeleted(**key_reference_deleted_model_dict) + key_reference_deleted_model_dict = KeyReferenceDeleted.from_dict( + key_reference_deleted_model_json).__dict__ + key_reference_deleted_model2 = KeyReferenceDeleted( + **key_reference_deleted_model_dict) # Verify the model instances are equivalent assert key_reference_deleted_model == key_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - key_reference_deleted_model_json2 = key_reference_deleted_model.to_dict() + key_reference_deleted_model_json2 = key_reference_deleted_model.to_dict( + ) assert key_reference_deleted_model_json2 == key_reference_deleted_model_json @@ -59651,21 +67022,26 @@ def test_legacy_cloud_object_storage_bucket_reference_serialization(self): # Construct a json representation of a LegacyCloudObjectStorageBucketReference model legacy_cloud_object_storage_bucket_reference_model_json = {} - legacy_cloud_object_storage_bucket_reference_model_json['name'] = 'bucket-27200-lwx4cfvcue' + legacy_cloud_object_storage_bucket_reference_model_json[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Construct a model instance of LegacyCloudObjectStorageBucketReference by calling from_dict on the json representation - legacy_cloud_object_storage_bucket_reference_model = LegacyCloudObjectStorageBucketReference.from_dict(legacy_cloud_object_storage_bucket_reference_model_json) + legacy_cloud_object_storage_bucket_reference_model = LegacyCloudObjectStorageBucketReference.from_dict( + legacy_cloud_object_storage_bucket_reference_model_json) assert legacy_cloud_object_storage_bucket_reference_model != False # Construct a model instance of LegacyCloudObjectStorageBucketReference by calling from_dict on the json representation - legacy_cloud_object_storage_bucket_reference_model_dict = LegacyCloudObjectStorageBucketReference.from_dict(legacy_cloud_object_storage_bucket_reference_model_json).__dict__ - legacy_cloud_object_storage_bucket_reference_model2 = LegacyCloudObjectStorageBucketReference(**legacy_cloud_object_storage_bucket_reference_model_dict) + legacy_cloud_object_storage_bucket_reference_model_dict = LegacyCloudObjectStorageBucketReference.from_dict( + legacy_cloud_object_storage_bucket_reference_model_json).__dict__ + legacy_cloud_object_storage_bucket_reference_model2 = LegacyCloudObjectStorageBucketReference( + **legacy_cloud_object_storage_bucket_reference_model_dict) # Verify the model instances are equivalent assert legacy_cloud_object_storage_bucket_reference_model == legacy_cloud_object_storage_bucket_reference_model2 # Convert model instance back to dict and verify no loss of data - legacy_cloud_object_storage_bucket_reference_model_json2 = legacy_cloud_object_storage_bucket_reference_model.to_dict() + legacy_cloud_object_storage_bucket_reference_model_json2 = legacy_cloud_object_storage_bucket_reference_model.to_dict( + ) assert legacy_cloud_object_storage_bucket_reference_model_json2 == legacy_cloud_object_storage_bucket_reference_model_json @@ -59681,107 +67057,152 @@ def test_load_balancer_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dns_instance_reference_model = {} # DNSInstanceReference - dns_instance_reference_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_reference_load_balancer_dns_context_model = { + } # DNSInstanceReferenceLoadBalancerDNSContext + dns_instance_reference_load_balancer_dns_context_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' dns_zone_reference_model = {} # DNSZoneReference dns_zone_reference_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' load_balancer_dns_model = {} # LoadBalancerDNS - load_balancer_dns_model['instance'] = dns_instance_reference_model + load_balancer_dns_model[ + 'instance'] = dns_instance_reference_load_balancer_dns_context_model load_balancer_dns_model['zone'] = dns_zone_reference_model - load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted - load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_reference_deleted_model = { + } # LoadBalancerListenerReferenceDeleted + load_balancer_listener_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - load_balancer_listener_reference_model = {} # LoadBalancerListenerReference - load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model - load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model = { + } # LoadBalancerListenerReference + load_balancer_listener_reference_model[ + 'deleted'] = load_balancer_listener_reference_deleted_model + load_balancer_listener_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath load_balancer_logging_datapath_model['active'] = True load_balancer_logging_model = {} # LoadBalancerLogging - load_balancer_logging_model['datapath'] = load_balancer_logging_datapath_model + load_balancer_logging_model[ + 'datapath'] = load_balancer_logging_datapath_model - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference - load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_pool_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_private_ips_item_model = {} # LoadBalancerPrivateIpsItem load_balancer_private_ips_item_model['address'] = '192.168.3.4' - load_balancer_private_ips_item_model['deleted'] = reserved_ip_reference_deleted_model - load_balancer_private_ips_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - load_balancer_private_ips_item_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + load_balancer_private_ips_item_model[ + 'deleted'] = reserved_ip_reference_deleted_model + load_balancer_private_ips_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + load_balancer_private_ips_item_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' load_balancer_private_ips_item_model['name'] = 'my-reserved-ip' - load_balancer_private_ips_item_model['resource_type'] = 'subnet_reserved_ip' + load_balancer_private_ips_item_model[ + 'resource_type'] = 'subnet_reserved_ip' - load_balancer_profile_reference_model = {} # LoadBalancerProfileReference + load_balancer_profile_reference_model = { + } # LoadBalancerProfileReference load_balancer_profile_reference_model['family'] = 'network' - load_balancer_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' + load_balancer_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' load_balancer_profile_reference_model['name'] = 'network-fixed' ip_model = {} # IP ip_model['address'] = '192.168.3.4' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a LoadBalancer model load_balancer_model_json = {} load_balancer_model_json['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model_json['dns'] = load_balancer_dns_model - load_balancer_model_json['hostname'] = '6b88d615-us-south.lb.appdomain.cloud' - load_balancer_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model_json[ + 'hostname'] = '6b88d615-us-south.lb.appdomain.cloud' + load_balancer_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model_json['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model_json['instance_groups_supported'] = False load_balancer_model_json['is_public'] = True - load_balancer_model_json['listeners'] = [load_balancer_listener_reference_model] + load_balancer_model_json['listeners'] = [ + load_balancer_listener_reference_model + ] load_balancer_model_json['logging'] = load_balancer_logging_model load_balancer_model_json['name'] = 'my-load-balancer' load_balancer_model_json['operating_status'] = 'offline' load_balancer_model_json['pools'] = [load_balancer_pool_reference_model] - load_balancer_model_json['private_ips'] = [load_balancer_private_ips_item_model] - load_balancer_model_json['profile'] = load_balancer_profile_reference_model + load_balancer_model_json['private_ips'] = [ + load_balancer_private_ips_item_model + ] + load_balancer_model_json[ + 'profile'] = load_balancer_profile_reference_model load_balancer_model_json['provisioning_status'] = 'active' load_balancer_model_json['public_ips'] = [ip_model] - load_balancer_model_json['resource_group'] = resource_group_reference_model + load_balancer_model_json[ + 'resource_group'] = resource_group_reference_model load_balancer_model_json['resource_type'] = 'load_balancer' load_balancer_model_json['route_mode'] = True - load_balancer_model_json['security_groups'] = [security_group_reference_model] + load_balancer_model_json['security_groups'] = [ + security_group_reference_model + ] load_balancer_model_json['security_groups_supported'] = True load_balancer_model_json['subnets'] = [subnet_reference_model] load_balancer_model_json['udp_supported'] = True @@ -59791,7 +67212,8 @@ def test_load_balancer_serialization(self): assert load_balancer_model != False # Construct a model instance of LoadBalancer by calling from_dict on the json representation - load_balancer_model_dict = LoadBalancer.from_dict(load_balancer_model_json).__dict__ + load_balancer_model_dict = LoadBalancer.from_dict( + load_balancer_model_json).__dict__ load_balancer_model2 = LoadBalancer(**load_balancer_model_dict) # Verify the model instances are equivalent @@ -59815,136 +67237,188 @@ def test_load_balancer_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. load_balancer_collection_first_model = {} # LoadBalancerCollectionFirst - load_balancer_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20' + load_balancer_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20' - dns_instance_reference_model = {} # DNSInstanceReference - dns_instance_reference_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_reference_load_balancer_dns_context_model = { + } # DNSInstanceReferenceLoadBalancerDNSContext + dns_instance_reference_load_balancer_dns_context_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' dns_zone_reference_model = {} # DNSZoneReference dns_zone_reference_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' load_balancer_dns_model = {} # LoadBalancerDNS - load_balancer_dns_model['instance'] = dns_instance_reference_model + load_balancer_dns_model[ + 'instance'] = dns_instance_reference_load_balancer_dns_context_model load_balancer_dns_model['zone'] = dns_zone_reference_model - load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted - load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_reference_deleted_model = { + } # LoadBalancerListenerReferenceDeleted + load_balancer_listener_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - load_balancer_listener_reference_model = {} # LoadBalancerListenerReference - load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model - load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model = { + } # LoadBalancerListenerReference + load_balancer_listener_reference_model[ + 'deleted'] = load_balancer_listener_reference_deleted_model + load_balancer_listener_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath load_balancer_logging_datapath_model['active'] = True load_balancer_logging_model = {} # LoadBalancerLogging - load_balancer_logging_model['datapath'] = load_balancer_logging_datapath_model + load_balancer_logging_model[ + 'datapath'] = load_balancer_logging_datapath_model - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference - load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_pool_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_private_ips_item_model = {} # LoadBalancerPrivateIpsItem load_balancer_private_ips_item_model['address'] = '192.168.3.4' - load_balancer_private_ips_item_model['deleted'] = reserved_ip_reference_deleted_model - load_balancer_private_ips_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - load_balancer_private_ips_item_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + load_balancer_private_ips_item_model[ + 'deleted'] = reserved_ip_reference_deleted_model + load_balancer_private_ips_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + load_balancer_private_ips_item_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' load_balancer_private_ips_item_model['name'] = 'my-reserved-ip' - load_balancer_private_ips_item_model['resource_type'] = 'subnet_reserved_ip' + load_balancer_private_ips_item_model[ + 'resource_type'] = 'subnet_reserved_ip' - load_balancer_profile_reference_model = {} # LoadBalancerProfileReference + load_balancer_profile_reference_model = { + } # LoadBalancerProfileReference load_balancer_profile_reference_model['family'] = 'network' - load_balancer_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' + load_balancer_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' load_balancer_profile_reference_model['name'] = 'network-fixed' ip_model = {} # IP ip_model['address'] = '192.168.3.4' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' load_balancer_model = {} # LoadBalancer load_balancer_model['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model['dns'] = load_balancer_dns_model load_balancer_model['hostname'] = '6b88d615-us-south.lb.appdomain.cloud' - load_balancer_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model['instance_groups_supported'] = False load_balancer_model['is_public'] = True - load_balancer_model['listeners'] = [load_balancer_listener_reference_model] + load_balancer_model['listeners'] = [ + load_balancer_listener_reference_model + ] load_balancer_model['logging'] = load_balancer_logging_model load_balancer_model['name'] = 'my-load-balancer' load_balancer_model['operating_status'] = 'offline' load_balancer_model['pools'] = [load_balancer_pool_reference_model] - load_balancer_model['private_ips'] = [load_balancer_private_ips_item_model] + load_balancer_model['private_ips'] = [ + load_balancer_private_ips_item_model + ] load_balancer_model['profile'] = load_balancer_profile_reference_model load_balancer_model['provisioning_status'] = 'active' load_balancer_model['public_ips'] = [ip_model] load_balancer_model['resource_group'] = resource_group_reference_model load_balancer_model['resource_type'] = 'load_balancer' load_balancer_model['route_mode'] = True - load_balancer_model['security_groups'] = [security_group_reference_model] + load_balancer_model['security_groups'] = [ + security_group_reference_model + ] load_balancer_model['security_groups_supported'] = True load_balancer_model['subnets'] = [subnet_reference_model] load_balancer_model['udp_supported'] = True load_balancer_collection_next_model = {} # LoadBalancerCollectionNext - load_balancer_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + load_balancer_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' # Construct a json representation of a LoadBalancerCollection model load_balancer_collection_model_json = {} - load_balancer_collection_model_json['first'] = load_balancer_collection_first_model + load_balancer_collection_model_json[ + 'first'] = load_balancer_collection_first_model load_balancer_collection_model_json['limit'] = 20 - load_balancer_collection_model_json['load_balancers'] = [load_balancer_model] - load_balancer_collection_model_json['next'] = load_balancer_collection_next_model + load_balancer_collection_model_json['load_balancers'] = [ + load_balancer_model + ] + load_balancer_collection_model_json[ + 'next'] = load_balancer_collection_next_model load_balancer_collection_model_json['total_count'] = 132 # Construct a model instance of LoadBalancerCollection by calling from_dict on the json representation - load_balancer_collection_model = LoadBalancerCollection.from_dict(load_balancer_collection_model_json) + load_balancer_collection_model = LoadBalancerCollection.from_dict( + load_balancer_collection_model_json) assert load_balancer_collection_model != False # Construct a model instance of LoadBalancerCollection by calling from_dict on the json representation - load_balancer_collection_model_dict = LoadBalancerCollection.from_dict(load_balancer_collection_model_json).__dict__ - load_balancer_collection_model2 = LoadBalancerCollection(**load_balancer_collection_model_dict) + load_balancer_collection_model_dict = LoadBalancerCollection.from_dict( + load_balancer_collection_model_json).__dict__ + load_balancer_collection_model2 = LoadBalancerCollection( + **load_balancer_collection_model_dict) # Verify the model instances are equivalent assert load_balancer_collection_model == load_balancer_collection_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_collection_model_json2 = load_balancer_collection_model.to_dict() + load_balancer_collection_model_json2 = load_balancer_collection_model.to_dict( + ) assert load_balancer_collection_model_json2 == load_balancer_collection_model_json @@ -59960,21 +67434,26 @@ def test_load_balancer_collection_first_serialization(self): # Construct a json representation of a LoadBalancerCollectionFirst model load_balancer_collection_first_model_json = {} - load_balancer_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20' + load_balancer_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20' # Construct a model instance of LoadBalancerCollectionFirst by calling from_dict on the json representation - load_balancer_collection_first_model = LoadBalancerCollectionFirst.from_dict(load_balancer_collection_first_model_json) + load_balancer_collection_first_model = LoadBalancerCollectionFirst.from_dict( + load_balancer_collection_first_model_json) assert load_balancer_collection_first_model != False # Construct a model instance of LoadBalancerCollectionFirst by calling from_dict on the json representation - load_balancer_collection_first_model_dict = LoadBalancerCollectionFirst.from_dict(load_balancer_collection_first_model_json).__dict__ - load_balancer_collection_first_model2 = LoadBalancerCollectionFirst(**load_balancer_collection_first_model_dict) + load_balancer_collection_first_model_dict = LoadBalancerCollectionFirst.from_dict( + load_balancer_collection_first_model_json).__dict__ + load_balancer_collection_first_model2 = LoadBalancerCollectionFirst( + **load_balancer_collection_first_model_dict) # Verify the model instances are equivalent assert load_balancer_collection_first_model == load_balancer_collection_first_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_collection_first_model_json2 = load_balancer_collection_first_model.to_dict() + load_balancer_collection_first_model_json2 = load_balancer_collection_first_model.to_dict( + ) assert load_balancer_collection_first_model_json2 == load_balancer_collection_first_model_json @@ -59990,21 +67469,26 @@ def test_load_balancer_collection_next_serialization(self): # Construct a json representation of a LoadBalancerCollectionNext model load_balancer_collection_next_model_json = {} - load_balancer_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + load_balancer_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' # Construct a model instance of LoadBalancerCollectionNext by calling from_dict on the json representation - load_balancer_collection_next_model = LoadBalancerCollectionNext.from_dict(load_balancer_collection_next_model_json) + load_balancer_collection_next_model = LoadBalancerCollectionNext.from_dict( + load_balancer_collection_next_model_json) assert load_balancer_collection_next_model != False # Construct a model instance of LoadBalancerCollectionNext by calling from_dict on the json representation - load_balancer_collection_next_model_dict = LoadBalancerCollectionNext.from_dict(load_balancer_collection_next_model_json).__dict__ - load_balancer_collection_next_model2 = LoadBalancerCollectionNext(**load_balancer_collection_next_model_dict) + load_balancer_collection_next_model_dict = LoadBalancerCollectionNext.from_dict( + load_balancer_collection_next_model_json).__dict__ + load_balancer_collection_next_model2 = LoadBalancerCollectionNext( + **load_balancer_collection_next_model_dict) # Verify the model instances are equivalent assert load_balancer_collection_next_model == load_balancer_collection_next_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_collection_next_model_json2 = load_balancer_collection_next_model.to_dict() + load_balancer_collection_next_model_json2 = load_balancer_collection_next_model.to_dict( + ) assert load_balancer_collection_next_model_json2 == load_balancer_collection_next_model_json @@ -60020,24 +67504,30 @@ def test_load_balancer_dns_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - dns_instance_reference_model = {} # DNSInstanceReference - dns_instance_reference_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_reference_load_balancer_dns_context_model = { + } # DNSInstanceReferenceLoadBalancerDNSContext + dns_instance_reference_load_balancer_dns_context_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' dns_zone_reference_model = {} # DNSZoneReference dns_zone_reference_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' # Construct a json representation of a LoadBalancerDNS model load_balancer_dns_model_json = {} - load_balancer_dns_model_json['instance'] = dns_instance_reference_model + load_balancer_dns_model_json[ + 'instance'] = dns_instance_reference_load_balancer_dns_context_model load_balancer_dns_model_json['zone'] = dns_zone_reference_model # Construct a model instance of LoadBalancerDNS by calling from_dict on the json representation - load_balancer_dns_model = LoadBalancerDNS.from_dict(load_balancer_dns_model_json) + load_balancer_dns_model = LoadBalancerDNS.from_dict( + load_balancer_dns_model_json) assert load_balancer_dns_model != False # Construct a model instance of LoadBalancerDNS by calling from_dict on the json representation - load_balancer_dns_model_dict = LoadBalancerDNS.from_dict(load_balancer_dns_model_json).__dict__ - load_balancer_dns_model2 = LoadBalancerDNS(**load_balancer_dns_model_dict) + load_balancer_dns_model_dict = LoadBalancerDNS.from_dict( + load_balancer_dns_model_json).__dict__ + load_balancer_dns_model2 = LoadBalancerDNS( + **load_balancer_dns_model_dict) # Verify the model instances are equivalent assert load_balancer_dns_model == load_balancer_dns_model2 @@ -60060,29 +67550,35 @@ def test_load_balancer_dns_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. dns_instance_identity_model = {} # DNSInstanceIdentityByCRN - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' dns_zone_identity_model = {} # DNSZoneIdentityById dns_zone_identity_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' # Construct a json representation of a LoadBalancerDNSPatch model load_balancer_dns_patch_model_json = {} - load_balancer_dns_patch_model_json['instance'] = dns_instance_identity_model + load_balancer_dns_patch_model_json[ + 'instance'] = dns_instance_identity_model load_balancer_dns_patch_model_json['zone'] = dns_zone_identity_model # Construct a model instance of LoadBalancerDNSPatch by calling from_dict on the json representation - load_balancer_dns_patch_model = LoadBalancerDNSPatch.from_dict(load_balancer_dns_patch_model_json) + load_balancer_dns_patch_model = LoadBalancerDNSPatch.from_dict( + load_balancer_dns_patch_model_json) assert load_balancer_dns_patch_model != False # Construct a model instance of LoadBalancerDNSPatch by calling from_dict on the json representation - load_balancer_dns_patch_model_dict = LoadBalancerDNSPatch.from_dict(load_balancer_dns_patch_model_json).__dict__ - load_balancer_dns_patch_model2 = LoadBalancerDNSPatch(**load_balancer_dns_patch_model_dict) + load_balancer_dns_patch_model_dict = LoadBalancerDNSPatch.from_dict( + load_balancer_dns_patch_model_json).__dict__ + load_balancer_dns_patch_model2 = LoadBalancerDNSPatch( + **load_balancer_dns_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_dns_patch_model == load_balancer_dns_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_dns_patch_model_json2 = load_balancer_dns_patch_model.to_dict() + load_balancer_dns_patch_model_json2 = load_balancer_dns_patch_model.to_dict( + ) assert load_balancer_dns_patch_model_json2 == load_balancer_dns_patch_model_json @@ -60099,29 +67595,35 @@ def test_load_balancer_dns_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. dns_instance_identity_model = {} # DNSInstanceIdentityByCRN - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' dns_zone_identity_model = {} # DNSZoneIdentityById dns_zone_identity_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' # Construct a json representation of a LoadBalancerDNSPrototype model load_balancer_dns_prototype_model_json = {} - load_balancer_dns_prototype_model_json['instance'] = dns_instance_identity_model + load_balancer_dns_prototype_model_json[ + 'instance'] = dns_instance_identity_model load_balancer_dns_prototype_model_json['zone'] = dns_zone_identity_model # Construct a model instance of LoadBalancerDNSPrototype by calling from_dict on the json representation - load_balancer_dns_prototype_model = LoadBalancerDNSPrototype.from_dict(load_balancer_dns_prototype_model_json) + load_balancer_dns_prototype_model = LoadBalancerDNSPrototype.from_dict( + load_balancer_dns_prototype_model_json) assert load_balancer_dns_prototype_model != False # Construct a model instance of LoadBalancerDNSPrototype by calling from_dict on the json representation - load_balancer_dns_prototype_model_dict = LoadBalancerDNSPrototype.from_dict(load_balancer_dns_prototype_model_json).__dict__ - load_balancer_dns_prototype_model2 = LoadBalancerDNSPrototype(**load_balancer_dns_prototype_model_dict) + load_balancer_dns_prototype_model_dict = LoadBalancerDNSPrototype.from_dict( + load_balancer_dns_prototype_model_json).__dict__ + load_balancer_dns_prototype_model2 = LoadBalancerDNSPrototype( + **load_balancer_dns_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_dns_prototype_model == load_balancer_dns_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_dns_prototype_model_json2 = load_balancer_dns_prototype_model.to_dict() + load_balancer_dns_prototype_model_json2 = load_balancer_dns_prototype_model.to_dict( + ) assert load_balancer_dns_prototype_model_json2 == load_balancer_dns_prototype_model_json @@ -60137,52 +67639,80 @@ def test_load_balancer_listener_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_reference_model = {} # CertificateInstanceReference - certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_reference_model = { + } # CertificateInstanceReference + certificate_instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference - load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_pool_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' - load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted - load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_reference_model = {} # LoadBalancerListenerReference - load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model - load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect + load_balancer_listener_reference_deleted_model = { + } # LoadBalancerListenerReferenceDeleted + load_balancer_listener_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_reference_model = { + } # LoadBalancerListenerReference + load_balancer_listener_reference_model[ + 'deleted'] = load_balancer_listener_reference_deleted_model + load_balancer_listener_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_listener_https_redirect_model = { + } # LoadBalancerListenerHTTPSRedirect load_balancer_listener_https_redirect_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_model['listener'] = load_balancer_listener_reference_model + load_balancer_listener_https_redirect_model[ + 'listener'] = load_balancer_listener_reference_model load_balancer_listener_https_redirect_model['uri'] = '/example?doc=get' - load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted - load_balancer_listener_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference - load_balancer_listener_policy_reference_model['deleted'] = load_balancer_listener_policy_reference_deleted_model - load_balancer_listener_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' - load_balancer_listener_policy_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_reference_deleted_model = { + } # LoadBalancerListenerPolicyReferenceDeleted + load_balancer_listener_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_policy_reference_model = { + } # LoadBalancerListenerPolicyReference + load_balancer_listener_policy_reference_model[ + 'deleted'] = load_balancer_listener_policy_reference_deleted_model + load_balancer_listener_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' + load_balancer_listener_policy_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_listener_policy_reference_model['name'] = 'my-policy' # Construct a json representation of a LoadBalancerListener model load_balancer_listener_model_json = {} load_balancer_listener_model_json['accept_proxy_protocol'] = True - load_balancer_listener_model_json['certificate_instance'] = certificate_instance_reference_model + load_balancer_listener_model_json[ + 'certificate_instance'] = certificate_instance_reference_model load_balancer_listener_model_json['connection_limit'] = 2000 load_balancer_listener_model_json['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_listener_model_json['default_pool'] = load_balancer_pool_reference_model - load_balancer_listener_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_model_json['https_redirect'] = load_balancer_listener_https_redirect_model - load_balancer_listener_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_model_json[ + 'default_pool'] = load_balancer_pool_reference_model + load_balancer_listener_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_model_json[ + 'https_redirect'] = load_balancer_listener_https_redirect_model + load_balancer_listener_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_listener_model_json['idle_connection_timeout'] = 100 - load_balancer_listener_model_json['policies'] = [load_balancer_listener_policy_reference_model] + load_balancer_listener_model_json['policies'] = [ + load_balancer_listener_policy_reference_model + ] load_balancer_listener_model_json['port'] = 443 load_balancer_listener_model_json['port_max'] = 499 load_balancer_listener_model_json['port_min'] = 443 @@ -60190,18 +67720,22 @@ def test_load_balancer_listener_serialization(self): load_balancer_listener_model_json['provisioning_status'] = 'active' # Construct a model instance of LoadBalancerListener by calling from_dict on the json representation - load_balancer_listener_model = LoadBalancerListener.from_dict(load_balancer_listener_model_json) + load_balancer_listener_model = LoadBalancerListener.from_dict( + load_balancer_listener_model_json) assert load_balancer_listener_model != False # Construct a model instance of LoadBalancerListener by calling from_dict on the json representation - load_balancer_listener_model_dict = LoadBalancerListener.from_dict(load_balancer_listener_model_json).__dict__ - load_balancer_listener_model2 = LoadBalancerListener(**load_balancer_listener_model_dict) + load_balancer_listener_model_dict = LoadBalancerListener.from_dict( + load_balancer_listener_model_json).__dict__ + load_balancer_listener_model2 = LoadBalancerListener( + **load_balancer_listener_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_model == load_balancer_listener_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_model_json2 = load_balancer_listener_model.to_dict() + load_balancer_listener_model_json2 = load_balancer_listener_model.to_dict( + ) assert load_balancer_listener_model_json2 == load_balancer_listener_model_json @@ -60217,51 +67751,79 @@ def test_load_balancer_listener_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_reference_model = {} # CertificateInstanceReference - certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_reference_model = { + } # CertificateInstanceReference + certificate_instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference - load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_pool_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' - load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted - load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_reference_model = {} # LoadBalancerListenerReference - load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model - load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect + load_balancer_listener_reference_deleted_model = { + } # LoadBalancerListenerReferenceDeleted + load_balancer_listener_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_reference_model = { + } # LoadBalancerListenerReference + load_balancer_listener_reference_model[ + 'deleted'] = load_balancer_listener_reference_deleted_model + load_balancer_listener_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_listener_https_redirect_model = { + } # LoadBalancerListenerHTTPSRedirect load_balancer_listener_https_redirect_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_model['listener'] = load_balancer_listener_reference_model + load_balancer_listener_https_redirect_model[ + 'listener'] = load_balancer_listener_reference_model load_balancer_listener_https_redirect_model['uri'] = '/example?doc=get' - load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted - load_balancer_listener_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference - load_balancer_listener_policy_reference_model['deleted'] = load_balancer_listener_policy_reference_deleted_model - load_balancer_listener_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' - load_balancer_listener_policy_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_reference_deleted_model = { + } # LoadBalancerListenerPolicyReferenceDeleted + load_balancer_listener_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_policy_reference_model = { + } # LoadBalancerListenerPolicyReference + load_balancer_listener_policy_reference_model[ + 'deleted'] = load_balancer_listener_policy_reference_deleted_model + load_balancer_listener_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' + load_balancer_listener_policy_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_listener_policy_reference_model['name'] = 'my-policy' load_balancer_listener_model = {} # LoadBalancerListener load_balancer_listener_model['accept_proxy_protocol'] = True - load_balancer_listener_model['certificate_instance'] = certificate_instance_reference_model + load_balancer_listener_model[ + 'certificate_instance'] = certificate_instance_reference_model load_balancer_listener_model['connection_limit'] = 2000 load_balancer_listener_model['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_listener_model['default_pool'] = load_balancer_pool_reference_model - load_balancer_listener_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_model['https_redirect'] = load_balancer_listener_https_redirect_model - load_balancer_listener_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_model[ + 'default_pool'] = load_balancer_pool_reference_model + load_balancer_listener_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_model[ + 'https_redirect'] = load_balancer_listener_https_redirect_model + load_balancer_listener_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_listener_model['idle_connection_timeout'] = 100 - load_balancer_listener_model['policies'] = [load_balancer_listener_policy_reference_model] + load_balancer_listener_model['policies'] = [ + load_balancer_listener_policy_reference_model + ] load_balancer_listener_model['port'] = 443 load_balancer_listener_model['port_max'] = 499 load_balancer_listener_model['port_min'] = 443 @@ -60270,21 +67832,27 @@ def test_load_balancer_listener_collection_serialization(self): # Construct a json representation of a LoadBalancerListenerCollection model load_balancer_listener_collection_model_json = {} - load_balancer_listener_collection_model_json['listeners'] = [load_balancer_listener_model] + load_balancer_listener_collection_model_json['listeners'] = [ + load_balancer_listener_model + ] # Construct a model instance of LoadBalancerListenerCollection by calling from_dict on the json representation - load_balancer_listener_collection_model = LoadBalancerListenerCollection.from_dict(load_balancer_listener_collection_model_json) + load_balancer_listener_collection_model = LoadBalancerListenerCollection.from_dict( + load_balancer_listener_collection_model_json) assert load_balancer_listener_collection_model != False # Construct a model instance of LoadBalancerListenerCollection by calling from_dict on the json representation - load_balancer_listener_collection_model_dict = LoadBalancerListenerCollection.from_dict(load_balancer_listener_collection_model_json).__dict__ - load_balancer_listener_collection_model2 = LoadBalancerListenerCollection(**load_balancer_listener_collection_model_dict) + load_balancer_listener_collection_model_dict = LoadBalancerListenerCollection.from_dict( + load_balancer_listener_collection_model_json).__dict__ + load_balancer_listener_collection_model2 = LoadBalancerListenerCollection( + **load_balancer_listener_collection_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_collection_model == load_balancer_listener_collection_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_collection_model_json2 = load_balancer_listener_collection_model.to_dict() + load_balancer_listener_collection_model_json2 = load_balancer_listener_collection_model.to_dict( + ) assert load_balancer_listener_collection_model_json2 == load_balancer_listener_collection_model_json @@ -60300,33 +67868,46 @@ def test_load_balancer_listener_https_redirect_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted - load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_reference_deleted_model = { + } # LoadBalancerListenerReferenceDeleted + load_balancer_listener_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - load_balancer_listener_reference_model = {} # LoadBalancerListenerReference - load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model - load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model = { + } # LoadBalancerListenerReference + load_balancer_listener_reference_model[ + 'deleted'] = load_balancer_listener_reference_deleted_model + load_balancer_listener_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerHTTPSRedirect model load_balancer_listener_https_redirect_model_json = {} - load_balancer_listener_https_redirect_model_json['http_status_code'] = 301 - load_balancer_listener_https_redirect_model_json['listener'] = load_balancer_listener_reference_model - load_balancer_listener_https_redirect_model_json['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_model_json[ + 'listener'] = load_balancer_listener_reference_model + load_balancer_listener_https_redirect_model_json[ + 'uri'] = '/example?doc=get' # Construct a model instance of LoadBalancerListenerHTTPSRedirect by calling from_dict on the json representation - load_balancer_listener_https_redirect_model = LoadBalancerListenerHTTPSRedirect.from_dict(load_balancer_listener_https_redirect_model_json) + load_balancer_listener_https_redirect_model = LoadBalancerListenerHTTPSRedirect.from_dict( + load_balancer_listener_https_redirect_model_json) assert load_balancer_listener_https_redirect_model != False # Construct a model instance of LoadBalancerListenerHTTPSRedirect by calling from_dict on the json representation - load_balancer_listener_https_redirect_model_dict = LoadBalancerListenerHTTPSRedirect.from_dict(load_balancer_listener_https_redirect_model_json).__dict__ - load_balancer_listener_https_redirect_model2 = LoadBalancerListenerHTTPSRedirect(**load_balancer_listener_https_redirect_model_dict) + load_balancer_listener_https_redirect_model_dict = LoadBalancerListenerHTTPSRedirect.from_dict( + load_balancer_listener_https_redirect_model_json).__dict__ + load_balancer_listener_https_redirect_model2 = LoadBalancerListenerHTTPSRedirect( + **load_balancer_listener_https_redirect_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_https_redirect_model == load_balancer_listener_https_redirect_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_https_redirect_model_json2 = load_balancer_listener_https_redirect_model.to_dict() + load_balancer_listener_https_redirect_model_json2 = load_balancer_listener_https_redirect_model.to_dict( + ) assert load_balancer_listener_https_redirect_model_json2 == load_balancer_listener_https_redirect_model_json @@ -60342,28 +67923,37 @@ def test_load_balancer_listener_https_redirect_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model = { + } # LoadBalancerListenerIdentityById + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerHTTPSRedirectPatch model load_balancer_listener_https_redirect_patch_model_json = {} - load_balancer_listener_https_redirect_patch_model_json['http_status_code'] = 301 - load_balancer_listener_https_redirect_patch_model_json['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_patch_model_json['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_patch_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_patch_model_json[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_patch_model_json[ + 'uri'] = '/example?doc=get' # Construct a model instance of LoadBalancerListenerHTTPSRedirectPatch by calling from_dict on the json representation - load_balancer_listener_https_redirect_patch_model = LoadBalancerListenerHTTPSRedirectPatch.from_dict(load_balancer_listener_https_redirect_patch_model_json) + load_balancer_listener_https_redirect_patch_model = LoadBalancerListenerHTTPSRedirectPatch.from_dict( + load_balancer_listener_https_redirect_patch_model_json) assert load_balancer_listener_https_redirect_patch_model != False # Construct a model instance of LoadBalancerListenerHTTPSRedirectPatch by calling from_dict on the json representation - load_balancer_listener_https_redirect_patch_model_dict = LoadBalancerListenerHTTPSRedirectPatch.from_dict(load_balancer_listener_https_redirect_patch_model_json).__dict__ - load_balancer_listener_https_redirect_patch_model2 = LoadBalancerListenerHTTPSRedirectPatch(**load_balancer_listener_https_redirect_patch_model_dict) + load_balancer_listener_https_redirect_patch_model_dict = LoadBalancerListenerHTTPSRedirectPatch.from_dict( + load_balancer_listener_https_redirect_patch_model_json).__dict__ + load_balancer_listener_https_redirect_patch_model2 = LoadBalancerListenerHTTPSRedirectPatch( + **load_balancer_listener_https_redirect_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_https_redirect_patch_model == load_balancer_listener_https_redirect_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_https_redirect_patch_model_json2 = load_balancer_listener_https_redirect_patch_model.to_dict() + load_balancer_listener_https_redirect_patch_model_json2 = load_balancer_listener_https_redirect_patch_model.to_dict( + ) assert load_balancer_listener_https_redirect_patch_model_json2 == load_balancer_listener_https_redirect_patch_model_json @@ -60372,35 +67962,45 @@ class TestModel_LoadBalancerListenerHTTPSRedirectPrototype: Test Class for LoadBalancerListenerHTTPSRedirectPrototype """ - def test_load_balancer_listener_https_redirect_prototype_serialization(self): + def test_load_balancer_listener_https_redirect_prototype_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerHTTPSRedirectPrototype """ # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model = { + } # LoadBalancerListenerIdentityById + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model_json = {} - load_balancer_listener_https_redirect_prototype_model_json['http_status_code'] = 301 - load_balancer_listener_https_redirect_prototype_model_json['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_prototype_model_json['uri'] = '/example?doc=get' + load_balancer_listener_https_redirect_prototype_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_prototype_model_json[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_prototype_model_json[ + 'uri'] = '/example?doc=get' # Construct a model instance of LoadBalancerListenerHTTPSRedirectPrototype by calling from_dict on the json representation - load_balancer_listener_https_redirect_prototype_model = LoadBalancerListenerHTTPSRedirectPrototype.from_dict(load_balancer_listener_https_redirect_prototype_model_json) + load_balancer_listener_https_redirect_prototype_model = LoadBalancerListenerHTTPSRedirectPrototype.from_dict( + load_balancer_listener_https_redirect_prototype_model_json) assert load_balancer_listener_https_redirect_prototype_model != False # Construct a model instance of LoadBalancerListenerHTTPSRedirectPrototype by calling from_dict on the json representation - load_balancer_listener_https_redirect_prototype_model_dict = LoadBalancerListenerHTTPSRedirectPrototype.from_dict(load_balancer_listener_https_redirect_prototype_model_json).__dict__ - load_balancer_listener_https_redirect_prototype_model2 = LoadBalancerListenerHTTPSRedirectPrototype(**load_balancer_listener_https_redirect_prototype_model_dict) + load_balancer_listener_https_redirect_prototype_model_dict = LoadBalancerListenerHTTPSRedirectPrototype.from_dict( + load_balancer_listener_https_redirect_prototype_model_json).__dict__ + load_balancer_listener_https_redirect_prototype_model2 = LoadBalancerListenerHTTPSRedirectPrototype( + **load_balancer_listener_https_redirect_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_https_redirect_prototype_model == load_balancer_listener_https_redirect_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_https_redirect_prototype_model_json2 = load_balancer_listener_https_redirect_prototype_model.to_dict() + load_balancer_listener_https_redirect_prototype_model_json2 = load_balancer_listener_https_redirect_prototype_model.to_dict( + ) assert load_balancer_listener_https_redirect_prototype_model_json2 == load_balancer_listener_https_redirect_prototype_model_json @@ -60416,27 +68016,40 @@ def test_load_balancer_listener_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_identity_model = {} # CertificateInstanceIdentityByCRN - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' - - load_balancer_listener_default_pool_patch_model = {} # LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById - load_balancer_listener_default_pool_patch_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_listener_https_redirect_patch_model = {} # LoadBalancerListenerHTTPSRedirectPatch - load_balancer_listener_https_redirect_patch_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_patch_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_patch_model['uri'] = '/example?doc=get' + certificate_instance_identity_model = { + } # CertificateInstanceIdentityByCRN + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + + load_balancer_listener_default_pool_patch_model = { + } # LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById + load_balancer_listener_default_pool_patch_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_listener_identity_model = { + } # LoadBalancerListenerIdentityById + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_listener_https_redirect_patch_model = { + } # LoadBalancerListenerHTTPSRedirectPatch + load_balancer_listener_https_redirect_patch_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_patch_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_patch_model[ + 'uri'] = '/example?doc=get' # Construct a json representation of a LoadBalancerListenerPatch model load_balancer_listener_patch_model_json = {} load_balancer_listener_patch_model_json['accept_proxy_protocol'] = True - load_balancer_listener_patch_model_json['certificate_instance'] = certificate_instance_identity_model + load_balancer_listener_patch_model_json[ + 'certificate_instance'] = certificate_instance_identity_model load_balancer_listener_patch_model_json['connection_limit'] = 2000 - load_balancer_listener_patch_model_json['default_pool'] = load_balancer_listener_default_pool_patch_model - load_balancer_listener_patch_model_json['https_redirect'] = load_balancer_listener_https_redirect_patch_model + load_balancer_listener_patch_model_json[ + 'default_pool'] = load_balancer_listener_default_pool_patch_model + load_balancer_listener_patch_model_json[ + 'https_redirect'] = load_balancer_listener_https_redirect_patch_model load_balancer_listener_patch_model_json['idle_connection_timeout'] = 100 load_balancer_listener_patch_model_json['port'] = 443 load_balancer_listener_patch_model_json['port_max'] = 499 @@ -60444,18 +68057,22 @@ def test_load_balancer_listener_patch_serialization(self): load_balancer_listener_patch_model_json['protocol'] = 'http' # Construct a model instance of LoadBalancerListenerPatch by calling from_dict on the json representation - load_balancer_listener_patch_model = LoadBalancerListenerPatch.from_dict(load_balancer_listener_patch_model_json) + load_balancer_listener_patch_model = LoadBalancerListenerPatch.from_dict( + load_balancer_listener_patch_model_json) assert load_balancer_listener_patch_model != False # Construct a model instance of LoadBalancerListenerPatch by calling from_dict on the json representation - load_balancer_listener_patch_model_dict = LoadBalancerListenerPatch.from_dict(load_balancer_listener_patch_model_json).__dict__ - load_balancer_listener_patch_model2 = LoadBalancerListenerPatch(**load_balancer_listener_patch_model_dict) + load_balancer_listener_patch_model_dict = LoadBalancerListenerPatch.from_dict( + load_balancer_listener_patch_model_json).__dict__ + load_balancer_listener_patch_model2 = LoadBalancerListenerPatch( + **load_balancer_listener_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_patch_model == load_balancer_listener_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_patch_model_json2 = load_balancer_listener_patch_model.to_dict() + load_balancer_listener_patch_model_json2 = load_balancer_listener_patch_model.to_dict( + ) assert load_balancer_listener_patch_model_json2 == load_balancer_listener_patch_model_json @@ -60471,48 +68088,72 @@ def test_load_balancer_listener_policy_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted - load_balancer_listener_policy_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference - load_balancer_listener_policy_rule_reference_model['deleted'] = load_balancer_listener_policy_rule_reference_deleted_model - load_balancer_listener_policy_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' - load_balancer_listener_policy_rule_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference - load_balancer_listener_policy_target_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_listener_policy_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_target_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_target_model['name'] = 'my-load-balancer-pool' + load_balancer_listener_policy_rule_reference_deleted_model = { + } # LoadBalancerListenerPolicyRuleReferenceDeleted + load_balancer_listener_policy_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_policy_rule_reference_model = { + } # LoadBalancerListenerPolicyRuleReference + load_balancer_listener_policy_rule_reference_model[ + 'deleted'] = load_balancer_listener_policy_rule_reference_deleted_model + load_balancer_listener_policy_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' + load_balancer_listener_policy_rule_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_policy_target_model = { + } # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference + load_balancer_listener_policy_target_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_listener_policy_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_model[ + 'name'] = 'my-load-balancer-pool' # Construct a json representation of a LoadBalancerListenerPolicy model load_balancer_listener_policy_model_json = {} load_balancer_listener_policy_model_json['action'] = 'forward' - load_balancer_listener_policy_model_json['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_listener_policy_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' - load_balancer_listener_policy_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + load_balancer_listener_policy_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' + load_balancer_listener_policy_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_listener_policy_model_json['name'] = 'my-policy' load_balancer_listener_policy_model_json['priority'] = 5 - load_balancer_listener_policy_model_json['provisioning_status'] = 'active' - load_balancer_listener_policy_model_json['rules'] = [load_balancer_listener_policy_rule_reference_model] - load_balancer_listener_policy_model_json['target'] = load_balancer_listener_policy_target_model + load_balancer_listener_policy_model_json[ + 'provisioning_status'] = 'active' + load_balancer_listener_policy_model_json['rules'] = [ + load_balancer_listener_policy_rule_reference_model + ] + load_balancer_listener_policy_model_json[ + 'target'] = load_balancer_listener_policy_target_model # Construct a model instance of LoadBalancerListenerPolicy by calling from_dict on the json representation - load_balancer_listener_policy_model = LoadBalancerListenerPolicy.from_dict(load_balancer_listener_policy_model_json) + load_balancer_listener_policy_model = LoadBalancerListenerPolicy.from_dict( + load_balancer_listener_policy_model_json) assert load_balancer_listener_policy_model != False # Construct a model instance of LoadBalancerListenerPolicy by calling from_dict on the json representation - load_balancer_listener_policy_model_dict = LoadBalancerListenerPolicy.from_dict(load_balancer_listener_policy_model_json).__dict__ - load_balancer_listener_policy_model2 = LoadBalancerListenerPolicy(**load_balancer_listener_policy_model_dict) + load_balancer_listener_policy_model_dict = LoadBalancerListenerPolicy.from_dict( + load_balancer_listener_policy_model_json).__dict__ + load_balancer_listener_policy_model2 = LoadBalancerListenerPolicy( + **load_balancer_listener_policy_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_model == load_balancer_listener_policy_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_model_json2 = load_balancer_listener_policy_model.to_dict() + load_balancer_listener_policy_model_json2 = load_balancer_listener_policy_model.to_dict( + ) assert load_balancer_listener_policy_model_json2 == load_balancer_listener_policy_model_json @@ -60528,51 +68169,76 @@ def test_load_balancer_listener_policy_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted - load_balancer_listener_policy_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference - load_balancer_listener_policy_rule_reference_model['deleted'] = load_balancer_listener_policy_rule_reference_deleted_model - load_balancer_listener_policy_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' - load_balancer_listener_policy_rule_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference - load_balancer_listener_policy_target_model['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_listener_policy_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_target_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_target_model['name'] = 'my-load-balancer-pool' + load_balancer_listener_policy_rule_reference_deleted_model = { + } # LoadBalancerListenerPolicyRuleReferenceDeleted + load_balancer_listener_policy_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_policy_rule_reference_model = { + } # LoadBalancerListenerPolicyRuleReference + load_balancer_listener_policy_rule_reference_model[ + 'deleted'] = load_balancer_listener_policy_rule_reference_deleted_model + load_balancer_listener_policy_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' + load_balancer_listener_policy_rule_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_listener_policy_target_model = { + } # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference + load_balancer_listener_policy_target_model[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_listener_policy_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_model[ + 'name'] = 'my-load-balancer-pool' load_balancer_listener_policy_model = {} # LoadBalancerListenerPolicy load_balancer_listener_policy_model['action'] = 'forward' - load_balancer_listener_policy_model['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_listener_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' - load_balancer_listener_policy_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_model[ + 'created_at'] = '2019-01-01T12:00:00Z' + load_balancer_listener_policy_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' + load_balancer_listener_policy_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_listener_policy_model['name'] = 'my-policy' load_balancer_listener_policy_model['priority'] = 5 load_balancer_listener_policy_model['provisioning_status'] = 'active' - load_balancer_listener_policy_model['rules'] = [load_balancer_listener_policy_rule_reference_model] - load_balancer_listener_policy_model['target'] = load_balancer_listener_policy_target_model + load_balancer_listener_policy_model['rules'] = [ + load_balancer_listener_policy_rule_reference_model + ] + load_balancer_listener_policy_model[ + 'target'] = load_balancer_listener_policy_target_model # Construct a json representation of a LoadBalancerListenerPolicyCollection model load_balancer_listener_policy_collection_model_json = {} - load_balancer_listener_policy_collection_model_json['policies'] = [load_balancer_listener_policy_model] + load_balancer_listener_policy_collection_model_json['policies'] = [ + load_balancer_listener_policy_model + ] # Construct a model instance of LoadBalancerListenerPolicyCollection by calling from_dict on the json representation - load_balancer_listener_policy_collection_model = LoadBalancerListenerPolicyCollection.from_dict(load_balancer_listener_policy_collection_model_json) + load_balancer_listener_policy_collection_model = LoadBalancerListenerPolicyCollection.from_dict( + load_balancer_listener_policy_collection_model_json) assert load_balancer_listener_policy_collection_model != False # Construct a model instance of LoadBalancerListenerPolicyCollection by calling from_dict on the json representation - load_balancer_listener_policy_collection_model_dict = LoadBalancerListenerPolicyCollection.from_dict(load_balancer_listener_policy_collection_model_json).__dict__ - load_balancer_listener_policy_collection_model2 = LoadBalancerListenerPolicyCollection(**load_balancer_listener_policy_collection_model_dict) + load_balancer_listener_policy_collection_model_dict = LoadBalancerListenerPolicyCollection.from_dict( + load_balancer_listener_policy_collection_model_json).__dict__ + load_balancer_listener_policy_collection_model2 = LoadBalancerListenerPolicyCollection( + **load_balancer_listener_policy_collection_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_collection_model == load_balancer_listener_policy_collection_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_collection_model_json2 = load_balancer_listener_policy_collection_model.to_dict() + load_balancer_listener_policy_collection_model_json2 = load_balancer_listener_policy_collection_model.to_dict( + ) assert load_balancer_listener_policy_collection_model_json2 == load_balancer_listener_policy_collection_model_json @@ -60588,28 +68254,35 @@ def test_load_balancer_listener_policy_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_policy_target_patch_model = {} # LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById - load_balancer_listener_policy_target_patch_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_patch_model = { + } # LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById + load_balancer_listener_policy_target_patch_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerPolicyPatch model load_balancer_listener_policy_patch_model_json = {} load_balancer_listener_policy_patch_model_json['name'] = 'my-policy' load_balancer_listener_policy_patch_model_json['priority'] = 5 - load_balancer_listener_policy_patch_model_json['target'] = load_balancer_listener_policy_target_patch_model + load_balancer_listener_policy_patch_model_json[ + 'target'] = load_balancer_listener_policy_target_patch_model # Construct a model instance of LoadBalancerListenerPolicyPatch by calling from_dict on the json representation - load_balancer_listener_policy_patch_model = LoadBalancerListenerPolicyPatch.from_dict(load_balancer_listener_policy_patch_model_json) + load_balancer_listener_policy_patch_model = LoadBalancerListenerPolicyPatch.from_dict( + load_balancer_listener_policy_patch_model_json) assert load_balancer_listener_policy_patch_model != False # Construct a model instance of LoadBalancerListenerPolicyPatch by calling from_dict on the json representation - load_balancer_listener_policy_patch_model_dict = LoadBalancerListenerPolicyPatch.from_dict(load_balancer_listener_policy_patch_model_json).__dict__ - load_balancer_listener_policy_patch_model2 = LoadBalancerListenerPolicyPatch(**load_balancer_listener_policy_patch_model_dict) + load_balancer_listener_policy_patch_model_dict = LoadBalancerListenerPolicyPatch.from_dict( + load_balancer_listener_policy_patch_model_json).__dict__ + load_balancer_listener_policy_patch_model2 = LoadBalancerListenerPolicyPatch( + **load_balancer_listener_policy_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_patch_model == load_balancer_listener_policy_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_patch_model_json2 = load_balancer_listener_policy_patch_model.to_dict() + load_balancer_listener_policy_patch_model_json2 = load_balancer_listener_policy_patch_model.to_dict( + ) assert load_balancer_listener_policy_patch_model_json2 == load_balancer_listener_policy_patch_model_json @@ -60625,36 +68298,49 @@ def test_load_balancer_listener_policy_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_policy_rule_prototype_model = {} # LoadBalancerListenerPolicyRulePrototype - load_balancer_listener_policy_rule_prototype_model['condition'] = 'contains' - load_balancer_listener_policy_rule_prototype_model['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_prototype_model = { + } # LoadBalancerListenerPolicyRulePrototype + load_balancer_listener_policy_rule_prototype_model[ + 'condition'] = 'contains' + load_balancer_listener_policy_rule_prototype_model[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_prototype_model['type'] = 'body' - load_balancer_listener_policy_rule_prototype_model['value'] = 'testString' + load_balancer_listener_policy_rule_prototype_model[ + 'value'] = 'testString' - load_balancer_listener_policy_target_prototype_model = {} # LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById - load_balancer_listener_policy_target_prototype_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_prototype_model = { + } # LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById + load_balancer_listener_policy_target_prototype_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerPolicyPrototype model load_balancer_listener_policy_prototype_model_json = {} load_balancer_listener_policy_prototype_model_json['action'] = 'forward' load_balancer_listener_policy_prototype_model_json['name'] = 'my-policy' load_balancer_listener_policy_prototype_model_json['priority'] = 5 - load_balancer_listener_policy_prototype_model_json['rules'] = [load_balancer_listener_policy_rule_prototype_model] - load_balancer_listener_policy_prototype_model_json['target'] = load_balancer_listener_policy_target_prototype_model + load_balancer_listener_policy_prototype_model_json['rules'] = [ + load_balancer_listener_policy_rule_prototype_model + ] + load_balancer_listener_policy_prototype_model_json[ + 'target'] = load_balancer_listener_policy_target_prototype_model # Construct a model instance of LoadBalancerListenerPolicyPrototype by calling from_dict on the json representation - load_balancer_listener_policy_prototype_model = LoadBalancerListenerPolicyPrototype.from_dict(load_balancer_listener_policy_prototype_model_json) + load_balancer_listener_policy_prototype_model = LoadBalancerListenerPolicyPrototype.from_dict( + load_balancer_listener_policy_prototype_model_json) assert load_balancer_listener_policy_prototype_model != False # Construct a model instance of LoadBalancerListenerPolicyPrototype by calling from_dict on the json representation - load_balancer_listener_policy_prototype_model_dict = LoadBalancerListenerPolicyPrototype.from_dict(load_balancer_listener_policy_prototype_model_json).__dict__ - load_balancer_listener_policy_prototype_model2 = LoadBalancerListenerPolicyPrototype(**load_balancer_listener_policy_prototype_model_dict) + load_balancer_listener_policy_prototype_model_dict = LoadBalancerListenerPolicyPrototype.from_dict( + load_balancer_listener_policy_prototype_model_json).__dict__ + load_balancer_listener_policy_prototype_model2 = LoadBalancerListenerPolicyPrototype( + **load_balancer_listener_policy_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_prototype_model == load_balancer_listener_policy_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_prototype_model_json2 = load_balancer_listener_policy_prototype_model.to_dict() + load_balancer_listener_policy_prototype_model_json2 = load_balancer_listener_policy_prototype_model.to_dict( + ) assert load_balancer_listener_policy_prototype_model_json2 == load_balancer_listener_policy_prototype_model_json @@ -60670,29 +68356,38 @@ def test_load_balancer_listener_policy_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted - load_balancer_listener_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_policy_reference_deleted_model = { + } # LoadBalancerListenerPolicyReferenceDeleted + load_balancer_listener_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerListenerPolicyReference model load_balancer_listener_policy_reference_model_json = {} - load_balancer_listener_policy_reference_model_json['deleted'] = load_balancer_listener_policy_reference_deleted_model - load_balancer_listener_policy_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' - load_balancer_listener_policy_reference_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_reference_model_json[ + 'deleted'] = load_balancer_listener_policy_reference_deleted_model + load_balancer_listener_policy_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278' + load_balancer_listener_policy_reference_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_listener_policy_reference_model_json['name'] = 'my-policy' # Construct a model instance of LoadBalancerListenerPolicyReference by calling from_dict on the json representation - load_balancer_listener_policy_reference_model = LoadBalancerListenerPolicyReference.from_dict(load_balancer_listener_policy_reference_model_json) + load_balancer_listener_policy_reference_model = LoadBalancerListenerPolicyReference.from_dict( + load_balancer_listener_policy_reference_model_json) assert load_balancer_listener_policy_reference_model != False # Construct a model instance of LoadBalancerListenerPolicyReference by calling from_dict on the json representation - load_balancer_listener_policy_reference_model_dict = LoadBalancerListenerPolicyReference.from_dict(load_balancer_listener_policy_reference_model_json).__dict__ - load_balancer_listener_policy_reference_model2 = LoadBalancerListenerPolicyReference(**load_balancer_listener_policy_reference_model_dict) + load_balancer_listener_policy_reference_model_dict = LoadBalancerListenerPolicyReference.from_dict( + load_balancer_listener_policy_reference_model_json).__dict__ + load_balancer_listener_policy_reference_model2 = LoadBalancerListenerPolicyReference( + **load_balancer_listener_policy_reference_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_reference_model == load_balancer_listener_policy_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_reference_model_json2 = load_balancer_listener_policy_reference_model.to_dict() + load_balancer_listener_policy_reference_model_json2 = load_balancer_listener_policy_reference_model.to_dict( + ) assert load_balancer_listener_policy_reference_model_json2 == load_balancer_listener_policy_reference_model_json @@ -60701,28 +68396,34 @@ class TestModel_LoadBalancerListenerPolicyReferenceDeleted: Test Class for LoadBalancerListenerPolicyReferenceDeleted """ - def test_load_balancer_listener_policy_reference_deleted_serialization(self): + def test_load_balancer_listener_policy_reference_deleted_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyReferenceDeleted """ # Construct a json representation of a LoadBalancerListenerPolicyReferenceDeleted model load_balancer_listener_policy_reference_deleted_model_json = {} - load_balancer_listener_policy_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_policy_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of LoadBalancerListenerPolicyReferenceDeleted by calling from_dict on the json representation - load_balancer_listener_policy_reference_deleted_model = LoadBalancerListenerPolicyReferenceDeleted.from_dict(load_balancer_listener_policy_reference_deleted_model_json) + load_balancer_listener_policy_reference_deleted_model = LoadBalancerListenerPolicyReferenceDeleted.from_dict( + load_balancer_listener_policy_reference_deleted_model_json) assert load_balancer_listener_policy_reference_deleted_model != False # Construct a model instance of LoadBalancerListenerPolicyReferenceDeleted by calling from_dict on the json representation - load_balancer_listener_policy_reference_deleted_model_dict = LoadBalancerListenerPolicyReferenceDeleted.from_dict(load_balancer_listener_policy_reference_deleted_model_json).__dict__ - load_balancer_listener_policy_reference_deleted_model2 = LoadBalancerListenerPolicyReferenceDeleted(**load_balancer_listener_policy_reference_deleted_model_dict) + load_balancer_listener_policy_reference_deleted_model_dict = LoadBalancerListenerPolicyReferenceDeleted.from_dict( + load_balancer_listener_policy_reference_deleted_model_json).__dict__ + load_balancer_listener_policy_reference_deleted_model2 = LoadBalancerListenerPolicyReferenceDeleted( + **load_balancer_listener_policy_reference_deleted_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_reference_deleted_model == load_balancer_listener_policy_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_reference_deleted_model_json2 = load_balancer_listener_policy_reference_deleted_model.to_dict() + load_balancer_listener_policy_reference_deleted_model_json2 = load_balancer_listener_policy_reference_deleted_model.to_dict( + ) assert load_balancer_listener_policy_reference_deleted_model_json2 == load_balancer_listener_policy_reference_deleted_model_json @@ -60739,27 +68440,35 @@ def test_load_balancer_listener_policy_rule_serialization(self): # Construct a json representation of a LoadBalancerListenerPolicyRule model load_balancer_listener_policy_rule_model_json = {} load_balancer_listener_policy_rule_model_json['condition'] = 'contains' - load_balancer_listener_policy_rule_model_json['created_at'] = '2019-01-01T12:00:00Z' + load_balancer_listener_policy_rule_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' load_balancer_listener_policy_rule_model_json['field'] = 'MY-APP-HEADER' - load_balancer_listener_policy_rule_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' - load_balancer_listener_policy_rule_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_rule_model_json['provisioning_status'] = 'active' + load_balancer_listener_policy_rule_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' + load_balancer_listener_policy_rule_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_rule_model_json[ + 'provisioning_status'] = 'active' load_balancer_listener_policy_rule_model_json['type'] = 'body' load_balancer_listener_policy_rule_model_json['value'] = 'testString' # Construct a model instance of LoadBalancerListenerPolicyRule by calling from_dict on the json representation - load_balancer_listener_policy_rule_model = LoadBalancerListenerPolicyRule.from_dict(load_balancer_listener_policy_rule_model_json) + load_balancer_listener_policy_rule_model = LoadBalancerListenerPolicyRule.from_dict( + load_balancer_listener_policy_rule_model_json) assert load_balancer_listener_policy_rule_model != False # Construct a model instance of LoadBalancerListenerPolicyRule by calling from_dict on the json representation - load_balancer_listener_policy_rule_model_dict = LoadBalancerListenerPolicyRule.from_dict(load_balancer_listener_policy_rule_model_json).__dict__ - load_balancer_listener_policy_rule_model2 = LoadBalancerListenerPolicyRule(**load_balancer_listener_policy_rule_model_dict) + load_balancer_listener_policy_rule_model_dict = LoadBalancerListenerPolicyRule.from_dict( + load_balancer_listener_policy_rule_model_json).__dict__ + load_balancer_listener_policy_rule_model2 = LoadBalancerListenerPolicyRule( + **load_balancer_listener_policy_rule_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_rule_model == load_balancer_listener_policy_rule_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_rule_model_json2 = load_balancer_listener_policy_rule_model.to_dict() + load_balancer_listener_policy_rule_model_json2 = load_balancer_listener_policy_rule_model.to_dict( + ) assert load_balancer_listener_policy_rule_model_json2 == load_balancer_listener_policy_rule_model_json @@ -60775,33 +68484,44 @@ def test_load_balancer_listener_policy_rule_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_policy_rule_model = {} # LoadBalancerListenerPolicyRule + load_balancer_listener_policy_rule_model = { + } # LoadBalancerListenerPolicyRule load_balancer_listener_policy_rule_model['condition'] = 'contains' - load_balancer_listener_policy_rule_model['created_at'] = '2019-01-01T12:00:00Z' + load_balancer_listener_policy_rule_model[ + 'created_at'] = '2019-01-01T12:00:00Z' load_balancer_listener_policy_rule_model['field'] = 'MY-APP-HEADER' - load_balancer_listener_policy_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' - load_balancer_listener_policy_rule_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_rule_model['provisioning_status'] = 'active' + load_balancer_listener_policy_rule_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' + load_balancer_listener_policy_rule_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_rule_model[ + 'provisioning_status'] = 'active' load_balancer_listener_policy_rule_model['type'] = 'body' load_balancer_listener_policy_rule_model['value'] = 'testString' # Construct a json representation of a LoadBalancerListenerPolicyRuleCollection model load_balancer_listener_policy_rule_collection_model_json = {} - load_balancer_listener_policy_rule_collection_model_json['rules'] = [load_balancer_listener_policy_rule_model] + load_balancer_listener_policy_rule_collection_model_json['rules'] = [ + load_balancer_listener_policy_rule_model + ] # Construct a model instance of LoadBalancerListenerPolicyRuleCollection by calling from_dict on the json representation - load_balancer_listener_policy_rule_collection_model = LoadBalancerListenerPolicyRuleCollection.from_dict(load_balancer_listener_policy_rule_collection_model_json) + load_balancer_listener_policy_rule_collection_model = LoadBalancerListenerPolicyRuleCollection.from_dict( + load_balancer_listener_policy_rule_collection_model_json) assert load_balancer_listener_policy_rule_collection_model != False # Construct a model instance of LoadBalancerListenerPolicyRuleCollection by calling from_dict on the json representation - load_balancer_listener_policy_rule_collection_model_dict = LoadBalancerListenerPolicyRuleCollection.from_dict(load_balancer_listener_policy_rule_collection_model_json).__dict__ - load_balancer_listener_policy_rule_collection_model2 = LoadBalancerListenerPolicyRuleCollection(**load_balancer_listener_policy_rule_collection_model_dict) + load_balancer_listener_policy_rule_collection_model_dict = LoadBalancerListenerPolicyRuleCollection.from_dict( + load_balancer_listener_policy_rule_collection_model_json).__dict__ + load_balancer_listener_policy_rule_collection_model2 = LoadBalancerListenerPolicyRuleCollection( + **load_balancer_listener_policy_rule_collection_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_rule_collection_model == load_balancer_listener_policy_rule_collection_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_rule_collection_model_json2 = load_balancer_listener_policy_rule_collection_model.to_dict() + load_balancer_listener_policy_rule_collection_model_json2 = load_balancer_listener_policy_rule_collection_model.to_dict( + ) assert load_balancer_listener_policy_rule_collection_model_json2 == load_balancer_listener_policy_rule_collection_model_json @@ -60817,24 +68537,31 @@ def test_load_balancer_listener_policy_rule_patch_serialization(self): # Construct a json representation of a LoadBalancerListenerPolicyRulePatch model load_balancer_listener_policy_rule_patch_model_json = {} - load_balancer_listener_policy_rule_patch_model_json['condition'] = 'contains' - load_balancer_listener_policy_rule_patch_model_json['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_patch_model_json[ + 'condition'] = 'contains' + load_balancer_listener_policy_rule_patch_model_json[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_patch_model_json['type'] = 'body' - load_balancer_listener_policy_rule_patch_model_json['value'] = 'testString' + load_balancer_listener_policy_rule_patch_model_json[ + 'value'] = 'testString' # Construct a model instance of LoadBalancerListenerPolicyRulePatch by calling from_dict on the json representation - load_balancer_listener_policy_rule_patch_model = LoadBalancerListenerPolicyRulePatch.from_dict(load_balancer_listener_policy_rule_patch_model_json) + load_balancer_listener_policy_rule_patch_model = LoadBalancerListenerPolicyRulePatch.from_dict( + load_balancer_listener_policy_rule_patch_model_json) assert load_balancer_listener_policy_rule_patch_model != False # Construct a model instance of LoadBalancerListenerPolicyRulePatch by calling from_dict on the json representation - load_balancer_listener_policy_rule_patch_model_dict = LoadBalancerListenerPolicyRulePatch.from_dict(load_balancer_listener_policy_rule_patch_model_json).__dict__ - load_balancer_listener_policy_rule_patch_model2 = LoadBalancerListenerPolicyRulePatch(**load_balancer_listener_policy_rule_patch_model_dict) + load_balancer_listener_policy_rule_patch_model_dict = LoadBalancerListenerPolicyRulePatch.from_dict( + load_balancer_listener_policy_rule_patch_model_json).__dict__ + load_balancer_listener_policy_rule_patch_model2 = LoadBalancerListenerPolicyRulePatch( + **load_balancer_listener_policy_rule_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_rule_patch_model == load_balancer_listener_policy_rule_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_rule_patch_model_json2 = load_balancer_listener_policy_rule_patch_model.to_dict() + load_balancer_listener_policy_rule_patch_model_json2 = load_balancer_listener_policy_rule_patch_model.to_dict( + ) assert load_balancer_listener_policy_rule_patch_model_json2 == load_balancer_listener_policy_rule_patch_model_json @@ -60850,24 +68577,31 @@ def test_load_balancer_listener_policy_rule_prototype_serialization(self): # Construct a json representation of a LoadBalancerListenerPolicyRulePrototype model load_balancer_listener_policy_rule_prototype_model_json = {} - load_balancer_listener_policy_rule_prototype_model_json['condition'] = 'contains' - load_balancer_listener_policy_rule_prototype_model_json['field'] = 'MY-APP-HEADER' + load_balancer_listener_policy_rule_prototype_model_json[ + 'condition'] = 'contains' + load_balancer_listener_policy_rule_prototype_model_json[ + 'field'] = 'MY-APP-HEADER' load_balancer_listener_policy_rule_prototype_model_json['type'] = 'body' - load_balancer_listener_policy_rule_prototype_model_json['value'] = 'testString' + load_balancer_listener_policy_rule_prototype_model_json[ + 'value'] = 'testString' # Construct a model instance of LoadBalancerListenerPolicyRulePrototype by calling from_dict on the json representation - load_balancer_listener_policy_rule_prototype_model = LoadBalancerListenerPolicyRulePrototype.from_dict(load_balancer_listener_policy_rule_prototype_model_json) + load_balancer_listener_policy_rule_prototype_model = LoadBalancerListenerPolicyRulePrototype.from_dict( + load_balancer_listener_policy_rule_prototype_model_json) assert load_balancer_listener_policy_rule_prototype_model != False # Construct a model instance of LoadBalancerListenerPolicyRulePrototype by calling from_dict on the json representation - load_balancer_listener_policy_rule_prototype_model_dict = LoadBalancerListenerPolicyRulePrototype.from_dict(load_balancer_listener_policy_rule_prototype_model_json).__dict__ - load_balancer_listener_policy_rule_prototype_model2 = LoadBalancerListenerPolicyRulePrototype(**load_balancer_listener_policy_rule_prototype_model_dict) + load_balancer_listener_policy_rule_prototype_model_dict = LoadBalancerListenerPolicyRulePrototype.from_dict( + load_balancer_listener_policy_rule_prototype_model_json).__dict__ + load_balancer_listener_policy_rule_prototype_model2 = LoadBalancerListenerPolicyRulePrototype( + **load_balancer_listener_policy_rule_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_rule_prototype_model == load_balancer_listener_policy_rule_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_rule_prototype_model_json2 = load_balancer_listener_policy_rule_prototype_model.to_dict() + load_balancer_listener_policy_rule_prototype_model_json2 = load_balancer_listener_policy_rule_prototype_model.to_dict( + ) assert load_balancer_listener_policy_rule_prototype_model_json2 == load_balancer_listener_policy_rule_prototype_model_json @@ -60883,28 +68617,37 @@ def test_load_balancer_listener_policy_rule_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted - load_balancer_listener_policy_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_policy_rule_reference_deleted_model = { + } # LoadBalancerListenerPolicyRuleReferenceDeleted + load_balancer_listener_policy_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerListenerPolicyRuleReference model load_balancer_listener_policy_rule_reference_model_json = {} - load_balancer_listener_policy_rule_reference_model_json['deleted'] = load_balancer_listener_policy_rule_reference_deleted_model - load_balancer_listener_policy_rule_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' - load_balancer_listener_policy_rule_reference_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_rule_reference_model_json[ + 'deleted'] = load_balancer_listener_policy_rule_reference_deleted_model + load_balancer_listener_policy_rule_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762' + load_balancer_listener_policy_rule_reference_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerPolicyRuleReference by calling from_dict on the json representation - load_balancer_listener_policy_rule_reference_model = LoadBalancerListenerPolicyRuleReference.from_dict(load_balancer_listener_policy_rule_reference_model_json) + load_balancer_listener_policy_rule_reference_model = LoadBalancerListenerPolicyRuleReference.from_dict( + load_balancer_listener_policy_rule_reference_model_json) assert load_balancer_listener_policy_rule_reference_model != False # Construct a model instance of LoadBalancerListenerPolicyRuleReference by calling from_dict on the json representation - load_balancer_listener_policy_rule_reference_model_dict = LoadBalancerListenerPolicyRuleReference.from_dict(load_balancer_listener_policy_rule_reference_model_json).__dict__ - load_balancer_listener_policy_rule_reference_model2 = LoadBalancerListenerPolicyRuleReference(**load_balancer_listener_policy_rule_reference_model_dict) + load_balancer_listener_policy_rule_reference_model_dict = LoadBalancerListenerPolicyRuleReference.from_dict( + load_balancer_listener_policy_rule_reference_model_json).__dict__ + load_balancer_listener_policy_rule_reference_model2 = LoadBalancerListenerPolicyRuleReference( + **load_balancer_listener_policy_rule_reference_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_rule_reference_model == load_balancer_listener_policy_rule_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_rule_reference_model_json2 = load_balancer_listener_policy_rule_reference_model.to_dict() + load_balancer_listener_policy_rule_reference_model_json2 = load_balancer_listener_policy_rule_reference_model.to_dict( + ) assert load_balancer_listener_policy_rule_reference_model_json2 == load_balancer_listener_policy_rule_reference_model_json @@ -60913,28 +68656,35 @@ class TestModel_LoadBalancerListenerPolicyRuleReferenceDeleted: Test Class for LoadBalancerListenerPolicyRuleReferenceDeleted """ - def test_load_balancer_listener_policy_rule_reference_deleted_serialization(self): + def test_load_balancer_listener_policy_rule_reference_deleted_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyRuleReferenceDeleted """ # Construct a json representation of a LoadBalancerListenerPolicyRuleReferenceDeleted model load_balancer_listener_policy_rule_reference_deleted_model_json = {} - load_balancer_listener_policy_rule_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_policy_rule_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of LoadBalancerListenerPolicyRuleReferenceDeleted by calling from_dict on the json representation - load_balancer_listener_policy_rule_reference_deleted_model = LoadBalancerListenerPolicyRuleReferenceDeleted.from_dict(load_balancer_listener_policy_rule_reference_deleted_model_json) + load_balancer_listener_policy_rule_reference_deleted_model = LoadBalancerListenerPolicyRuleReferenceDeleted.from_dict( + load_balancer_listener_policy_rule_reference_deleted_model_json) assert load_balancer_listener_policy_rule_reference_deleted_model != False # Construct a model instance of LoadBalancerListenerPolicyRuleReferenceDeleted by calling from_dict on the json representation - load_balancer_listener_policy_rule_reference_deleted_model_dict = LoadBalancerListenerPolicyRuleReferenceDeleted.from_dict(load_balancer_listener_policy_rule_reference_deleted_model_json).__dict__ - load_balancer_listener_policy_rule_reference_deleted_model2 = LoadBalancerListenerPolicyRuleReferenceDeleted(**load_balancer_listener_policy_rule_reference_deleted_model_dict) + load_balancer_listener_policy_rule_reference_deleted_model_dict = LoadBalancerListenerPolicyRuleReferenceDeleted.from_dict( + load_balancer_listener_policy_rule_reference_deleted_model_json + ).__dict__ + load_balancer_listener_policy_rule_reference_deleted_model2 = LoadBalancerListenerPolicyRuleReferenceDeleted( + **load_balancer_listener_policy_rule_reference_deleted_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_policy_rule_reference_deleted_model == load_balancer_listener_policy_rule_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_rule_reference_deleted_model_json2 = load_balancer_listener_policy_rule_reference_deleted_model.to_dict() + load_balancer_listener_policy_rule_reference_deleted_model_json2 = load_balancer_listener_policy_rule_reference_deleted_model.to_dict( + ) assert load_balancer_listener_policy_rule_reference_deleted_model_json2 == load_balancer_listener_policy_rule_reference_deleted_model_json @@ -60943,53 +68693,79 @@ class TestModel_LoadBalancerListenerPrototypeLoadBalancerContext: Test Class for LoadBalancerListenerPrototypeLoadBalancerContext """ - def test_load_balancer_listener_prototype_load_balancer_context_serialization(self): + def test_load_balancer_listener_prototype_load_balancer_context_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPrototypeLoadBalancerContext """ # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_identity_model = {} # CertificateInstanceIdentityByCRN - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' - - load_balancer_pool_identity_by_name_model = {} # LoadBalancerPoolIdentityByName - load_balancer_pool_identity_by_name_model['name'] = 'my-load-balancer-pool' - - load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_listener_https_redirect_prototype_model = {} # LoadBalancerListenerHTTPSRedirectPrototype - load_balancer_listener_https_redirect_prototype_model['http_status_code'] = 301 - load_balancer_listener_https_redirect_prototype_model['listener'] = load_balancer_listener_identity_model - load_balancer_listener_https_redirect_prototype_model['uri'] = '/example?doc=get' + certificate_instance_identity_model = { + } # CertificateInstanceIdentityByCRN + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + + load_balancer_pool_identity_by_name_model = { + } # LoadBalancerPoolIdentityByName + load_balancer_pool_identity_by_name_model[ + 'name'] = 'my-load-balancer-pool' + + load_balancer_listener_identity_model = { + } # LoadBalancerListenerIdentityById + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_listener_https_redirect_prototype_model = { + } # LoadBalancerListenerHTTPSRedirectPrototype + load_balancer_listener_https_redirect_prototype_model[ + 'http_status_code'] = 301 + load_balancer_listener_https_redirect_prototype_model[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_https_redirect_prototype_model[ + 'uri'] = '/example?doc=get' # Construct a json representation of a LoadBalancerListenerPrototypeLoadBalancerContext model load_balancer_listener_prototype_load_balancer_context_model_json = {} - load_balancer_listener_prototype_load_balancer_context_model_json['accept_proxy_protocol'] = True - load_balancer_listener_prototype_load_balancer_context_model_json['certificate_instance'] = certificate_instance_identity_model - load_balancer_listener_prototype_load_balancer_context_model_json['connection_limit'] = 2000 - load_balancer_listener_prototype_load_balancer_context_model_json['default_pool'] = load_balancer_pool_identity_by_name_model - load_balancer_listener_prototype_load_balancer_context_model_json['https_redirect'] = load_balancer_listener_https_redirect_prototype_model - load_balancer_listener_prototype_load_balancer_context_model_json['idle_connection_timeout'] = 100 - load_balancer_listener_prototype_load_balancer_context_model_json['port'] = 443 - load_balancer_listener_prototype_load_balancer_context_model_json['port_max'] = 499 - load_balancer_listener_prototype_load_balancer_context_model_json['port_min'] = 443 - load_balancer_listener_prototype_load_balancer_context_model_json['protocol'] = 'http' + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'accept_proxy_protocol'] = True + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'certificate_instance'] = certificate_instance_identity_model + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'connection_limit'] = 2000 + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'default_pool'] = load_balancer_pool_identity_by_name_model + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'https_redirect'] = load_balancer_listener_https_redirect_prototype_model + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'idle_connection_timeout'] = 100 + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'port'] = 443 + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'port_max'] = 499 + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'port_min'] = 443 + load_balancer_listener_prototype_load_balancer_context_model_json[ + 'protocol'] = 'http' # Construct a model instance of LoadBalancerListenerPrototypeLoadBalancerContext by calling from_dict on the json representation - load_balancer_listener_prototype_load_balancer_context_model = LoadBalancerListenerPrototypeLoadBalancerContext.from_dict(load_balancer_listener_prototype_load_balancer_context_model_json) + load_balancer_listener_prototype_load_balancer_context_model = LoadBalancerListenerPrototypeLoadBalancerContext.from_dict( + load_balancer_listener_prototype_load_balancer_context_model_json) assert load_balancer_listener_prototype_load_balancer_context_model != False # Construct a model instance of LoadBalancerListenerPrototypeLoadBalancerContext by calling from_dict on the json representation - load_balancer_listener_prototype_load_balancer_context_model_dict = LoadBalancerListenerPrototypeLoadBalancerContext.from_dict(load_balancer_listener_prototype_load_balancer_context_model_json).__dict__ - load_balancer_listener_prototype_load_balancer_context_model2 = LoadBalancerListenerPrototypeLoadBalancerContext(**load_balancer_listener_prototype_load_balancer_context_model_dict) + load_balancer_listener_prototype_load_balancer_context_model_dict = LoadBalancerListenerPrototypeLoadBalancerContext.from_dict( + load_balancer_listener_prototype_load_balancer_context_model_json + ).__dict__ + load_balancer_listener_prototype_load_balancer_context_model2 = LoadBalancerListenerPrototypeLoadBalancerContext( + **load_balancer_listener_prototype_load_balancer_context_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_prototype_load_balancer_context_model == load_balancer_listener_prototype_load_balancer_context_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_prototype_load_balancer_context_model_json2 = load_balancer_listener_prototype_load_balancer_context_model.to_dict() + load_balancer_listener_prototype_load_balancer_context_model_json2 = load_balancer_listener_prototype_load_balancer_context_model.to_dict( + ) assert load_balancer_listener_prototype_load_balancer_context_model_json2 == load_balancer_listener_prototype_load_balancer_context_model_json @@ -61005,28 +68781,37 @@ def test_load_balancer_listener_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted - load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_reference_deleted_model = { + } # LoadBalancerListenerReferenceDeleted + load_balancer_listener_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerListenerReference model load_balancer_listener_reference_model_json = {} - load_balancer_listener_reference_model_json['deleted'] = load_balancer_listener_reference_deleted_model - load_balancer_listener_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_reference_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model_json[ + 'deleted'] = load_balancer_listener_reference_deleted_model + load_balancer_listener_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerReference by calling from_dict on the json representation - load_balancer_listener_reference_model = LoadBalancerListenerReference.from_dict(load_balancer_listener_reference_model_json) + load_balancer_listener_reference_model = LoadBalancerListenerReference.from_dict( + load_balancer_listener_reference_model_json) assert load_balancer_listener_reference_model != False # Construct a model instance of LoadBalancerListenerReference by calling from_dict on the json representation - load_balancer_listener_reference_model_dict = LoadBalancerListenerReference.from_dict(load_balancer_listener_reference_model_json).__dict__ - load_balancer_listener_reference_model2 = LoadBalancerListenerReference(**load_balancer_listener_reference_model_dict) + load_balancer_listener_reference_model_dict = LoadBalancerListenerReference.from_dict( + load_balancer_listener_reference_model_json).__dict__ + load_balancer_listener_reference_model2 = LoadBalancerListenerReference( + **load_balancer_listener_reference_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_reference_model == load_balancer_listener_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_reference_model_json2 = load_balancer_listener_reference_model.to_dict() + load_balancer_listener_reference_model_json2 = load_balancer_listener_reference_model.to_dict( + ) assert load_balancer_listener_reference_model_json2 == load_balancer_listener_reference_model_json @@ -61042,21 +68827,26 @@ def test_load_balancer_listener_reference_deleted_serialization(self): # Construct a json representation of a LoadBalancerListenerReferenceDeleted model load_balancer_listener_reference_deleted_model_json = {} - load_balancer_listener_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of LoadBalancerListenerReferenceDeleted by calling from_dict on the json representation - load_balancer_listener_reference_deleted_model = LoadBalancerListenerReferenceDeleted.from_dict(load_balancer_listener_reference_deleted_model_json) + load_balancer_listener_reference_deleted_model = LoadBalancerListenerReferenceDeleted.from_dict( + load_balancer_listener_reference_deleted_model_json) assert load_balancer_listener_reference_deleted_model != False # Construct a model instance of LoadBalancerListenerReferenceDeleted by calling from_dict on the json representation - load_balancer_listener_reference_deleted_model_dict = LoadBalancerListenerReferenceDeleted.from_dict(load_balancer_listener_reference_deleted_model_json).__dict__ - load_balancer_listener_reference_deleted_model2 = LoadBalancerListenerReferenceDeleted(**load_balancer_listener_reference_deleted_model_dict) + load_balancer_listener_reference_deleted_model_dict = LoadBalancerListenerReferenceDeleted.from_dict( + load_balancer_listener_reference_deleted_model_json).__dict__ + load_balancer_listener_reference_deleted_model2 = LoadBalancerListenerReferenceDeleted( + **load_balancer_listener_reference_deleted_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_reference_deleted_model == load_balancer_listener_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_reference_deleted_model_json2 = load_balancer_listener_reference_deleted_model.to_dict() + load_balancer_listener_reference_deleted_model_json2 = load_balancer_listener_reference_deleted_model.to_dict( + ) assert load_balancer_listener_reference_deleted_model_json2 == load_balancer_listener_reference_deleted_model_json @@ -61077,21 +68867,26 @@ def test_load_balancer_logging_serialization(self): # Construct a json representation of a LoadBalancerLogging model load_balancer_logging_model_json = {} - load_balancer_logging_model_json['datapath'] = load_balancer_logging_datapath_model + load_balancer_logging_model_json[ + 'datapath'] = load_balancer_logging_datapath_model # Construct a model instance of LoadBalancerLogging by calling from_dict on the json representation - load_balancer_logging_model = LoadBalancerLogging.from_dict(load_balancer_logging_model_json) + load_balancer_logging_model = LoadBalancerLogging.from_dict( + load_balancer_logging_model_json) assert load_balancer_logging_model != False # Construct a model instance of LoadBalancerLogging by calling from_dict on the json representation - load_balancer_logging_model_dict = LoadBalancerLogging.from_dict(load_balancer_logging_model_json).__dict__ - load_balancer_logging_model2 = LoadBalancerLogging(**load_balancer_logging_model_dict) + load_balancer_logging_model_dict = LoadBalancerLogging.from_dict( + load_balancer_logging_model_json).__dict__ + load_balancer_logging_model2 = LoadBalancerLogging( + **load_balancer_logging_model_dict) # Verify the model instances are equivalent assert load_balancer_logging_model == load_balancer_logging_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_logging_model_json2 = load_balancer_logging_model.to_dict() + load_balancer_logging_model_json2 = load_balancer_logging_model.to_dict( + ) assert load_balancer_logging_model_json2 == load_balancer_logging_model_json @@ -61110,18 +68905,22 @@ def test_load_balancer_logging_datapath_serialization(self): load_balancer_logging_datapath_model_json['active'] = True # Construct a model instance of LoadBalancerLoggingDatapath by calling from_dict on the json representation - load_balancer_logging_datapath_model = LoadBalancerLoggingDatapath.from_dict(load_balancer_logging_datapath_model_json) + load_balancer_logging_datapath_model = LoadBalancerLoggingDatapath.from_dict( + load_balancer_logging_datapath_model_json) assert load_balancer_logging_datapath_model != False # Construct a model instance of LoadBalancerLoggingDatapath by calling from_dict on the json representation - load_balancer_logging_datapath_model_dict = LoadBalancerLoggingDatapath.from_dict(load_balancer_logging_datapath_model_json).__dict__ - load_balancer_logging_datapath_model2 = LoadBalancerLoggingDatapath(**load_balancer_logging_datapath_model_dict) + load_balancer_logging_datapath_model_dict = LoadBalancerLoggingDatapath.from_dict( + load_balancer_logging_datapath_model_json).__dict__ + load_balancer_logging_datapath_model2 = LoadBalancerLoggingDatapath( + **load_balancer_logging_datapath_model_dict) # Verify the model instances are equivalent assert load_balancer_logging_datapath_model == load_balancer_logging_datapath_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_logging_datapath_model_json2 = load_balancer_logging_datapath_model.to_dict() + load_balancer_logging_datapath_model_json2 = load_balancer_logging_datapath_model.to_dict( + ) assert load_balancer_logging_datapath_model_json2 == load_balancer_logging_datapath_model_json @@ -61140,18 +68939,22 @@ def test_load_balancer_logging_datapath_patch_serialization(self): load_balancer_logging_datapath_patch_model_json['active'] = True # Construct a model instance of LoadBalancerLoggingDatapathPatch by calling from_dict on the json representation - load_balancer_logging_datapath_patch_model = LoadBalancerLoggingDatapathPatch.from_dict(load_balancer_logging_datapath_patch_model_json) + load_balancer_logging_datapath_patch_model = LoadBalancerLoggingDatapathPatch.from_dict( + load_balancer_logging_datapath_patch_model_json) assert load_balancer_logging_datapath_patch_model != False # Construct a model instance of LoadBalancerLoggingDatapathPatch by calling from_dict on the json representation - load_balancer_logging_datapath_patch_model_dict = LoadBalancerLoggingDatapathPatch.from_dict(load_balancer_logging_datapath_patch_model_json).__dict__ - load_balancer_logging_datapath_patch_model2 = LoadBalancerLoggingDatapathPatch(**load_balancer_logging_datapath_patch_model_dict) + load_balancer_logging_datapath_patch_model_dict = LoadBalancerLoggingDatapathPatch.from_dict( + load_balancer_logging_datapath_patch_model_json).__dict__ + load_balancer_logging_datapath_patch_model2 = LoadBalancerLoggingDatapathPatch( + **load_balancer_logging_datapath_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_logging_datapath_patch_model == load_balancer_logging_datapath_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_logging_datapath_patch_model_json2 = load_balancer_logging_datapath_patch_model.to_dict() + load_balancer_logging_datapath_patch_model_json2 = load_balancer_logging_datapath_patch_model.to_dict( + ) assert load_balancer_logging_datapath_patch_model_json2 == load_balancer_logging_datapath_patch_model_json @@ -61170,18 +68973,22 @@ def test_load_balancer_logging_datapath_prototype_serialization(self): load_balancer_logging_datapath_prototype_model_json['active'] = True # Construct a model instance of LoadBalancerLoggingDatapathPrototype by calling from_dict on the json representation - load_balancer_logging_datapath_prototype_model = LoadBalancerLoggingDatapathPrototype.from_dict(load_balancer_logging_datapath_prototype_model_json) + load_balancer_logging_datapath_prototype_model = LoadBalancerLoggingDatapathPrototype.from_dict( + load_balancer_logging_datapath_prototype_model_json) assert load_balancer_logging_datapath_prototype_model != False # Construct a model instance of LoadBalancerLoggingDatapathPrototype by calling from_dict on the json representation - load_balancer_logging_datapath_prototype_model_dict = LoadBalancerLoggingDatapathPrototype.from_dict(load_balancer_logging_datapath_prototype_model_json).__dict__ - load_balancer_logging_datapath_prototype_model2 = LoadBalancerLoggingDatapathPrototype(**load_balancer_logging_datapath_prototype_model_dict) + load_balancer_logging_datapath_prototype_model_dict = LoadBalancerLoggingDatapathPrototype.from_dict( + load_balancer_logging_datapath_prototype_model_json).__dict__ + load_balancer_logging_datapath_prototype_model2 = LoadBalancerLoggingDatapathPrototype( + **load_balancer_logging_datapath_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_logging_datapath_prototype_model == load_balancer_logging_datapath_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_logging_datapath_prototype_model_json2 = load_balancer_logging_datapath_prototype_model.to_dict() + load_balancer_logging_datapath_prototype_model_json2 = load_balancer_logging_datapath_prototype_model.to_dict( + ) assert load_balancer_logging_datapath_prototype_model_json2 == load_balancer_logging_datapath_prototype_model_json @@ -61197,26 +69004,32 @@ def test_load_balancer_logging_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_logging_datapath_patch_model = {} # LoadBalancerLoggingDatapathPatch + load_balancer_logging_datapath_patch_model = { + } # LoadBalancerLoggingDatapathPatch load_balancer_logging_datapath_patch_model['active'] = True # Construct a json representation of a LoadBalancerLoggingPatch model load_balancer_logging_patch_model_json = {} - load_balancer_logging_patch_model_json['datapath'] = load_balancer_logging_datapath_patch_model + load_balancer_logging_patch_model_json[ + 'datapath'] = load_balancer_logging_datapath_patch_model # Construct a model instance of LoadBalancerLoggingPatch by calling from_dict on the json representation - load_balancer_logging_patch_model = LoadBalancerLoggingPatch.from_dict(load_balancer_logging_patch_model_json) + load_balancer_logging_patch_model = LoadBalancerLoggingPatch.from_dict( + load_balancer_logging_patch_model_json) assert load_balancer_logging_patch_model != False # Construct a model instance of LoadBalancerLoggingPatch by calling from_dict on the json representation - load_balancer_logging_patch_model_dict = LoadBalancerLoggingPatch.from_dict(load_balancer_logging_patch_model_json).__dict__ - load_balancer_logging_patch_model2 = LoadBalancerLoggingPatch(**load_balancer_logging_patch_model_dict) + load_balancer_logging_patch_model_dict = LoadBalancerLoggingPatch.from_dict( + load_balancer_logging_patch_model_json).__dict__ + load_balancer_logging_patch_model2 = LoadBalancerLoggingPatch( + **load_balancer_logging_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_logging_patch_model == load_balancer_logging_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_logging_patch_model_json2 = load_balancer_logging_patch_model.to_dict() + load_balancer_logging_patch_model_json2 = load_balancer_logging_patch_model.to_dict( + ) assert load_balancer_logging_patch_model_json2 == load_balancer_logging_patch_model_json @@ -61232,26 +69045,32 @@ def test_load_balancer_logging_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_logging_datapath_prototype_model = {} # LoadBalancerLoggingDatapathPrototype + load_balancer_logging_datapath_prototype_model = { + } # LoadBalancerLoggingDatapathPrototype load_balancer_logging_datapath_prototype_model['active'] = True # Construct a json representation of a LoadBalancerLoggingPrototype model load_balancer_logging_prototype_model_json = {} - load_balancer_logging_prototype_model_json['datapath'] = load_balancer_logging_datapath_prototype_model + load_balancer_logging_prototype_model_json[ + 'datapath'] = load_balancer_logging_datapath_prototype_model # Construct a model instance of LoadBalancerLoggingPrototype by calling from_dict on the json representation - load_balancer_logging_prototype_model = LoadBalancerLoggingPrototype.from_dict(load_balancer_logging_prototype_model_json) + load_balancer_logging_prototype_model = LoadBalancerLoggingPrototype.from_dict( + load_balancer_logging_prototype_model_json) assert load_balancer_logging_prototype_model != False # Construct a model instance of LoadBalancerLoggingPrototype by calling from_dict on the json representation - load_balancer_logging_prototype_model_dict = LoadBalancerLoggingPrototype.from_dict(load_balancer_logging_prototype_model_json).__dict__ - load_balancer_logging_prototype_model2 = LoadBalancerLoggingPrototype(**load_balancer_logging_prototype_model_dict) + load_balancer_logging_prototype_model_dict = LoadBalancerLoggingPrototype.from_dict( + load_balancer_logging_prototype_model_json).__dict__ + load_balancer_logging_prototype_model2 = LoadBalancerLoggingPrototype( + **load_balancer_logging_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_logging_prototype_model == load_balancer_logging_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_logging_prototype_model_json2 = load_balancer_logging_prototype_model.to_dict() + load_balancer_logging_prototype_model_json2 = load_balancer_logging_prototype_model.to_dict( + ) assert load_balancer_logging_prototype_model_json2 == load_balancer_logging_prototype_model_json @@ -61268,7 +69087,8 @@ def test_load_balancer_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. dns_instance_identity_model = {} # DNSInstanceIdentityByCRN - dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' dns_zone_identity_model = {} # DNSZoneIdentityById dns_zone_identity_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' @@ -61277,29 +69097,36 @@ def test_load_balancer_patch_serialization(self): load_balancer_dns_patch_model['instance'] = dns_instance_identity_model load_balancer_dns_patch_model['zone'] = dns_zone_identity_model - load_balancer_logging_datapath_patch_model = {} # LoadBalancerLoggingDatapathPatch + load_balancer_logging_datapath_patch_model = { + } # LoadBalancerLoggingDatapathPatch load_balancer_logging_datapath_patch_model['active'] = True load_balancer_logging_patch_model = {} # LoadBalancerLoggingPatch - load_balancer_logging_patch_model['datapath'] = load_balancer_logging_datapath_patch_model + load_balancer_logging_patch_model[ + 'datapath'] = load_balancer_logging_datapath_patch_model subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a LoadBalancerPatch model load_balancer_patch_model_json = {} load_balancer_patch_model_json['dns'] = load_balancer_dns_patch_model - load_balancer_patch_model_json['logging'] = load_balancer_logging_patch_model + load_balancer_patch_model_json[ + 'logging'] = load_balancer_logging_patch_model load_balancer_patch_model_json['name'] = 'my-load-balancer' load_balancer_patch_model_json['subnets'] = [subnet_identity_model] # Construct a model instance of LoadBalancerPatch by calling from_dict on the json representation - load_balancer_patch_model = LoadBalancerPatch.from_dict(load_balancer_patch_model_json) + load_balancer_patch_model = LoadBalancerPatch.from_dict( + load_balancer_patch_model_json) assert load_balancer_patch_model != False # Construct a model instance of LoadBalancerPatch by calling from_dict on the json representation - load_balancer_patch_model_dict = LoadBalancerPatch.from_dict(load_balancer_patch_model_json).__dict__ - load_balancer_patch_model2 = LoadBalancerPatch(**load_balancer_patch_model_dict) + load_balancer_patch_model_dict = LoadBalancerPatch.from_dict( + load_balancer_patch_model_json).__dict__ + load_balancer_patch_model2 = LoadBalancerPatch( + **load_balancer_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_patch_model == load_balancer_patch_model2 @@ -61321,7 +69148,8 @@ def test_load_balancer_pool_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_health_monitor_model = {} # LoadBalancerPoolHealthMonitor + load_balancer_pool_health_monitor_model = { + } # LoadBalancerPoolHealthMonitor load_balancer_pool_health_monitor_model['delay'] = 5 load_balancer_pool_health_monitor_model['max_retries'] = 2 load_balancer_pool_health_monitor_model['port'] = 22 @@ -61329,50 +69157,74 @@ def test_load_balancer_pool_serialization(self): load_balancer_pool_health_monitor_model['type'] = 'http' load_balancer_pool_health_monitor_model['url_path'] = '/' - instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted - instance_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_reference_deleted_model = { + } # InstanceGroupReferenceDeleted + instance_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_group_reference_model = {} # InstanceGroupReference - instance_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_reference_model['deleted'] = instance_group_reference_deleted_model - instance_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model[ + 'deleted'] = instance_group_reference_deleted_model + instance_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_reference_model['name'] = 'my-instance-group' - load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted - load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference - load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model - load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_pool_session_persistence_model = {} # LoadBalancerPoolSessionPersistence - load_balancer_pool_session_persistence_model['cookie_name'] = 'my-cookie-name' + load_balancer_pool_member_reference_deleted_model = { + } # LoadBalancerPoolMemberReferenceDeleted + load_balancer_pool_member_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_pool_member_reference_model = { + } # LoadBalancerPoolMemberReference + load_balancer_pool_member_reference_model[ + 'deleted'] = load_balancer_pool_member_reference_deleted_model + load_balancer_pool_member_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_pool_session_persistence_model = { + } # LoadBalancerPoolSessionPersistence + load_balancer_pool_session_persistence_model[ + 'cookie_name'] = 'my-cookie-name' load_balancer_pool_session_persistence_model['type'] = 'app_cookie' # Construct a json representation of a LoadBalancerPool model load_balancer_pool_model_json = {} load_balancer_pool_model_json['algorithm'] = 'least_connections' load_balancer_pool_model_json['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_pool_model_json['health_monitor'] = load_balancer_pool_health_monitor_model - load_balancer_pool_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_model_json['instance_group'] = instance_group_reference_model - load_balancer_pool_model_json['members'] = [load_balancer_pool_member_reference_model] + load_balancer_pool_model_json[ + 'health_monitor'] = load_balancer_pool_health_monitor_model + load_balancer_pool_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_model_json[ + 'instance_group'] = instance_group_reference_model + load_balancer_pool_model_json['members'] = [ + load_balancer_pool_member_reference_model + ] load_balancer_pool_model_json['name'] = 'my-load-balancer-pool' load_balancer_pool_model_json['protocol'] = 'http' load_balancer_pool_model_json['provisioning_status'] = 'active' load_balancer_pool_model_json['proxy_protocol'] = 'disabled' - load_balancer_pool_model_json['session_persistence'] = load_balancer_pool_session_persistence_model + load_balancer_pool_model_json[ + 'session_persistence'] = load_balancer_pool_session_persistence_model # Construct a model instance of LoadBalancerPool by calling from_dict on the json representation - load_balancer_pool_model = LoadBalancerPool.from_dict(load_balancer_pool_model_json) + load_balancer_pool_model = LoadBalancerPool.from_dict( + load_balancer_pool_model_json) assert load_balancer_pool_model != False # Construct a model instance of LoadBalancerPool by calling from_dict on the json representation - load_balancer_pool_model_dict = LoadBalancerPool.from_dict(load_balancer_pool_model_json).__dict__ - load_balancer_pool_model2 = LoadBalancerPool(**load_balancer_pool_model_dict) + load_balancer_pool_model_dict = LoadBalancerPool.from_dict( + load_balancer_pool_model_json).__dict__ + load_balancer_pool_model2 = LoadBalancerPool( + **load_balancer_pool_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_model == load_balancer_pool_model2 @@ -61394,7 +69246,8 @@ def test_load_balancer_pool_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_health_monitor_model = {} # LoadBalancerPoolHealthMonitor + load_balancer_pool_health_monitor_model = { + } # LoadBalancerPoolHealthMonitor load_balancer_pool_health_monitor_model['delay'] = 5 load_balancer_pool_health_monitor_model['max_retries'] = 2 load_balancer_pool_health_monitor_model['port'] = 22 @@ -61402,59 +69255,85 @@ def test_load_balancer_pool_collection_serialization(self): load_balancer_pool_health_monitor_model['type'] = 'http' load_balancer_pool_health_monitor_model['url_path'] = '/' - instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted - instance_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_reference_deleted_model = { + } # InstanceGroupReferenceDeleted + instance_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_group_reference_model = {} # InstanceGroupReference - instance_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_reference_model['deleted'] = instance_group_reference_deleted_model - instance_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model[ + 'deleted'] = instance_group_reference_deleted_model + instance_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_reference_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_reference_model['name'] = 'my-instance-group' - load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted - load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference - load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model - load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - - load_balancer_pool_session_persistence_model = {} # LoadBalancerPoolSessionPersistence - load_balancer_pool_session_persistence_model['cookie_name'] = 'my-cookie-name' + load_balancer_pool_member_reference_deleted_model = { + } # LoadBalancerPoolMemberReferenceDeleted + load_balancer_pool_member_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_pool_member_reference_model = { + } # LoadBalancerPoolMemberReference + load_balancer_pool_member_reference_model[ + 'deleted'] = load_balancer_pool_member_reference_deleted_model + load_balancer_pool_member_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + + load_balancer_pool_session_persistence_model = { + } # LoadBalancerPoolSessionPersistence + load_balancer_pool_session_persistence_model[ + 'cookie_name'] = 'my-cookie-name' load_balancer_pool_session_persistence_model['type'] = 'app_cookie' load_balancer_pool_model = {} # LoadBalancerPool load_balancer_pool_model['algorithm'] = 'least_connections' load_balancer_pool_model['created_at'] = '2019-01-01T12:00:00Z' - load_balancer_pool_model['health_monitor'] = load_balancer_pool_health_monitor_model - load_balancer_pool_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_model[ + 'health_monitor'] = load_balancer_pool_health_monitor_model + load_balancer_pool_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_model['instance_group'] = instance_group_reference_model - load_balancer_pool_model['members'] = [load_balancer_pool_member_reference_model] + load_balancer_pool_model[ + 'instance_group'] = instance_group_reference_model + load_balancer_pool_model['members'] = [ + load_balancer_pool_member_reference_model + ] load_balancer_pool_model['name'] = 'my-load-balancer-pool' load_balancer_pool_model['protocol'] = 'http' load_balancer_pool_model['provisioning_status'] = 'active' load_balancer_pool_model['proxy_protocol'] = 'disabled' - load_balancer_pool_model['session_persistence'] = load_balancer_pool_session_persistence_model + load_balancer_pool_model[ + 'session_persistence'] = load_balancer_pool_session_persistence_model # Construct a json representation of a LoadBalancerPoolCollection model load_balancer_pool_collection_model_json = {} - load_balancer_pool_collection_model_json['pools'] = [load_balancer_pool_model] + load_balancer_pool_collection_model_json['pools'] = [ + load_balancer_pool_model + ] # Construct a model instance of LoadBalancerPoolCollection by calling from_dict on the json representation - load_balancer_pool_collection_model = LoadBalancerPoolCollection.from_dict(load_balancer_pool_collection_model_json) + load_balancer_pool_collection_model = LoadBalancerPoolCollection.from_dict( + load_balancer_pool_collection_model_json) assert load_balancer_pool_collection_model != False # Construct a model instance of LoadBalancerPoolCollection by calling from_dict on the json representation - load_balancer_pool_collection_model_dict = LoadBalancerPoolCollection.from_dict(load_balancer_pool_collection_model_json).__dict__ - load_balancer_pool_collection_model2 = LoadBalancerPoolCollection(**load_balancer_pool_collection_model_dict) + load_balancer_pool_collection_model_dict = LoadBalancerPoolCollection.from_dict( + load_balancer_pool_collection_model_json).__dict__ + load_balancer_pool_collection_model2 = LoadBalancerPoolCollection( + **load_balancer_pool_collection_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_collection_model == load_balancer_pool_collection_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_collection_model_json2 = load_balancer_pool_collection_model.to_dict() + load_balancer_pool_collection_model_json2 = load_balancer_pool_collection_model.to_dict( + ) assert load_balancer_pool_collection_model_json2 == load_balancer_pool_collection_model_json @@ -61478,18 +69357,22 @@ def test_load_balancer_pool_health_monitor_serialization(self): load_balancer_pool_health_monitor_model_json['url_path'] = '/' # Construct a model instance of LoadBalancerPoolHealthMonitor by calling from_dict on the json representation - load_balancer_pool_health_monitor_model = LoadBalancerPoolHealthMonitor.from_dict(load_balancer_pool_health_monitor_model_json) + load_balancer_pool_health_monitor_model = LoadBalancerPoolHealthMonitor.from_dict( + load_balancer_pool_health_monitor_model_json) assert load_balancer_pool_health_monitor_model != False # Construct a model instance of LoadBalancerPoolHealthMonitor by calling from_dict on the json representation - load_balancer_pool_health_monitor_model_dict = LoadBalancerPoolHealthMonitor.from_dict(load_balancer_pool_health_monitor_model_json).__dict__ - load_balancer_pool_health_monitor_model2 = LoadBalancerPoolHealthMonitor(**load_balancer_pool_health_monitor_model_dict) + load_balancer_pool_health_monitor_model_dict = LoadBalancerPoolHealthMonitor.from_dict( + load_balancer_pool_health_monitor_model_json).__dict__ + load_balancer_pool_health_monitor_model2 = LoadBalancerPoolHealthMonitor( + **load_balancer_pool_health_monitor_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_health_monitor_model == load_balancer_pool_health_monitor_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_health_monitor_model_json2 = load_balancer_pool_health_monitor_model.to_dict() + load_balancer_pool_health_monitor_model_json2 = load_balancer_pool_health_monitor_model.to_dict( + ) assert load_balancer_pool_health_monitor_model_json2 == load_balancer_pool_health_monitor_model_json @@ -61513,18 +69396,22 @@ def test_load_balancer_pool_health_monitor_patch_serialization(self): load_balancer_pool_health_monitor_patch_model_json['url_path'] = '/' # Construct a model instance of LoadBalancerPoolHealthMonitorPatch by calling from_dict on the json representation - load_balancer_pool_health_monitor_patch_model = LoadBalancerPoolHealthMonitorPatch.from_dict(load_balancer_pool_health_monitor_patch_model_json) + load_balancer_pool_health_monitor_patch_model = LoadBalancerPoolHealthMonitorPatch.from_dict( + load_balancer_pool_health_monitor_patch_model_json) assert load_balancer_pool_health_monitor_patch_model != False # Construct a model instance of LoadBalancerPoolHealthMonitorPatch by calling from_dict on the json representation - load_balancer_pool_health_monitor_patch_model_dict = LoadBalancerPoolHealthMonitorPatch.from_dict(load_balancer_pool_health_monitor_patch_model_json).__dict__ - load_balancer_pool_health_monitor_patch_model2 = LoadBalancerPoolHealthMonitorPatch(**load_balancer_pool_health_monitor_patch_model_dict) + load_balancer_pool_health_monitor_patch_model_dict = LoadBalancerPoolHealthMonitorPatch.from_dict( + load_balancer_pool_health_monitor_patch_model_json).__dict__ + load_balancer_pool_health_monitor_patch_model2 = LoadBalancerPoolHealthMonitorPatch( + **load_balancer_pool_health_monitor_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_health_monitor_patch_model == load_balancer_pool_health_monitor_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_health_monitor_patch_model_json2 = load_balancer_pool_health_monitor_patch_model.to_dict() + load_balancer_pool_health_monitor_patch_model_json2 = load_balancer_pool_health_monitor_patch_model.to_dict( + ) assert load_balancer_pool_health_monitor_patch_model_json2 == load_balancer_pool_health_monitor_patch_model_json @@ -61541,25 +69428,30 @@ def test_load_balancer_pool_health_monitor_prototype_serialization(self): # Construct a json representation of a LoadBalancerPoolHealthMonitorPrototype model load_balancer_pool_health_monitor_prototype_model_json = {} load_balancer_pool_health_monitor_prototype_model_json['delay'] = 5 - load_balancer_pool_health_monitor_prototype_model_json['max_retries'] = 2 + load_balancer_pool_health_monitor_prototype_model_json[ + 'max_retries'] = 2 load_balancer_pool_health_monitor_prototype_model_json['port'] = 22 load_balancer_pool_health_monitor_prototype_model_json['timeout'] = 2 load_balancer_pool_health_monitor_prototype_model_json['type'] = 'http' load_balancer_pool_health_monitor_prototype_model_json['url_path'] = '/' # Construct a model instance of LoadBalancerPoolHealthMonitorPrototype by calling from_dict on the json representation - load_balancer_pool_health_monitor_prototype_model = LoadBalancerPoolHealthMonitorPrototype.from_dict(load_balancer_pool_health_monitor_prototype_model_json) + load_balancer_pool_health_monitor_prototype_model = LoadBalancerPoolHealthMonitorPrototype.from_dict( + load_balancer_pool_health_monitor_prototype_model_json) assert load_balancer_pool_health_monitor_prototype_model != False # Construct a model instance of LoadBalancerPoolHealthMonitorPrototype by calling from_dict on the json representation - load_balancer_pool_health_monitor_prototype_model_dict = LoadBalancerPoolHealthMonitorPrototype.from_dict(load_balancer_pool_health_monitor_prototype_model_json).__dict__ - load_balancer_pool_health_monitor_prototype_model2 = LoadBalancerPoolHealthMonitorPrototype(**load_balancer_pool_health_monitor_prototype_model_dict) + load_balancer_pool_health_monitor_prototype_model_dict = LoadBalancerPoolHealthMonitorPrototype.from_dict( + load_balancer_pool_health_monitor_prototype_model_json).__dict__ + load_balancer_pool_health_monitor_prototype_model2 = LoadBalancerPoolHealthMonitorPrototype( + **load_balancer_pool_health_monitor_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_health_monitor_prototype_model == load_balancer_pool_health_monitor_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_health_monitor_prototype_model_json2 = load_balancer_pool_health_monitor_prototype_model.to_dict() + load_balancer_pool_health_monitor_prototype_model_json2 = load_balancer_pool_health_monitor_prototype_model.to_dict( + ) assert load_balancer_pool_health_monitor_prototype_model_json2 == load_balancer_pool_health_monitor_prototype_model_json @@ -61575,21 +69467,26 @@ def test_load_balancer_pool_identity_by_name_serialization(self): # Construct a json representation of a LoadBalancerPoolIdentityByName model load_balancer_pool_identity_by_name_model_json = {} - load_balancer_pool_identity_by_name_model_json['name'] = 'my-load-balancer-pool' + load_balancer_pool_identity_by_name_model_json[ + 'name'] = 'my-load-balancer-pool' # Construct a model instance of LoadBalancerPoolIdentityByName by calling from_dict on the json representation - load_balancer_pool_identity_by_name_model = LoadBalancerPoolIdentityByName.from_dict(load_balancer_pool_identity_by_name_model_json) + load_balancer_pool_identity_by_name_model = LoadBalancerPoolIdentityByName.from_dict( + load_balancer_pool_identity_by_name_model_json) assert load_balancer_pool_identity_by_name_model != False # Construct a model instance of LoadBalancerPoolIdentityByName by calling from_dict on the json representation - load_balancer_pool_identity_by_name_model_dict = LoadBalancerPoolIdentityByName.from_dict(load_balancer_pool_identity_by_name_model_json).__dict__ - load_balancer_pool_identity_by_name_model2 = LoadBalancerPoolIdentityByName(**load_balancer_pool_identity_by_name_model_dict) + load_balancer_pool_identity_by_name_model_dict = LoadBalancerPoolIdentityByName.from_dict( + load_balancer_pool_identity_by_name_model_json).__dict__ + load_balancer_pool_identity_by_name_model2 = LoadBalancerPoolIdentityByName( + **load_balancer_pool_identity_by_name_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_identity_by_name_model == load_balancer_pool_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_identity_by_name_model_json2 = load_balancer_pool_identity_by_name_model.to_dict() + load_balancer_pool_identity_by_name_model_json2 = load_balancer_pool_identity_by_name_model.to_dict( + ) assert load_balancer_pool_identity_by_name_model_json2 == load_balancer_pool_identity_by_name_model_json @@ -61606,39 +69503,53 @@ def test_load_balancer_pool_member_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_pool_member_target_model = {} # LoadBalancerPoolMemberTargetInstanceReference - load_balancer_pool_member_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - load_balancer_pool_member_target_model['deleted'] = instance_reference_deleted_model - load_balancer_pool_member_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - load_balancer_pool_member_target_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_pool_member_target_model = { + } # LoadBalancerPoolMemberTargetInstanceReference + load_balancer_pool_member_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_model[ + 'deleted'] = instance_reference_deleted_model + load_balancer_pool_member_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + load_balancer_pool_member_target_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' load_balancer_pool_member_target_model['name'] = 'my-instance' # Construct a json representation of a LoadBalancerPoolMember model load_balancer_pool_member_model_json = {} - load_balancer_pool_member_model_json['created_at'] = '2019-01-01T12:00:00Z' + load_balancer_pool_member_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' load_balancer_pool_member_model_json['health'] = 'faulted' - load_balancer_pool_member_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_member_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_member_model_json['port'] = 80 load_balancer_pool_member_model_json['provisioning_status'] = 'active' - load_balancer_pool_member_model_json['target'] = load_balancer_pool_member_target_model + load_balancer_pool_member_model_json[ + 'target'] = load_balancer_pool_member_target_model load_balancer_pool_member_model_json['weight'] = 50 # Construct a model instance of LoadBalancerPoolMember by calling from_dict on the json representation - load_balancer_pool_member_model = LoadBalancerPoolMember.from_dict(load_balancer_pool_member_model_json) + load_balancer_pool_member_model = LoadBalancerPoolMember.from_dict( + load_balancer_pool_member_model_json) assert load_balancer_pool_member_model != False # Construct a model instance of LoadBalancerPoolMember by calling from_dict on the json representation - load_balancer_pool_member_model_dict = LoadBalancerPoolMember.from_dict(load_balancer_pool_member_model_json).__dict__ - load_balancer_pool_member_model2 = LoadBalancerPoolMember(**load_balancer_pool_member_model_dict) + load_balancer_pool_member_model_dict = LoadBalancerPoolMember.from_dict( + load_balancer_pool_member_model_json).__dict__ + load_balancer_pool_member_model2 = LoadBalancerPoolMember( + **load_balancer_pool_member_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_model == load_balancer_pool_member_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_model_json2 = load_balancer_pool_member_model.to_dict() + load_balancer_pool_member_model_json2 = load_balancer_pool_member_model.to_dict( + ) assert load_balancer_pool_member_model_json2 == load_balancer_pool_member_model_json @@ -61655,42 +69566,57 @@ def test_load_balancer_pool_member_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - load_balancer_pool_member_target_model = {} # LoadBalancerPoolMemberTargetInstanceReference - load_balancer_pool_member_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - load_balancer_pool_member_target_model['deleted'] = instance_reference_deleted_model - load_balancer_pool_member_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - load_balancer_pool_member_target_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + load_balancer_pool_member_target_model = { + } # LoadBalancerPoolMemberTargetInstanceReference + load_balancer_pool_member_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_model[ + 'deleted'] = instance_reference_deleted_model + load_balancer_pool_member_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + load_balancer_pool_member_target_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' load_balancer_pool_member_target_model['name'] = 'my-instance' load_balancer_pool_member_model = {} # LoadBalancerPoolMember load_balancer_pool_member_model['created_at'] = '2019-01-01T12:00:00Z' load_balancer_pool_member_model['health'] = 'faulted' - load_balancer_pool_member_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_member_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_member_model['port'] = 80 load_balancer_pool_member_model['provisioning_status'] = 'active' - load_balancer_pool_member_model['target'] = load_balancer_pool_member_target_model + load_balancer_pool_member_model[ + 'target'] = load_balancer_pool_member_target_model load_balancer_pool_member_model['weight'] = 50 # Construct a json representation of a LoadBalancerPoolMemberCollection model load_balancer_pool_member_collection_model_json = {} - load_balancer_pool_member_collection_model_json['members'] = [load_balancer_pool_member_model] + load_balancer_pool_member_collection_model_json['members'] = [ + load_balancer_pool_member_model + ] # Construct a model instance of LoadBalancerPoolMemberCollection by calling from_dict on the json representation - load_balancer_pool_member_collection_model = LoadBalancerPoolMemberCollection.from_dict(load_balancer_pool_member_collection_model_json) + load_balancer_pool_member_collection_model = LoadBalancerPoolMemberCollection.from_dict( + load_balancer_pool_member_collection_model_json) assert load_balancer_pool_member_collection_model != False # Construct a model instance of LoadBalancerPoolMemberCollection by calling from_dict on the json representation - load_balancer_pool_member_collection_model_dict = LoadBalancerPoolMemberCollection.from_dict(load_balancer_pool_member_collection_model_json).__dict__ - load_balancer_pool_member_collection_model2 = LoadBalancerPoolMemberCollection(**load_balancer_pool_member_collection_model_dict) + load_balancer_pool_member_collection_model_dict = LoadBalancerPoolMemberCollection.from_dict( + load_balancer_pool_member_collection_model_json).__dict__ + load_balancer_pool_member_collection_model2 = LoadBalancerPoolMemberCollection( + **load_balancer_pool_member_collection_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_collection_model == load_balancer_pool_member_collection_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_collection_model_json2 = load_balancer_pool_member_collection_model.to_dict() + load_balancer_pool_member_collection_model_json2 = load_balancer_pool_member_collection_model.to_dict( + ) assert load_balancer_pool_member_collection_model_json2 == load_balancer_pool_member_collection_model_json @@ -61706,28 +69632,35 @@ def test_load_balancer_pool_member_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_member_target_prototype_model = {} # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model = { + } # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a json representation of a LoadBalancerPoolMemberPatch model load_balancer_pool_member_patch_model_json = {} load_balancer_pool_member_patch_model_json['port'] = 80 - load_balancer_pool_member_patch_model_json['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_patch_model_json[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_patch_model_json['weight'] = 50 # Construct a model instance of LoadBalancerPoolMemberPatch by calling from_dict on the json representation - load_balancer_pool_member_patch_model = LoadBalancerPoolMemberPatch.from_dict(load_balancer_pool_member_patch_model_json) + load_balancer_pool_member_patch_model = LoadBalancerPoolMemberPatch.from_dict( + load_balancer_pool_member_patch_model_json) assert load_balancer_pool_member_patch_model != False # Construct a model instance of LoadBalancerPoolMemberPatch by calling from_dict on the json representation - load_balancer_pool_member_patch_model_dict = LoadBalancerPoolMemberPatch.from_dict(load_balancer_pool_member_patch_model_json).__dict__ - load_balancer_pool_member_patch_model2 = LoadBalancerPoolMemberPatch(**load_balancer_pool_member_patch_model_dict) + load_balancer_pool_member_patch_model_dict = LoadBalancerPoolMemberPatch.from_dict( + load_balancer_pool_member_patch_model_json).__dict__ + load_balancer_pool_member_patch_model2 = LoadBalancerPoolMemberPatch( + **load_balancer_pool_member_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_patch_model == load_balancer_pool_member_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_patch_model_json2 = load_balancer_pool_member_patch_model.to_dict() + load_balancer_pool_member_patch_model_json2 = load_balancer_pool_member_patch_model.to_dict( + ) assert load_balancer_pool_member_patch_model_json2 == load_balancer_pool_member_patch_model_json @@ -61743,28 +69676,35 @@ def test_load_balancer_pool_member_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_member_target_prototype_model = {} # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model = { + } # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a json representation of a LoadBalancerPoolMemberPrototype model load_balancer_pool_member_prototype_model_json = {} load_balancer_pool_member_prototype_model_json['port'] = 80 - load_balancer_pool_member_prototype_model_json['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model_json[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model_json['weight'] = 50 # Construct a model instance of LoadBalancerPoolMemberPrototype by calling from_dict on the json representation - load_balancer_pool_member_prototype_model = LoadBalancerPoolMemberPrototype.from_dict(load_balancer_pool_member_prototype_model_json) + load_balancer_pool_member_prototype_model = LoadBalancerPoolMemberPrototype.from_dict( + load_balancer_pool_member_prototype_model_json) assert load_balancer_pool_member_prototype_model != False # Construct a model instance of LoadBalancerPoolMemberPrototype by calling from_dict on the json representation - load_balancer_pool_member_prototype_model_dict = LoadBalancerPoolMemberPrototype.from_dict(load_balancer_pool_member_prototype_model_json).__dict__ - load_balancer_pool_member_prototype_model2 = LoadBalancerPoolMemberPrototype(**load_balancer_pool_member_prototype_model_dict) + load_balancer_pool_member_prototype_model_dict = LoadBalancerPoolMemberPrototype.from_dict( + load_balancer_pool_member_prototype_model_json).__dict__ + load_balancer_pool_member_prototype_model2 = LoadBalancerPoolMemberPrototype( + **load_balancer_pool_member_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_prototype_model == load_balancer_pool_member_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_prototype_model_json2 = load_balancer_pool_member_prototype_model.to_dict() + load_balancer_pool_member_prototype_model_json2 = load_balancer_pool_member_prototype_model.to_dict( + ) assert load_balancer_pool_member_prototype_model_json2 == load_balancer_pool_member_prototype_model_json @@ -61780,28 +69720,37 @@ def test_load_balancer_pool_member_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted - load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_member_reference_deleted_model = { + } # LoadBalancerPoolMemberReferenceDeleted + load_balancer_pool_member_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerPoolMemberReference model load_balancer_pool_member_reference_model_json = {} - load_balancer_pool_member_reference_model_json['deleted'] = load_balancer_pool_member_reference_deleted_model - load_balancer_pool_member_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_member_reference_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model_json[ + 'deleted'] = load_balancer_pool_member_reference_deleted_model + load_balancer_pool_member_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_member_reference_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerPoolMemberReference by calling from_dict on the json representation - load_balancer_pool_member_reference_model = LoadBalancerPoolMemberReference.from_dict(load_balancer_pool_member_reference_model_json) + load_balancer_pool_member_reference_model = LoadBalancerPoolMemberReference.from_dict( + load_balancer_pool_member_reference_model_json) assert load_balancer_pool_member_reference_model != False # Construct a model instance of LoadBalancerPoolMemberReference by calling from_dict on the json representation - load_balancer_pool_member_reference_model_dict = LoadBalancerPoolMemberReference.from_dict(load_balancer_pool_member_reference_model_json).__dict__ - load_balancer_pool_member_reference_model2 = LoadBalancerPoolMemberReference(**load_balancer_pool_member_reference_model_dict) + load_balancer_pool_member_reference_model_dict = LoadBalancerPoolMemberReference.from_dict( + load_balancer_pool_member_reference_model_json).__dict__ + load_balancer_pool_member_reference_model2 = LoadBalancerPoolMemberReference( + **load_balancer_pool_member_reference_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_reference_model == load_balancer_pool_member_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_reference_model_json2 = load_balancer_pool_member_reference_model.to_dict() + load_balancer_pool_member_reference_model_json2 = load_balancer_pool_member_reference_model.to_dict( + ) assert load_balancer_pool_member_reference_model_json2 == load_balancer_pool_member_reference_model_json @@ -61817,21 +69766,26 @@ def test_load_balancer_pool_member_reference_deleted_serialization(self): # Construct a json representation of a LoadBalancerPoolMemberReferenceDeleted model load_balancer_pool_member_reference_deleted_model_json = {} - load_balancer_pool_member_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_member_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of LoadBalancerPoolMemberReferenceDeleted by calling from_dict on the json representation - load_balancer_pool_member_reference_deleted_model = LoadBalancerPoolMemberReferenceDeleted.from_dict(load_balancer_pool_member_reference_deleted_model_json) + load_balancer_pool_member_reference_deleted_model = LoadBalancerPoolMemberReferenceDeleted.from_dict( + load_balancer_pool_member_reference_deleted_model_json) assert load_balancer_pool_member_reference_deleted_model != False # Construct a model instance of LoadBalancerPoolMemberReferenceDeleted by calling from_dict on the json representation - load_balancer_pool_member_reference_deleted_model_dict = LoadBalancerPoolMemberReferenceDeleted.from_dict(load_balancer_pool_member_reference_deleted_model_json).__dict__ - load_balancer_pool_member_reference_deleted_model2 = LoadBalancerPoolMemberReferenceDeleted(**load_balancer_pool_member_reference_deleted_model_dict) + load_balancer_pool_member_reference_deleted_model_dict = LoadBalancerPoolMemberReferenceDeleted.from_dict( + load_balancer_pool_member_reference_deleted_model_json).__dict__ + load_balancer_pool_member_reference_deleted_model2 = LoadBalancerPoolMemberReferenceDeleted( + **load_balancer_pool_member_reference_deleted_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_reference_deleted_model == load_balancer_pool_member_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_reference_deleted_model_json2 = load_balancer_pool_member_reference_deleted_model.to_dict() + load_balancer_pool_member_reference_deleted_model_json2 = load_balancer_pool_member_reference_deleted_model.to_dict( + ) assert load_balancer_pool_member_reference_deleted_model_json2 == load_balancer_pool_member_reference_deleted_model_json @@ -61847,7 +69801,8 @@ def test_load_balancer_pool_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_health_monitor_patch_model = {} # LoadBalancerPoolHealthMonitorPatch + load_balancer_pool_health_monitor_patch_model = { + } # LoadBalancerPoolHealthMonitorPatch load_balancer_pool_health_monitor_patch_model['delay'] = 5 load_balancer_pool_health_monitor_patch_model['max_retries'] = 2 load_balancer_pool_health_monitor_patch_model['port'] = 22 @@ -61855,32 +69810,41 @@ def test_load_balancer_pool_patch_serialization(self): load_balancer_pool_health_monitor_patch_model['type'] = 'http' load_balancer_pool_health_monitor_patch_model['url_path'] = '/' - load_balancer_pool_session_persistence_patch_model = {} # LoadBalancerPoolSessionPersistencePatch - load_balancer_pool_session_persistence_patch_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_patch_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_patch_model = { + } # LoadBalancerPoolSessionPersistencePatch + load_balancer_pool_session_persistence_patch_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_patch_model[ + 'type'] = 'app_cookie' # Construct a json representation of a LoadBalancerPoolPatch model load_balancer_pool_patch_model_json = {} load_balancer_pool_patch_model_json['algorithm'] = 'least_connections' - load_balancer_pool_patch_model_json['health_monitor'] = load_balancer_pool_health_monitor_patch_model + load_balancer_pool_patch_model_json[ + 'health_monitor'] = load_balancer_pool_health_monitor_patch_model load_balancer_pool_patch_model_json['name'] = 'my-load-balancer-pool' load_balancer_pool_patch_model_json['protocol'] = 'http' load_balancer_pool_patch_model_json['proxy_protocol'] = 'disabled' - load_balancer_pool_patch_model_json['session_persistence'] = load_balancer_pool_session_persistence_patch_model + load_balancer_pool_patch_model_json[ + 'session_persistence'] = load_balancer_pool_session_persistence_patch_model # Construct a model instance of LoadBalancerPoolPatch by calling from_dict on the json representation - load_balancer_pool_patch_model = LoadBalancerPoolPatch.from_dict(load_balancer_pool_patch_model_json) + load_balancer_pool_patch_model = LoadBalancerPoolPatch.from_dict( + load_balancer_pool_patch_model_json) assert load_balancer_pool_patch_model != False # Construct a model instance of LoadBalancerPoolPatch by calling from_dict on the json representation - load_balancer_pool_patch_model_dict = LoadBalancerPoolPatch.from_dict(load_balancer_pool_patch_model_json).__dict__ - load_balancer_pool_patch_model2 = LoadBalancerPoolPatch(**load_balancer_pool_patch_model_dict) + load_balancer_pool_patch_model_dict = LoadBalancerPoolPatch.from_dict( + load_balancer_pool_patch_model_json).__dict__ + load_balancer_pool_patch_model2 = LoadBalancerPoolPatch( + **load_balancer_pool_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_patch_model == load_balancer_pool_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_patch_model_json2 = load_balancer_pool_patch_model.to_dict() + load_balancer_pool_patch_model_json2 = load_balancer_pool_patch_model.to_dict( + ) assert load_balancer_pool_patch_model_json2 == load_balancer_pool_patch_model_json @@ -61896,7 +69860,8 @@ def test_load_balancer_pool_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_health_monitor_prototype_model = {} # LoadBalancerPoolHealthMonitorPrototype + load_balancer_pool_health_monitor_prototype_model = { + } # LoadBalancerPoolHealthMonitorPrototype load_balancer_pool_health_monitor_prototype_model['delay'] = 5 load_balancer_pool_health_monitor_prototype_model['max_retries'] = 2 load_balancer_pool_health_monitor_prototype_model['port'] = 22 @@ -61904,41 +69869,58 @@ def test_load_balancer_pool_prototype_serialization(self): load_balancer_pool_health_monitor_prototype_model['type'] = 'http' load_balancer_pool_health_monitor_prototype_model['url_path'] = '/' - load_balancer_pool_member_target_prototype_model = {} # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById - load_balancer_pool_member_target_prototype_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_model = { + } # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById + load_balancer_pool_member_target_prototype_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - load_balancer_pool_member_prototype_model = {} # LoadBalancerPoolMemberPrototype + load_balancer_pool_member_prototype_model = { + } # LoadBalancerPoolMemberPrototype load_balancer_pool_member_prototype_model['port'] = 80 - load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model + load_balancer_pool_member_prototype_model[ + 'target'] = load_balancer_pool_member_target_prototype_model load_balancer_pool_member_prototype_model['weight'] = 50 - load_balancer_pool_session_persistence_prototype_model = {} # LoadBalancerPoolSessionPersistencePrototype - load_balancer_pool_session_persistence_prototype_model['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_prototype_model['type'] = 'app_cookie' + load_balancer_pool_session_persistence_prototype_model = { + } # LoadBalancerPoolSessionPersistencePrototype + load_balancer_pool_session_persistence_prototype_model[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_prototype_model[ + 'type'] = 'app_cookie' # Construct a json representation of a LoadBalancerPoolPrototype model load_balancer_pool_prototype_model_json = {} - load_balancer_pool_prototype_model_json['algorithm'] = 'least_connections' - load_balancer_pool_prototype_model_json['health_monitor'] = load_balancer_pool_health_monitor_prototype_model - load_balancer_pool_prototype_model_json['members'] = [load_balancer_pool_member_prototype_model] - load_balancer_pool_prototype_model_json['name'] = 'my-load-balancer-pool' + load_balancer_pool_prototype_model_json[ + 'algorithm'] = 'least_connections' + load_balancer_pool_prototype_model_json[ + 'health_monitor'] = load_balancer_pool_health_monitor_prototype_model + load_balancer_pool_prototype_model_json['members'] = [ + load_balancer_pool_member_prototype_model + ] + load_balancer_pool_prototype_model_json[ + 'name'] = 'my-load-balancer-pool' load_balancer_pool_prototype_model_json['protocol'] = 'http' load_balancer_pool_prototype_model_json['proxy_protocol'] = 'disabled' - load_balancer_pool_prototype_model_json['session_persistence'] = load_balancer_pool_session_persistence_prototype_model + load_balancer_pool_prototype_model_json[ + 'session_persistence'] = load_balancer_pool_session_persistence_prototype_model # Construct a model instance of LoadBalancerPoolPrototype by calling from_dict on the json representation - load_balancer_pool_prototype_model = LoadBalancerPoolPrototype.from_dict(load_balancer_pool_prototype_model_json) + load_balancer_pool_prototype_model = LoadBalancerPoolPrototype.from_dict( + load_balancer_pool_prototype_model_json) assert load_balancer_pool_prototype_model != False # Construct a model instance of LoadBalancerPoolPrototype by calling from_dict on the json representation - load_balancer_pool_prototype_model_dict = LoadBalancerPoolPrototype.from_dict(load_balancer_pool_prototype_model_json).__dict__ - load_balancer_pool_prototype_model2 = LoadBalancerPoolPrototype(**load_balancer_pool_prototype_model_dict) + load_balancer_pool_prototype_model_dict = LoadBalancerPoolPrototype.from_dict( + load_balancer_pool_prototype_model_json).__dict__ + load_balancer_pool_prototype_model2 = LoadBalancerPoolPrototype( + **load_balancer_pool_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_prototype_model == load_balancer_pool_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_prototype_model_json2 = load_balancer_pool_prototype_model.to_dict() + load_balancer_pool_prototype_model_json2 = load_balancer_pool_prototype_model.to_dict( + ) assert load_balancer_pool_prototype_model_json2 == load_balancer_pool_prototype_model_json @@ -61954,29 +69936,39 @@ def test_load_balancer_pool_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerPoolReference model load_balancer_pool_reference_model_json = {} - load_balancer_pool_reference_model_json['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_pool_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_pool_reference_model_json['name'] = 'my-load-balancer-pool' + load_balancer_pool_reference_model_json[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_pool_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model_json[ + 'name'] = 'my-load-balancer-pool' # Construct a model instance of LoadBalancerPoolReference by calling from_dict on the json representation - load_balancer_pool_reference_model = LoadBalancerPoolReference.from_dict(load_balancer_pool_reference_model_json) + load_balancer_pool_reference_model = LoadBalancerPoolReference.from_dict( + load_balancer_pool_reference_model_json) assert load_balancer_pool_reference_model != False # Construct a model instance of LoadBalancerPoolReference by calling from_dict on the json representation - load_balancer_pool_reference_model_dict = LoadBalancerPoolReference.from_dict(load_balancer_pool_reference_model_json).__dict__ - load_balancer_pool_reference_model2 = LoadBalancerPoolReference(**load_balancer_pool_reference_model_dict) + load_balancer_pool_reference_model_dict = LoadBalancerPoolReference.from_dict( + load_balancer_pool_reference_model_json).__dict__ + load_balancer_pool_reference_model2 = LoadBalancerPoolReference( + **load_balancer_pool_reference_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_reference_model == load_balancer_pool_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_reference_model_json2 = load_balancer_pool_reference_model.to_dict() + load_balancer_pool_reference_model_json2 = load_balancer_pool_reference_model.to_dict( + ) assert load_balancer_pool_reference_model_json2 == load_balancer_pool_reference_model_json @@ -61992,21 +69984,26 @@ def test_load_balancer_pool_reference_deleted_serialization(self): # Construct a json representation of a LoadBalancerPoolReferenceDeleted model load_balancer_pool_reference_deleted_model_json = {} - load_balancer_pool_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of LoadBalancerPoolReferenceDeleted by calling from_dict on the json representation - load_balancer_pool_reference_deleted_model = LoadBalancerPoolReferenceDeleted.from_dict(load_balancer_pool_reference_deleted_model_json) + load_balancer_pool_reference_deleted_model = LoadBalancerPoolReferenceDeleted.from_dict( + load_balancer_pool_reference_deleted_model_json) assert load_balancer_pool_reference_deleted_model != False # Construct a model instance of LoadBalancerPoolReferenceDeleted by calling from_dict on the json representation - load_balancer_pool_reference_deleted_model_dict = LoadBalancerPoolReferenceDeleted.from_dict(load_balancer_pool_reference_deleted_model_json).__dict__ - load_balancer_pool_reference_deleted_model2 = LoadBalancerPoolReferenceDeleted(**load_balancer_pool_reference_deleted_model_dict) + load_balancer_pool_reference_deleted_model_dict = LoadBalancerPoolReferenceDeleted.from_dict( + load_balancer_pool_reference_deleted_model_json).__dict__ + load_balancer_pool_reference_deleted_model2 = LoadBalancerPoolReferenceDeleted( + **load_balancer_pool_reference_deleted_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_reference_deleted_model == load_balancer_pool_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_reference_deleted_model_json2 = load_balancer_pool_reference_deleted_model.to_dict() + load_balancer_pool_reference_deleted_model_json2 = load_balancer_pool_reference_deleted_model.to_dict( + ) assert load_balancer_pool_reference_deleted_model_json2 == load_balancer_pool_reference_deleted_model_json @@ -62022,22 +70019,27 @@ def test_load_balancer_pool_session_persistence_serialization(self): # Construct a json representation of a LoadBalancerPoolSessionPersistence model load_balancer_pool_session_persistence_model_json = {} - load_balancer_pool_session_persistence_model_json['cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_model_json[ + 'cookie_name'] = 'my-cookie-name' load_balancer_pool_session_persistence_model_json['type'] = 'app_cookie' # Construct a model instance of LoadBalancerPoolSessionPersistence by calling from_dict on the json representation - load_balancer_pool_session_persistence_model = LoadBalancerPoolSessionPersistence.from_dict(load_balancer_pool_session_persistence_model_json) + load_balancer_pool_session_persistence_model = LoadBalancerPoolSessionPersistence.from_dict( + load_balancer_pool_session_persistence_model_json) assert load_balancer_pool_session_persistence_model != False # Construct a model instance of LoadBalancerPoolSessionPersistence by calling from_dict on the json representation - load_balancer_pool_session_persistence_model_dict = LoadBalancerPoolSessionPersistence.from_dict(load_balancer_pool_session_persistence_model_json).__dict__ - load_balancer_pool_session_persistence_model2 = LoadBalancerPoolSessionPersistence(**load_balancer_pool_session_persistence_model_dict) + load_balancer_pool_session_persistence_model_dict = LoadBalancerPoolSessionPersistence.from_dict( + load_balancer_pool_session_persistence_model_json).__dict__ + load_balancer_pool_session_persistence_model2 = LoadBalancerPoolSessionPersistence( + **load_balancer_pool_session_persistence_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_session_persistence_model == load_balancer_pool_session_persistence_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_session_persistence_model_json2 = load_balancer_pool_session_persistence_model.to_dict() + load_balancer_pool_session_persistence_model_json2 = load_balancer_pool_session_persistence_model.to_dict( + ) assert load_balancer_pool_session_persistence_model_json2 == load_balancer_pool_session_persistence_model_json @@ -62053,22 +70055,28 @@ def test_load_balancer_pool_session_persistence_patch_serialization(self): # Construct a json representation of a LoadBalancerPoolSessionPersistencePatch model load_balancer_pool_session_persistence_patch_model_json = {} - load_balancer_pool_session_persistence_patch_model_json['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_patch_model_json['type'] = 'app_cookie' + load_balancer_pool_session_persistence_patch_model_json[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_patch_model_json[ + 'type'] = 'app_cookie' # Construct a model instance of LoadBalancerPoolSessionPersistencePatch by calling from_dict on the json representation - load_balancer_pool_session_persistence_patch_model = LoadBalancerPoolSessionPersistencePatch.from_dict(load_balancer_pool_session_persistence_patch_model_json) + load_balancer_pool_session_persistence_patch_model = LoadBalancerPoolSessionPersistencePatch.from_dict( + load_balancer_pool_session_persistence_patch_model_json) assert load_balancer_pool_session_persistence_patch_model != False # Construct a model instance of LoadBalancerPoolSessionPersistencePatch by calling from_dict on the json representation - load_balancer_pool_session_persistence_patch_model_dict = LoadBalancerPoolSessionPersistencePatch.from_dict(load_balancer_pool_session_persistence_patch_model_json).__dict__ - load_balancer_pool_session_persistence_patch_model2 = LoadBalancerPoolSessionPersistencePatch(**load_balancer_pool_session_persistence_patch_model_dict) + load_balancer_pool_session_persistence_patch_model_dict = LoadBalancerPoolSessionPersistencePatch.from_dict( + load_balancer_pool_session_persistence_patch_model_json).__dict__ + load_balancer_pool_session_persistence_patch_model2 = LoadBalancerPoolSessionPersistencePatch( + **load_balancer_pool_session_persistence_patch_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_session_persistence_patch_model == load_balancer_pool_session_persistence_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_session_persistence_patch_model_json2 = load_balancer_pool_session_persistence_patch_model.to_dict() + load_balancer_pool_session_persistence_patch_model_json2 = load_balancer_pool_session_persistence_patch_model.to_dict( + ) assert load_balancer_pool_session_persistence_patch_model_json2 == load_balancer_pool_session_persistence_patch_model_json @@ -62077,29 +70085,37 @@ class TestModel_LoadBalancerPoolSessionPersistencePrototype: Test Class for LoadBalancerPoolSessionPersistencePrototype """ - def test_load_balancer_pool_session_persistence_prototype_serialization(self): + def test_load_balancer_pool_session_persistence_prototype_serialization( + self): """ Test serialization/deserialization for LoadBalancerPoolSessionPersistencePrototype """ # Construct a json representation of a LoadBalancerPoolSessionPersistencePrototype model load_balancer_pool_session_persistence_prototype_model_json = {} - load_balancer_pool_session_persistence_prototype_model_json['cookie_name'] = 'my-cookie-name' - load_balancer_pool_session_persistence_prototype_model_json['type'] = 'app_cookie' + load_balancer_pool_session_persistence_prototype_model_json[ + 'cookie_name'] = 'my-cookie-name' + load_balancer_pool_session_persistence_prototype_model_json[ + 'type'] = 'app_cookie' # Construct a model instance of LoadBalancerPoolSessionPersistencePrototype by calling from_dict on the json representation - load_balancer_pool_session_persistence_prototype_model = LoadBalancerPoolSessionPersistencePrototype.from_dict(load_balancer_pool_session_persistence_prototype_model_json) + load_balancer_pool_session_persistence_prototype_model = LoadBalancerPoolSessionPersistencePrototype.from_dict( + load_balancer_pool_session_persistence_prototype_model_json) assert load_balancer_pool_session_persistence_prototype_model != False # Construct a model instance of LoadBalancerPoolSessionPersistencePrototype by calling from_dict on the json representation - load_balancer_pool_session_persistence_prototype_model_dict = LoadBalancerPoolSessionPersistencePrototype.from_dict(load_balancer_pool_session_persistence_prototype_model_json).__dict__ - load_balancer_pool_session_persistence_prototype_model2 = LoadBalancerPoolSessionPersistencePrototype(**load_balancer_pool_session_persistence_prototype_model_dict) + load_balancer_pool_session_persistence_prototype_model_dict = LoadBalancerPoolSessionPersistencePrototype.from_dict( + load_balancer_pool_session_persistence_prototype_model_json + ).__dict__ + load_balancer_pool_session_persistence_prototype_model2 = LoadBalancerPoolSessionPersistencePrototype( + **load_balancer_pool_session_persistence_prototype_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_session_persistence_prototype_model == load_balancer_pool_session_persistence_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_session_persistence_prototype_model_json2 = load_balancer_pool_session_persistence_prototype_model.to_dict() + load_balancer_pool_session_persistence_prototype_model_json2 = load_balancer_pool_session_persistence_prototype_model.to_dict( + ) assert load_balancer_pool_session_persistence_prototype_model_json2 == load_balancer_pool_session_persistence_prototype_model_json @@ -62116,30 +70132,39 @@ def test_load_balancer_private_ips_item_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerPrivateIpsItem model load_balancer_private_ips_item_model_json = {} load_balancer_private_ips_item_model_json['address'] = '192.168.3.4' - load_balancer_private_ips_item_model_json['deleted'] = reserved_ip_reference_deleted_model - load_balancer_private_ips_item_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - load_balancer_private_ips_item_model_json['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + load_balancer_private_ips_item_model_json[ + 'deleted'] = reserved_ip_reference_deleted_model + load_balancer_private_ips_item_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + load_balancer_private_ips_item_model_json[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' load_balancer_private_ips_item_model_json['name'] = 'my-reserved-ip' - load_balancer_private_ips_item_model_json['resource_type'] = 'subnet_reserved_ip' + load_balancer_private_ips_item_model_json[ + 'resource_type'] = 'subnet_reserved_ip' # Construct a model instance of LoadBalancerPrivateIpsItem by calling from_dict on the json representation - load_balancer_private_ips_item_model = LoadBalancerPrivateIpsItem.from_dict(load_balancer_private_ips_item_model_json) + load_balancer_private_ips_item_model = LoadBalancerPrivateIpsItem.from_dict( + load_balancer_private_ips_item_model_json) assert load_balancer_private_ips_item_model != False # Construct a model instance of LoadBalancerPrivateIpsItem by calling from_dict on the json representation - load_balancer_private_ips_item_model_dict = LoadBalancerPrivateIpsItem.from_dict(load_balancer_private_ips_item_model_json).__dict__ - load_balancer_private_ips_item_model2 = LoadBalancerPrivateIpsItem(**load_balancer_private_ips_item_model_dict) + load_balancer_private_ips_item_model_dict = LoadBalancerPrivateIpsItem.from_dict( + load_balancer_private_ips_item_model_json).__dict__ + load_balancer_private_ips_item_model2 = LoadBalancerPrivateIpsItem( + **load_balancer_private_ips_item_model_dict) # Verify the model instances are equivalent assert load_balancer_private_ips_item_model == load_balancer_private_ips_item_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_private_ips_item_model_json2 = load_balancer_private_ips_item_model.to_dict() + load_balancer_private_ips_item_model_json2 = load_balancer_private_ips_item_model.to_dict( + ) assert load_balancer_private_ips_item_model_json2 == load_balancer_private_ips_item_model_json @@ -62155,50 +70180,65 @@ def test_load_balancer_profile_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_profile_instance_groups_supported_model = {} # LoadBalancerProfileInstanceGroupsSupportedFixed + load_balancer_profile_instance_groups_supported_model = { + } # LoadBalancerProfileInstanceGroupsSupportedFixed load_balancer_profile_instance_groups_supported_model['type'] = 'fixed' load_balancer_profile_instance_groups_supported_model['value'] = True - load_balancer_profile_logging_supported_model = {} # LoadBalancerProfileLoggingSupported + load_balancer_profile_logging_supported_model = { + } # LoadBalancerProfileLoggingSupported load_balancer_profile_logging_supported_model['type'] = 'fixed' load_balancer_profile_logging_supported_model['value'] = ['datapath'] - load_balancer_profile_route_mode_supported_model = {} # LoadBalancerProfileRouteModeSupportedFixed + load_balancer_profile_route_mode_supported_model = { + } # LoadBalancerProfileRouteModeSupportedFixed load_balancer_profile_route_mode_supported_model['type'] = 'fixed' load_balancer_profile_route_mode_supported_model['value'] = True - load_balancer_profile_security_groups_supported_model = {} # LoadBalancerProfileSecurityGroupsSupportedFixed + load_balancer_profile_security_groups_supported_model = { + } # LoadBalancerProfileSecurityGroupsSupportedFixed load_balancer_profile_security_groups_supported_model['type'] = 'fixed' load_balancer_profile_security_groups_supported_model['value'] = True - load_balancer_profile_udp_supported_model = {} # LoadBalancerProfileUDPSupportedFixed + load_balancer_profile_udp_supported_model = { + } # LoadBalancerProfileUDPSupportedFixed load_balancer_profile_udp_supported_model['type'] = 'fixed' load_balancer_profile_udp_supported_model['value'] = True # Construct a json representation of a LoadBalancerProfile model load_balancer_profile_model_json = {} load_balancer_profile_model_json['family'] = 'network' - load_balancer_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' - load_balancer_profile_model_json['instance_groups_supported'] = load_balancer_profile_instance_groups_supported_model - load_balancer_profile_model_json['logging_supported'] = load_balancer_profile_logging_supported_model + load_balancer_profile_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' + load_balancer_profile_model_json[ + 'instance_groups_supported'] = load_balancer_profile_instance_groups_supported_model + load_balancer_profile_model_json[ + 'logging_supported'] = load_balancer_profile_logging_supported_model load_balancer_profile_model_json['name'] = 'network-fixed' - load_balancer_profile_model_json['route_mode_supported'] = load_balancer_profile_route_mode_supported_model - load_balancer_profile_model_json['security_groups_supported'] = load_balancer_profile_security_groups_supported_model - load_balancer_profile_model_json['udp_supported'] = load_balancer_profile_udp_supported_model + load_balancer_profile_model_json[ + 'route_mode_supported'] = load_balancer_profile_route_mode_supported_model + load_balancer_profile_model_json[ + 'security_groups_supported'] = load_balancer_profile_security_groups_supported_model + load_balancer_profile_model_json[ + 'udp_supported'] = load_balancer_profile_udp_supported_model # Construct a model instance of LoadBalancerProfile by calling from_dict on the json representation - load_balancer_profile_model = LoadBalancerProfile.from_dict(load_balancer_profile_model_json) + load_balancer_profile_model = LoadBalancerProfile.from_dict( + load_balancer_profile_model_json) assert load_balancer_profile_model != False # Construct a model instance of LoadBalancerProfile by calling from_dict on the json representation - load_balancer_profile_model_dict = LoadBalancerProfile.from_dict(load_balancer_profile_model_json).__dict__ - load_balancer_profile_model2 = LoadBalancerProfile(**load_balancer_profile_model_dict) + load_balancer_profile_model_dict = LoadBalancerProfile.from_dict( + load_balancer_profile_model_json).__dict__ + load_balancer_profile_model2 = LoadBalancerProfile( + **load_balancer_profile_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_model == load_balancer_profile_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_model_json2 = load_balancer_profile_model.to_dict() + load_balancer_profile_model_json2 = load_balancer_profile_model.to_dict( + ) assert load_balancer_profile_model_json2 == load_balancer_profile_model_json @@ -62214,63 +70254,86 @@ def test_load_balancer_profile_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_profile_collection_first_model = {} # LoadBalancerProfileCollectionFirst - load_balancer_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20' + load_balancer_profile_collection_first_model = { + } # LoadBalancerProfileCollectionFirst + load_balancer_profile_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20' - load_balancer_profile_collection_next_model = {} # LoadBalancerProfileCollectionNext - load_balancer_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + load_balancer_profile_collection_next_model = { + } # LoadBalancerProfileCollectionNext + load_balancer_profile_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - load_balancer_profile_instance_groups_supported_model = {} # LoadBalancerProfileInstanceGroupsSupportedFixed + load_balancer_profile_instance_groups_supported_model = { + } # LoadBalancerProfileInstanceGroupsSupportedFixed load_balancer_profile_instance_groups_supported_model['type'] = 'fixed' load_balancer_profile_instance_groups_supported_model['value'] = True - load_balancer_profile_logging_supported_model = {} # LoadBalancerProfileLoggingSupported + load_balancer_profile_logging_supported_model = { + } # LoadBalancerProfileLoggingSupported load_balancer_profile_logging_supported_model['type'] = 'fixed' load_balancer_profile_logging_supported_model['value'] = ['datapath'] - load_balancer_profile_route_mode_supported_model = {} # LoadBalancerProfileRouteModeSupportedFixed + load_balancer_profile_route_mode_supported_model = { + } # LoadBalancerProfileRouteModeSupportedFixed load_balancer_profile_route_mode_supported_model['type'] = 'fixed' load_balancer_profile_route_mode_supported_model['value'] = True - load_balancer_profile_security_groups_supported_model = {} # LoadBalancerProfileSecurityGroupsSupportedFixed + load_balancer_profile_security_groups_supported_model = { + } # LoadBalancerProfileSecurityGroupsSupportedFixed load_balancer_profile_security_groups_supported_model['type'] = 'fixed' load_balancer_profile_security_groups_supported_model['value'] = True - load_balancer_profile_udp_supported_model = {} # LoadBalancerProfileUDPSupportedFixed + load_balancer_profile_udp_supported_model = { + } # LoadBalancerProfileUDPSupportedFixed load_balancer_profile_udp_supported_model['type'] = 'fixed' load_balancer_profile_udp_supported_model['value'] = True load_balancer_profile_model = {} # LoadBalancerProfile load_balancer_profile_model['family'] = 'network' - load_balancer_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' - load_balancer_profile_model['instance_groups_supported'] = load_balancer_profile_instance_groups_supported_model - load_balancer_profile_model['logging_supported'] = load_balancer_profile_logging_supported_model + load_balancer_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' + load_balancer_profile_model[ + 'instance_groups_supported'] = load_balancer_profile_instance_groups_supported_model + load_balancer_profile_model[ + 'logging_supported'] = load_balancer_profile_logging_supported_model load_balancer_profile_model['name'] = 'network-fixed' - load_balancer_profile_model['route_mode_supported'] = load_balancer_profile_route_mode_supported_model - load_balancer_profile_model['security_groups_supported'] = load_balancer_profile_security_groups_supported_model - load_balancer_profile_model['udp_supported'] = load_balancer_profile_udp_supported_model + load_balancer_profile_model[ + 'route_mode_supported'] = load_balancer_profile_route_mode_supported_model + load_balancer_profile_model[ + 'security_groups_supported'] = load_balancer_profile_security_groups_supported_model + load_balancer_profile_model[ + 'udp_supported'] = load_balancer_profile_udp_supported_model # Construct a json representation of a LoadBalancerProfileCollection model load_balancer_profile_collection_model_json = {} - load_balancer_profile_collection_model_json['first'] = load_balancer_profile_collection_first_model + load_balancer_profile_collection_model_json[ + 'first'] = load_balancer_profile_collection_first_model load_balancer_profile_collection_model_json['limit'] = 20 - load_balancer_profile_collection_model_json['next'] = load_balancer_profile_collection_next_model - load_balancer_profile_collection_model_json['profiles'] = [load_balancer_profile_model] + load_balancer_profile_collection_model_json[ + 'next'] = load_balancer_profile_collection_next_model + load_balancer_profile_collection_model_json['profiles'] = [ + load_balancer_profile_model + ] load_balancer_profile_collection_model_json['total_count'] = 132 # Construct a model instance of LoadBalancerProfileCollection by calling from_dict on the json representation - load_balancer_profile_collection_model = LoadBalancerProfileCollection.from_dict(load_balancer_profile_collection_model_json) + load_balancer_profile_collection_model = LoadBalancerProfileCollection.from_dict( + load_balancer_profile_collection_model_json) assert load_balancer_profile_collection_model != False # Construct a model instance of LoadBalancerProfileCollection by calling from_dict on the json representation - load_balancer_profile_collection_model_dict = LoadBalancerProfileCollection.from_dict(load_balancer_profile_collection_model_json).__dict__ - load_balancer_profile_collection_model2 = LoadBalancerProfileCollection(**load_balancer_profile_collection_model_dict) + load_balancer_profile_collection_model_dict = LoadBalancerProfileCollection.from_dict( + load_balancer_profile_collection_model_json).__dict__ + load_balancer_profile_collection_model2 = LoadBalancerProfileCollection( + **load_balancer_profile_collection_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_collection_model == load_balancer_profile_collection_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_collection_model_json2 = load_balancer_profile_collection_model.to_dict() + load_balancer_profile_collection_model_json2 = load_balancer_profile_collection_model.to_dict( + ) assert load_balancer_profile_collection_model_json2 == load_balancer_profile_collection_model_json @@ -62286,21 +70349,26 @@ def test_load_balancer_profile_collection_first_serialization(self): # Construct a json representation of a LoadBalancerProfileCollectionFirst model load_balancer_profile_collection_first_model_json = {} - load_balancer_profile_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20' + load_balancer_profile_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20' # Construct a model instance of LoadBalancerProfileCollectionFirst by calling from_dict on the json representation - load_balancer_profile_collection_first_model = LoadBalancerProfileCollectionFirst.from_dict(load_balancer_profile_collection_first_model_json) + load_balancer_profile_collection_first_model = LoadBalancerProfileCollectionFirst.from_dict( + load_balancer_profile_collection_first_model_json) assert load_balancer_profile_collection_first_model != False # Construct a model instance of LoadBalancerProfileCollectionFirst by calling from_dict on the json representation - load_balancer_profile_collection_first_model_dict = LoadBalancerProfileCollectionFirst.from_dict(load_balancer_profile_collection_first_model_json).__dict__ - load_balancer_profile_collection_first_model2 = LoadBalancerProfileCollectionFirst(**load_balancer_profile_collection_first_model_dict) + load_balancer_profile_collection_first_model_dict = LoadBalancerProfileCollectionFirst.from_dict( + load_balancer_profile_collection_first_model_json).__dict__ + load_balancer_profile_collection_first_model2 = LoadBalancerProfileCollectionFirst( + **load_balancer_profile_collection_first_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_collection_first_model == load_balancer_profile_collection_first_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_collection_first_model_json2 = load_balancer_profile_collection_first_model.to_dict() + load_balancer_profile_collection_first_model_json2 = load_balancer_profile_collection_first_model.to_dict( + ) assert load_balancer_profile_collection_first_model_json2 == load_balancer_profile_collection_first_model_json @@ -62316,21 +70384,26 @@ def test_load_balancer_profile_collection_next_serialization(self): # Construct a json representation of a LoadBalancerProfileCollectionNext model load_balancer_profile_collection_next_model_json = {} - load_balancer_profile_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + load_balancer_profile_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of LoadBalancerProfileCollectionNext by calling from_dict on the json representation - load_balancer_profile_collection_next_model = LoadBalancerProfileCollectionNext.from_dict(load_balancer_profile_collection_next_model_json) + load_balancer_profile_collection_next_model = LoadBalancerProfileCollectionNext.from_dict( + load_balancer_profile_collection_next_model_json) assert load_balancer_profile_collection_next_model != False # Construct a model instance of LoadBalancerProfileCollectionNext by calling from_dict on the json representation - load_balancer_profile_collection_next_model_dict = LoadBalancerProfileCollectionNext.from_dict(load_balancer_profile_collection_next_model_json).__dict__ - load_balancer_profile_collection_next_model2 = LoadBalancerProfileCollectionNext(**load_balancer_profile_collection_next_model_dict) + load_balancer_profile_collection_next_model_dict = LoadBalancerProfileCollectionNext.from_dict( + load_balancer_profile_collection_next_model_json).__dict__ + load_balancer_profile_collection_next_model2 = LoadBalancerProfileCollectionNext( + **load_balancer_profile_collection_next_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_collection_next_model == load_balancer_profile_collection_next_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_collection_next_model_json2 = load_balancer_profile_collection_next_model.to_dict() + load_balancer_profile_collection_next_model_json2 = load_balancer_profile_collection_next_model.to_dict( + ) assert load_balancer_profile_collection_next_model_json2 == load_balancer_profile_collection_next_model_json @@ -62347,21 +70420,27 @@ def test_load_balancer_profile_logging_supported_serialization(self): # Construct a json representation of a LoadBalancerProfileLoggingSupported model load_balancer_profile_logging_supported_model_json = {} load_balancer_profile_logging_supported_model_json['type'] = 'fixed' - load_balancer_profile_logging_supported_model_json['value'] = ['datapath'] + load_balancer_profile_logging_supported_model_json['value'] = [ + 'datapath' + ] # Construct a model instance of LoadBalancerProfileLoggingSupported by calling from_dict on the json representation - load_balancer_profile_logging_supported_model = LoadBalancerProfileLoggingSupported.from_dict(load_balancer_profile_logging_supported_model_json) + load_balancer_profile_logging_supported_model = LoadBalancerProfileLoggingSupported.from_dict( + load_balancer_profile_logging_supported_model_json) assert load_balancer_profile_logging_supported_model != False # Construct a model instance of LoadBalancerProfileLoggingSupported by calling from_dict on the json representation - load_balancer_profile_logging_supported_model_dict = LoadBalancerProfileLoggingSupported.from_dict(load_balancer_profile_logging_supported_model_json).__dict__ - load_balancer_profile_logging_supported_model2 = LoadBalancerProfileLoggingSupported(**load_balancer_profile_logging_supported_model_dict) + load_balancer_profile_logging_supported_model_dict = LoadBalancerProfileLoggingSupported.from_dict( + load_balancer_profile_logging_supported_model_json).__dict__ + load_balancer_profile_logging_supported_model2 = LoadBalancerProfileLoggingSupported( + **load_balancer_profile_logging_supported_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_logging_supported_model == load_balancer_profile_logging_supported_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_logging_supported_model_json2 = load_balancer_profile_logging_supported_model.to_dict() + load_balancer_profile_logging_supported_model_json2 = load_balancer_profile_logging_supported_model.to_dict( + ) assert load_balancer_profile_logging_supported_model_json2 == load_balancer_profile_logging_supported_model_json @@ -62378,22 +70457,27 @@ def test_load_balancer_profile_reference_serialization(self): # Construct a json representation of a LoadBalancerProfileReference model load_balancer_profile_reference_model_json = {} load_balancer_profile_reference_model_json['family'] = 'network' - load_balancer_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' + load_balancer_profile_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' load_balancer_profile_reference_model_json['name'] = 'network-fixed' # Construct a model instance of LoadBalancerProfileReference by calling from_dict on the json representation - load_balancer_profile_reference_model = LoadBalancerProfileReference.from_dict(load_balancer_profile_reference_model_json) + load_balancer_profile_reference_model = LoadBalancerProfileReference.from_dict( + load_balancer_profile_reference_model_json) assert load_balancer_profile_reference_model != False # Construct a model instance of LoadBalancerProfileReference by calling from_dict on the json representation - load_balancer_profile_reference_model_dict = LoadBalancerProfileReference.from_dict(load_balancer_profile_reference_model_json).__dict__ - load_balancer_profile_reference_model2 = LoadBalancerProfileReference(**load_balancer_profile_reference_model_dict) + load_balancer_profile_reference_model_dict = LoadBalancerProfileReference.from_dict( + load_balancer_profile_reference_model_json).__dict__ + load_balancer_profile_reference_model2 = LoadBalancerProfileReference( + **load_balancer_profile_reference_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_reference_model == load_balancer_profile_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_reference_model_json2 = load_balancer_profile_reference_model.to_dict() + load_balancer_profile_reference_model_json2 = load_balancer_profile_reference_model.to_dict( + ) assert load_balancer_profile_reference_model_json2 == load_balancer_profile_reference_model_json @@ -62409,21 +70493,26 @@ def test_load_balancer_reference_deleted_serialization(self): # Construct a json representation of a LoadBalancerReferenceDeleted model load_balancer_reference_deleted_model_json = {} - load_balancer_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of LoadBalancerReferenceDeleted by calling from_dict on the json representation - load_balancer_reference_deleted_model = LoadBalancerReferenceDeleted.from_dict(load_balancer_reference_deleted_model_json) + load_balancer_reference_deleted_model = LoadBalancerReferenceDeleted.from_dict( + load_balancer_reference_deleted_model_json) assert load_balancer_reference_deleted_model != False # Construct a model instance of LoadBalancerReferenceDeleted by calling from_dict on the json representation - load_balancer_reference_deleted_model_dict = LoadBalancerReferenceDeleted.from_dict(load_balancer_reference_deleted_model_json).__dict__ - load_balancer_reference_deleted_model2 = LoadBalancerReferenceDeleted(**load_balancer_reference_deleted_model_dict) + load_balancer_reference_deleted_model_dict = LoadBalancerReferenceDeleted.from_dict( + load_balancer_reference_deleted_model_json).__dict__ + load_balancer_reference_deleted_model2 = LoadBalancerReferenceDeleted( + **load_balancer_reference_deleted_model_dict) # Verify the model instances are equivalent assert load_balancer_reference_deleted_model == load_balancer_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_reference_deleted_model_json2 = load_balancer_reference_deleted_model.to_dict() + load_balancer_reference_deleted_model_json2 = load_balancer_reference_deleted_model.to_dict( + ) assert load_balancer_reference_deleted_model_json2 == load_balancer_reference_deleted_model_json @@ -62441,22 +70530,27 @@ def test_load_balancer_statistics_serialization(self): load_balancer_statistics_model_json = {} load_balancer_statistics_model_json['active_connections'] = 797 load_balancer_statistics_model_json['connection_rate'] = 91.121 - load_balancer_statistics_model_json['data_processed_this_month'] = 10093173145 + load_balancer_statistics_model_json[ + 'data_processed_this_month'] = 10093173145 load_balancer_statistics_model_json['throughput'] = 167.278 # Construct a model instance of LoadBalancerStatistics by calling from_dict on the json representation - load_balancer_statistics_model = LoadBalancerStatistics.from_dict(load_balancer_statistics_model_json) + load_balancer_statistics_model = LoadBalancerStatistics.from_dict( + load_balancer_statistics_model_json) assert load_balancer_statistics_model != False # Construct a model instance of LoadBalancerStatistics by calling from_dict on the json representation - load_balancer_statistics_model_dict = LoadBalancerStatistics.from_dict(load_balancer_statistics_model_json).__dict__ - load_balancer_statistics_model2 = LoadBalancerStatistics(**load_balancer_statistics_model_dict) + load_balancer_statistics_model_dict = LoadBalancerStatistics.from_dict( + load_balancer_statistics_model_json).__dict__ + load_balancer_statistics_model2 = LoadBalancerStatistics( + **load_balancer_statistics_model_dict) # Verify the model instances are equivalent assert load_balancer_statistics_model == load_balancer_statistics_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_statistics_model_json2 = load_balancer_statistics_model.to_dict() + load_balancer_statistics_model_json2 = load_balancer_statistics_model.to_dict( + ) assert load_balancer_statistics_model_json2 == load_balancer_statistics_model_json @@ -62473,27 +70567,37 @@ def test_network_acl_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' - network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP + network_acl_rule_item_model = { + } # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP network_acl_rule_item_model['action'] = 'allow' network_acl_rule_item_model['before'] = network_acl_rule_reference_model network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z' network_acl_rule_item_model['destination'] = '192.168.3.0/24' network_acl_rule_item_model['direction'] = 'inbound' - network_acl_rule_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_item_model['ip_version'] = 'ipv4' network_acl_rule_item_model['name'] = 'my-rule-1' network_acl_rule_item_model['source'] = '192.168.3.0/24' @@ -62504,23 +70608,30 @@ def test_network_acl_serialization(self): network_acl_rule_item_model['source_port_min'] = 49152 subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -62528,11 +70639,15 @@ def test_network_acl_serialization(self): # Construct a json representation of a NetworkACL model network_acl_model_json = {} network_acl_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_acl_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_model_json['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_model_json[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_model_json['name'] = 'my-network-acl' - network_acl_model_json['resource_group'] = resource_group_reference_model + network_acl_model_json[ + 'resource_group'] = resource_group_reference_model network_acl_model_json['rules'] = [network_acl_rule_item_model] network_acl_model_json['subnets'] = [subnet_reference_model] network_acl_model_json['vpc'] = vpc_reference_model @@ -62542,7 +70657,8 @@ def test_network_acl_serialization(self): assert network_acl_model != False # Construct a model instance of NetworkACL by calling from_dict on the json representation - network_acl_model_dict = NetworkACL.from_dict(network_acl_model_json).__dict__ + network_acl_model_dict = NetworkACL.from_dict( + network_acl_model_json).__dict__ network_acl_model2 = NetworkACL(**network_acl_model_dict) # Verify the model instances are equivalent @@ -62566,30 +70682,41 @@ def test_network_acl_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. network_acl_collection_first_model = {} # NetworkACLCollectionFirst - network_acl_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20' + network_acl_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' - network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP + network_acl_rule_item_model = { + } # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP network_acl_rule_item_model['action'] = 'allow' network_acl_rule_item_model['before'] = network_acl_rule_reference_model network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z' network_acl_rule_item_model['destination'] = '192.168.3.0/24' network_acl_rule_item_model['direction'] = 'inbound' - network_acl_rule_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_item_model['ip_version'] = 'ipv4' network_acl_rule_item_model['name'] = 'my-rule-1' network_acl_rule_item_model['source'] = '192.168.3.0/24' @@ -62600,31 +70727,40 @@ def test_network_acl_collection_serialization(self): network_acl_rule_item_model['source_port_min'] = 49152 subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' network_acl_model = {} # NetworkACL network_acl_model['created_at'] = '2019-01-01T12:00:00Z' - network_acl_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_model['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_model['name'] = 'my-network-acl' network_acl_model['resource_group'] = resource_group_reference_model @@ -62633,29 +70769,36 @@ def test_network_acl_collection_serialization(self): network_acl_model['vpc'] = vpc_reference_model network_acl_collection_next_model = {} # NetworkACLCollectionNext - network_acl_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + network_acl_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a NetworkACLCollection model network_acl_collection_model_json = {} - network_acl_collection_model_json['first'] = network_acl_collection_first_model + network_acl_collection_model_json[ + 'first'] = network_acl_collection_first_model network_acl_collection_model_json['limit'] = 20 network_acl_collection_model_json['network_acls'] = [network_acl_model] - network_acl_collection_model_json['next'] = network_acl_collection_next_model + network_acl_collection_model_json[ + 'next'] = network_acl_collection_next_model network_acl_collection_model_json['total_count'] = 132 # Construct a model instance of NetworkACLCollection by calling from_dict on the json representation - network_acl_collection_model = NetworkACLCollection.from_dict(network_acl_collection_model_json) + network_acl_collection_model = NetworkACLCollection.from_dict( + network_acl_collection_model_json) assert network_acl_collection_model != False # Construct a model instance of NetworkACLCollection by calling from_dict on the json representation - network_acl_collection_model_dict = NetworkACLCollection.from_dict(network_acl_collection_model_json).__dict__ - network_acl_collection_model2 = NetworkACLCollection(**network_acl_collection_model_dict) + network_acl_collection_model_dict = NetworkACLCollection.from_dict( + network_acl_collection_model_json).__dict__ + network_acl_collection_model2 = NetworkACLCollection( + **network_acl_collection_model_dict) # Verify the model instances are equivalent assert network_acl_collection_model == network_acl_collection_model2 # Convert model instance back to dict and verify no loss of data - network_acl_collection_model_json2 = network_acl_collection_model.to_dict() + network_acl_collection_model_json2 = network_acl_collection_model.to_dict( + ) assert network_acl_collection_model_json2 == network_acl_collection_model_json @@ -62671,21 +70814,26 @@ def test_network_acl_collection_first_serialization(self): # Construct a json representation of a NetworkACLCollectionFirst model network_acl_collection_first_model_json = {} - network_acl_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20' + network_acl_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20' # Construct a model instance of NetworkACLCollectionFirst by calling from_dict on the json representation - network_acl_collection_first_model = NetworkACLCollectionFirst.from_dict(network_acl_collection_first_model_json) + network_acl_collection_first_model = NetworkACLCollectionFirst.from_dict( + network_acl_collection_first_model_json) assert network_acl_collection_first_model != False # Construct a model instance of NetworkACLCollectionFirst by calling from_dict on the json representation - network_acl_collection_first_model_dict = NetworkACLCollectionFirst.from_dict(network_acl_collection_first_model_json).__dict__ - network_acl_collection_first_model2 = NetworkACLCollectionFirst(**network_acl_collection_first_model_dict) + network_acl_collection_first_model_dict = NetworkACLCollectionFirst.from_dict( + network_acl_collection_first_model_json).__dict__ + network_acl_collection_first_model2 = NetworkACLCollectionFirst( + **network_acl_collection_first_model_dict) # Verify the model instances are equivalent assert network_acl_collection_first_model == network_acl_collection_first_model2 # Convert model instance back to dict and verify no loss of data - network_acl_collection_first_model_json2 = network_acl_collection_first_model.to_dict() + network_acl_collection_first_model_json2 = network_acl_collection_first_model.to_dict( + ) assert network_acl_collection_first_model_json2 == network_acl_collection_first_model_json @@ -62701,21 +70849,26 @@ def test_network_acl_collection_next_serialization(self): # Construct a json representation of a NetworkACLCollectionNext model network_acl_collection_next_model_json = {} - network_acl_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + network_acl_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of NetworkACLCollectionNext by calling from_dict on the json representation - network_acl_collection_next_model = NetworkACLCollectionNext.from_dict(network_acl_collection_next_model_json) + network_acl_collection_next_model = NetworkACLCollectionNext.from_dict( + network_acl_collection_next_model_json) assert network_acl_collection_next_model != False # Construct a model instance of NetworkACLCollectionNext by calling from_dict on the json representation - network_acl_collection_next_model_dict = NetworkACLCollectionNext.from_dict(network_acl_collection_next_model_json).__dict__ - network_acl_collection_next_model2 = NetworkACLCollectionNext(**network_acl_collection_next_model_dict) + network_acl_collection_next_model_dict = NetworkACLCollectionNext.from_dict( + network_acl_collection_next_model_json).__dict__ + network_acl_collection_next_model2 = NetworkACLCollectionNext( + **network_acl_collection_next_model_dict) # Verify the model instances are equivalent assert network_acl_collection_next_model == network_acl_collection_next_model2 # Convert model instance back to dict and verify no loss of data - network_acl_collection_next_model_json2 = network_acl_collection_next_model.to_dict() + network_acl_collection_next_model_json2 = network_acl_collection_next_model.to_dict( + ) assert network_acl_collection_next_model_json2 == network_acl_collection_next_model_json @@ -62734,12 +70887,15 @@ def test_network_acl_patch_serialization(self): network_acl_patch_model_json['name'] = 'my-network-acl' # Construct a model instance of NetworkACLPatch by calling from_dict on the json representation - network_acl_patch_model = NetworkACLPatch.from_dict(network_acl_patch_model_json) + network_acl_patch_model = NetworkACLPatch.from_dict( + network_acl_patch_model_json) assert network_acl_patch_model != False # Construct a model instance of NetworkACLPatch by calling from_dict on the json representation - network_acl_patch_model_dict = NetworkACLPatch.from_dict(network_acl_patch_model_json).__dict__ - network_acl_patch_model2 = NetworkACLPatch(**network_acl_patch_model_dict) + network_acl_patch_model_dict = NetworkACLPatch.from_dict( + network_acl_patch_model_json).__dict__ + network_acl_patch_model2 = NetworkACLPatch( + **network_acl_patch_model_dict) # Verify the model instances are equivalent assert network_acl_patch_model == network_acl_patch_model2 @@ -62762,29 +70918,38 @@ def test_network_acl_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted - network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a NetworkACLReference model network_acl_reference_model_json = {} - network_acl_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model_json['deleted'] = network_acl_reference_deleted_model - network_acl_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model_json['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model_json[ + 'deleted'] = network_acl_reference_deleted_model + network_acl_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model_json[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model_json['name'] = 'my-network-acl' # Construct a model instance of NetworkACLReference by calling from_dict on the json representation - network_acl_reference_model = NetworkACLReference.from_dict(network_acl_reference_model_json) + network_acl_reference_model = NetworkACLReference.from_dict( + network_acl_reference_model_json) assert network_acl_reference_model != False # Construct a model instance of NetworkACLReference by calling from_dict on the json representation - network_acl_reference_model_dict = NetworkACLReference.from_dict(network_acl_reference_model_json).__dict__ - network_acl_reference_model2 = NetworkACLReference(**network_acl_reference_model_dict) + network_acl_reference_model_dict = NetworkACLReference.from_dict( + network_acl_reference_model_json).__dict__ + network_acl_reference_model2 = NetworkACLReference( + **network_acl_reference_model_dict) # Verify the model instances are equivalent assert network_acl_reference_model == network_acl_reference_model2 # Convert model instance back to dict and verify no loss of data - network_acl_reference_model_json2 = network_acl_reference_model.to_dict() + network_acl_reference_model_json2 = network_acl_reference_model.to_dict( + ) assert network_acl_reference_model_json2 == network_acl_reference_model_json @@ -62800,21 +70965,26 @@ def test_network_acl_reference_deleted_serialization(self): # Construct a json representation of a NetworkACLReferenceDeleted model network_acl_reference_deleted_model_json = {} - network_acl_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of NetworkACLReferenceDeleted by calling from_dict on the json representation - network_acl_reference_deleted_model = NetworkACLReferenceDeleted.from_dict(network_acl_reference_deleted_model_json) + network_acl_reference_deleted_model = NetworkACLReferenceDeleted.from_dict( + network_acl_reference_deleted_model_json) assert network_acl_reference_deleted_model != False # Construct a model instance of NetworkACLReferenceDeleted by calling from_dict on the json representation - network_acl_reference_deleted_model_dict = NetworkACLReferenceDeleted.from_dict(network_acl_reference_deleted_model_json).__dict__ - network_acl_reference_deleted_model2 = NetworkACLReferenceDeleted(**network_acl_reference_deleted_model_dict) + network_acl_reference_deleted_model_dict = NetworkACLReferenceDeleted.from_dict( + network_acl_reference_deleted_model_json).__dict__ + network_acl_reference_deleted_model2 = NetworkACLReferenceDeleted( + **network_acl_reference_deleted_model_dict) # Verify the model instances are equivalent assert network_acl_reference_deleted_model == network_acl_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - network_acl_reference_deleted_model_json2 = network_acl_reference_deleted_model.to_dict() + network_acl_reference_deleted_model_json2 = network_acl_reference_deleted_model.to_dict( + ) assert network_acl_reference_deleted_model_json2 == network_acl_reference_deleted_model_json @@ -62830,29 +71000,41 @@ def test_network_acl_rule_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_collection_first_model = {} # NetworkACLRuleCollectionFirst - network_acl_rule_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20' + network_acl_rule_collection_first_model = { + } # NetworkACLRuleCollectionFirst + network_acl_rule_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20' - network_acl_rule_collection_next_model = {} # NetworkACLRuleCollectionNext - network_acl_rule_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + network_acl_rule_collection_next_model = { + } # NetworkACLRuleCollectionNext + network_acl_rule_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' - network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP + network_acl_rule_item_model = { + } # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP network_acl_rule_item_model['action'] = 'allow' network_acl_rule_item_model['before'] = network_acl_rule_reference_model network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z' network_acl_rule_item_model['destination'] = '192.168.3.0/24' network_acl_rule_item_model['direction'] = 'inbound' - network_acl_rule_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_item_model['ip_version'] = 'ipv4' network_acl_rule_item_model['name'] = 'my-rule-1' network_acl_rule_item_model['source'] = '192.168.3.0/24' @@ -62864,25 +71046,33 @@ def test_network_acl_rule_collection_serialization(self): # Construct a json representation of a NetworkACLRuleCollection model network_acl_rule_collection_model_json = {} - network_acl_rule_collection_model_json['first'] = network_acl_rule_collection_first_model + network_acl_rule_collection_model_json[ + 'first'] = network_acl_rule_collection_first_model network_acl_rule_collection_model_json['limit'] = 20 - network_acl_rule_collection_model_json['next'] = network_acl_rule_collection_next_model - network_acl_rule_collection_model_json['rules'] = [network_acl_rule_item_model] + network_acl_rule_collection_model_json[ + 'next'] = network_acl_rule_collection_next_model + network_acl_rule_collection_model_json['rules'] = [ + network_acl_rule_item_model + ] network_acl_rule_collection_model_json['total_count'] = 132 # Construct a model instance of NetworkACLRuleCollection by calling from_dict on the json representation - network_acl_rule_collection_model = NetworkACLRuleCollection.from_dict(network_acl_rule_collection_model_json) + network_acl_rule_collection_model = NetworkACLRuleCollection.from_dict( + network_acl_rule_collection_model_json) assert network_acl_rule_collection_model != False # Construct a model instance of NetworkACLRuleCollection by calling from_dict on the json representation - network_acl_rule_collection_model_dict = NetworkACLRuleCollection.from_dict(network_acl_rule_collection_model_json).__dict__ - network_acl_rule_collection_model2 = NetworkACLRuleCollection(**network_acl_rule_collection_model_dict) + network_acl_rule_collection_model_dict = NetworkACLRuleCollection.from_dict( + network_acl_rule_collection_model_json).__dict__ + network_acl_rule_collection_model2 = NetworkACLRuleCollection( + **network_acl_rule_collection_model_dict) # Verify the model instances are equivalent assert network_acl_rule_collection_model == network_acl_rule_collection_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_collection_model_json2 = network_acl_rule_collection_model.to_dict() + network_acl_rule_collection_model_json2 = network_acl_rule_collection_model.to_dict( + ) assert network_acl_rule_collection_model_json2 == network_acl_rule_collection_model_json @@ -62898,21 +71088,26 @@ def test_network_acl_rule_collection_first_serialization(self): # Construct a json representation of a NetworkACLRuleCollectionFirst model network_acl_rule_collection_first_model_json = {} - network_acl_rule_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20' + network_acl_rule_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20' # Construct a model instance of NetworkACLRuleCollectionFirst by calling from_dict on the json representation - network_acl_rule_collection_first_model = NetworkACLRuleCollectionFirst.from_dict(network_acl_rule_collection_first_model_json) + network_acl_rule_collection_first_model = NetworkACLRuleCollectionFirst.from_dict( + network_acl_rule_collection_first_model_json) assert network_acl_rule_collection_first_model != False # Construct a model instance of NetworkACLRuleCollectionFirst by calling from_dict on the json representation - network_acl_rule_collection_first_model_dict = NetworkACLRuleCollectionFirst.from_dict(network_acl_rule_collection_first_model_json).__dict__ - network_acl_rule_collection_first_model2 = NetworkACLRuleCollectionFirst(**network_acl_rule_collection_first_model_dict) + network_acl_rule_collection_first_model_dict = NetworkACLRuleCollectionFirst.from_dict( + network_acl_rule_collection_first_model_json).__dict__ + network_acl_rule_collection_first_model2 = NetworkACLRuleCollectionFirst( + **network_acl_rule_collection_first_model_dict) # Verify the model instances are equivalent assert network_acl_rule_collection_first_model == network_acl_rule_collection_first_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_collection_first_model_json2 = network_acl_rule_collection_first_model.to_dict() + network_acl_rule_collection_first_model_json2 = network_acl_rule_collection_first_model.to_dict( + ) assert network_acl_rule_collection_first_model_json2 == network_acl_rule_collection_first_model_json @@ -62928,21 +71123,26 @@ def test_network_acl_rule_collection_next_serialization(self): # Construct a json representation of a NetworkACLRuleCollectionNext model network_acl_rule_collection_next_model_json = {} - network_acl_rule_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + network_acl_rule_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of NetworkACLRuleCollectionNext by calling from_dict on the json representation - network_acl_rule_collection_next_model = NetworkACLRuleCollectionNext.from_dict(network_acl_rule_collection_next_model_json) + network_acl_rule_collection_next_model = NetworkACLRuleCollectionNext.from_dict( + network_acl_rule_collection_next_model_json) assert network_acl_rule_collection_next_model != False # Construct a model instance of NetworkACLRuleCollectionNext by calling from_dict on the json representation - network_acl_rule_collection_next_model_dict = NetworkACLRuleCollectionNext.from_dict(network_acl_rule_collection_next_model_json).__dict__ - network_acl_rule_collection_next_model2 = NetworkACLRuleCollectionNext(**network_acl_rule_collection_next_model_dict) + network_acl_rule_collection_next_model_dict = NetworkACLRuleCollectionNext.from_dict( + network_acl_rule_collection_next_model_json).__dict__ + network_acl_rule_collection_next_model2 = NetworkACLRuleCollectionNext( + **network_acl_rule_collection_next_model_dict) # Verify the model instances are equivalent assert network_acl_rule_collection_next_model == network_acl_rule_collection_next_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_collection_next_model_json2 = network_acl_rule_collection_next_model.to_dict() + network_acl_rule_collection_next_model_json2 = network_acl_rule_collection_next_model.to_dict( + ) assert network_acl_rule_collection_next_model_json2 == network_acl_rule_collection_next_model_json @@ -62958,13 +71158,16 @@ def test_network_acl_rule_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_before_patch_model = {} # NetworkACLRuleBeforePatchNetworkACLRuleIdentityById - network_acl_rule_before_patch_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_patch_model = { + } # NetworkACLRuleBeforePatchNetworkACLRuleIdentityById + network_acl_rule_before_patch_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a json representation of a NetworkACLRulePatch model network_acl_rule_patch_model_json = {} network_acl_rule_patch_model_json['action'] = 'allow' - network_acl_rule_patch_model_json['before'] = network_acl_rule_before_patch_model + network_acl_rule_patch_model_json[ + 'before'] = network_acl_rule_before_patch_model network_acl_rule_patch_model_json['code'] = 0 network_acl_rule_patch_model_json['destination'] = '192.168.3.2/32' network_acl_rule_patch_model_json['destination_port_max'] = 22 @@ -62978,18 +71181,22 @@ def test_network_acl_rule_patch_serialization(self): network_acl_rule_patch_model_json['type'] = 8 # Construct a model instance of NetworkACLRulePatch by calling from_dict on the json representation - network_acl_rule_patch_model = NetworkACLRulePatch.from_dict(network_acl_rule_patch_model_json) + network_acl_rule_patch_model = NetworkACLRulePatch.from_dict( + network_acl_rule_patch_model_json) assert network_acl_rule_patch_model != False # Construct a model instance of NetworkACLRulePatch by calling from_dict on the json representation - network_acl_rule_patch_model_dict = NetworkACLRulePatch.from_dict(network_acl_rule_patch_model_json).__dict__ - network_acl_rule_patch_model2 = NetworkACLRulePatch(**network_acl_rule_patch_model_dict) + network_acl_rule_patch_model_dict = NetworkACLRulePatch.from_dict( + network_acl_rule_patch_model_json).__dict__ + network_acl_rule_patch_model2 = NetworkACLRulePatch( + **network_acl_rule_patch_model_dict) # Verify the model instances are equivalent assert network_acl_rule_patch_model == network_acl_rule_patch_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_patch_model_json2 = network_acl_rule_patch_model.to_dict() + network_acl_rule_patch_model_json2 = network_acl_rule_patch_model.to_dict( + ) assert network_acl_rule_patch_model_json2 == network_acl_rule_patch_model_json @@ -63005,29 +71212,38 @@ def test_network_acl_rule_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a NetworkACLRuleReference model network_acl_rule_reference_model_json = {} - network_acl_rule_reference_model_json['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model_json[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model_json['name'] = 'my-rule-1' # Construct a model instance of NetworkACLRuleReference by calling from_dict on the json representation - network_acl_rule_reference_model = NetworkACLRuleReference.from_dict(network_acl_rule_reference_model_json) + network_acl_rule_reference_model = NetworkACLRuleReference.from_dict( + network_acl_rule_reference_model_json) assert network_acl_rule_reference_model != False # Construct a model instance of NetworkACLRuleReference by calling from_dict on the json representation - network_acl_rule_reference_model_dict = NetworkACLRuleReference.from_dict(network_acl_rule_reference_model_json).__dict__ - network_acl_rule_reference_model2 = NetworkACLRuleReference(**network_acl_rule_reference_model_dict) + network_acl_rule_reference_model_dict = NetworkACLRuleReference.from_dict( + network_acl_rule_reference_model_json).__dict__ + network_acl_rule_reference_model2 = NetworkACLRuleReference( + **network_acl_rule_reference_model_dict) # Verify the model instances are equivalent assert network_acl_rule_reference_model == network_acl_rule_reference_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_reference_model_json2 = network_acl_rule_reference_model.to_dict() + network_acl_rule_reference_model_json2 = network_acl_rule_reference_model.to_dict( + ) assert network_acl_rule_reference_model_json2 == network_acl_rule_reference_model_json @@ -63043,21 +71259,26 @@ def test_network_acl_rule_reference_deleted_serialization(self): # Construct a json representation of a NetworkACLRuleReferenceDeleted model network_acl_rule_reference_deleted_model_json = {} - network_acl_rule_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of NetworkACLRuleReferenceDeleted by calling from_dict on the json representation - network_acl_rule_reference_deleted_model = NetworkACLRuleReferenceDeleted.from_dict(network_acl_rule_reference_deleted_model_json) + network_acl_rule_reference_deleted_model = NetworkACLRuleReferenceDeleted.from_dict( + network_acl_rule_reference_deleted_model_json) assert network_acl_rule_reference_deleted_model != False # Construct a model instance of NetworkACLRuleReferenceDeleted by calling from_dict on the json representation - network_acl_rule_reference_deleted_model_dict = NetworkACLRuleReferenceDeleted.from_dict(network_acl_rule_reference_deleted_model_json).__dict__ - network_acl_rule_reference_deleted_model2 = NetworkACLRuleReferenceDeleted(**network_acl_rule_reference_deleted_model_dict) + network_acl_rule_reference_deleted_model_dict = NetworkACLRuleReferenceDeleted.from_dict( + network_acl_rule_reference_deleted_model_json).__dict__ + network_acl_rule_reference_deleted_model2 = NetworkACLRuleReferenceDeleted( + **network_acl_rule_reference_deleted_model_dict) # Verify the model instances are equivalent assert network_acl_rule_reference_deleted_model == network_acl_rule_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_reference_deleted_model_json2 = network_acl_rule_reference_deleted_model.to_dict() + network_acl_rule_reference_deleted_model_json2 = network_acl_rule_reference_deleted_model.to_dict( + ) assert network_acl_rule_reference_deleted_model_json2 == network_acl_rule_reference_deleted_model_json @@ -63074,44 +71295,60 @@ def test_network_interface_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' floating_ip_reference_model = {} # FloatingIPReference floating_ip_reference_model['address'] = '192.0.2.2' floating_ip_reference_model['crn'] = 'crn:[...]' - floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/181b8670-52bf-47af-a5ca-7aff7f3824d1' - floating_ip_reference_model['id'] = '181b8670-52bf-47af-a5ca-7aff7f3824d1' + floating_ip_reference_model[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/181b8670-52bf-47af-a5ca-7aff7f3824d1' + floating_ip_reference_model[ + 'id'] = '181b8670-52bf-47af-a5ca-7aff7f3824d1' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.0.32' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' - reserved_ip_reference_model['id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' reserved_ip_reference_model['name'] = 'my-reserved-ip-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference security_group_reference_model['crn'] = 'crn:[...]' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' - security_group_reference_model['id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' - security_group_reference_model['name'] = 'before-entrance-mountain-paralegal-photo-uninstall' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'name'] = 'before-entrance-mountain-paralegal-photo-uninstall' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference subnet_reference_model['crn'] = 'crn:[...]' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['id'] = '9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' @@ -63120,25 +71357,34 @@ def test_network_interface_serialization(self): network_interface_model_json = {} network_interface_model_json['allow_ip_spoofing'] = True network_interface_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_interface_model_json['floating_ips'] = [floating_ip_reference_model] - network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_model_json['floating_ips'] = [ + floating_ip_reference_model + ] + network_interface_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' network_interface_model_json['name'] = 'my-instance-network-interface' network_interface_model_json['port_speed'] = 1000 network_interface_model_json['primary_ip'] = reserved_ip_reference_model network_interface_model_json['resource_type'] = 'network_interface' - network_interface_model_json['security_groups'] = [security_group_reference_model] + network_interface_model_json['security_groups'] = [ + security_group_reference_model + ] network_interface_model_json['status'] = 'available' network_interface_model_json['subnet'] = subnet_reference_model network_interface_model_json['type'] = 'primary' # Construct a model instance of NetworkInterface by calling from_dict on the json representation - network_interface_model = NetworkInterface.from_dict(network_interface_model_json) + network_interface_model = NetworkInterface.from_dict( + network_interface_model_json) assert network_interface_model != False # Construct a model instance of NetworkInterface by calling from_dict on the json representation - network_interface_model_dict = NetworkInterface.from_dict(network_interface_model_json).__dict__ - network_interface_model2 = NetworkInterface(**network_interface_model_dict) + network_interface_model_dict = NetworkInterface.from_dict( + network_interface_model_json).__dict__ + network_interface_model2 = NetworkInterface( + **network_interface_model_dict) # Verify the model instances are equivalent assert network_interface_model == network_interface_model2 @@ -63153,61 +71399,84 @@ class TestModel_NetworkInterfaceBareMetalServerContextReference: Test Class for NetworkInterfaceBareMetalServerContextReference """ - def test_network_interface_bare_metal_server_context_reference_serialization(self): + def test_network_interface_bare_metal_server_context_reference_serialization( + self): """ Test serialization/deserialization for NetworkInterfaceBareMetalServerContextReference """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted - network_interface_bare_metal_server_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_bare_metal_server_context_reference_deleted_model = { + } # NetworkInterfaceBareMetalServerContextReferenceDeleted + network_interface_bare_metal_server_context_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a NetworkInterfaceBareMetalServerContextReference model network_interface_bare_metal_server_context_reference_model_json = {} - network_interface_bare_metal_server_context_reference_model_json['deleted'] = network_interface_bare_metal_server_context_reference_deleted_model - network_interface_bare_metal_server_context_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_bare_metal_server_context_reference_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_bare_metal_server_context_reference_model_json['name'] = 'my-bare-metal-server-network-interface' - network_interface_bare_metal_server_context_reference_model_json['primary_ip'] = reserved_ip_reference_model - network_interface_bare_metal_server_context_reference_model_json['resource_type'] = 'network_interface' - network_interface_bare_metal_server_context_reference_model_json['subnet'] = subnet_reference_model + network_interface_bare_metal_server_context_reference_model_json[ + 'deleted'] = network_interface_bare_metal_server_context_reference_deleted_model + network_interface_bare_metal_server_context_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_bare_metal_server_context_reference_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_bare_metal_server_context_reference_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + network_interface_bare_metal_server_context_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + network_interface_bare_metal_server_context_reference_model_json[ + 'resource_type'] = 'network_interface' + network_interface_bare_metal_server_context_reference_model_json[ + 'subnet'] = subnet_reference_model # Construct a model instance of NetworkInterfaceBareMetalServerContextReference by calling from_dict on the json representation - network_interface_bare_metal_server_context_reference_model = NetworkInterfaceBareMetalServerContextReference.from_dict(network_interface_bare_metal_server_context_reference_model_json) + network_interface_bare_metal_server_context_reference_model = NetworkInterfaceBareMetalServerContextReference.from_dict( + network_interface_bare_metal_server_context_reference_model_json) assert network_interface_bare_metal_server_context_reference_model != False # Construct a model instance of NetworkInterfaceBareMetalServerContextReference by calling from_dict on the json representation - network_interface_bare_metal_server_context_reference_model_dict = NetworkInterfaceBareMetalServerContextReference.from_dict(network_interface_bare_metal_server_context_reference_model_json).__dict__ - network_interface_bare_metal_server_context_reference_model2 = NetworkInterfaceBareMetalServerContextReference(**network_interface_bare_metal_server_context_reference_model_dict) + network_interface_bare_metal_server_context_reference_model_dict = NetworkInterfaceBareMetalServerContextReference.from_dict( + network_interface_bare_metal_server_context_reference_model_json + ).__dict__ + network_interface_bare_metal_server_context_reference_model2 = NetworkInterfaceBareMetalServerContextReference( + **network_interface_bare_metal_server_context_reference_model_dict) # Verify the model instances are equivalent assert network_interface_bare_metal_server_context_reference_model == network_interface_bare_metal_server_context_reference_model2 # Convert model instance back to dict and verify no loss of data - network_interface_bare_metal_server_context_reference_model_json2 = network_interface_bare_metal_server_context_reference_model.to_dict() + network_interface_bare_metal_server_context_reference_model_json2 = network_interface_bare_metal_server_context_reference_model.to_dict( + ) assert network_interface_bare_metal_server_context_reference_model_json2 == network_interface_bare_metal_server_context_reference_model_json @@ -63216,28 +71485,38 @@ class TestModel_NetworkInterfaceBareMetalServerContextReferenceDeleted: Test Class for NetworkInterfaceBareMetalServerContextReferenceDeleted """ - def test_network_interface_bare_metal_server_context_reference_deleted_serialization(self): + def test_network_interface_bare_metal_server_context_reference_deleted_serialization( + self): """ Test serialization/deserialization for NetworkInterfaceBareMetalServerContextReferenceDeleted """ # Construct a json representation of a NetworkInterfaceBareMetalServerContextReferenceDeleted model network_interface_bare_metal_server_context_reference_deleted_model_json = {} - network_interface_bare_metal_server_context_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_bare_metal_server_context_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of NetworkInterfaceBareMetalServerContextReferenceDeleted by calling from_dict on the json representation - network_interface_bare_metal_server_context_reference_deleted_model = NetworkInterfaceBareMetalServerContextReferenceDeleted.from_dict(network_interface_bare_metal_server_context_reference_deleted_model_json) + network_interface_bare_metal_server_context_reference_deleted_model = NetworkInterfaceBareMetalServerContextReferenceDeleted.from_dict( + network_interface_bare_metal_server_context_reference_deleted_model_json + ) assert network_interface_bare_metal_server_context_reference_deleted_model != False # Construct a model instance of NetworkInterfaceBareMetalServerContextReferenceDeleted by calling from_dict on the json representation - network_interface_bare_metal_server_context_reference_deleted_model_dict = NetworkInterfaceBareMetalServerContextReferenceDeleted.from_dict(network_interface_bare_metal_server_context_reference_deleted_model_json).__dict__ - network_interface_bare_metal_server_context_reference_deleted_model2 = NetworkInterfaceBareMetalServerContextReferenceDeleted(**network_interface_bare_metal_server_context_reference_deleted_model_dict) + network_interface_bare_metal_server_context_reference_deleted_model_dict = NetworkInterfaceBareMetalServerContextReferenceDeleted.from_dict( + network_interface_bare_metal_server_context_reference_deleted_model_json + ).__dict__ + network_interface_bare_metal_server_context_reference_deleted_model2 = NetworkInterfaceBareMetalServerContextReferenceDeleted( + ** + network_interface_bare_metal_server_context_reference_deleted_model_dict + ) # Verify the model instances are equivalent assert network_interface_bare_metal_server_context_reference_deleted_model == network_interface_bare_metal_server_context_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - network_interface_bare_metal_server_context_reference_deleted_model_json2 = network_interface_bare_metal_server_context_reference_deleted_model.to_dict() + network_interface_bare_metal_server_context_reference_deleted_model_json2 = network_interface_bare_metal_server_context_reference_deleted_model.to_dict( + ) assert network_interface_bare_metal_server_context_reference_deleted_model_json2 == network_interface_bare_metal_server_context_reference_deleted_model_json @@ -63253,54 +71532,75 @@ def test_network_interface_instance_context_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted - network_interface_instance_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_instance_context_reference_deleted_model = { + } # NetworkInterfaceInstanceContextReferenceDeleted + network_interface_instance_context_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.240.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a NetworkInterfaceInstanceContextReference model network_interface_instance_context_reference_model_json = {} - network_interface_instance_context_reference_model_json['deleted'] = network_interface_instance_context_reference_deleted_model - network_interface_instance_context_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_instance_context_reference_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - network_interface_instance_context_reference_model_json['name'] = 'my-instance-network-interface' - network_interface_instance_context_reference_model_json['primary_ip'] = reserved_ip_reference_model - network_interface_instance_context_reference_model_json['resource_type'] = 'network_interface' - network_interface_instance_context_reference_model_json['subnet'] = subnet_reference_model + network_interface_instance_context_reference_model_json[ + 'deleted'] = network_interface_instance_context_reference_deleted_model + network_interface_instance_context_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_instance_context_reference_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + network_interface_instance_context_reference_model_json[ + 'name'] = 'my-instance-network-interface' + network_interface_instance_context_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + network_interface_instance_context_reference_model_json[ + 'resource_type'] = 'network_interface' + network_interface_instance_context_reference_model_json[ + 'subnet'] = subnet_reference_model # Construct a model instance of NetworkInterfaceInstanceContextReference by calling from_dict on the json representation - network_interface_instance_context_reference_model = NetworkInterfaceInstanceContextReference.from_dict(network_interface_instance_context_reference_model_json) + network_interface_instance_context_reference_model = NetworkInterfaceInstanceContextReference.from_dict( + network_interface_instance_context_reference_model_json) assert network_interface_instance_context_reference_model != False # Construct a model instance of NetworkInterfaceInstanceContextReference by calling from_dict on the json representation - network_interface_instance_context_reference_model_dict = NetworkInterfaceInstanceContextReference.from_dict(network_interface_instance_context_reference_model_json).__dict__ - network_interface_instance_context_reference_model2 = NetworkInterfaceInstanceContextReference(**network_interface_instance_context_reference_model_dict) + network_interface_instance_context_reference_model_dict = NetworkInterfaceInstanceContextReference.from_dict( + network_interface_instance_context_reference_model_json).__dict__ + network_interface_instance_context_reference_model2 = NetworkInterfaceInstanceContextReference( + **network_interface_instance_context_reference_model_dict) # Verify the model instances are equivalent assert network_interface_instance_context_reference_model == network_interface_instance_context_reference_model2 # Convert model instance back to dict and verify no loss of data - network_interface_instance_context_reference_model_json2 = network_interface_instance_context_reference_model.to_dict() + network_interface_instance_context_reference_model_json2 = network_interface_instance_context_reference_model.to_dict( + ) assert network_interface_instance_context_reference_model_json2 == network_interface_instance_context_reference_model_json @@ -63309,28 +71609,35 @@ class TestModel_NetworkInterfaceInstanceContextReferenceDeleted: Test Class for NetworkInterfaceInstanceContextReferenceDeleted """ - def test_network_interface_instance_context_reference_deleted_serialization(self): + def test_network_interface_instance_context_reference_deleted_serialization( + self): """ Test serialization/deserialization for NetworkInterfaceInstanceContextReferenceDeleted """ # Construct a json representation of a NetworkInterfaceInstanceContextReferenceDeleted model network_interface_instance_context_reference_deleted_model_json = {} - network_interface_instance_context_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_instance_context_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of NetworkInterfaceInstanceContextReferenceDeleted by calling from_dict on the json representation - network_interface_instance_context_reference_deleted_model = NetworkInterfaceInstanceContextReferenceDeleted.from_dict(network_interface_instance_context_reference_deleted_model_json) + network_interface_instance_context_reference_deleted_model = NetworkInterfaceInstanceContextReferenceDeleted.from_dict( + network_interface_instance_context_reference_deleted_model_json) assert network_interface_instance_context_reference_deleted_model != False # Construct a model instance of NetworkInterfaceInstanceContextReferenceDeleted by calling from_dict on the json representation - network_interface_instance_context_reference_deleted_model_dict = NetworkInterfaceInstanceContextReferenceDeleted.from_dict(network_interface_instance_context_reference_deleted_model_json).__dict__ - network_interface_instance_context_reference_deleted_model2 = NetworkInterfaceInstanceContextReferenceDeleted(**network_interface_instance_context_reference_deleted_model_dict) + network_interface_instance_context_reference_deleted_model_dict = NetworkInterfaceInstanceContextReferenceDeleted.from_dict( + network_interface_instance_context_reference_deleted_model_json + ).__dict__ + network_interface_instance_context_reference_deleted_model2 = NetworkInterfaceInstanceContextReferenceDeleted( + **network_interface_instance_context_reference_deleted_model_dict) # Verify the model instances are equivalent assert network_interface_instance_context_reference_deleted_model == network_interface_instance_context_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - network_interface_instance_context_reference_deleted_model_json2 = network_interface_instance_context_reference_deleted_model.to_dict() + network_interface_instance_context_reference_deleted_model_json2 = network_interface_instance_context_reference_deleted_model.to_dict( + ) assert network_interface_instance_context_reference_deleted_model_json2 == network_interface_instance_context_reference_deleted_model_json @@ -63347,21 +71654,26 @@ def test_network_interface_patch_serialization(self): # Construct a json representation of a NetworkInterfacePatch model network_interface_patch_model_json = {} network_interface_patch_model_json['allow_ip_spoofing'] = True - network_interface_patch_model_json['name'] = 'my-instance-network-interface' + network_interface_patch_model_json[ + 'name'] = 'my-instance-network-interface' # Construct a model instance of NetworkInterfacePatch by calling from_dict on the json representation - network_interface_patch_model = NetworkInterfacePatch.from_dict(network_interface_patch_model_json) + network_interface_patch_model = NetworkInterfacePatch.from_dict( + network_interface_patch_model_json) assert network_interface_patch_model != False # Construct a model instance of NetworkInterfacePatch by calling from_dict on the json representation - network_interface_patch_model_dict = NetworkInterfacePatch.from_dict(network_interface_patch_model_json).__dict__ - network_interface_patch_model2 = NetworkInterfacePatch(**network_interface_patch_model_dict) + network_interface_patch_model_dict = NetworkInterfacePatch.from_dict( + network_interface_patch_model_json).__dict__ + network_interface_patch_model2 = NetworkInterfacePatch( + **network_interface_patch_model_dict) # Verify the model instances are equivalent assert network_interface_patch_model == network_interface_patch_model2 # Convert model instance back to dict and verify no loss of data - network_interface_patch_model_json2 = network_interface_patch_model.to_dict() + network_interface_patch_model_json2 = network_interface_patch_model.to_dict( + ) assert network_interface_patch_model_json2 == network_interface_patch_model_json @@ -63377,13 +71689,15 @@ def test_network_interface_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' @@ -63391,24 +71705,32 @@ def test_network_interface_prototype_serialization(self): # Construct a json representation of a NetworkInterfacePrototype model network_interface_prototype_model_json = {} network_interface_prototype_model_json['allow_ip_spoofing'] = True - network_interface_prototype_model_json['name'] = 'my-instance-network-interface' - network_interface_prototype_model_json['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model_json['security_groups'] = [security_group_identity_model] + network_interface_prototype_model_json[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model_json[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model_json['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model_json['subnet'] = subnet_identity_model # Construct a model instance of NetworkInterfacePrototype by calling from_dict on the json representation - network_interface_prototype_model = NetworkInterfacePrototype.from_dict(network_interface_prototype_model_json) + network_interface_prototype_model = NetworkInterfacePrototype.from_dict( + network_interface_prototype_model_json) assert network_interface_prototype_model != False # Construct a model instance of NetworkInterfacePrototype by calling from_dict on the json representation - network_interface_prototype_model_dict = NetworkInterfacePrototype.from_dict(network_interface_prototype_model_json).__dict__ - network_interface_prototype_model2 = NetworkInterfacePrototype(**network_interface_prototype_model_dict) + network_interface_prototype_model_dict = NetworkInterfacePrototype.from_dict( + network_interface_prototype_model_json).__dict__ + network_interface_prototype_model2 = NetworkInterfacePrototype( + **network_interface_prototype_model_dict) # Verify the model instances are equivalent assert network_interface_prototype_model == network_interface_prototype_model2 # Convert model instance back to dict and verify no loss of data - network_interface_prototype_model_json2 = network_interface_prototype_model.to_dict() + network_interface_prototype_model_json2 = network_interface_prototype_model.to_dict( + ) assert network_interface_prototype_model_json2 == network_interface_prototype_model_json @@ -63424,21 +71746,26 @@ def test_network_interface_reference_deleted_serialization(self): # Construct a json representation of a NetworkInterfaceReferenceDeleted model network_interface_reference_deleted_model_json = {} - network_interface_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of NetworkInterfaceReferenceDeleted by calling from_dict on the json representation - network_interface_reference_deleted_model = NetworkInterfaceReferenceDeleted.from_dict(network_interface_reference_deleted_model_json) + network_interface_reference_deleted_model = NetworkInterfaceReferenceDeleted.from_dict( + network_interface_reference_deleted_model_json) assert network_interface_reference_deleted_model != False # Construct a model instance of NetworkInterfaceReferenceDeleted by calling from_dict on the json representation - network_interface_reference_deleted_model_dict = NetworkInterfaceReferenceDeleted.from_dict(network_interface_reference_deleted_model_json).__dict__ - network_interface_reference_deleted_model2 = NetworkInterfaceReferenceDeleted(**network_interface_reference_deleted_model_dict) + network_interface_reference_deleted_model_dict = NetworkInterfaceReferenceDeleted.from_dict( + network_interface_reference_deleted_model_json).__dict__ + network_interface_reference_deleted_model2 = NetworkInterfaceReferenceDeleted( + **network_interface_reference_deleted_model_dict) # Verify the model instances are equivalent assert network_interface_reference_deleted_model == network_interface_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - network_interface_reference_deleted_model_json2 = network_interface_reference_deleted_model.to_dict() + network_interface_reference_deleted_model_json2 = network_interface_reference_deleted_model.to_dict( + ) assert network_interface_reference_deleted_model_json2 == network_interface_reference_deleted_model_json @@ -63447,28 +71774,35 @@ class TestModel_NetworkInterfaceReferenceTargetContextDeleted: Test Class for NetworkInterfaceReferenceTargetContextDeleted """ - def test_network_interface_reference_target_context_deleted_serialization(self): + def test_network_interface_reference_target_context_deleted_serialization( + self): """ Test serialization/deserialization for NetworkInterfaceReferenceTargetContextDeleted """ # Construct a json representation of a NetworkInterfaceReferenceTargetContextDeleted model network_interface_reference_target_context_deleted_model_json = {} - network_interface_reference_target_context_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_target_context_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of NetworkInterfaceReferenceTargetContextDeleted by calling from_dict on the json representation - network_interface_reference_target_context_deleted_model = NetworkInterfaceReferenceTargetContextDeleted.from_dict(network_interface_reference_target_context_deleted_model_json) + network_interface_reference_target_context_deleted_model = NetworkInterfaceReferenceTargetContextDeleted.from_dict( + network_interface_reference_target_context_deleted_model_json) assert network_interface_reference_target_context_deleted_model != False # Construct a model instance of NetworkInterfaceReferenceTargetContextDeleted by calling from_dict on the json representation - network_interface_reference_target_context_deleted_model_dict = NetworkInterfaceReferenceTargetContextDeleted.from_dict(network_interface_reference_target_context_deleted_model_json).__dict__ - network_interface_reference_target_context_deleted_model2 = NetworkInterfaceReferenceTargetContextDeleted(**network_interface_reference_target_context_deleted_model_dict) + network_interface_reference_target_context_deleted_model_dict = NetworkInterfaceReferenceTargetContextDeleted.from_dict( + network_interface_reference_target_context_deleted_model_json + ).__dict__ + network_interface_reference_target_context_deleted_model2 = NetworkInterfaceReferenceTargetContextDeleted( + **network_interface_reference_target_context_deleted_model_dict) # Verify the model instances are equivalent assert network_interface_reference_target_context_deleted_model == network_interface_reference_target_context_deleted_model2 # Convert model instance back to dict and verify no loss of data - network_interface_reference_target_context_deleted_model_json2 = network_interface_reference_target_context_deleted_model.to_dict() + network_interface_reference_target_context_deleted_model_json2 = network_interface_reference_target_context_deleted_model.to_dict( + ) assert network_interface_reference_target_context_deleted_model_json2 == network_interface_reference_target_context_deleted_model_json @@ -63485,44 +71819,60 @@ def test_network_interface_unpaginated_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' floating_ip_reference_model = {} # FloatingIPReference floating_ip_reference_model['address'] = '192.0.2.2' floating_ip_reference_model['crn'] = 'crn:[...]' - floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/181b8670-52bf-47af-a5ca-7aff7f3824d1' - floating_ip_reference_model['id'] = '181b8670-52bf-47af-a5ca-7aff7f3824d1' + floating_ip_reference_model[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/181b8670-52bf-47af-a5ca-7aff7f3824d1' + floating_ip_reference_model[ + 'id'] = '181b8670-52bf-47af-a5ca-7aff7f3824d1' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.0.32' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' - reserved_ip_reference_model['id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' reserved_ip_reference_model['name'] = 'my-reserved-ip-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference security_group_reference_model['crn'] = 'crn:[...]' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' - security_group_reference_model['id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' - security_group_reference_model['name'] = 'before-entrance-mountain-paralegal-photo-uninstall' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'name'] = 'before-entrance-mountain-paralegal-photo-uninstall' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference subnet_reference_model['crn'] = 'crn:[...]' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['id'] = '9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' @@ -63531,34 +71881,43 @@ def test_network_interface_unpaginated_collection_serialization(self): network_interface_model['allow_ip_spoofing'] = False network_interface_model['created_at'] = '2019-01-31T03:42:32.993000Z' network_interface_model['floating_ips'] = [floating_ip_reference_model] - network_interface_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/123a490a-9e64-4254-a93b-9a3af3ede270/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20' + network_interface_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/123a490a-9e64-4254-a93b-9a3af3ede270/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20' network_interface_model['id'] = '35bd3f19-bdd4-434b-ad6a-5e9358d65e20' - network_interface_model['name'] = 'molecule-find-wild-name-dictionary-trench' + network_interface_model[ + 'name'] = 'molecule-find-wild-name-dictionary-trench' network_interface_model['port_speed'] = 1000 network_interface_model['primary_ip'] = reserved_ip_reference_model network_interface_model['resource_type'] = 'network_interface' - network_interface_model['security_groups'] = [security_group_reference_model] + network_interface_model['security_groups'] = [ + security_group_reference_model + ] network_interface_model['status'] = 'available' network_interface_model['subnet'] = subnet_reference_model network_interface_model['type'] = 'primary' # Construct a json representation of a NetworkInterfaceUnpaginatedCollection model network_interface_unpaginated_collection_model_json = {} - network_interface_unpaginated_collection_model_json['network_interfaces'] = [network_interface_model] + network_interface_unpaginated_collection_model_json[ + 'network_interfaces'] = [network_interface_model] # Construct a model instance of NetworkInterfaceUnpaginatedCollection by calling from_dict on the json representation - network_interface_unpaginated_collection_model = NetworkInterfaceUnpaginatedCollection.from_dict(network_interface_unpaginated_collection_model_json) + network_interface_unpaginated_collection_model = NetworkInterfaceUnpaginatedCollection.from_dict( + network_interface_unpaginated_collection_model_json) assert network_interface_unpaginated_collection_model != False # Construct a model instance of NetworkInterfaceUnpaginatedCollection by calling from_dict on the json representation - network_interface_unpaginated_collection_model_dict = NetworkInterfaceUnpaginatedCollection.from_dict(network_interface_unpaginated_collection_model_json).__dict__ - network_interface_unpaginated_collection_model2 = NetworkInterfaceUnpaginatedCollection(**network_interface_unpaginated_collection_model_dict) + network_interface_unpaginated_collection_model_dict = NetworkInterfaceUnpaginatedCollection.from_dict( + network_interface_unpaginated_collection_model_json).__dict__ + network_interface_unpaginated_collection_model2 = NetworkInterfaceUnpaginatedCollection( + **network_interface_unpaginated_collection_model_dict) # Verify the model instances are equivalent assert network_interface_unpaginated_collection_model == network_interface_unpaginated_collection_model2 # Convert model instance back to dict and verify no loss of data - network_interface_unpaginated_collection_model_json2 = network_interface_unpaginated_collection_model.to_dict() + network_interface_unpaginated_collection_model_json2 = network_interface_unpaginated_collection_model.to_dict( + ) assert network_interface_unpaginated_collection_model_json2 == network_interface_unpaginated_collection_model_json @@ -63574,21 +71933,27 @@ def test_operating_system_serialization(self): # Construct a json representation of a OperatingSystem model operating_system_model_json = {} + operating_system_model_json['allow_user_image_creation'] = True operating_system_model_json['architecture'] = 'amd64' operating_system_model_json['dedicated_host_only'] = False - operating_system_model_json['display_name'] = 'Ubuntu Server 16.04 LTS amd64' + operating_system_model_json[ + 'display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model_json['family'] = 'Ubuntu Server' - operating_system_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model_json['name'] = 'ubuntu-16-amd64' + operating_system_model_json['user_data_format'] = 'cloud_init' operating_system_model_json['vendor'] = 'Canonical' operating_system_model_json['version'] = '16.04 LTS' # Construct a model instance of OperatingSystem by calling from_dict on the json representation - operating_system_model = OperatingSystem.from_dict(operating_system_model_json) + operating_system_model = OperatingSystem.from_dict( + operating_system_model_json) assert operating_system_model != False # Construct a model instance of OperatingSystem by calling from_dict on the json representation - operating_system_model_dict = OperatingSystem.from_dict(operating_system_model_json).__dict__ + operating_system_model_dict = OperatingSystem.from_dict( + operating_system_model_json).__dict__ operating_system_model2 = OperatingSystem(**operating_system_model_dict) # Verify the model instances are equivalent @@ -63611,43 +71976,58 @@ def test_operating_system_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - operating_system_collection_first_model = {} # OperatingSystemCollectionFirst - operating_system_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20' + operating_system_collection_first_model = { + } # OperatingSystemCollectionFirst + operating_system_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20' - operating_system_collection_next_model = {} # OperatingSystemCollectionNext - operating_system_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + operating_system_collection_next_model = { + } # OperatingSystemCollectionNext + operating_system_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' operating_system_model = {} # OperatingSystem + operating_system_model['allow_user_image_creation'] = True operating_system_model['architecture'] = 'amd64' operating_system_model['dedicated_host_only'] = False operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model['family'] = 'Ubuntu Server' - operating_system_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model['name'] = 'ubuntu-16-amd64' + operating_system_model['user_data_format'] = 'cloud_init' operating_system_model['vendor'] = 'Canonical' operating_system_model['version'] = '16.04 LTS' # Construct a json representation of a OperatingSystemCollection model operating_system_collection_model_json = {} - operating_system_collection_model_json['first'] = operating_system_collection_first_model + operating_system_collection_model_json[ + 'first'] = operating_system_collection_first_model operating_system_collection_model_json['limit'] = 20 - operating_system_collection_model_json['next'] = operating_system_collection_next_model - operating_system_collection_model_json['operating_systems'] = [operating_system_model] + operating_system_collection_model_json[ + 'next'] = operating_system_collection_next_model + operating_system_collection_model_json['operating_systems'] = [ + operating_system_model + ] operating_system_collection_model_json['total_count'] = 132 # Construct a model instance of OperatingSystemCollection by calling from_dict on the json representation - operating_system_collection_model = OperatingSystemCollection.from_dict(operating_system_collection_model_json) + operating_system_collection_model = OperatingSystemCollection.from_dict( + operating_system_collection_model_json) assert operating_system_collection_model != False # Construct a model instance of OperatingSystemCollection by calling from_dict on the json representation - operating_system_collection_model_dict = OperatingSystemCollection.from_dict(operating_system_collection_model_json).__dict__ - operating_system_collection_model2 = OperatingSystemCollection(**operating_system_collection_model_dict) + operating_system_collection_model_dict = OperatingSystemCollection.from_dict( + operating_system_collection_model_json).__dict__ + operating_system_collection_model2 = OperatingSystemCollection( + **operating_system_collection_model_dict) # Verify the model instances are equivalent assert operating_system_collection_model == operating_system_collection_model2 # Convert model instance back to dict and verify no loss of data - operating_system_collection_model_json2 = operating_system_collection_model.to_dict() + operating_system_collection_model_json2 = operating_system_collection_model.to_dict( + ) assert operating_system_collection_model_json2 == operating_system_collection_model_json @@ -63663,21 +72043,26 @@ def test_operating_system_collection_first_serialization(self): # Construct a json representation of a OperatingSystemCollectionFirst model operating_system_collection_first_model_json = {} - operating_system_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20' + operating_system_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20' # Construct a model instance of OperatingSystemCollectionFirst by calling from_dict on the json representation - operating_system_collection_first_model = OperatingSystemCollectionFirst.from_dict(operating_system_collection_first_model_json) + operating_system_collection_first_model = OperatingSystemCollectionFirst.from_dict( + operating_system_collection_first_model_json) assert operating_system_collection_first_model != False # Construct a model instance of OperatingSystemCollectionFirst by calling from_dict on the json representation - operating_system_collection_first_model_dict = OperatingSystemCollectionFirst.from_dict(operating_system_collection_first_model_json).__dict__ - operating_system_collection_first_model2 = OperatingSystemCollectionFirst(**operating_system_collection_first_model_dict) + operating_system_collection_first_model_dict = OperatingSystemCollectionFirst.from_dict( + operating_system_collection_first_model_json).__dict__ + operating_system_collection_first_model2 = OperatingSystemCollectionFirst( + **operating_system_collection_first_model_dict) # Verify the model instances are equivalent assert operating_system_collection_first_model == operating_system_collection_first_model2 # Convert model instance back to dict and verify no loss of data - operating_system_collection_first_model_json2 = operating_system_collection_first_model.to_dict() + operating_system_collection_first_model_json2 = operating_system_collection_first_model.to_dict( + ) assert operating_system_collection_first_model_json2 == operating_system_collection_first_model_json @@ -63693,21 +72078,26 @@ def test_operating_system_collection_next_serialization(self): # Construct a json representation of a OperatingSystemCollectionNext model operating_system_collection_next_model_json = {} - operating_system_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + operating_system_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of OperatingSystemCollectionNext by calling from_dict on the json representation - operating_system_collection_next_model = OperatingSystemCollectionNext.from_dict(operating_system_collection_next_model_json) + operating_system_collection_next_model = OperatingSystemCollectionNext.from_dict( + operating_system_collection_next_model_json) assert operating_system_collection_next_model != False # Construct a model instance of OperatingSystemCollectionNext by calling from_dict on the json representation - operating_system_collection_next_model_dict = OperatingSystemCollectionNext.from_dict(operating_system_collection_next_model_json).__dict__ - operating_system_collection_next_model2 = OperatingSystemCollectionNext(**operating_system_collection_next_model_dict) + operating_system_collection_next_model_dict = OperatingSystemCollectionNext.from_dict( + operating_system_collection_next_model_json).__dict__ + operating_system_collection_next_model2 = OperatingSystemCollectionNext( + **operating_system_collection_next_model_dict) # Verify the model instances are equivalent assert operating_system_collection_next_model == operating_system_collection_next_model2 # Convert model instance back to dict and verify no loss of data - operating_system_collection_next_model_json2 = operating_system_collection_next_model.to_dict() + operating_system_collection_next_model_json2 = operating_system_collection_next_model.to_dict( + ) assert operating_system_collection_next_model_json2 == operating_system_collection_next_model_json @@ -63724,28 +72114,36 @@ def test_placement_group_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' - resource_group_reference_model['id'] = '4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'id'] = '4bbce614c13444cd8fc5e7e878ef8e21' resource_group_reference_model['name'] = 'Default' # Construct a json representation of a PlacementGroup model placement_group_model_json = {} placement_group_model_json['created_at'] = '2019-01-01T12:00:00Z' - placement_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871' - placement_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' - placement_group_model_json['id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + placement_group_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + placement_group_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + placement_group_model_json[ + 'id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' placement_group_model_json['lifecycle_state'] = 'stable' placement_group_model_json['name'] = 'my-placement-group' - placement_group_model_json['resource_group'] = resource_group_reference_model + placement_group_model_json[ + 'resource_group'] = resource_group_reference_model placement_group_model_json['resource_type'] = 'placement_group' placement_group_model_json['strategy'] = 'host_spread' # Construct a model instance of PlacementGroup by calling from_dict on the json representation - placement_group_model = PlacementGroup.from_dict(placement_group_model_json) + placement_group_model = PlacementGroup.from_dict( + placement_group_model_json) assert placement_group_model != False # Construct a model instance of PlacementGroup by calling from_dict on the json representation - placement_group_model_dict = PlacementGroup.from_dict(placement_group_model_json).__dict__ + placement_group_model_dict = PlacementGroup.from_dict( + placement_group_model_json).__dict__ placement_group_model2 = PlacementGroup(**placement_group_model_dict) # Verify the model instances are equivalent @@ -63768,22 +72166,30 @@ def test_placement_group_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - placement_group_collection_first_model = {} # PlacementGroupCollectionFirst - placement_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=50' + placement_group_collection_first_model = { + } # PlacementGroupCollectionFirst + placement_group_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=50' - placement_group_collection_next_model = {} # PlacementGroupCollectionNext - placement_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + placement_group_collection_next_model = { + } # PlacementGroupCollectionNext + placement_group_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' - resource_group_reference_model['id'] = '4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'id'] = '4bbce614c13444cd8fc5e7e878ef8e21' resource_group_reference_model['name'] = 'Default' placement_group_model = {} # PlacementGroup placement_group_model['created_at'] = '2020-12-29T19:55:00Z' placement_group_model['crn'] = 'crn:[...]' - placement_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' - placement_group_model['id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + placement_group_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + placement_group_model[ + 'id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' placement_group_model['lifecycle_state'] = 'stable' placement_group_model['name'] = 'my-updated-placement-group' placement_group_model['resource_group'] = resource_group_reference_model @@ -63792,25 +72198,33 @@ def test_placement_group_collection_serialization(self): # Construct a json representation of a PlacementGroupCollection model placement_group_collection_model_json = {} - placement_group_collection_model_json['first'] = placement_group_collection_first_model + placement_group_collection_model_json[ + 'first'] = placement_group_collection_first_model placement_group_collection_model_json['limit'] = 20 - placement_group_collection_model_json['next'] = placement_group_collection_next_model - placement_group_collection_model_json['placement_groups'] = [placement_group_model] + placement_group_collection_model_json[ + 'next'] = placement_group_collection_next_model + placement_group_collection_model_json['placement_groups'] = [ + placement_group_model + ] placement_group_collection_model_json['total_count'] = 132 # Construct a model instance of PlacementGroupCollection by calling from_dict on the json representation - placement_group_collection_model = PlacementGroupCollection.from_dict(placement_group_collection_model_json) + placement_group_collection_model = PlacementGroupCollection.from_dict( + placement_group_collection_model_json) assert placement_group_collection_model != False # Construct a model instance of PlacementGroupCollection by calling from_dict on the json representation - placement_group_collection_model_dict = PlacementGroupCollection.from_dict(placement_group_collection_model_json).__dict__ - placement_group_collection_model2 = PlacementGroupCollection(**placement_group_collection_model_dict) + placement_group_collection_model_dict = PlacementGroupCollection.from_dict( + placement_group_collection_model_json).__dict__ + placement_group_collection_model2 = PlacementGroupCollection( + **placement_group_collection_model_dict) # Verify the model instances are equivalent assert placement_group_collection_model == placement_group_collection_model2 # Convert model instance back to dict and verify no loss of data - placement_group_collection_model_json2 = placement_group_collection_model.to_dict() + placement_group_collection_model_json2 = placement_group_collection_model.to_dict( + ) assert placement_group_collection_model_json2 == placement_group_collection_model_json @@ -63826,21 +72240,26 @@ def test_placement_group_collection_first_serialization(self): # Construct a json representation of a PlacementGroupCollectionFirst model placement_group_collection_first_model_json = {} - placement_group_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20' + placement_group_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20' # Construct a model instance of PlacementGroupCollectionFirst by calling from_dict on the json representation - placement_group_collection_first_model = PlacementGroupCollectionFirst.from_dict(placement_group_collection_first_model_json) + placement_group_collection_first_model = PlacementGroupCollectionFirst.from_dict( + placement_group_collection_first_model_json) assert placement_group_collection_first_model != False # Construct a model instance of PlacementGroupCollectionFirst by calling from_dict on the json representation - placement_group_collection_first_model_dict = PlacementGroupCollectionFirst.from_dict(placement_group_collection_first_model_json).__dict__ - placement_group_collection_first_model2 = PlacementGroupCollectionFirst(**placement_group_collection_first_model_dict) + placement_group_collection_first_model_dict = PlacementGroupCollectionFirst.from_dict( + placement_group_collection_first_model_json).__dict__ + placement_group_collection_first_model2 = PlacementGroupCollectionFirst( + **placement_group_collection_first_model_dict) # Verify the model instances are equivalent assert placement_group_collection_first_model == placement_group_collection_first_model2 # Convert model instance back to dict and verify no loss of data - placement_group_collection_first_model_json2 = placement_group_collection_first_model.to_dict() + placement_group_collection_first_model_json2 = placement_group_collection_first_model.to_dict( + ) assert placement_group_collection_first_model_json2 == placement_group_collection_first_model_json @@ -63856,21 +72275,26 @@ def test_placement_group_collection_next_serialization(self): # Construct a json representation of a PlacementGroupCollectionNext model placement_group_collection_next_model_json = {} - placement_group_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + placement_group_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of PlacementGroupCollectionNext by calling from_dict on the json representation - placement_group_collection_next_model = PlacementGroupCollectionNext.from_dict(placement_group_collection_next_model_json) + placement_group_collection_next_model = PlacementGroupCollectionNext.from_dict( + placement_group_collection_next_model_json) assert placement_group_collection_next_model != False # Construct a model instance of PlacementGroupCollectionNext by calling from_dict on the json representation - placement_group_collection_next_model_dict = PlacementGroupCollectionNext.from_dict(placement_group_collection_next_model_json).__dict__ - placement_group_collection_next_model2 = PlacementGroupCollectionNext(**placement_group_collection_next_model_dict) + placement_group_collection_next_model_dict = PlacementGroupCollectionNext.from_dict( + placement_group_collection_next_model_json).__dict__ + placement_group_collection_next_model2 = PlacementGroupCollectionNext( + **placement_group_collection_next_model_dict) # Verify the model instances are equivalent assert placement_group_collection_next_model == placement_group_collection_next_model2 # Convert model instance back to dict and verify no loss of data - placement_group_collection_next_model_json2 = placement_group_collection_next_model.to_dict() + placement_group_collection_next_model_json2 = placement_group_collection_next_model.to_dict( + ) assert placement_group_collection_next_model_json2 == placement_group_collection_next_model_json @@ -63889,18 +72313,22 @@ def test_placement_group_patch_serialization(self): placement_group_patch_model_json['name'] = 'my-placement-group' # Construct a model instance of PlacementGroupPatch by calling from_dict on the json representation - placement_group_patch_model = PlacementGroupPatch.from_dict(placement_group_patch_model_json) + placement_group_patch_model = PlacementGroupPatch.from_dict( + placement_group_patch_model_json) assert placement_group_patch_model != False # Construct a model instance of PlacementGroupPatch by calling from_dict on the json representation - placement_group_patch_model_dict = PlacementGroupPatch.from_dict(placement_group_patch_model_json).__dict__ - placement_group_patch_model2 = PlacementGroupPatch(**placement_group_patch_model_dict) + placement_group_patch_model_dict = PlacementGroupPatch.from_dict( + placement_group_patch_model_json).__dict__ + placement_group_patch_model2 = PlacementGroupPatch( + **placement_group_patch_model_dict) # Verify the model instances are equivalent assert placement_group_patch_model == placement_group_patch_model2 # Convert model instance back to dict and verify no loss of data - placement_group_patch_model_json2 = placement_group_patch_model.to_dict() + placement_group_patch_model_json2 = placement_group_patch_model.to_dict( + ) assert placement_group_patch_model_json2 == placement_group_patch_model_json @@ -63916,21 +72344,26 @@ def test_placement_group_reference_deleted_serialization(self): # Construct a json representation of a PlacementGroupReferenceDeleted model placement_group_reference_deleted_model_json = {} - placement_group_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + placement_group_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of PlacementGroupReferenceDeleted by calling from_dict on the json representation - placement_group_reference_deleted_model = PlacementGroupReferenceDeleted.from_dict(placement_group_reference_deleted_model_json) + placement_group_reference_deleted_model = PlacementGroupReferenceDeleted.from_dict( + placement_group_reference_deleted_model_json) assert placement_group_reference_deleted_model != False # Construct a model instance of PlacementGroupReferenceDeleted by calling from_dict on the json representation - placement_group_reference_deleted_model_dict = PlacementGroupReferenceDeleted.from_dict(placement_group_reference_deleted_model_json).__dict__ - placement_group_reference_deleted_model2 = PlacementGroupReferenceDeleted(**placement_group_reference_deleted_model_dict) + placement_group_reference_deleted_model_dict = PlacementGroupReferenceDeleted.from_dict( + placement_group_reference_deleted_model_json).__dict__ + placement_group_reference_deleted_model2 = PlacementGroupReferenceDeleted( + **placement_group_reference_deleted_model_dict) # Verify the model instances are equivalent assert placement_group_reference_deleted_model == placement_group_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - placement_group_reference_deleted_model_json2 = placement_group_reference_deleted_model.to_dict() + placement_group_reference_deleted_model_json2 = placement_group_reference_deleted_model.to_dict( + ) assert placement_group_reference_deleted_model_json2 == placement_group_reference_deleted_model_json @@ -63947,56 +72380,73 @@ def test_public_gateway_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' public_gateway_floating_ip_model = {} # PublicGatewayFloatingIp public_gateway_floating_ip_model['address'] = '203.0.113.1' - public_gateway_floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - public_gateway_floating_ip_model['deleted'] = floating_ip_reference_deleted_model - public_gateway_floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - public_gateway_floating_ip_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model[ + 'deleted'] = floating_ip_reference_deleted_model + public_gateway_floating_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' public_gateway_floating_ip_model['name'] = 'my-floating-ip' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a PublicGateway model public_gateway_model_json = {} public_gateway_model_json['created_at'] = '2019-01-01T12:00:00Z' - public_gateway_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' - public_gateway_model_json['floating_ip'] = public_gateway_floating_ip_model - public_gateway_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_model_json[ + 'floating_ip'] = public_gateway_floating_ip_model + public_gateway_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_model_json['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_model_json['name'] = 'my-public-gateway' - public_gateway_model_json['resource_group'] = resource_group_reference_model + public_gateway_model_json[ + 'resource_group'] = resource_group_reference_model public_gateway_model_json['resource_type'] = 'public_gateway' public_gateway_model_json['status'] = 'available' public_gateway_model_json['vpc'] = vpc_reference_model public_gateway_model_json['zone'] = zone_reference_model # Construct a model instance of PublicGateway by calling from_dict on the json representation - public_gateway_model = PublicGateway.from_dict(public_gateway_model_json) + public_gateway_model = PublicGateway.from_dict( + public_gateway_model_json) assert public_gateway_model != False # Construct a model instance of PublicGateway by calling from_dict on the json representation - public_gateway_model_dict = PublicGateway.from_dict(public_gateway_model_json).__dict__ + public_gateway_model_dict = PublicGateway.from_dict( + public_gateway_model_json).__dict__ public_gateway_model2 = PublicGateway(**public_gateway_model_dict) # Verify the model instances are equivalent @@ -64019,48 +72469,64 @@ def test_public_gateway_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - public_gateway_collection_first_model = {} # PublicGatewayCollectionFirst - public_gateway_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20' + public_gateway_collection_first_model = { + } # PublicGatewayCollectionFirst + public_gateway_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20' public_gateway_collection_next_model = {} # PublicGatewayCollectionNext - public_gateway_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + public_gateway_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' public_gateway_floating_ip_model = {} # PublicGatewayFloatingIp public_gateway_floating_ip_model['address'] = '203.0.113.1' - public_gateway_floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - public_gateway_floating_ip_model['deleted'] = floating_ip_reference_deleted_model - public_gateway_floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - public_gateway_floating_ip_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model[ + 'deleted'] = floating_ip_reference_deleted_model + public_gateway_floating_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' public_gateway_floating_ip_model['name'] = 'my-floating-ip' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' public_gateway_model = {} # PublicGateway public_gateway_model['created_at'] = '2019-01-01T12:00:00Z' - public_gateway_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_model['floating_ip'] = public_gateway_floating_ip_model - public_gateway_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_model['name'] = 'my-public-gateway' public_gateway_model['resource_group'] = resource_group_reference_model @@ -64071,25 +72537,33 @@ def test_public_gateway_collection_serialization(self): # Construct a json representation of a PublicGatewayCollection model public_gateway_collection_model_json = {} - public_gateway_collection_model_json['first'] = public_gateway_collection_first_model + public_gateway_collection_model_json[ + 'first'] = public_gateway_collection_first_model public_gateway_collection_model_json['limit'] = 20 - public_gateway_collection_model_json['next'] = public_gateway_collection_next_model - public_gateway_collection_model_json['public_gateways'] = [public_gateway_model] + public_gateway_collection_model_json[ + 'next'] = public_gateway_collection_next_model + public_gateway_collection_model_json['public_gateways'] = [ + public_gateway_model + ] public_gateway_collection_model_json['total_count'] = 132 # Construct a model instance of PublicGatewayCollection by calling from_dict on the json representation - public_gateway_collection_model = PublicGatewayCollection.from_dict(public_gateway_collection_model_json) + public_gateway_collection_model = PublicGatewayCollection.from_dict( + public_gateway_collection_model_json) assert public_gateway_collection_model != False # Construct a model instance of PublicGatewayCollection by calling from_dict on the json representation - public_gateway_collection_model_dict = PublicGatewayCollection.from_dict(public_gateway_collection_model_json).__dict__ - public_gateway_collection_model2 = PublicGatewayCollection(**public_gateway_collection_model_dict) + public_gateway_collection_model_dict = PublicGatewayCollection.from_dict( + public_gateway_collection_model_json).__dict__ + public_gateway_collection_model2 = PublicGatewayCollection( + **public_gateway_collection_model_dict) # Verify the model instances are equivalent assert public_gateway_collection_model == public_gateway_collection_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_collection_model_json2 = public_gateway_collection_model.to_dict() + public_gateway_collection_model_json2 = public_gateway_collection_model.to_dict( + ) assert public_gateway_collection_model_json2 == public_gateway_collection_model_json @@ -64105,21 +72579,26 @@ def test_public_gateway_collection_first_serialization(self): # Construct a json representation of a PublicGatewayCollectionFirst model public_gateway_collection_first_model_json = {} - public_gateway_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20' + public_gateway_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20' # Construct a model instance of PublicGatewayCollectionFirst by calling from_dict on the json representation - public_gateway_collection_first_model = PublicGatewayCollectionFirst.from_dict(public_gateway_collection_first_model_json) + public_gateway_collection_first_model = PublicGatewayCollectionFirst.from_dict( + public_gateway_collection_first_model_json) assert public_gateway_collection_first_model != False # Construct a model instance of PublicGatewayCollectionFirst by calling from_dict on the json representation - public_gateway_collection_first_model_dict = PublicGatewayCollectionFirst.from_dict(public_gateway_collection_first_model_json).__dict__ - public_gateway_collection_first_model2 = PublicGatewayCollectionFirst(**public_gateway_collection_first_model_dict) + public_gateway_collection_first_model_dict = PublicGatewayCollectionFirst.from_dict( + public_gateway_collection_first_model_json).__dict__ + public_gateway_collection_first_model2 = PublicGatewayCollectionFirst( + **public_gateway_collection_first_model_dict) # Verify the model instances are equivalent assert public_gateway_collection_first_model == public_gateway_collection_first_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_collection_first_model_json2 = public_gateway_collection_first_model.to_dict() + public_gateway_collection_first_model_json2 = public_gateway_collection_first_model.to_dict( + ) assert public_gateway_collection_first_model_json2 == public_gateway_collection_first_model_json @@ -64135,21 +72614,26 @@ def test_public_gateway_collection_next_serialization(self): # Construct a json representation of a PublicGatewayCollectionNext model public_gateway_collection_next_model_json = {} - public_gateway_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + public_gateway_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of PublicGatewayCollectionNext by calling from_dict on the json representation - public_gateway_collection_next_model = PublicGatewayCollectionNext.from_dict(public_gateway_collection_next_model_json) + public_gateway_collection_next_model = PublicGatewayCollectionNext.from_dict( + public_gateway_collection_next_model_json) assert public_gateway_collection_next_model != False # Construct a model instance of PublicGatewayCollectionNext by calling from_dict on the json representation - public_gateway_collection_next_model_dict = PublicGatewayCollectionNext.from_dict(public_gateway_collection_next_model_json).__dict__ - public_gateway_collection_next_model2 = PublicGatewayCollectionNext(**public_gateway_collection_next_model_dict) + public_gateway_collection_next_model_dict = PublicGatewayCollectionNext.from_dict( + public_gateway_collection_next_model_json).__dict__ + public_gateway_collection_next_model2 = PublicGatewayCollectionNext( + **public_gateway_collection_next_model_dict) # Verify the model instances are equivalent assert public_gateway_collection_next_model == public_gateway_collection_next_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_collection_next_model_json2 = public_gateway_collection_next_model.to_dict() + public_gateway_collection_next_model_json2 = public_gateway_collection_next_model.to_dict( + ) assert public_gateway_collection_next_model_json2 == public_gateway_collection_next_model_json @@ -64166,30 +72650,39 @@ def test_public_gateway_floating_ip_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a PublicGatewayFloatingIp model public_gateway_floating_ip_model_json = {} public_gateway_floating_ip_model_json['address'] = '203.0.113.1' - public_gateway_floating_ip_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - public_gateway_floating_ip_model_json['deleted'] = floating_ip_reference_deleted_model - public_gateway_floating_ip_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - public_gateway_floating_ip_model_json['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model_json[ + 'deleted'] = floating_ip_reference_deleted_model + public_gateway_floating_ip_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_model_json[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' public_gateway_floating_ip_model_json['name'] = 'my-floating-ip' # Construct a model instance of PublicGatewayFloatingIp by calling from_dict on the json representation - public_gateway_floating_ip_model = PublicGatewayFloatingIp.from_dict(public_gateway_floating_ip_model_json) + public_gateway_floating_ip_model = PublicGatewayFloatingIp.from_dict( + public_gateway_floating_ip_model_json) assert public_gateway_floating_ip_model != False # Construct a model instance of PublicGatewayFloatingIp by calling from_dict on the json representation - public_gateway_floating_ip_model_dict = PublicGatewayFloatingIp.from_dict(public_gateway_floating_ip_model_json).__dict__ - public_gateway_floating_ip_model2 = PublicGatewayFloatingIp(**public_gateway_floating_ip_model_dict) + public_gateway_floating_ip_model_dict = PublicGatewayFloatingIp.from_dict( + public_gateway_floating_ip_model_json).__dict__ + public_gateway_floating_ip_model2 = PublicGatewayFloatingIp( + **public_gateway_floating_ip_model_dict) # Verify the model instances are equivalent assert public_gateway_floating_ip_model == public_gateway_floating_ip_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_floating_ip_model_json2 = public_gateway_floating_ip_model.to_dict() + public_gateway_floating_ip_model_json2 = public_gateway_floating_ip_model.to_dict( + ) assert public_gateway_floating_ip_model_json2 == public_gateway_floating_ip_model_json @@ -64208,12 +72701,15 @@ def test_public_gateway_patch_serialization(self): public_gateway_patch_model_json['name'] = 'my-public-gateway' # Construct a model instance of PublicGatewayPatch by calling from_dict on the json representation - public_gateway_patch_model = PublicGatewayPatch.from_dict(public_gateway_patch_model_json) + public_gateway_patch_model = PublicGatewayPatch.from_dict( + public_gateway_patch_model_json) assert public_gateway_patch_model != False # Construct a model instance of PublicGatewayPatch by calling from_dict on the json representation - public_gateway_patch_model_dict = PublicGatewayPatch.from_dict(public_gateway_patch_model_json).__dict__ - public_gateway_patch_model2 = PublicGatewayPatch(**public_gateway_patch_model_dict) + public_gateway_patch_model_dict = PublicGatewayPatch.from_dict( + public_gateway_patch_model_json).__dict__ + public_gateway_patch_model2 = PublicGatewayPatch( + **public_gateway_patch_model_dict) # Verify the model instances are equivalent assert public_gateway_patch_model == public_gateway_patch_model2 @@ -64235,31 +72731,41 @@ def test_public_gateway_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted - public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + public_gateway_reference_deleted_model = { + } # PublicGatewayReferenceDeleted + public_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a PublicGatewayReference model public_gateway_reference_model_json = {} - public_gateway_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' - public_gateway_reference_model_json['deleted'] = public_gateway_reference_deleted_model - public_gateway_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' - public_gateway_reference_model_json['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model_json[ + 'deleted'] = public_gateway_reference_deleted_model + public_gateway_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model_json[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_reference_model_json['name'] = 'my-public-gateway' public_gateway_reference_model_json['resource_type'] = 'public_gateway' # Construct a model instance of PublicGatewayReference by calling from_dict on the json representation - public_gateway_reference_model = PublicGatewayReference.from_dict(public_gateway_reference_model_json) + public_gateway_reference_model = PublicGatewayReference.from_dict( + public_gateway_reference_model_json) assert public_gateway_reference_model != False # Construct a model instance of PublicGatewayReference by calling from_dict on the json representation - public_gateway_reference_model_dict = PublicGatewayReference.from_dict(public_gateway_reference_model_json).__dict__ - public_gateway_reference_model2 = PublicGatewayReference(**public_gateway_reference_model_dict) + public_gateway_reference_model_dict = PublicGatewayReference.from_dict( + public_gateway_reference_model_json).__dict__ + public_gateway_reference_model2 = PublicGatewayReference( + **public_gateway_reference_model_dict) # Verify the model instances are equivalent assert public_gateway_reference_model == public_gateway_reference_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_reference_model_json2 = public_gateway_reference_model.to_dict() + public_gateway_reference_model_json2 = public_gateway_reference_model.to_dict( + ) assert public_gateway_reference_model_json2 == public_gateway_reference_model_json @@ -64275,21 +72781,26 @@ def test_public_gateway_reference_deleted_serialization(self): # Construct a json representation of a PublicGatewayReferenceDeleted model public_gateway_reference_deleted_model_json = {} - public_gateway_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + public_gateway_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of PublicGatewayReferenceDeleted by calling from_dict on the json representation - public_gateway_reference_deleted_model = PublicGatewayReferenceDeleted.from_dict(public_gateway_reference_deleted_model_json) + public_gateway_reference_deleted_model = PublicGatewayReferenceDeleted.from_dict( + public_gateway_reference_deleted_model_json) assert public_gateway_reference_deleted_model != False # Construct a model instance of PublicGatewayReferenceDeleted by calling from_dict on the json representation - public_gateway_reference_deleted_model_dict = PublicGatewayReferenceDeleted.from_dict(public_gateway_reference_deleted_model_json).__dict__ - public_gateway_reference_deleted_model2 = PublicGatewayReferenceDeleted(**public_gateway_reference_deleted_model_dict) + public_gateway_reference_deleted_model_dict = PublicGatewayReferenceDeleted.from_dict( + public_gateway_reference_deleted_model_json).__dict__ + public_gateway_reference_deleted_model2 = PublicGatewayReferenceDeleted( + **public_gateway_reference_deleted_model_dict) # Verify the model instances are equivalent assert public_gateway_reference_deleted_model == public_gateway_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_reference_deleted_model_json2 = public_gateway_reference_deleted_model.to_dict() + public_gateway_reference_deleted_model_json2 = public_gateway_reference_deleted_model.to_dict( + ) assert public_gateway_reference_deleted_model_json2 == public_gateway_reference_deleted_model_json @@ -64306,7 +72817,8 @@ def test_region_serialization(self): # Construct a json representation of a Region model region_model_json = {} region_model_json['endpoint'] = 'testString' - region_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_model_json['name'] = 'us-south' region_model_json['status'] = 'available' @@ -64340,7 +72852,8 @@ def test_region_collection_serialization(self): region_model = {} # Region region_model['endpoint'] = 'testString' - region_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_model['name'] = 'us-south' region_model['status'] = 'available' @@ -64349,12 +72862,15 @@ def test_region_collection_serialization(self): region_collection_model_json['regions'] = [region_model] # Construct a model instance of RegionCollection by calling from_dict on the json representation - region_collection_model = RegionCollection.from_dict(region_collection_model_json) + region_collection_model = RegionCollection.from_dict( + region_collection_model_json) assert region_collection_model != False # Construct a model instance of RegionCollection by calling from_dict on the json representation - region_collection_model_dict = RegionCollection.from_dict(region_collection_model_json).__dict__ - region_collection_model2 = RegionCollection(**region_collection_model_dict) + region_collection_model_dict = RegionCollection.from_dict( + region_collection_model_json).__dict__ + region_collection_model2 = RegionCollection( + **region_collection_model_dict) # Verify the model instances are equivalent assert region_collection_model == region_collection_model2 @@ -64376,15 +72892,18 @@ def test_region_reference_serialization(self): # Construct a json representation of a RegionReference model region_reference_model_json = {} - region_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model_json['name'] = 'us-south' # Construct a model instance of RegionReference by calling from_dict on the json representation - region_reference_model = RegionReference.from_dict(region_reference_model_json) + region_reference_model = RegionReference.from_dict( + region_reference_model_json) assert region_reference_model != False # Construct a model instance of RegionReference by calling from_dict on the json representation - region_reference_model_dict = RegionReference.from_dict(region_reference_model_json).__dict__ + region_reference_model_dict = RegionReference.from_dict( + region_reference_model_json).__dict__ region_reference_model2 = RegionReference(**region_reference_model_dict) # Verify the model instances are equivalent @@ -64415,45 +72934,60 @@ def test_reservation_serialization(self): reservation_capacity_model['used'] = 8 reservation_committed_use_model = {} # ReservationCommittedUse - reservation_committed_use_model['expiration_at'] = '2024-12-29T19:55:00Z' + reservation_committed_use_model[ + 'expiration_at'] = '2024-12-29T19:55:00Z' reservation_committed_use_model['expiration_policy'] = 'renew' reservation_committed_use_model['term'] = 'one_year' reservation_profile_model = {} # ReservationProfile - reservation_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-2x8' + reservation_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-2x8' reservation_profile_model['name'] = 'bx2-2x8' reservation_profile_model['resource_type'] = 'instance_profile' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' - resource_group_reference_model['id'] = '4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'id'] = '4bbce614c13444cd8fc5e7e878ef8e21' resource_group_reference_model['name'] = 'Default' reservation_status_reason_model = {} # ReservationStatusReason - reservation_status_reason_model['code'] = 'cannot_activate_no_capacity_available' - reservation_status_reason_model['message'] = 'The reservation cannot be activated because capacity is unavailable' - reservation_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons' + reservation_status_reason_model[ + 'code'] = 'cannot_activate_no_capacity_available' + reservation_status_reason_model[ + 'message'] = 'The reservation cannot be activated because capacity is unavailable' + reservation_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a Reservation model reservation_model_json = {} reservation_model_json['affinity_policy'] = 'restricted' reservation_model_json['capacity'] = reservation_capacity_model - reservation_model_json['committed_use'] = reservation_committed_use_model + reservation_model_json[ + 'committed_use'] = reservation_committed_use_model reservation_model_json['created_at'] = '2019-01-01T12:00:00Z' - reservation_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_model_json['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_model_json[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_model_json['lifecycle_state'] = 'stable' reservation_model_json['name'] = 'my-reservation' reservation_model_json['profile'] = reservation_profile_model - reservation_model_json['resource_group'] = resource_group_reference_model + reservation_model_json[ + 'resource_group'] = resource_group_reference_model reservation_model_json['resource_type'] = 'reservation' reservation_model_json['status'] = 'activating' - reservation_model_json['status_reasons'] = [reservation_status_reason_model] + reservation_model_json['status_reasons'] = [ + reservation_status_reason_model + ] reservation_model_json['zone'] = zone_reference_model # Construct a model instance of Reservation by calling from_dict on the json representation @@ -64461,7 +72995,8 @@ def test_reservation_serialization(self): assert reservation_model != False # Construct a model instance of Reservation by calling from_dict on the json representation - reservation_model_dict = Reservation.from_dict(reservation_model_json).__dict__ + reservation_model_dict = Reservation.from_dict( + reservation_model_json).__dict__ reservation_model2 = Reservation(**reservation_model_dict) # Verify the model instances are equivalent @@ -64491,12 +73026,15 @@ def test_reservation_capacity_serialization(self): reservation_capacity_model_json['used'] = 8 # Construct a model instance of ReservationCapacity by calling from_dict on the json representation - reservation_capacity_model = ReservationCapacity.from_dict(reservation_capacity_model_json) + reservation_capacity_model = ReservationCapacity.from_dict( + reservation_capacity_model_json) assert reservation_capacity_model != False # Construct a model instance of ReservationCapacity by calling from_dict on the json representation - reservation_capacity_model_dict = ReservationCapacity.from_dict(reservation_capacity_model_json).__dict__ - reservation_capacity_model2 = ReservationCapacity(**reservation_capacity_model_dict) + reservation_capacity_model_dict = ReservationCapacity.from_dict( + reservation_capacity_model_json).__dict__ + reservation_capacity_model2 = ReservationCapacity( + **reservation_capacity_model_dict) # Verify the model instances are equivalent assert reservation_capacity_model == reservation_capacity_model2 @@ -64521,18 +73059,22 @@ def test_reservation_capacity_patch_serialization(self): reservation_capacity_patch_model_json['total'] = 10 # Construct a model instance of ReservationCapacityPatch by calling from_dict on the json representation - reservation_capacity_patch_model = ReservationCapacityPatch.from_dict(reservation_capacity_patch_model_json) + reservation_capacity_patch_model = ReservationCapacityPatch.from_dict( + reservation_capacity_patch_model_json) assert reservation_capacity_patch_model != False # Construct a model instance of ReservationCapacityPatch by calling from_dict on the json representation - reservation_capacity_patch_model_dict = ReservationCapacityPatch.from_dict(reservation_capacity_patch_model_json).__dict__ - reservation_capacity_patch_model2 = ReservationCapacityPatch(**reservation_capacity_patch_model_dict) + reservation_capacity_patch_model_dict = ReservationCapacityPatch.from_dict( + reservation_capacity_patch_model_json).__dict__ + reservation_capacity_patch_model2 = ReservationCapacityPatch( + **reservation_capacity_patch_model_dict) # Verify the model instances are equivalent assert reservation_capacity_patch_model == reservation_capacity_patch_model2 # Convert model instance back to dict and verify no loss of data - reservation_capacity_patch_model_json2 = reservation_capacity_patch_model.to_dict() + reservation_capacity_patch_model_json2 = reservation_capacity_patch_model.to_dict( + ) assert reservation_capacity_patch_model_json2 == reservation_capacity_patch_model_json @@ -64551,18 +73093,22 @@ def test_reservation_capacity_prototype_serialization(self): reservation_capacity_prototype_model_json['total'] = 10 # Construct a model instance of ReservationCapacityPrototype by calling from_dict on the json representation - reservation_capacity_prototype_model = ReservationCapacityPrototype.from_dict(reservation_capacity_prototype_model_json) + reservation_capacity_prototype_model = ReservationCapacityPrototype.from_dict( + reservation_capacity_prototype_model_json) assert reservation_capacity_prototype_model != False # Construct a model instance of ReservationCapacityPrototype by calling from_dict on the json representation - reservation_capacity_prototype_model_dict = ReservationCapacityPrototype.from_dict(reservation_capacity_prototype_model_json).__dict__ - reservation_capacity_prototype_model2 = ReservationCapacityPrototype(**reservation_capacity_prototype_model_dict) + reservation_capacity_prototype_model_dict = ReservationCapacityPrototype.from_dict( + reservation_capacity_prototype_model_json).__dict__ + reservation_capacity_prototype_model2 = ReservationCapacityPrototype( + **reservation_capacity_prototype_model_dict) # Verify the model instances are equivalent assert reservation_capacity_prototype_model == reservation_capacity_prototype_model2 # Convert model instance back to dict and verify no loss of data - reservation_capacity_prototype_model_json2 = reservation_capacity_prototype_model.to_dict() + reservation_capacity_prototype_model_json2 = reservation_capacity_prototype_model.to_dict( + ) assert reservation_capacity_prototype_model_json2 == reservation_capacity_prototype_model_json @@ -64579,10 +73125,12 @@ def test_reservation_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reservation_collection_first_model = {} # ReservationCollectionFirst - reservation_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=50' + reservation_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=50' reservation_collection_next_model = {} # ReservationCollectionNext - reservation_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + reservation_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' reservation_capacity_model = {} # ReservationCapacity reservation_capacity_model['allocated'] = 10 @@ -64592,27 +73140,35 @@ def test_reservation_collection_serialization(self): reservation_capacity_model['used'] = 8 reservation_committed_use_model = {} # ReservationCommittedUse - reservation_committed_use_model['expiration_at'] = '2024-12-29T19:55:00Z' + reservation_committed_use_model[ + 'expiration_at'] = '2024-12-29T19:55:00Z' reservation_committed_use_model['expiration_policy'] = 'renew' reservation_committed_use_model['term'] = 'one_year' reservation_profile_model = {} # ReservationProfile - reservation_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-2x8' + reservation_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-2x8' reservation_profile_model['name'] = 'bx2-2x8' reservation_profile_model['resource_type'] = 'instance_profile' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' - resource_group_reference_model['id'] = '4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'id'] = '4bbce614c13444cd8fc5e7e878ef8e21' resource_group_reference_model['name'] = 'Default' reservation_status_reason_model = {} # ReservationStatusReason - reservation_status_reason_model['code'] = 'cannot_activate_no_capacity_available' - reservation_status_reason_model['message'] = 'The reservation cannot be activated because capacity is unavailable' - reservation_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons' + reservation_status_reason_model[ + 'code'] = 'cannot_activate_no_capacity_available' + reservation_status_reason_model[ + 'message'] = 'The reservation cannot be activated because capacity is unavailable' + reservation_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' reservation_model = {} # Reservation @@ -64621,7 +73177,8 @@ def test_reservation_collection_serialization(self): reservation_model['committed_use'] = reservation_committed_use_model reservation_model['created_at'] = '2020-12-29T19:55:00Z' reservation_model['crn'] = 'crn:[...]' - reservation_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_model['lifecycle_state'] = 'stable' reservation_model['name'] = 'my-reservation' @@ -64634,25 +73191,31 @@ def test_reservation_collection_serialization(self): # Construct a json representation of a ReservationCollection model reservation_collection_model_json = {} - reservation_collection_model_json['first'] = reservation_collection_first_model + reservation_collection_model_json[ + 'first'] = reservation_collection_first_model reservation_collection_model_json['limit'] = 20 - reservation_collection_model_json['next'] = reservation_collection_next_model + reservation_collection_model_json[ + 'next'] = reservation_collection_next_model reservation_collection_model_json['reservations'] = [reservation_model] reservation_collection_model_json['total_count'] = 132 # Construct a model instance of ReservationCollection by calling from_dict on the json representation - reservation_collection_model = ReservationCollection.from_dict(reservation_collection_model_json) + reservation_collection_model = ReservationCollection.from_dict( + reservation_collection_model_json) assert reservation_collection_model != False # Construct a model instance of ReservationCollection by calling from_dict on the json representation - reservation_collection_model_dict = ReservationCollection.from_dict(reservation_collection_model_json).__dict__ - reservation_collection_model2 = ReservationCollection(**reservation_collection_model_dict) + reservation_collection_model_dict = ReservationCollection.from_dict( + reservation_collection_model_json).__dict__ + reservation_collection_model2 = ReservationCollection( + **reservation_collection_model_dict) # Verify the model instances are equivalent assert reservation_collection_model == reservation_collection_model2 # Convert model instance back to dict and verify no loss of data - reservation_collection_model_json2 = reservation_collection_model.to_dict() + reservation_collection_model_json2 = reservation_collection_model.to_dict( + ) assert reservation_collection_model_json2 == reservation_collection_model_json @@ -64668,21 +73231,26 @@ def test_reservation_collection_first_serialization(self): # Construct a json representation of a ReservationCollectionFirst model reservation_collection_first_model_json = {} - reservation_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=20' + reservation_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?limit=20' # Construct a model instance of ReservationCollectionFirst by calling from_dict on the json representation - reservation_collection_first_model = ReservationCollectionFirst.from_dict(reservation_collection_first_model_json) + reservation_collection_first_model = ReservationCollectionFirst.from_dict( + reservation_collection_first_model_json) assert reservation_collection_first_model != False # Construct a model instance of ReservationCollectionFirst by calling from_dict on the json representation - reservation_collection_first_model_dict = ReservationCollectionFirst.from_dict(reservation_collection_first_model_json).__dict__ - reservation_collection_first_model2 = ReservationCollectionFirst(**reservation_collection_first_model_dict) + reservation_collection_first_model_dict = ReservationCollectionFirst.from_dict( + reservation_collection_first_model_json).__dict__ + reservation_collection_first_model2 = ReservationCollectionFirst( + **reservation_collection_first_model_dict) # Verify the model instances are equivalent assert reservation_collection_first_model == reservation_collection_first_model2 # Convert model instance back to dict and verify no loss of data - reservation_collection_first_model_json2 = reservation_collection_first_model.to_dict() + reservation_collection_first_model_json2 = reservation_collection_first_model.to_dict( + ) assert reservation_collection_first_model_json2 == reservation_collection_first_model_json @@ -64698,21 +73266,26 @@ def test_reservation_collection_next_serialization(self): # Construct a json representation of a ReservationCollectionNext model reservation_collection_next_model_json = {} - reservation_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + reservation_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of ReservationCollectionNext by calling from_dict on the json representation - reservation_collection_next_model = ReservationCollectionNext.from_dict(reservation_collection_next_model_json) + reservation_collection_next_model = ReservationCollectionNext.from_dict( + reservation_collection_next_model_json) assert reservation_collection_next_model != False # Construct a model instance of ReservationCollectionNext by calling from_dict on the json representation - reservation_collection_next_model_dict = ReservationCollectionNext.from_dict(reservation_collection_next_model_json).__dict__ - reservation_collection_next_model2 = ReservationCollectionNext(**reservation_collection_next_model_dict) + reservation_collection_next_model_dict = ReservationCollectionNext.from_dict( + reservation_collection_next_model_json).__dict__ + reservation_collection_next_model2 = ReservationCollectionNext( + **reservation_collection_next_model_dict) # Verify the model instances are equivalent assert reservation_collection_next_model == reservation_collection_next_model2 # Convert model instance back to dict and verify no loss of data - reservation_collection_next_model_json2 = reservation_collection_next_model.to_dict() + reservation_collection_next_model_json2 = reservation_collection_next_model.to_dict( + ) assert reservation_collection_next_model_json2 == reservation_collection_next_model_json @@ -64728,23 +73301,28 @@ def test_reservation_committed_use_serialization(self): # Construct a json representation of a ReservationCommittedUse model reservation_committed_use_model_json = {} - reservation_committed_use_model_json['expiration_at'] = '2019-01-01T12:00:00Z' + reservation_committed_use_model_json[ + 'expiration_at'] = '2019-01-01T12:00:00Z' reservation_committed_use_model_json['expiration_policy'] = 'release' reservation_committed_use_model_json['term'] = 'testString' # Construct a model instance of ReservationCommittedUse by calling from_dict on the json representation - reservation_committed_use_model = ReservationCommittedUse.from_dict(reservation_committed_use_model_json) + reservation_committed_use_model = ReservationCommittedUse.from_dict( + reservation_committed_use_model_json) assert reservation_committed_use_model != False # Construct a model instance of ReservationCommittedUse by calling from_dict on the json representation - reservation_committed_use_model_dict = ReservationCommittedUse.from_dict(reservation_committed_use_model_json).__dict__ - reservation_committed_use_model2 = ReservationCommittedUse(**reservation_committed_use_model_dict) + reservation_committed_use_model_dict = ReservationCommittedUse.from_dict( + reservation_committed_use_model_json).__dict__ + reservation_committed_use_model2 = ReservationCommittedUse( + **reservation_committed_use_model_dict) # Verify the model instances are equivalent assert reservation_committed_use_model == reservation_committed_use_model2 # Convert model instance back to dict and verify no loss of data - reservation_committed_use_model_json2 = reservation_committed_use_model.to_dict() + reservation_committed_use_model_json2 = reservation_committed_use_model.to_dict( + ) assert reservation_committed_use_model_json2 == reservation_committed_use_model_json @@ -64760,22 +73338,27 @@ def test_reservation_committed_use_patch_serialization(self): # Construct a json representation of a ReservationCommittedUsePatch model reservation_committed_use_patch_model_json = {} - reservation_committed_use_patch_model_json['expiration_policy'] = 'release' + reservation_committed_use_patch_model_json[ + 'expiration_policy'] = 'release' reservation_committed_use_patch_model_json['term'] = 'testString' # Construct a model instance of ReservationCommittedUsePatch by calling from_dict on the json representation - reservation_committed_use_patch_model = ReservationCommittedUsePatch.from_dict(reservation_committed_use_patch_model_json) + reservation_committed_use_patch_model = ReservationCommittedUsePatch.from_dict( + reservation_committed_use_patch_model_json) assert reservation_committed_use_patch_model != False # Construct a model instance of ReservationCommittedUsePatch by calling from_dict on the json representation - reservation_committed_use_patch_model_dict = ReservationCommittedUsePatch.from_dict(reservation_committed_use_patch_model_json).__dict__ - reservation_committed_use_patch_model2 = ReservationCommittedUsePatch(**reservation_committed_use_patch_model_dict) + reservation_committed_use_patch_model_dict = ReservationCommittedUsePatch.from_dict( + reservation_committed_use_patch_model_json).__dict__ + reservation_committed_use_patch_model2 = ReservationCommittedUsePatch( + **reservation_committed_use_patch_model_dict) # Verify the model instances are equivalent assert reservation_committed_use_patch_model == reservation_committed_use_patch_model2 # Convert model instance back to dict and verify no loss of data - reservation_committed_use_patch_model_json2 = reservation_committed_use_patch_model.to_dict() + reservation_committed_use_patch_model_json2 = reservation_committed_use_patch_model.to_dict( + ) assert reservation_committed_use_patch_model_json2 == reservation_committed_use_patch_model_json @@ -64791,22 +73374,27 @@ def test_reservation_committed_use_prototype_serialization(self): # Construct a json representation of a ReservationCommittedUsePrototype model reservation_committed_use_prototype_model_json = {} - reservation_committed_use_prototype_model_json['expiration_policy'] = 'release' + reservation_committed_use_prototype_model_json[ + 'expiration_policy'] = 'release' reservation_committed_use_prototype_model_json['term'] = 'testString' # Construct a model instance of ReservationCommittedUsePrototype by calling from_dict on the json representation - reservation_committed_use_prototype_model = ReservationCommittedUsePrototype.from_dict(reservation_committed_use_prototype_model_json) + reservation_committed_use_prototype_model = ReservationCommittedUsePrototype.from_dict( + reservation_committed_use_prototype_model_json) assert reservation_committed_use_prototype_model != False # Construct a model instance of ReservationCommittedUsePrototype by calling from_dict on the json representation - reservation_committed_use_prototype_model_dict = ReservationCommittedUsePrototype.from_dict(reservation_committed_use_prototype_model_json).__dict__ - reservation_committed_use_prototype_model2 = ReservationCommittedUsePrototype(**reservation_committed_use_prototype_model_dict) + reservation_committed_use_prototype_model_dict = ReservationCommittedUsePrototype.from_dict( + reservation_committed_use_prototype_model_json).__dict__ + reservation_committed_use_prototype_model2 = ReservationCommittedUsePrototype( + **reservation_committed_use_prototype_model_dict) # Verify the model instances are equivalent assert reservation_committed_use_prototype_model == reservation_committed_use_prototype_model2 # Convert model instance back to dict and verify no loss of data - reservation_committed_use_prototype_model_json2 = reservation_committed_use_prototype_model.to_dict() + reservation_committed_use_prototype_model_json2 = reservation_committed_use_prototype_model.to_dict( + ) assert reservation_committed_use_prototype_model_json2 == reservation_committed_use_prototype_model_json @@ -64825,7 +73413,8 @@ def test_reservation_patch_serialization(self): reservation_capacity_patch_model = {} # ReservationCapacityPatch reservation_capacity_patch_model['total'] = 10 - reservation_committed_use_patch_model = {} # ReservationCommittedUsePatch + reservation_committed_use_patch_model = { + } # ReservationCommittedUsePatch reservation_committed_use_patch_model['expiration_policy'] = 'renew' reservation_committed_use_patch_model['term'] = 'testString' @@ -64835,18 +73424,24 @@ def test_reservation_patch_serialization(self): # Construct a json representation of a ReservationPatch model reservation_patch_model_json = {} - reservation_patch_model_json['capacity'] = reservation_capacity_patch_model - reservation_patch_model_json['committed_use'] = reservation_committed_use_patch_model + reservation_patch_model_json[ + 'capacity'] = reservation_capacity_patch_model + reservation_patch_model_json[ + 'committed_use'] = reservation_committed_use_patch_model reservation_patch_model_json['name'] = 'my-reservation' - reservation_patch_model_json['profile'] = reservation_profile_patch_model + reservation_patch_model_json[ + 'profile'] = reservation_profile_patch_model # Construct a model instance of ReservationPatch by calling from_dict on the json representation - reservation_patch_model = ReservationPatch.from_dict(reservation_patch_model_json) + reservation_patch_model = ReservationPatch.from_dict( + reservation_patch_model_json) assert reservation_patch_model != False # Construct a model instance of ReservationPatch by calling from_dict on the json representation - reservation_patch_model_dict = ReservationPatch.from_dict(reservation_patch_model_json).__dict__ - reservation_patch_model2 = ReservationPatch(**reservation_patch_model_dict) + reservation_patch_model_dict = ReservationPatch.from_dict( + reservation_patch_model_json).__dict__ + reservation_patch_model2 = ReservationPatch( + **reservation_patch_model_dict) # Verify the model instances are equivalent assert reservation_patch_model == reservation_patch_model2 @@ -64868,17 +73463,21 @@ def test_reservation_profile_serialization(self): # Construct a json representation of a ReservationProfile model reservation_profile_model_json = {} - reservation_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + reservation_profile_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' reservation_profile_model_json['name'] = 'bx2-4x16' reservation_profile_model_json['resource_type'] = 'instance_profile' # Construct a model instance of ReservationProfile by calling from_dict on the json representation - reservation_profile_model = ReservationProfile.from_dict(reservation_profile_model_json) + reservation_profile_model = ReservationProfile.from_dict( + reservation_profile_model_json) assert reservation_profile_model != False # Construct a model instance of ReservationProfile by calling from_dict on the json representation - reservation_profile_model_dict = ReservationProfile.from_dict(reservation_profile_model_json).__dict__ - reservation_profile_model2 = ReservationProfile(**reservation_profile_model_dict) + reservation_profile_model_dict = ReservationProfile.from_dict( + reservation_profile_model_json).__dict__ + reservation_profile_model2 = ReservationProfile( + **reservation_profile_model_dict) # Verify the model instances are equivalent assert reservation_profile_model == reservation_profile_model2 @@ -64901,21 +73500,26 @@ def test_reservation_profile_patch_serialization(self): # Construct a json representation of a ReservationProfilePatch model reservation_profile_patch_model_json = {} reservation_profile_patch_model_json['name'] = 'bx2-4x16' - reservation_profile_patch_model_json['resource_type'] = 'instance_profile' + reservation_profile_patch_model_json[ + 'resource_type'] = 'instance_profile' # Construct a model instance of ReservationProfilePatch by calling from_dict on the json representation - reservation_profile_patch_model = ReservationProfilePatch.from_dict(reservation_profile_patch_model_json) + reservation_profile_patch_model = ReservationProfilePatch.from_dict( + reservation_profile_patch_model_json) assert reservation_profile_patch_model != False # Construct a model instance of ReservationProfilePatch by calling from_dict on the json representation - reservation_profile_patch_model_dict = ReservationProfilePatch.from_dict(reservation_profile_patch_model_json).__dict__ - reservation_profile_patch_model2 = ReservationProfilePatch(**reservation_profile_patch_model_dict) + reservation_profile_patch_model_dict = ReservationProfilePatch.from_dict( + reservation_profile_patch_model_json).__dict__ + reservation_profile_patch_model2 = ReservationProfilePatch( + **reservation_profile_patch_model_dict) # Verify the model instances are equivalent assert reservation_profile_patch_model == reservation_profile_patch_model2 # Convert model instance back to dict and verify no loss of data - reservation_profile_patch_model_json2 = reservation_profile_patch_model.to_dict() + reservation_profile_patch_model_json2 = reservation_profile_patch_model.to_dict( + ) assert reservation_profile_patch_model_json2 == reservation_profile_patch_model_json @@ -64932,21 +73536,26 @@ def test_reservation_profile_prototype_serialization(self): # Construct a json representation of a ReservationProfilePrototype model reservation_profile_prototype_model_json = {} reservation_profile_prototype_model_json['name'] = 'bx2-4x16' - reservation_profile_prototype_model_json['resource_type'] = 'instance_profile' + reservation_profile_prototype_model_json[ + 'resource_type'] = 'instance_profile' # Construct a model instance of ReservationProfilePrototype by calling from_dict on the json representation - reservation_profile_prototype_model = ReservationProfilePrototype.from_dict(reservation_profile_prototype_model_json) + reservation_profile_prototype_model = ReservationProfilePrototype.from_dict( + reservation_profile_prototype_model_json) assert reservation_profile_prototype_model != False # Construct a model instance of ReservationProfilePrototype by calling from_dict on the json representation - reservation_profile_prototype_model_dict = ReservationProfilePrototype.from_dict(reservation_profile_prototype_model_json).__dict__ - reservation_profile_prototype_model2 = ReservationProfilePrototype(**reservation_profile_prototype_model_dict) + reservation_profile_prototype_model_dict = ReservationProfilePrototype.from_dict( + reservation_profile_prototype_model_json).__dict__ + reservation_profile_prototype_model2 = ReservationProfilePrototype( + **reservation_profile_prototype_model_dict) # Verify the model instances are equivalent assert reservation_profile_prototype_model == reservation_profile_prototype_model2 # Convert model instance back to dict and verify no loss of data - reservation_profile_prototype_model_json2 = reservation_profile_prototype_model.to_dict() + reservation_profile_prototype_model_json2 = reservation_profile_prototype_model.to_dict( + ) assert reservation_profile_prototype_model_json2 == reservation_profile_prototype_model_json @@ -64963,30 +73572,39 @@ def test_reservation_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reservation_reference_deleted_model = {} # ReservationReferenceDeleted - reservation_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reservation_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservationReference model reservation_reference_model_json = {} - reservation_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model_json['deleted'] = reservation_reference_deleted_model - reservation_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - reservation_reference_model_json['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model_json[ + 'deleted'] = reservation_reference_deleted_model + reservation_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model_json[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model_json['name'] = 'my-reservation' reservation_reference_model_json['resource_type'] = 'reservation' # Construct a model instance of ReservationReference by calling from_dict on the json representation - reservation_reference_model = ReservationReference.from_dict(reservation_reference_model_json) + reservation_reference_model = ReservationReference.from_dict( + reservation_reference_model_json) assert reservation_reference_model != False # Construct a model instance of ReservationReference by calling from_dict on the json representation - reservation_reference_model_dict = ReservationReference.from_dict(reservation_reference_model_json).__dict__ - reservation_reference_model2 = ReservationReference(**reservation_reference_model_dict) + reservation_reference_model_dict = ReservationReference.from_dict( + reservation_reference_model_json).__dict__ + reservation_reference_model2 = ReservationReference( + **reservation_reference_model_dict) # Verify the model instances are equivalent assert reservation_reference_model == reservation_reference_model2 # Convert model instance back to dict and verify no loss of data - reservation_reference_model_json2 = reservation_reference_model.to_dict() + reservation_reference_model_json2 = reservation_reference_model.to_dict( + ) assert reservation_reference_model_json2 == reservation_reference_model_json @@ -65002,21 +73620,26 @@ def test_reservation_reference_deleted_serialization(self): # Construct a json representation of a ReservationReferenceDeleted model reservation_reference_deleted_model_json = {} - reservation_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reservation_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of ReservationReferenceDeleted by calling from_dict on the json representation - reservation_reference_deleted_model = ReservationReferenceDeleted.from_dict(reservation_reference_deleted_model_json) + reservation_reference_deleted_model = ReservationReferenceDeleted.from_dict( + reservation_reference_deleted_model_json) assert reservation_reference_deleted_model != False # Construct a model instance of ReservationReferenceDeleted by calling from_dict on the json representation - reservation_reference_deleted_model_dict = ReservationReferenceDeleted.from_dict(reservation_reference_deleted_model_json).__dict__ - reservation_reference_deleted_model2 = ReservationReferenceDeleted(**reservation_reference_deleted_model_dict) + reservation_reference_deleted_model_dict = ReservationReferenceDeleted.from_dict( + reservation_reference_deleted_model_json).__dict__ + reservation_reference_deleted_model2 = ReservationReferenceDeleted( + **reservation_reference_deleted_model_dict) # Verify the model instances are equivalent assert reservation_reference_deleted_model == reservation_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - reservation_reference_deleted_model_json2 = reservation_reference_deleted_model.to_dict() + reservation_reference_deleted_model_json2 = reservation_reference_deleted_model.to_dict( + ) assert reservation_reference_deleted_model_json2 == reservation_reference_deleted_model_json @@ -65032,23 +73655,30 @@ def test_reservation_status_reason_serialization(self): # Construct a json representation of a ReservationStatusReason model reservation_status_reason_model_json = {} - reservation_status_reason_model_json['code'] = 'cannot_activate_no_capacity_available' - reservation_status_reason_model_json['message'] = 'The reservation cannot be activated because capacity is unavailable' - reservation_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons' + reservation_status_reason_model_json[ + 'code'] = 'cannot_activate_no_capacity_available' + reservation_status_reason_model_json[ + 'message'] = 'The reservation cannot be activated because capacity is unavailable' + reservation_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons' # Construct a model instance of ReservationStatusReason by calling from_dict on the json representation - reservation_status_reason_model = ReservationStatusReason.from_dict(reservation_status_reason_model_json) + reservation_status_reason_model = ReservationStatusReason.from_dict( + reservation_status_reason_model_json) assert reservation_status_reason_model != False # Construct a model instance of ReservationStatusReason by calling from_dict on the json representation - reservation_status_reason_model_dict = ReservationStatusReason.from_dict(reservation_status_reason_model_json).__dict__ - reservation_status_reason_model2 = ReservationStatusReason(**reservation_status_reason_model_dict) + reservation_status_reason_model_dict = ReservationStatusReason.from_dict( + reservation_status_reason_model_json).__dict__ + reservation_status_reason_model2 = ReservationStatusReason( + **reservation_status_reason_model_dict) # Verify the model instances are equivalent assert reservation_status_reason_model == reservation_status_reason_model2 # Convert model instance back to dict and verify no loss of data - reservation_status_reason_model_json2 = reservation_status_reason_model.to_dict() + reservation_status_reason_model_json2 = reservation_status_reason_model.to_dict( + ) assert reservation_status_reason_model_json2 == reservation_status_reason_model_json @@ -65064,14 +73694,21 @@ def test_reserved_ip_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted - endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference - reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model - reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_deleted_model = { + } # EndpointGatewayReferenceDeleted + endpoint_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + reserved_ip_target_model = { + } # ReservedIPTargetEndpointGatewayReference + reserved_ip_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'deleted'] = endpoint_gateway_reference_deleted_model + reserved_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' @@ -65080,8 +73717,10 @@ def test_reserved_ip_serialization(self): reserved_ip_model_json['address'] = '192.168.3.4' reserved_ip_model_json['auto_delete'] = False reserved_ip_model_json['created_at'] = '2019-01-01T12:00:00Z' - reserved_ip_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_model_json['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_model_json[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model_json['lifecycle_state'] = 'stable' reserved_ip_model_json['name'] = 'my-reserved-ip' reserved_ip_model_json['owner'] = 'user' @@ -65093,7 +73732,8 @@ def test_reserved_ip_serialization(self): assert reserved_ip_model != False # Construct a model instance of ReservedIP by calling from_dict on the json representation - reserved_ip_model_dict = ReservedIP.from_dict(reserved_ip_model_json).__dict__ + reserved_ip_model_dict = ReservedIP.from_dict( + reserved_ip_model_json).__dict__ reserved_ip_model2 = ReservedIP(**reserved_ip_model_dict) # Verify the model instances are equivalent @@ -65117,19 +73757,28 @@ def test_reserved_ip_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_collection_first_model = {} # ReservedIPCollectionFirst - reserved_ip_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20' + reserved_ip_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20' reserved_ip_collection_next_model = {} # ReservedIPCollectionNext - reserved_ip_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - - endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted - endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference - reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model - reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + + endpoint_gateway_reference_deleted_model = { + } # EndpointGatewayReferenceDeleted + endpoint_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + reserved_ip_target_model = { + } # ReservedIPTargetEndpointGatewayReference + reserved_ip_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'deleted'] = endpoint_gateway_reference_deleted_model + reserved_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' @@ -65137,7 +73786,8 @@ def test_reserved_ip_collection_serialization(self): reserved_ip_model['address'] = '192.168.3.4' reserved_ip_model['auto_delete'] = False reserved_ip_model['created_at'] = '2019-01-01T12:00:00Z' - reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['lifecycle_state'] = 'stable' reserved_ip_model['name'] = 'my-reserved-ip' @@ -65147,25 +73797,31 @@ def test_reserved_ip_collection_serialization(self): # Construct a json representation of a ReservedIPCollection model reserved_ip_collection_model_json = {} - reserved_ip_collection_model_json['first'] = reserved_ip_collection_first_model + reserved_ip_collection_model_json[ + 'first'] = reserved_ip_collection_first_model reserved_ip_collection_model_json['limit'] = 20 - reserved_ip_collection_model_json['next'] = reserved_ip_collection_next_model + reserved_ip_collection_model_json[ + 'next'] = reserved_ip_collection_next_model reserved_ip_collection_model_json['reserved_ips'] = [reserved_ip_model] reserved_ip_collection_model_json['total_count'] = 132 # Construct a model instance of ReservedIPCollection by calling from_dict on the json representation - reserved_ip_collection_model = ReservedIPCollection.from_dict(reserved_ip_collection_model_json) + reserved_ip_collection_model = ReservedIPCollection.from_dict( + reserved_ip_collection_model_json) assert reserved_ip_collection_model != False # Construct a model instance of ReservedIPCollection by calling from_dict on the json representation - reserved_ip_collection_model_dict = ReservedIPCollection.from_dict(reserved_ip_collection_model_json).__dict__ - reserved_ip_collection_model2 = ReservedIPCollection(**reserved_ip_collection_model_dict) + reserved_ip_collection_model_dict = ReservedIPCollection.from_dict( + reserved_ip_collection_model_json).__dict__ + reserved_ip_collection_model2 = ReservedIPCollection( + **reserved_ip_collection_model_dict) # Verify the model instances are equivalent assert reserved_ip_collection_model == reserved_ip_collection_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_model_json2 = reserved_ip_collection_model.to_dict() + reserved_ip_collection_model_json2 = reserved_ip_collection_model.to_dict( + ) assert reserved_ip_collection_model_json2 == reserved_ip_collection_model_json @@ -65174,24 +73830,34 @@ class TestModel_ReservedIPCollectionBareMetalServerNetworkInterfaceContext: Test Class for ReservedIPCollectionBareMetalServerNetworkInterfaceContext """ - def test_reserved_ip_collection_bare_metal_server_network_interface_context_serialization(self): + def test_reserved_ip_collection_bare_metal_server_network_interface_context_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionBareMetalServerNetworkInterfaceContext """ # Construct dict forms of any model objects needed in order to build this model. - reserved_ip_collection_bare_metal_server_network_interface_context_first_model = {} # ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst - reserved_ip_collection_bare_metal_server_network_interface_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' - - endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted - endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference - reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model - reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_collection_bare_metal_server_network_interface_context_first_model = { + } # ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst + reserved_ip_collection_bare_metal_server_network_interface_context_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' + + endpoint_gateway_reference_deleted_model = { + } # EndpointGatewayReferenceDeleted + endpoint_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + reserved_ip_target_model = { + } # ReservedIPTargetEndpointGatewayReference + reserved_ip_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'deleted'] = endpoint_gateway_reference_deleted_model + reserved_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' @@ -65199,7 +73865,8 @@ def test_reserved_ip_collection_bare_metal_server_network_interface_context_seri reserved_ip_model['address'] = '192.168.3.4' reserved_ip_model['auto_delete'] = False reserved_ip_model['created_at'] = '2019-01-01T12:00:00Z' - reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['lifecycle_state'] = 'stable' reserved_ip_model['name'] = 'my-reserved-ip' @@ -65207,30 +73874,45 @@ def test_reserved_ip_collection_bare_metal_server_network_interface_context_seri reserved_ip_model['resource_type'] = 'subnet_reserved_ip' reserved_ip_model['target'] = reserved_ip_target_model - reserved_ip_collection_bare_metal_server_network_interface_context_next_model = {} # ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext - reserved_ip_collection_bare_metal_server_network_interface_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' + reserved_ip_collection_bare_metal_server_network_interface_context_next_model = { + } # ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext + reserved_ip_collection_bare_metal_server_network_interface_context_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' # Construct a json representation of a ReservedIPCollectionBareMetalServerNetworkInterfaceContext model reserved_ip_collection_bare_metal_server_network_interface_context_model_json = {} - reserved_ip_collection_bare_metal_server_network_interface_context_model_json['first'] = reserved_ip_collection_bare_metal_server_network_interface_context_first_model - reserved_ip_collection_bare_metal_server_network_interface_context_model_json['ips'] = [reserved_ip_model] - reserved_ip_collection_bare_metal_server_network_interface_context_model_json['limit'] = 20 - reserved_ip_collection_bare_metal_server_network_interface_context_model_json['next'] = reserved_ip_collection_bare_metal_server_network_interface_context_next_model - reserved_ip_collection_bare_metal_server_network_interface_context_model_json['total_count'] = 132 + reserved_ip_collection_bare_metal_server_network_interface_context_model_json[ + 'first'] = reserved_ip_collection_bare_metal_server_network_interface_context_first_model + reserved_ip_collection_bare_metal_server_network_interface_context_model_json[ + 'ips'] = [reserved_ip_model] + reserved_ip_collection_bare_metal_server_network_interface_context_model_json[ + 'limit'] = 20 + reserved_ip_collection_bare_metal_server_network_interface_context_model_json[ + 'next'] = reserved_ip_collection_bare_metal_server_network_interface_context_next_model + reserved_ip_collection_bare_metal_server_network_interface_context_model_json[ + 'total_count'] = 132 # Construct a model instance of ReservedIPCollectionBareMetalServerNetworkInterfaceContext by calling from_dict on the json representation - reserved_ip_collection_bare_metal_server_network_interface_context_model = ReservedIPCollectionBareMetalServerNetworkInterfaceContext.from_dict(reserved_ip_collection_bare_metal_server_network_interface_context_model_json) + reserved_ip_collection_bare_metal_server_network_interface_context_model = ReservedIPCollectionBareMetalServerNetworkInterfaceContext.from_dict( + reserved_ip_collection_bare_metal_server_network_interface_context_model_json + ) assert reserved_ip_collection_bare_metal_server_network_interface_context_model != False # Construct a model instance of ReservedIPCollectionBareMetalServerNetworkInterfaceContext by calling from_dict on the json representation - reserved_ip_collection_bare_metal_server_network_interface_context_model_dict = ReservedIPCollectionBareMetalServerNetworkInterfaceContext.from_dict(reserved_ip_collection_bare_metal_server_network_interface_context_model_json).__dict__ - reserved_ip_collection_bare_metal_server_network_interface_context_model2 = ReservedIPCollectionBareMetalServerNetworkInterfaceContext(**reserved_ip_collection_bare_metal_server_network_interface_context_model_dict) + reserved_ip_collection_bare_metal_server_network_interface_context_model_dict = ReservedIPCollectionBareMetalServerNetworkInterfaceContext.from_dict( + reserved_ip_collection_bare_metal_server_network_interface_context_model_json + ).__dict__ + reserved_ip_collection_bare_metal_server_network_interface_context_model2 = ReservedIPCollectionBareMetalServerNetworkInterfaceContext( + ** + reserved_ip_collection_bare_metal_server_network_interface_context_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_bare_metal_server_network_interface_context_model == reserved_ip_collection_bare_metal_server_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_bare_metal_server_network_interface_context_model_json2 = reserved_ip_collection_bare_metal_server_network_interface_context_model.to_dict() + reserved_ip_collection_bare_metal_server_network_interface_context_model_json2 = reserved_ip_collection_bare_metal_server_network_interface_context_model.to_dict( + ) assert reserved_ip_collection_bare_metal_server_network_interface_context_model_json2 == reserved_ip_collection_bare_metal_server_network_interface_context_model_json @@ -65239,28 +73921,38 @@ class TestModel_ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst: Test Class for ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst """ - def test_reserved_ip_collection_bare_metal_server_network_interface_context_first_serialization(self): + def test_reserved_ip_collection_bare_metal_server_network_interface_context_first_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst """ # Construct a json representation of a ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst model reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json = {} - reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' + reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' # Construct a model instance of ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst by calling from_dict on the json representation - reserved_ip_collection_bare_metal_server_network_interface_context_first_model = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst.from_dict(reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json) + reserved_ip_collection_bare_metal_server_network_interface_context_first_model = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst.from_dict( + reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json + ) assert reserved_ip_collection_bare_metal_server_network_interface_context_first_model != False # Construct a model instance of ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst by calling from_dict on the json representation - reserved_ip_collection_bare_metal_server_network_interface_context_first_model_dict = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst.from_dict(reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json).__dict__ - reserved_ip_collection_bare_metal_server_network_interface_context_first_model2 = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst(**reserved_ip_collection_bare_metal_server_network_interface_context_first_model_dict) + reserved_ip_collection_bare_metal_server_network_interface_context_first_model_dict = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst.from_dict( + reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json + ).__dict__ + reserved_ip_collection_bare_metal_server_network_interface_context_first_model2 = ReservedIPCollectionBareMetalServerNetworkInterfaceContextFirst( + ** + reserved_ip_collection_bare_metal_server_network_interface_context_first_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_bare_metal_server_network_interface_context_first_model == reserved_ip_collection_bare_metal_server_network_interface_context_first_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json2 = reserved_ip_collection_bare_metal_server_network_interface_context_first_model.to_dict() + reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json2 = reserved_ip_collection_bare_metal_server_network_interface_context_first_model.to_dict( + ) assert reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json2 == reserved_ip_collection_bare_metal_server_network_interface_context_first_model_json @@ -65269,28 +73961,38 @@ class TestModel_ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext: Test Class for ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext """ - def test_reserved_ip_collection_bare_metal_server_network_interface_context_next_serialization(self): + def test_reserved_ip_collection_bare_metal_server_network_interface_context_next_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext """ # Construct a json representation of a ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext model reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json = {} - reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' + reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' # Construct a model instance of ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext by calling from_dict on the json representation - reserved_ip_collection_bare_metal_server_network_interface_context_next_model = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext.from_dict(reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json) + reserved_ip_collection_bare_metal_server_network_interface_context_next_model = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext.from_dict( + reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json + ) assert reserved_ip_collection_bare_metal_server_network_interface_context_next_model != False # Construct a model instance of ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext by calling from_dict on the json representation - reserved_ip_collection_bare_metal_server_network_interface_context_next_model_dict = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext.from_dict(reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json).__dict__ - reserved_ip_collection_bare_metal_server_network_interface_context_next_model2 = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext(**reserved_ip_collection_bare_metal_server_network_interface_context_next_model_dict) + reserved_ip_collection_bare_metal_server_network_interface_context_next_model_dict = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext.from_dict( + reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json + ).__dict__ + reserved_ip_collection_bare_metal_server_network_interface_context_next_model2 = ReservedIPCollectionBareMetalServerNetworkInterfaceContextNext( + ** + reserved_ip_collection_bare_metal_server_network_interface_context_next_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_bare_metal_server_network_interface_context_next_model == reserved_ip_collection_bare_metal_server_network_interface_context_next_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json2 = reserved_ip_collection_bare_metal_server_network_interface_context_next_model.to_dict() + reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json2 = reserved_ip_collection_bare_metal_server_network_interface_context_next_model.to_dict( + ) assert reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json2 == reserved_ip_collection_bare_metal_server_network_interface_context_next_model_json @@ -65299,24 +74001,34 @@ class TestModel_ReservedIPCollectionEndpointGatewayContext: Test Class for ReservedIPCollectionEndpointGatewayContext """ - def test_reserved_ip_collection_endpoint_gateway_context_serialization(self): + def test_reserved_ip_collection_endpoint_gateway_context_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionEndpointGatewayContext """ # Construct dict forms of any model objects needed in order to build this model. - reserved_ip_collection_endpoint_gateway_context_first_model = {} # ReservedIPCollectionEndpointGatewayContextFirst - reserved_ip_collection_endpoint_gateway_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20' - - endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted - endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference - reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model - reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_collection_endpoint_gateway_context_first_model = { + } # ReservedIPCollectionEndpointGatewayContextFirst + reserved_ip_collection_endpoint_gateway_context_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20' + + endpoint_gateway_reference_deleted_model = { + } # EndpointGatewayReferenceDeleted + endpoint_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + reserved_ip_target_model = { + } # ReservedIPTargetEndpointGatewayReference + reserved_ip_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'deleted'] = endpoint_gateway_reference_deleted_model + reserved_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' @@ -65324,7 +74036,8 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self): reserved_ip_model['address'] = '192.168.3.4' reserved_ip_model['auto_delete'] = False reserved_ip_model['created_at'] = '2019-01-01T12:00:00Z' - reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['lifecycle_state'] = 'stable' reserved_ip_model['name'] = 'my-reserved-ip' @@ -65332,30 +74045,41 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self): reserved_ip_model['resource_type'] = 'subnet_reserved_ip' reserved_ip_model['target'] = reserved_ip_target_model - reserved_ip_collection_endpoint_gateway_context_next_model = {} # ReservedIPCollectionEndpointGatewayContextNext - reserved_ip_collection_endpoint_gateway_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20' + reserved_ip_collection_endpoint_gateway_context_next_model = { + } # ReservedIPCollectionEndpointGatewayContextNext + reserved_ip_collection_endpoint_gateway_context_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20' # Construct a json representation of a ReservedIPCollectionEndpointGatewayContext model reserved_ip_collection_endpoint_gateway_context_model_json = {} - reserved_ip_collection_endpoint_gateway_context_model_json['first'] = reserved_ip_collection_endpoint_gateway_context_first_model - reserved_ip_collection_endpoint_gateway_context_model_json['ips'] = [reserved_ip_model] + reserved_ip_collection_endpoint_gateway_context_model_json[ + 'first'] = reserved_ip_collection_endpoint_gateway_context_first_model + reserved_ip_collection_endpoint_gateway_context_model_json['ips'] = [ + reserved_ip_model + ] reserved_ip_collection_endpoint_gateway_context_model_json['limit'] = 20 - reserved_ip_collection_endpoint_gateway_context_model_json['next'] = reserved_ip_collection_endpoint_gateway_context_next_model - reserved_ip_collection_endpoint_gateway_context_model_json['total_count'] = 132 + reserved_ip_collection_endpoint_gateway_context_model_json[ + 'next'] = reserved_ip_collection_endpoint_gateway_context_next_model + reserved_ip_collection_endpoint_gateway_context_model_json[ + 'total_count'] = 132 # Construct a model instance of ReservedIPCollectionEndpointGatewayContext by calling from_dict on the json representation - reserved_ip_collection_endpoint_gateway_context_model = ReservedIPCollectionEndpointGatewayContext.from_dict(reserved_ip_collection_endpoint_gateway_context_model_json) + reserved_ip_collection_endpoint_gateway_context_model = ReservedIPCollectionEndpointGatewayContext.from_dict( + reserved_ip_collection_endpoint_gateway_context_model_json) assert reserved_ip_collection_endpoint_gateway_context_model != False # Construct a model instance of ReservedIPCollectionEndpointGatewayContext by calling from_dict on the json representation - reserved_ip_collection_endpoint_gateway_context_model_dict = ReservedIPCollectionEndpointGatewayContext.from_dict(reserved_ip_collection_endpoint_gateway_context_model_json).__dict__ - reserved_ip_collection_endpoint_gateway_context_model2 = ReservedIPCollectionEndpointGatewayContext(**reserved_ip_collection_endpoint_gateway_context_model_dict) + reserved_ip_collection_endpoint_gateway_context_model_dict = ReservedIPCollectionEndpointGatewayContext.from_dict( + reserved_ip_collection_endpoint_gateway_context_model_json).__dict__ + reserved_ip_collection_endpoint_gateway_context_model2 = ReservedIPCollectionEndpointGatewayContext( + **reserved_ip_collection_endpoint_gateway_context_model_dict) # Verify the model instances are equivalent assert reserved_ip_collection_endpoint_gateway_context_model == reserved_ip_collection_endpoint_gateway_context_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_endpoint_gateway_context_model_json2 = reserved_ip_collection_endpoint_gateway_context_model.to_dict() + reserved_ip_collection_endpoint_gateway_context_model_json2 = reserved_ip_collection_endpoint_gateway_context_model.to_dict( + ) assert reserved_ip_collection_endpoint_gateway_context_model_json2 == reserved_ip_collection_endpoint_gateway_context_model_json @@ -65364,28 +74088,35 @@ class TestModel_ReservedIPCollectionEndpointGatewayContextFirst: Test Class for ReservedIPCollectionEndpointGatewayContextFirst """ - def test_reserved_ip_collection_endpoint_gateway_context_first_serialization(self): + def test_reserved_ip_collection_endpoint_gateway_context_first_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionEndpointGatewayContextFirst """ # Construct a json representation of a ReservedIPCollectionEndpointGatewayContextFirst model reserved_ip_collection_endpoint_gateway_context_first_model_json = {} - reserved_ip_collection_endpoint_gateway_context_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20' + reserved_ip_collection_endpoint_gateway_context_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20' # Construct a model instance of ReservedIPCollectionEndpointGatewayContextFirst by calling from_dict on the json representation - reserved_ip_collection_endpoint_gateway_context_first_model = ReservedIPCollectionEndpointGatewayContextFirst.from_dict(reserved_ip_collection_endpoint_gateway_context_first_model_json) + reserved_ip_collection_endpoint_gateway_context_first_model = ReservedIPCollectionEndpointGatewayContextFirst.from_dict( + reserved_ip_collection_endpoint_gateway_context_first_model_json) assert reserved_ip_collection_endpoint_gateway_context_first_model != False # Construct a model instance of ReservedIPCollectionEndpointGatewayContextFirst by calling from_dict on the json representation - reserved_ip_collection_endpoint_gateway_context_first_model_dict = ReservedIPCollectionEndpointGatewayContextFirst.from_dict(reserved_ip_collection_endpoint_gateway_context_first_model_json).__dict__ - reserved_ip_collection_endpoint_gateway_context_first_model2 = ReservedIPCollectionEndpointGatewayContextFirst(**reserved_ip_collection_endpoint_gateway_context_first_model_dict) + reserved_ip_collection_endpoint_gateway_context_first_model_dict = ReservedIPCollectionEndpointGatewayContextFirst.from_dict( + reserved_ip_collection_endpoint_gateway_context_first_model_json + ).__dict__ + reserved_ip_collection_endpoint_gateway_context_first_model2 = ReservedIPCollectionEndpointGatewayContextFirst( + **reserved_ip_collection_endpoint_gateway_context_first_model_dict) # Verify the model instances are equivalent assert reserved_ip_collection_endpoint_gateway_context_first_model == reserved_ip_collection_endpoint_gateway_context_first_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_endpoint_gateway_context_first_model_json2 = reserved_ip_collection_endpoint_gateway_context_first_model.to_dict() + reserved_ip_collection_endpoint_gateway_context_first_model_json2 = reserved_ip_collection_endpoint_gateway_context_first_model.to_dict( + ) assert reserved_ip_collection_endpoint_gateway_context_first_model_json2 == reserved_ip_collection_endpoint_gateway_context_first_model_json @@ -65394,28 +74125,35 @@ class TestModel_ReservedIPCollectionEndpointGatewayContextNext: Test Class for ReservedIPCollectionEndpointGatewayContextNext """ - def test_reserved_ip_collection_endpoint_gateway_context_next_serialization(self): + def test_reserved_ip_collection_endpoint_gateway_context_next_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionEndpointGatewayContextNext """ # Construct a json representation of a ReservedIPCollectionEndpointGatewayContextNext model reserved_ip_collection_endpoint_gateway_context_next_model_json = {} - reserved_ip_collection_endpoint_gateway_context_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20' + reserved_ip_collection_endpoint_gateway_context_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20' # Construct a model instance of ReservedIPCollectionEndpointGatewayContextNext by calling from_dict on the json representation - reserved_ip_collection_endpoint_gateway_context_next_model = ReservedIPCollectionEndpointGatewayContextNext.from_dict(reserved_ip_collection_endpoint_gateway_context_next_model_json) + reserved_ip_collection_endpoint_gateway_context_next_model = ReservedIPCollectionEndpointGatewayContextNext.from_dict( + reserved_ip_collection_endpoint_gateway_context_next_model_json) assert reserved_ip_collection_endpoint_gateway_context_next_model != False # Construct a model instance of ReservedIPCollectionEndpointGatewayContextNext by calling from_dict on the json representation - reserved_ip_collection_endpoint_gateway_context_next_model_dict = ReservedIPCollectionEndpointGatewayContextNext.from_dict(reserved_ip_collection_endpoint_gateway_context_next_model_json).__dict__ - reserved_ip_collection_endpoint_gateway_context_next_model2 = ReservedIPCollectionEndpointGatewayContextNext(**reserved_ip_collection_endpoint_gateway_context_next_model_dict) + reserved_ip_collection_endpoint_gateway_context_next_model_dict = ReservedIPCollectionEndpointGatewayContextNext.from_dict( + reserved_ip_collection_endpoint_gateway_context_next_model_json + ).__dict__ + reserved_ip_collection_endpoint_gateway_context_next_model2 = ReservedIPCollectionEndpointGatewayContextNext( + **reserved_ip_collection_endpoint_gateway_context_next_model_dict) # Verify the model instances are equivalent assert reserved_ip_collection_endpoint_gateway_context_next_model == reserved_ip_collection_endpoint_gateway_context_next_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_endpoint_gateway_context_next_model_json2 = reserved_ip_collection_endpoint_gateway_context_next_model.to_dict() + reserved_ip_collection_endpoint_gateway_context_next_model_json2 = reserved_ip_collection_endpoint_gateway_context_next_model.to_dict( + ) assert reserved_ip_collection_endpoint_gateway_context_next_model_json2 == reserved_ip_collection_endpoint_gateway_context_next_model_json @@ -65431,21 +74169,26 @@ def test_reserved_ip_collection_first_serialization(self): # Construct a json representation of a ReservedIPCollectionFirst model reserved_ip_collection_first_model_json = {} - reserved_ip_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20' + reserved_ip_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20' # Construct a model instance of ReservedIPCollectionFirst by calling from_dict on the json representation - reserved_ip_collection_first_model = ReservedIPCollectionFirst.from_dict(reserved_ip_collection_first_model_json) + reserved_ip_collection_first_model = ReservedIPCollectionFirst.from_dict( + reserved_ip_collection_first_model_json) assert reserved_ip_collection_first_model != False # Construct a model instance of ReservedIPCollectionFirst by calling from_dict on the json representation - reserved_ip_collection_first_model_dict = ReservedIPCollectionFirst.from_dict(reserved_ip_collection_first_model_json).__dict__ - reserved_ip_collection_first_model2 = ReservedIPCollectionFirst(**reserved_ip_collection_first_model_dict) + reserved_ip_collection_first_model_dict = ReservedIPCollectionFirst.from_dict( + reserved_ip_collection_first_model_json).__dict__ + reserved_ip_collection_first_model2 = ReservedIPCollectionFirst( + **reserved_ip_collection_first_model_dict) # Verify the model instances are equivalent assert reserved_ip_collection_first_model == reserved_ip_collection_first_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_first_model_json2 = reserved_ip_collection_first_model.to_dict() + reserved_ip_collection_first_model_json2 = reserved_ip_collection_first_model.to_dict( + ) assert reserved_ip_collection_first_model_json2 == reserved_ip_collection_first_model_json @@ -65454,24 +74197,34 @@ class TestModel_ReservedIPCollectionInstanceNetworkInterfaceContext: Test Class for ReservedIPCollectionInstanceNetworkInterfaceContext """ - def test_reserved_ip_collection_instance_network_interface_context_serialization(self): + def test_reserved_ip_collection_instance_network_interface_context_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionInstanceNetworkInterfaceContext """ # Construct dict forms of any model objects needed in order to build this model. - reserved_ip_collection_instance_network_interface_context_first_model = {} # ReservedIPCollectionInstanceNetworkInterfaceContextFirst - reserved_ip_collection_instance_network_interface_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' - - endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted - endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference - reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model - reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_collection_instance_network_interface_context_first_model = { + } # ReservedIPCollectionInstanceNetworkInterfaceContextFirst + reserved_ip_collection_instance_network_interface_context_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' + + endpoint_gateway_reference_deleted_model = { + } # EndpointGatewayReferenceDeleted + endpoint_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + reserved_ip_target_model = { + } # ReservedIPTargetEndpointGatewayReference + reserved_ip_target_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'deleted'] = endpoint_gateway_reference_deleted_model + reserved_ip_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' @@ -65479,7 +74232,8 @@ def test_reserved_ip_collection_instance_network_interface_context_serialization reserved_ip_model['address'] = '192.168.3.4' reserved_ip_model['auto_delete'] = False reserved_ip_model['created_at'] = '2019-01-01T12:00:00Z' - reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_model['lifecycle_state'] = 'stable' reserved_ip_model['name'] = 'my-reserved-ip' @@ -65487,30 +74241,45 @@ def test_reserved_ip_collection_instance_network_interface_context_serialization reserved_ip_model['resource_type'] = 'subnet_reserved_ip' reserved_ip_model['target'] = reserved_ip_target_model - reserved_ip_collection_instance_network_interface_context_next_model = {} # ReservedIPCollectionInstanceNetworkInterfaceContextNext - reserved_ip_collection_instance_network_interface_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' + reserved_ip_collection_instance_network_interface_context_next_model = { + } # ReservedIPCollectionInstanceNetworkInterfaceContextNext + reserved_ip_collection_instance_network_interface_context_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' # Construct a json representation of a ReservedIPCollectionInstanceNetworkInterfaceContext model reserved_ip_collection_instance_network_interface_context_model_json = {} - reserved_ip_collection_instance_network_interface_context_model_json['first'] = reserved_ip_collection_instance_network_interface_context_first_model - reserved_ip_collection_instance_network_interface_context_model_json['ips'] = [reserved_ip_model] - reserved_ip_collection_instance_network_interface_context_model_json['limit'] = 20 - reserved_ip_collection_instance_network_interface_context_model_json['next'] = reserved_ip_collection_instance_network_interface_context_next_model - reserved_ip_collection_instance_network_interface_context_model_json['total_count'] = 132 + reserved_ip_collection_instance_network_interface_context_model_json[ + 'first'] = reserved_ip_collection_instance_network_interface_context_first_model + reserved_ip_collection_instance_network_interface_context_model_json[ + 'ips'] = [reserved_ip_model] + reserved_ip_collection_instance_network_interface_context_model_json[ + 'limit'] = 20 + reserved_ip_collection_instance_network_interface_context_model_json[ + 'next'] = reserved_ip_collection_instance_network_interface_context_next_model + reserved_ip_collection_instance_network_interface_context_model_json[ + 'total_count'] = 132 # Construct a model instance of ReservedIPCollectionInstanceNetworkInterfaceContext by calling from_dict on the json representation - reserved_ip_collection_instance_network_interface_context_model = ReservedIPCollectionInstanceNetworkInterfaceContext.from_dict(reserved_ip_collection_instance_network_interface_context_model_json) + reserved_ip_collection_instance_network_interface_context_model = ReservedIPCollectionInstanceNetworkInterfaceContext.from_dict( + reserved_ip_collection_instance_network_interface_context_model_json + ) assert reserved_ip_collection_instance_network_interface_context_model != False # Construct a model instance of ReservedIPCollectionInstanceNetworkInterfaceContext by calling from_dict on the json representation - reserved_ip_collection_instance_network_interface_context_model_dict = ReservedIPCollectionInstanceNetworkInterfaceContext.from_dict(reserved_ip_collection_instance_network_interface_context_model_json).__dict__ - reserved_ip_collection_instance_network_interface_context_model2 = ReservedIPCollectionInstanceNetworkInterfaceContext(**reserved_ip_collection_instance_network_interface_context_model_dict) + reserved_ip_collection_instance_network_interface_context_model_dict = ReservedIPCollectionInstanceNetworkInterfaceContext.from_dict( + reserved_ip_collection_instance_network_interface_context_model_json + ).__dict__ + reserved_ip_collection_instance_network_interface_context_model2 = ReservedIPCollectionInstanceNetworkInterfaceContext( + ** + reserved_ip_collection_instance_network_interface_context_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_instance_network_interface_context_model == reserved_ip_collection_instance_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_instance_network_interface_context_model_json2 = reserved_ip_collection_instance_network_interface_context_model.to_dict() + reserved_ip_collection_instance_network_interface_context_model_json2 = reserved_ip_collection_instance_network_interface_context_model.to_dict( + ) assert reserved_ip_collection_instance_network_interface_context_model_json2 == reserved_ip_collection_instance_network_interface_context_model_json @@ -65519,28 +74288,38 @@ class TestModel_ReservedIPCollectionInstanceNetworkInterfaceContextFirst: Test Class for ReservedIPCollectionInstanceNetworkInterfaceContextFirst """ - def test_reserved_ip_collection_instance_network_interface_context_first_serialization(self): + def test_reserved_ip_collection_instance_network_interface_context_first_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionInstanceNetworkInterfaceContextFirst """ # Construct a json representation of a ReservedIPCollectionInstanceNetworkInterfaceContextFirst model reserved_ip_collection_instance_network_interface_context_first_model_json = {} - reserved_ip_collection_instance_network_interface_context_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' + reserved_ip_collection_instance_network_interface_context_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' # Construct a model instance of ReservedIPCollectionInstanceNetworkInterfaceContextFirst by calling from_dict on the json representation - reserved_ip_collection_instance_network_interface_context_first_model = ReservedIPCollectionInstanceNetworkInterfaceContextFirst.from_dict(reserved_ip_collection_instance_network_interface_context_first_model_json) + reserved_ip_collection_instance_network_interface_context_first_model = ReservedIPCollectionInstanceNetworkInterfaceContextFirst.from_dict( + reserved_ip_collection_instance_network_interface_context_first_model_json + ) assert reserved_ip_collection_instance_network_interface_context_first_model != False # Construct a model instance of ReservedIPCollectionInstanceNetworkInterfaceContextFirst by calling from_dict on the json representation - reserved_ip_collection_instance_network_interface_context_first_model_dict = ReservedIPCollectionInstanceNetworkInterfaceContextFirst.from_dict(reserved_ip_collection_instance_network_interface_context_first_model_json).__dict__ - reserved_ip_collection_instance_network_interface_context_first_model2 = ReservedIPCollectionInstanceNetworkInterfaceContextFirst(**reserved_ip_collection_instance_network_interface_context_first_model_dict) + reserved_ip_collection_instance_network_interface_context_first_model_dict = ReservedIPCollectionInstanceNetworkInterfaceContextFirst.from_dict( + reserved_ip_collection_instance_network_interface_context_first_model_json + ).__dict__ + reserved_ip_collection_instance_network_interface_context_first_model2 = ReservedIPCollectionInstanceNetworkInterfaceContextFirst( + ** + reserved_ip_collection_instance_network_interface_context_first_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_instance_network_interface_context_first_model == reserved_ip_collection_instance_network_interface_context_first_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_instance_network_interface_context_first_model_json2 = reserved_ip_collection_instance_network_interface_context_first_model.to_dict() + reserved_ip_collection_instance_network_interface_context_first_model_json2 = reserved_ip_collection_instance_network_interface_context_first_model.to_dict( + ) assert reserved_ip_collection_instance_network_interface_context_first_model_json2 == reserved_ip_collection_instance_network_interface_context_first_model_json @@ -65549,28 +74328,38 @@ class TestModel_ReservedIPCollectionInstanceNetworkInterfaceContextNext: Test Class for ReservedIPCollectionInstanceNetworkInterfaceContextNext """ - def test_reserved_ip_collection_instance_network_interface_context_next_serialization(self): + def test_reserved_ip_collection_instance_network_interface_context_next_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionInstanceNetworkInterfaceContextNext """ # Construct a json representation of a ReservedIPCollectionInstanceNetworkInterfaceContextNext model reserved_ip_collection_instance_network_interface_context_next_model_json = {} - reserved_ip_collection_instance_network_interface_context_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' + reserved_ip_collection_instance_network_interface_context_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' # Construct a model instance of ReservedIPCollectionInstanceNetworkInterfaceContextNext by calling from_dict on the json representation - reserved_ip_collection_instance_network_interface_context_next_model = ReservedIPCollectionInstanceNetworkInterfaceContextNext.from_dict(reserved_ip_collection_instance_network_interface_context_next_model_json) + reserved_ip_collection_instance_network_interface_context_next_model = ReservedIPCollectionInstanceNetworkInterfaceContextNext.from_dict( + reserved_ip_collection_instance_network_interface_context_next_model_json + ) assert reserved_ip_collection_instance_network_interface_context_next_model != False # Construct a model instance of ReservedIPCollectionInstanceNetworkInterfaceContextNext by calling from_dict on the json representation - reserved_ip_collection_instance_network_interface_context_next_model_dict = ReservedIPCollectionInstanceNetworkInterfaceContextNext.from_dict(reserved_ip_collection_instance_network_interface_context_next_model_json).__dict__ - reserved_ip_collection_instance_network_interface_context_next_model2 = ReservedIPCollectionInstanceNetworkInterfaceContextNext(**reserved_ip_collection_instance_network_interface_context_next_model_dict) + reserved_ip_collection_instance_network_interface_context_next_model_dict = ReservedIPCollectionInstanceNetworkInterfaceContextNext.from_dict( + reserved_ip_collection_instance_network_interface_context_next_model_json + ).__dict__ + reserved_ip_collection_instance_network_interface_context_next_model2 = ReservedIPCollectionInstanceNetworkInterfaceContextNext( + ** + reserved_ip_collection_instance_network_interface_context_next_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_instance_network_interface_context_next_model == reserved_ip_collection_instance_network_interface_context_next_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_instance_network_interface_context_next_model_json2 = reserved_ip_collection_instance_network_interface_context_next_model.to_dict() + reserved_ip_collection_instance_network_interface_context_next_model_json2 = reserved_ip_collection_instance_network_interface_context_next_model.to_dict( + ) assert reserved_ip_collection_instance_network_interface_context_next_model_json2 == reserved_ip_collection_instance_network_interface_context_next_model_json @@ -65586,21 +74375,26 @@ def test_reserved_ip_collection_next_serialization(self): # Construct a json representation of a ReservedIPCollectionNext model reserved_ip_collection_next_model_json = {} - reserved_ip_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + reserved_ip_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of ReservedIPCollectionNext by calling from_dict on the json representation - reserved_ip_collection_next_model = ReservedIPCollectionNext.from_dict(reserved_ip_collection_next_model_json) + reserved_ip_collection_next_model = ReservedIPCollectionNext.from_dict( + reserved_ip_collection_next_model_json) assert reserved_ip_collection_next_model != False # Construct a model instance of ReservedIPCollectionNext by calling from_dict on the json representation - reserved_ip_collection_next_model_dict = ReservedIPCollectionNext.from_dict(reserved_ip_collection_next_model_json).__dict__ - reserved_ip_collection_next_model2 = ReservedIPCollectionNext(**reserved_ip_collection_next_model_dict) + reserved_ip_collection_next_model_dict = ReservedIPCollectionNext.from_dict( + reserved_ip_collection_next_model_json).__dict__ + reserved_ip_collection_next_model2 = ReservedIPCollectionNext( + **reserved_ip_collection_next_model_dict) # Verify the model instances are equivalent assert reserved_ip_collection_next_model == reserved_ip_collection_next_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_next_model_json2 = reserved_ip_collection_next_model.to_dict() + reserved_ip_collection_next_model_json2 = reserved_ip_collection_next_model.to_dict( + ) assert reserved_ip_collection_next_model_json2 == reserved_ip_collection_next_model_json @@ -65609,51 +74403,71 @@ class TestModel_ReservedIPCollectionVirtualNetworkInterfaceContext: Test Class for ReservedIPCollectionVirtualNetworkInterfaceContext """ - def test_reserved_ip_collection_virtual_network_interface_context_serialization(self): + def test_reserved_ip_collection_virtual_network_interface_context_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionVirtualNetworkInterfaceContext """ # Construct dict forms of any model objects needed in order to build this model. - reserved_ip_collection_virtual_network_interface_context_first_model = {} # ReservedIPCollectionVirtualNetworkInterfaceContextFirst - reserved_ip_collection_virtual_network_interface_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' + reserved_ip_collection_virtual_network_interface_context_first_model = { + } # ReservedIPCollectionVirtualNetworkInterfaceContextFirst + reserved_ip_collection_virtual_network_interface_context_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - reserved_ip_collection_virtual_network_interface_context_next_model = {} # ReservedIPCollectionVirtualNetworkInterfaceContextNext - reserved_ip_collection_virtual_network_interface_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' + reserved_ip_collection_virtual_network_interface_context_next_model = { + } # ReservedIPCollectionVirtualNetworkInterfaceContextNext + reserved_ip_collection_virtual_network_interface_context_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' # Construct a json representation of a ReservedIPCollectionVirtualNetworkInterfaceContext model reserved_ip_collection_virtual_network_interface_context_model_json = {} - reserved_ip_collection_virtual_network_interface_context_model_json['first'] = reserved_ip_collection_virtual_network_interface_context_first_model - reserved_ip_collection_virtual_network_interface_context_model_json['ips'] = [reserved_ip_reference_model] - reserved_ip_collection_virtual_network_interface_context_model_json['limit'] = 20 - reserved_ip_collection_virtual_network_interface_context_model_json['next'] = reserved_ip_collection_virtual_network_interface_context_next_model - reserved_ip_collection_virtual_network_interface_context_model_json['total_count'] = 132 + reserved_ip_collection_virtual_network_interface_context_model_json[ + 'first'] = reserved_ip_collection_virtual_network_interface_context_first_model + reserved_ip_collection_virtual_network_interface_context_model_json[ + 'ips'] = [reserved_ip_reference_model] + reserved_ip_collection_virtual_network_interface_context_model_json[ + 'limit'] = 20 + reserved_ip_collection_virtual_network_interface_context_model_json[ + 'next'] = reserved_ip_collection_virtual_network_interface_context_next_model + reserved_ip_collection_virtual_network_interface_context_model_json[ + 'total_count'] = 132 # Construct a model instance of ReservedIPCollectionVirtualNetworkInterfaceContext by calling from_dict on the json representation - reserved_ip_collection_virtual_network_interface_context_model = ReservedIPCollectionVirtualNetworkInterfaceContext.from_dict(reserved_ip_collection_virtual_network_interface_context_model_json) + reserved_ip_collection_virtual_network_interface_context_model = ReservedIPCollectionVirtualNetworkInterfaceContext.from_dict( + reserved_ip_collection_virtual_network_interface_context_model_json) assert reserved_ip_collection_virtual_network_interface_context_model != False # Construct a model instance of ReservedIPCollectionVirtualNetworkInterfaceContext by calling from_dict on the json representation - reserved_ip_collection_virtual_network_interface_context_model_dict = ReservedIPCollectionVirtualNetworkInterfaceContext.from_dict(reserved_ip_collection_virtual_network_interface_context_model_json).__dict__ - reserved_ip_collection_virtual_network_interface_context_model2 = ReservedIPCollectionVirtualNetworkInterfaceContext(**reserved_ip_collection_virtual_network_interface_context_model_dict) + reserved_ip_collection_virtual_network_interface_context_model_dict = ReservedIPCollectionVirtualNetworkInterfaceContext.from_dict( + reserved_ip_collection_virtual_network_interface_context_model_json + ).__dict__ + reserved_ip_collection_virtual_network_interface_context_model2 = ReservedIPCollectionVirtualNetworkInterfaceContext( + ** + reserved_ip_collection_virtual_network_interface_context_model_dict) # Verify the model instances are equivalent assert reserved_ip_collection_virtual_network_interface_context_model == reserved_ip_collection_virtual_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_virtual_network_interface_context_model_json2 = reserved_ip_collection_virtual_network_interface_context_model.to_dict() + reserved_ip_collection_virtual_network_interface_context_model_json2 = reserved_ip_collection_virtual_network_interface_context_model.to_dict( + ) assert reserved_ip_collection_virtual_network_interface_context_model_json2 == reserved_ip_collection_virtual_network_interface_context_model_json @@ -65662,28 +74476,38 @@ class TestModel_ReservedIPCollectionVirtualNetworkInterfaceContextFirst: Test Class for ReservedIPCollectionVirtualNetworkInterfaceContextFirst """ - def test_reserved_ip_collection_virtual_network_interface_context_first_serialization(self): + def test_reserved_ip_collection_virtual_network_interface_context_first_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionVirtualNetworkInterfaceContextFirst """ # Construct a json representation of a ReservedIPCollectionVirtualNetworkInterfaceContextFirst model reserved_ip_collection_virtual_network_interface_context_first_model_json = {} - reserved_ip_collection_virtual_network_interface_context_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' + reserved_ip_collection_virtual_network_interface_context_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20' # Construct a model instance of ReservedIPCollectionVirtualNetworkInterfaceContextFirst by calling from_dict on the json representation - reserved_ip_collection_virtual_network_interface_context_first_model = ReservedIPCollectionVirtualNetworkInterfaceContextFirst.from_dict(reserved_ip_collection_virtual_network_interface_context_first_model_json) + reserved_ip_collection_virtual_network_interface_context_first_model = ReservedIPCollectionVirtualNetworkInterfaceContextFirst.from_dict( + reserved_ip_collection_virtual_network_interface_context_first_model_json + ) assert reserved_ip_collection_virtual_network_interface_context_first_model != False # Construct a model instance of ReservedIPCollectionVirtualNetworkInterfaceContextFirst by calling from_dict on the json representation - reserved_ip_collection_virtual_network_interface_context_first_model_dict = ReservedIPCollectionVirtualNetworkInterfaceContextFirst.from_dict(reserved_ip_collection_virtual_network_interface_context_first_model_json).__dict__ - reserved_ip_collection_virtual_network_interface_context_first_model2 = ReservedIPCollectionVirtualNetworkInterfaceContextFirst(**reserved_ip_collection_virtual_network_interface_context_first_model_dict) + reserved_ip_collection_virtual_network_interface_context_first_model_dict = ReservedIPCollectionVirtualNetworkInterfaceContextFirst.from_dict( + reserved_ip_collection_virtual_network_interface_context_first_model_json + ).__dict__ + reserved_ip_collection_virtual_network_interface_context_first_model2 = ReservedIPCollectionVirtualNetworkInterfaceContextFirst( + ** + reserved_ip_collection_virtual_network_interface_context_first_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_virtual_network_interface_context_first_model == reserved_ip_collection_virtual_network_interface_context_first_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_virtual_network_interface_context_first_model_json2 = reserved_ip_collection_virtual_network_interface_context_first_model.to_dict() + reserved_ip_collection_virtual_network_interface_context_first_model_json2 = reserved_ip_collection_virtual_network_interface_context_first_model.to_dict( + ) assert reserved_ip_collection_virtual_network_interface_context_first_model_json2 == reserved_ip_collection_virtual_network_interface_context_first_model_json @@ -65692,28 +74516,38 @@ class TestModel_ReservedIPCollectionVirtualNetworkInterfaceContextNext: Test Class for ReservedIPCollectionVirtualNetworkInterfaceContextNext """ - def test_reserved_ip_collection_virtual_network_interface_context_next_serialization(self): + def test_reserved_ip_collection_virtual_network_interface_context_next_serialization( + self): """ Test serialization/deserialization for ReservedIPCollectionVirtualNetworkInterfaceContextNext """ # Construct a json representation of a ReservedIPCollectionVirtualNetworkInterfaceContextNext model reserved_ip_collection_virtual_network_interface_context_next_model_json = {} - reserved_ip_collection_virtual_network_interface_context_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' + reserved_ip_collection_virtual_network_interface_context_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20' # Construct a model instance of ReservedIPCollectionVirtualNetworkInterfaceContextNext by calling from_dict on the json representation - reserved_ip_collection_virtual_network_interface_context_next_model = ReservedIPCollectionVirtualNetworkInterfaceContextNext.from_dict(reserved_ip_collection_virtual_network_interface_context_next_model_json) + reserved_ip_collection_virtual_network_interface_context_next_model = ReservedIPCollectionVirtualNetworkInterfaceContextNext.from_dict( + reserved_ip_collection_virtual_network_interface_context_next_model_json + ) assert reserved_ip_collection_virtual_network_interface_context_next_model != False # Construct a model instance of ReservedIPCollectionVirtualNetworkInterfaceContextNext by calling from_dict on the json representation - reserved_ip_collection_virtual_network_interface_context_next_model_dict = ReservedIPCollectionVirtualNetworkInterfaceContextNext.from_dict(reserved_ip_collection_virtual_network_interface_context_next_model_json).__dict__ - reserved_ip_collection_virtual_network_interface_context_next_model2 = ReservedIPCollectionVirtualNetworkInterfaceContextNext(**reserved_ip_collection_virtual_network_interface_context_next_model_dict) + reserved_ip_collection_virtual_network_interface_context_next_model_dict = ReservedIPCollectionVirtualNetworkInterfaceContextNext.from_dict( + reserved_ip_collection_virtual_network_interface_context_next_model_json + ).__dict__ + reserved_ip_collection_virtual_network_interface_context_next_model2 = ReservedIPCollectionVirtualNetworkInterfaceContextNext( + ** + reserved_ip_collection_virtual_network_interface_context_next_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_collection_virtual_network_interface_context_next_model == reserved_ip_collection_virtual_network_interface_context_next_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_collection_virtual_network_interface_context_next_model_json2 = reserved_ip_collection_virtual_network_interface_context_next_model.to_dict() + reserved_ip_collection_virtual_network_interface_context_next_model_json2 = reserved_ip_collection_virtual_network_interface_context_next_model.to_dict( + ) assert reserved_ip_collection_virtual_network_interface_context_next_model_json2 == reserved_ip_collection_virtual_network_interface_context_next_model_json @@ -65733,12 +74567,15 @@ def test_reserved_ip_patch_serialization(self): reserved_ip_patch_model_json['name'] = 'my-reserved-ip' # Construct a model instance of ReservedIPPatch by calling from_dict on the json representation - reserved_ip_patch_model = ReservedIPPatch.from_dict(reserved_ip_patch_model_json) + reserved_ip_patch_model = ReservedIPPatch.from_dict( + reserved_ip_patch_model_json) assert reserved_ip_patch_model != False # Construct a model instance of ReservedIPPatch by calling from_dict on the json representation - reserved_ip_patch_model_dict = ReservedIPPatch.from_dict(reserved_ip_patch_model_json).__dict__ - reserved_ip_patch_model2 = ReservedIPPatch(**reserved_ip_patch_model_dict) + reserved_ip_patch_model_dict = ReservedIPPatch.from_dict( + reserved_ip_patch_model_json).__dict__ + reserved_ip_patch_model2 = ReservedIPPatch( + **reserved_ip_patch_model_dict) # Verify the model instances are equivalent assert reserved_ip_patch_model == reserved_ip_patch_model2 @@ -65761,30 +74598,38 @@ def test_reserved_ip_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPReference model reserved_ip_reference_model_json = {} reserved_ip_reference_model_json['address'] = '192.168.3.4' - reserved_ip_reference_model_json['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model_json['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model_json[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model_json[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model_json['name'] = 'my-reserved-ip' reserved_ip_reference_model_json['resource_type'] = 'subnet_reserved_ip' # Construct a model instance of ReservedIPReference by calling from_dict on the json representation - reserved_ip_reference_model = ReservedIPReference.from_dict(reserved_ip_reference_model_json) + reserved_ip_reference_model = ReservedIPReference.from_dict( + reserved_ip_reference_model_json) assert reserved_ip_reference_model != False # Construct a model instance of ReservedIPReference by calling from_dict on the json representation - reserved_ip_reference_model_dict = ReservedIPReference.from_dict(reserved_ip_reference_model_json).__dict__ - reserved_ip_reference_model2 = ReservedIPReference(**reserved_ip_reference_model_dict) + reserved_ip_reference_model_dict = ReservedIPReference.from_dict( + reserved_ip_reference_model_json).__dict__ + reserved_ip_reference_model2 = ReservedIPReference( + **reserved_ip_reference_model_dict) # Verify the model instances are equivalent assert reserved_ip_reference_model == reserved_ip_reference_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_reference_model_json2 = reserved_ip_reference_model.to_dict() + reserved_ip_reference_model_json2 = reserved_ip_reference_model.to_dict( + ) assert reserved_ip_reference_model_json2 == reserved_ip_reference_model_json @@ -65800,21 +74645,26 @@ def test_reserved_ip_reference_deleted_serialization(self): # Construct a json representation of a ReservedIPReferenceDeleted model reserved_ip_reference_deleted_model_json = {} - reserved_ip_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of ReservedIPReferenceDeleted by calling from_dict on the json representation - reserved_ip_reference_deleted_model = ReservedIPReferenceDeleted.from_dict(reserved_ip_reference_deleted_model_json) + reserved_ip_reference_deleted_model = ReservedIPReferenceDeleted.from_dict( + reserved_ip_reference_deleted_model_json) assert reserved_ip_reference_deleted_model != False # Construct a model instance of ReservedIPReferenceDeleted by calling from_dict on the json representation - reserved_ip_reference_deleted_model_dict = ReservedIPReferenceDeleted.from_dict(reserved_ip_reference_deleted_model_json).__dict__ - reserved_ip_reference_deleted_model2 = ReservedIPReferenceDeleted(**reserved_ip_reference_deleted_model_dict) + reserved_ip_reference_deleted_model_dict = ReservedIPReferenceDeleted.from_dict( + reserved_ip_reference_deleted_model_json).__dict__ + reserved_ip_reference_deleted_model2 = ReservedIPReferenceDeleted( + **reserved_ip_reference_deleted_model_dict) # Verify the model instances are equivalent assert reserved_ip_reference_deleted_model == reserved_ip_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_reference_deleted_model_json2 = reserved_ip_reference_deleted_model.to_dict() + reserved_ip_reference_deleted_model_json2 = reserved_ip_reference_deleted_model.to_dict( + ) assert reserved_ip_reference_deleted_model_json2 == reserved_ip_reference_deleted_model_json @@ -65833,11 +74683,13 @@ def test_resource_filter_serialization(self): resource_filter_model_json['resource_type'] = 'vpn_server' # Construct a model instance of ResourceFilter by calling from_dict on the json representation - resource_filter_model = ResourceFilter.from_dict(resource_filter_model_json) + resource_filter_model = ResourceFilter.from_dict( + resource_filter_model_json) assert resource_filter_model != False # Construct a model instance of ResourceFilter by calling from_dict on the json representation - resource_filter_model_dict = ResourceFilter.from_dict(resource_filter_model_json).__dict__ + resource_filter_model_dict = ResourceFilter.from_dict( + resource_filter_model_json).__dict__ resource_filter_model2 = ResourceFilter(**resource_filter_model_dict) # Verify the model instances are equivalent @@ -65860,23 +74712,29 @@ def test_resource_group_reference_serialization(self): # Construct a json representation of a ResourceGroupReference model resource_group_reference_model_json = {} - resource_group_reference_model_json['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model_json['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model_json[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model_json[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model_json['name'] = 'my-resource-group' # Construct a model instance of ResourceGroupReference by calling from_dict on the json representation - resource_group_reference_model = ResourceGroupReference.from_dict(resource_group_reference_model_json) + resource_group_reference_model = ResourceGroupReference.from_dict( + resource_group_reference_model_json) assert resource_group_reference_model != False # Construct a model instance of ResourceGroupReference by calling from_dict on the json representation - resource_group_reference_model_dict = ResourceGroupReference.from_dict(resource_group_reference_model_json).__dict__ - resource_group_reference_model2 = ResourceGroupReference(**resource_group_reference_model_dict) + resource_group_reference_model_dict = ResourceGroupReference.from_dict( + resource_group_reference_model_json).__dict__ + resource_group_reference_model2 = ResourceGroupReference( + **resource_group_reference_model_dict) # Verify the model instances are equivalent assert resource_group_reference_model == resource_group_reference_model2 # Convert model instance back to dict and verify no loss of data - resource_group_reference_model_json2 = resource_group_reference_model.to_dict() + resource_group_reference_model_json2 = resource_group_reference_model.to_dict( + ) assert resource_group_reference_model_json2 == resource_group_reference_model_json @@ -65896,7 +74754,8 @@ def test_route_serialization(self): route_next_hop_model['address'] = '192.168.3.4' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a Route model @@ -65904,8 +74763,9 @@ def test_route_serialization(self): route_model_json['action'] = 'delegate' route_model_json['advertise'] = True route_model_json['created_at'] = '2019-01-01T12:00:00Z' - route_model_json['destination'] = 'testString' - route_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_model_json['destination'] = '192.168.3.0/24' + route_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' route_model_json['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' route_model_json['lifecycle_state'] = 'stable' route_model_json['name'] = 'my-route-1' @@ -65942,24 +74802,28 @@ def test_route_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. route_collection_first_model = {} # RouteCollectionFirst - route_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' + route_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' route_collection_next_model = {} # RouteCollectionNext - route_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + route_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' route_next_hop_model = {} # RouteNextHopIP route_next_hop_model['address'] = '192.168.3.4' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' route_model = {} # Route route_model['action'] = 'delegate' route_model['advertise'] = True route_model['created_at'] = '2019-01-01T12:00:00Z' - route_model['destination'] = 'testString' - route_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_model['destination'] = '192.168.3.0/24' + route_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' route_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' route_model['lifecycle_state'] = 'stable' route_model['name'] = 'my-route-1' @@ -65976,11 +74840,13 @@ def test_route_collection_serialization(self): route_collection_model_json['total_count'] = 132 # Construct a model instance of RouteCollection by calling from_dict on the json representation - route_collection_model = RouteCollection.from_dict(route_collection_model_json) + route_collection_model = RouteCollection.from_dict( + route_collection_model_json) assert route_collection_model != False # Construct a model instance of RouteCollection by calling from_dict on the json representation - route_collection_model_dict = RouteCollection.from_dict(route_collection_model_json).__dict__ + route_collection_model_dict = RouteCollection.from_dict( + route_collection_model_json).__dict__ route_collection_model2 = RouteCollection(**route_collection_model_dict) # Verify the model instances are equivalent @@ -66003,21 +74869,26 @@ def test_route_collection_first_serialization(self): # Construct a json representation of a RouteCollectionFirst model route_collection_first_model_json = {} - route_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' + route_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' # Construct a model instance of RouteCollectionFirst by calling from_dict on the json representation - route_collection_first_model = RouteCollectionFirst.from_dict(route_collection_first_model_json) + route_collection_first_model = RouteCollectionFirst.from_dict( + route_collection_first_model_json) assert route_collection_first_model != False # Construct a model instance of RouteCollectionFirst by calling from_dict on the json representation - route_collection_first_model_dict = RouteCollectionFirst.from_dict(route_collection_first_model_json).__dict__ - route_collection_first_model2 = RouteCollectionFirst(**route_collection_first_model_dict) + route_collection_first_model_dict = RouteCollectionFirst.from_dict( + route_collection_first_model_json).__dict__ + route_collection_first_model2 = RouteCollectionFirst( + **route_collection_first_model_dict) # Verify the model instances are equivalent assert route_collection_first_model == route_collection_first_model2 # Convert model instance back to dict and verify no loss of data - route_collection_first_model_json2 = route_collection_first_model.to_dict() + route_collection_first_model_json2 = route_collection_first_model.to_dict( + ) assert route_collection_first_model_json2 == route_collection_first_model_json @@ -66033,21 +74904,26 @@ def test_route_collection_next_serialization(self): # Construct a json representation of a RouteCollectionNext model route_collection_next_model_json = {} - route_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + route_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' # Construct a model instance of RouteCollectionNext by calling from_dict on the json representation - route_collection_next_model = RouteCollectionNext.from_dict(route_collection_next_model_json) + route_collection_next_model = RouteCollectionNext.from_dict( + route_collection_next_model_json) assert route_collection_next_model != False # Construct a model instance of RouteCollectionNext by calling from_dict on the json representation - route_collection_next_model_dict = RouteCollectionNext.from_dict(route_collection_next_model_json).__dict__ - route_collection_next_model2 = RouteCollectionNext(**route_collection_next_model_dict) + route_collection_next_model_dict = RouteCollectionNext.from_dict( + route_collection_next_model_json).__dict__ + route_collection_next_model2 = RouteCollectionNext( + **route_collection_next_model_dict) # Verify the model instances are equivalent assert route_collection_next_model == route_collection_next_model2 # Convert model instance back to dict and verify no loss of data - route_collection_next_model_json2 = route_collection_next_model.to_dict() + route_collection_next_model_json2 = route_collection_next_model.to_dict( + ) assert route_collection_next_model_json2 == route_collection_next_model_json @@ -66063,53 +74939,74 @@ def test_route_collection_vpc_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - route_collection_vpc_context_first_model = {} # RouteCollectionVPCContextFirst - route_collection_vpc_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' + route_collection_vpc_context_first_model = { + } # RouteCollectionVPCContextFirst + route_collection_vpc_context_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' - route_collection_vpc_context_next_model = {} # RouteCollectionVPCContextNext - route_collection_vpc_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + route_collection_vpc_context_next_model = { + } # RouteCollectionVPCContextNext + route_collection_vpc_context_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' route_next_hop_model = {} # RouteNextHopIP route_next_hop_model['address'] = '192.168.3.4' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' - route_collection_vpc_context_routes_item_model = {} # RouteCollectionVPCContextRoutesItem + route_collection_vpc_context_routes_item_model = { + } # RouteCollectionVPCContextRoutesItem route_collection_vpc_context_routes_item_model['action'] = 'delegate' route_collection_vpc_context_routes_item_model['advertise'] = True - route_collection_vpc_context_routes_item_model['created_at'] = '2019-01-01T12:00:00Z' - route_collection_vpc_context_routes_item_model['destination'] = 'testString' - route_collection_vpc_context_routes_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' - route_collection_vpc_context_routes_item_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' - route_collection_vpc_context_routes_item_model['lifecycle_state'] = 'stable' + route_collection_vpc_context_routes_item_model[ + 'created_at'] = '2019-01-01T12:00:00Z' + route_collection_vpc_context_routes_item_model[ + 'destination'] = '192.168.3.0/24' + route_collection_vpc_context_routes_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_collection_vpc_context_routes_item_model[ + 'id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_collection_vpc_context_routes_item_model[ + 'lifecycle_state'] = 'stable' route_collection_vpc_context_routes_item_model['name'] = 'my-route-1' - route_collection_vpc_context_routes_item_model['next_hop'] = route_next_hop_model + route_collection_vpc_context_routes_item_model[ + 'next_hop'] = route_next_hop_model route_collection_vpc_context_routes_item_model['priority'] = 1 - route_collection_vpc_context_routes_item_model['zone'] = zone_reference_model + route_collection_vpc_context_routes_item_model[ + 'zone'] = zone_reference_model # Construct a json representation of a RouteCollectionVPCContext model route_collection_vpc_context_model_json = {} - route_collection_vpc_context_model_json['first'] = route_collection_vpc_context_first_model + route_collection_vpc_context_model_json[ + 'first'] = route_collection_vpc_context_first_model route_collection_vpc_context_model_json['limit'] = 20 - route_collection_vpc_context_model_json['next'] = route_collection_vpc_context_next_model - route_collection_vpc_context_model_json['routes'] = [route_collection_vpc_context_routes_item_model] + route_collection_vpc_context_model_json[ + 'next'] = route_collection_vpc_context_next_model + route_collection_vpc_context_model_json['routes'] = [ + route_collection_vpc_context_routes_item_model + ] route_collection_vpc_context_model_json['total_count'] = 132 # Construct a model instance of RouteCollectionVPCContext by calling from_dict on the json representation - route_collection_vpc_context_model = RouteCollectionVPCContext.from_dict(route_collection_vpc_context_model_json) + route_collection_vpc_context_model = RouteCollectionVPCContext.from_dict( + route_collection_vpc_context_model_json) assert route_collection_vpc_context_model != False # Construct a model instance of RouteCollectionVPCContext by calling from_dict on the json representation - route_collection_vpc_context_model_dict = RouteCollectionVPCContext.from_dict(route_collection_vpc_context_model_json).__dict__ - route_collection_vpc_context_model2 = RouteCollectionVPCContext(**route_collection_vpc_context_model_dict) + route_collection_vpc_context_model_dict = RouteCollectionVPCContext.from_dict( + route_collection_vpc_context_model_json).__dict__ + route_collection_vpc_context_model2 = RouteCollectionVPCContext( + **route_collection_vpc_context_model_dict) # Verify the model instances are equivalent assert route_collection_vpc_context_model == route_collection_vpc_context_model2 # Convert model instance back to dict and verify no loss of data - route_collection_vpc_context_model_json2 = route_collection_vpc_context_model.to_dict() + route_collection_vpc_context_model_json2 = route_collection_vpc_context_model.to_dict( + ) assert route_collection_vpc_context_model_json2 == route_collection_vpc_context_model_json @@ -66125,21 +75022,26 @@ def test_route_collection_vpc_context_first_serialization(self): # Construct a json representation of a RouteCollectionVPCContextFirst model route_collection_vpc_context_first_model_json = {} - route_collection_vpc_context_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' + route_collection_vpc_context_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20' # Construct a model instance of RouteCollectionVPCContextFirst by calling from_dict on the json representation - route_collection_vpc_context_first_model = RouteCollectionVPCContextFirst.from_dict(route_collection_vpc_context_first_model_json) + route_collection_vpc_context_first_model = RouteCollectionVPCContextFirst.from_dict( + route_collection_vpc_context_first_model_json) assert route_collection_vpc_context_first_model != False # Construct a model instance of RouteCollectionVPCContextFirst by calling from_dict on the json representation - route_collection_vpc_context_first_model_dict = RouteCollectionVPCContextFirst.from_dict(route_collection_vpc_context_first_model_json).__dict__ - route_collection_vpc_context_first_model2 = RouteCollectionVPCContextFirst(**route_collection_vpc_context_first_model_dict) + route_collection_vpc_context_first_model_dict = RouteCollectionVPCContextFirst.from_dict( + route_collection_vpc_context_first_model_json).__dict__ + route_collection_vpc_context_first_model2 = RouteCollectionVPCContextFirst( + **route_collection_vpc_context_first_model_dict) # Verify the model instances are equivalent assert route_collection_vpc_context_first_model == route_collection_vpc_context_first_model2 # Convert model instance back to dict and verify no loss of data - route_collection_vpc_context_first_model_json2 = route_collection_vpc_context_first_model.to_dict() + route_collection_vpc_context_first_model_json2 = route_collection_vpc_context_first_model.to_dict( + ) assert route_collection_vpc_context_first_model_json2 == route_collection_vpc_context_first_model_json @@ -66155,21 +75057,26 @@ def test_route_collection_vpc_context_next_serialization(self): # Construct a json representation of a RouteCollectionVPCContextNext model route_collection_vpc_context_next_model_json = {} - route_collection_vpc_context_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + route_collection_vpc_context_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' # Construct a model instance of RouteCollectionVPCContextNext by calling from_dict on the json representation - route_collection_vpc_context_next_model = RouteCollectionVPCContextNext.from_dict(route_collection_vpc_context_next_model_json) + route_collection_vpc_context_next_model = RouteCollectionVPCContextNext.from_dict( + route_collection_vpc_context_next_model_json) assert route_collection_vpc_context_next_model != False # Construct a model instance of RouteCollectionVPCContextNext by calling from_dict on the json representation - route_collection_vpc_context_next_model_dict = RouteCollectionVPCContextNext.from_dict(route_collection_vpc_context_next_model_json).__dict__ - route_collection_vpc_context_next_model2 = RouteCollectionVPCContextNext(**route_collection_vpc_context_next_model_dict) + route_collection_vpc_context_next_model_dict = RouteCollectionVPCContextNext.from_dict( + route_collection_vpc_context_next_model_json).__dict__ + route_collection_vpc_context_next_model2 = RouteCollectionVPCContextNext( + **route_collection_vpc_context_next_model_dict) # Verify the model instances are equivalent assert route_collection_vpc_context_next_model == route_collection_vpc_context_next_model2 # Convert model instance back to dict and verify no loss of data - route_collection_vpc_context_next_model_json2 = route_collection_vpc_context_next_model.to_dict() + route_collection_vpc_context_next_model_json2 = route_collection_vpc_context_next_model.to_dict( + ) assert route_collection_vpc_context_next_model_json2 == route_collection_vpc_context_next_model_json @@ -66189,36 +75096,50 @@ def test_route_collection_vpc_context_routes_item_serialization(self): route_next_hop_model['address'] = '192.168.3.4' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a RouteCollectionVPCContextRoutesItem model route_collection_vpc_context_routes_item_model_json = {} - route_collection_vpc_context_routes_item_model_json['action'] = 'delegate' + route_collection_vpc_context_routes_item_model_json[ + 'action'] = 'delegate' route_collection_vpc_context_routes_item_model_json['advertise'] = True - route_collection_vpc_context_routes_item_model_json['created_at'] = '2019-01-01T12:00:00Z' - route_collection_vpc_context_routes_item_model_json['destination'] = 'testString' - route_collection_vpc_context_routes_item_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' - route_collection_vpc_context_routes_item_model_json['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' - route_collection_vpc_context_routes_item_model_json['lifecycle_state'] = 'stable' - route_collection_vpc_context_routes_item_model_json['name'] = 'my-route-1' - route_collection_vpc_context_routes_item_model_json['next_hop'] = route_next_hop_model + route_collection_vpc_context_routes_item_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + route_collection_vpc_context_routes_item_model_json[ + 'destination'] = '192.168.3.0/24' + route_collection_vpc_context_routes_item_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_collection_vpc_context_routes_item_model_json[ + 'id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_collection_vpc_context_routes_item_model_json[ + 'lifecycle_state'] = 'stable' + route_collection_vpc_context_routes_item_model_json[ + 'name'] = 'my-route-1' + route_collection_vpc_context_routes_item_model_json[ + 'next_hop'] = route_next_hop_model route_collection_vpc_context_routes_item_model_json['priority'] = 1 - route_collection_vpc_context_routes_item_model_json['zone'] = zone_reference_model + route_collection_vpc_context_routes_item_model_json[ + 'zone'] = zone_reference_model # Construct a model instance of RouteCollectionVPCContextRoutesItem by calling from_dict on the json representation - route_collection_vpc_context_routes_item_model = RouteCollectionVPCContextRoutesItem.from_dict(route_collection_vpc_context_routes_item_model_json) + route_collection_vpc_context_routes_item_model = RouteCollectionVPCContextRoutesItem.from_dict( + route_collection_vpc_context_routes_item_model_json) assert route_collection_vpc_context_routes_item_model != False # Construct a model instance of RouteCollectionVPCContextRoutesItem by calling from_dict on the json representation - route_collection_vpc_context_routes_item_model_dict = RouteCollectionVPCContextRoutesItem.from_dict(route_collection_vpc_context_routes_item_model_json).__dict__ - route_collection_vpc_context_routes_item_model2 = RouteCollectionVPCContextRoutesItem(**route_collection_vpc_context_routes_item_model_dict) + route_collection_vpc_context_routes_item_model_dict = RouteCollectionVPCContextRoutesItem.from_dict( + route_collection_vpc_context_routes_item_model_json).__dict__ + route_collection_vpc_context_routes_item_model2 = RouteCollectionVPCContextRoutesItem( + **route_collection_vpc_context_routes_item_model_dict) # Verify the model instances are equivalent assert route_collection_vpc_context_routes_item_model == route_collection_vpc_context_routes_item_model2 # Convert model instance back to dict and verify no loss of data - route_collection_vpc_context_routes_item_model_json2 = route_collection_vpc_context_routes_item_model.to_dict() + route_collection_vpc_context_routes_item_model_json2 = route_collection_vpc_context_routes_item_model.to_dict( + ) assert route_collection_vpc_context_routes_item_model_json2 == route_collection_vpc_context_routes_item_model_json @@ -66234,7 +75155,8 @@ def test_route_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - route_next_hop_patch_model = {} # RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP + route_next_hop_patch_model = { + } # RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP route_next_hop_patch_model['address'] = '0.0.0.0' # Construct a json representation of a RoutePatch model @@ -66249,7 +75171,8 @@ def test_route_patch_serialization(self): assert route_patch_model != False # Construct a model instance of RoutePatch by calling from_dict on the json representation - route_patch_model_dict = RoutePatch.from_dict(route_patch_model_json).__dict__ + route_patch_model_dict = RoutePatch.from_dict( + route_patch_model_json).__dict__ route_patch_model2 = RoutePatch(**route_patch_model_dict) # Verify the model instances are equivalent @@ -66272,7 +75195,8 @@ def test_route_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - route_prototype_next_hop_model = {} # RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP + route_prototype_next_hop_model = { + } # RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP route_prototype_next_hop_model['address'] = '0.0.0.0' zone_identity_model = {} # ZoneIdentityByName @@ -66282,18 +75206,20 @@ def test_route_prototype_serialization(self): route_prototype_model_json = {} route_prototype_model_json['action'] = 'deliver' route_prototype_model_json['advertise'] = False - route_prototype_model_json['destination'] = 'testString' + route_prototype_model_json['destination'] = '192.168.3.0/24' route_prototype_model_json['name'] = 'my-route-1' route_prototype_model_json['next_hop'] = route_prototype_next_hop_model route_prototype_model_json['priority'] = 1 route_prototype_model_json['zone'] = zone_identity_model # Construct a model instance of RoutePrototype by calling from_dict on the json representation - route_prototype_model = RoutePrototype.from_dict(route_prototype_model_json) + route_prototype_model = RoutePrototype.from_dict( + route_prototype_model_json) assert route_prototype_model != False # Construct a model instance of RoutePrototype by calling from_dict on the json representation - route_prototype_model_dict = RoutePrototype.from_dict(route_prototype_model_json).__dict__ + route_prototype_model_dict = RoutePrototype.from_dict( + route_prototype_model_json).__dict__ route_prototype_model2 = RoutePrototype(**route_prototype_model_dict) # Verify the model instances are equivalent @@ -66317,21 +75243,26 @@ def test_route_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. route_reference_deleted_model = {} # RouteReferenceDeleted - route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + route_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a RouteReference model route_reference_model_json = {} route_reference_model_json['deleted'] = route_reference_deleted_model - route_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' - route_reference_model_json['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + route_reference_model_json[ + 'id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531' route_reference_model_json['name'] = 'my-route-1' # Construct a model instance of RouteReference by calling from_dict on the json representation - route_reference_model = RouteReference.from_dict(route_reference_model_json) + route_reference_model = RouteReference.from_dict( + route_reference_model_json) assert route_reference_model != False # Construct a model instance of RouteReference by calling from_dict on the json representation - route_reference_model_dict = RouteReference.from_dict(route_reference_model_json).__dict__ + route_reference_model_dict = RouteReference.from_dict( + route_reference_model_json).__dict__ route_reference_model2 = RouteReference(**route_reference_model_dict) # Verify the model instances are equivalent @@ -66354,21 +75285,26 @@ def test_route_reference_deleted_serialization(self): # Construct a json representation of a RouteReferenceDeleted model route_reference_deleted_model_json = {} - route_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + route_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of RouteReferenceDeleted by calling from_dict on the json representation - route_reference_deleted_model = RouteReferenceDeleted.from_dict(route_reference_deleted_model_json) + route_reference_deleted_model = RouteReferenceDeleted.from_dict( + route_reference_deleted_model_json) assert route_reference_deleted_model != False # Construct a model instance of RouteReferenceDeleted by calling from_dict on the json representation - route_reference_deleted_model_dict = RouteReferenceDeleted.from_dict(route_reference_deleted_model_json).__dict__ - route_reference_deleted_model2 = RouteReferenceDeleted(**route_reference_deleted_model_dict) + route_reference_deleted_model_dict = RouteReferenceDeleted.from_dict( + route_reference_deleted_model_json).__dict__ + route_reference_deleted_model2 = RouteReferenceDeleted( + **route_reference_deleted_model_dict) # Verify the model instances are equivalent assert route_reference_deleted_model == route_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - route_reference_deleted_model_json2 = route_reference_deleted_model.to_dict() + route_reference_deleted_model_json2 = route_reference_deleted_model.to_dict( + ) assert route_reference_deleted_model_json2 == route_reference_deleted_model_json @@ -66388,32 +75324,43 @@ def test_routing_table_serialization(self): resource_filter_model['resource_type'] = 'vpn_gateway' route_reference_deleted_model = {} # RouteReferenceDeleted - route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + route_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' route_reference_model = {} # RouteReference route_reference_model['deleted'] = route_reference_deleted_model - route_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-ae54c371-56be-4306-91bd-bb64df239d69' - route_reference_model['id'] = 'r006-ae54c371-56be-4306-91bd-bb64df239d69' + route_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-ae54c371-56be-4306-91bd-bb64df239d69' + route_reference_model[ + 'id'] = 'r006-ae54c371-56be-4306-91bd-bb64df239d69' route_reference_model['name'] = 'my-route-1' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-8722d01c-9c78-4555-82b5-53ad1266f959' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-8722d01c-9c78-4555-82b5-53ad1266f959' - subnet_reference_model['id'] = '0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'id'] = '0717-8722d01c-9c78-4555-82b5-53ad1266f959' subnet_reference_model['name'] = 'my-subnet-1' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a RoutingTable model routing_table_model_json = {} routing_table_model_json['accept_routes_from'] = [resource_filter_model] - routing_table_model_json['advertise_routes_to'] = ['transit_gateway', 'direct_link'] + routing_table_model_json['advertise_routes_to'] = [ + 'transit_gateway', 'direct_link' + ] routing_table_model_json['created_at'] = '2019-01-01T12:00:00Z' - routing_table_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - routing_table_model_json['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_model_json[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_model_json['is_default'] = True routing_table_model_json['lifecycle_state'] = 'stable' routing_table_model_json['name'] = 'my-routing-table-1' @@ -66430,7 +75377,8 @@ def test_routing_table_serialization(self): assert routing_table_model != False # Construct a model instance of RoutingTable by calling from_dict on the json representation - routing_table_model_dict = RoutingTable.from_dict(routing_table_model_json).__dict__ + routing_table_model_dict = RoutingTable.from_dict( + routing_table_model_json).__dict__ routing_table_model2 = RoutingTable(**routing_table_model_dict) # Verify the model instances are equivalent @@ -66454,31 +75402,40 @@ def test_routing_table_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. routing_table_collection_first_model = {} # RoutingTableCollectionFirst - routing_table_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=50' + routing_table_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=50' routing_table_collection_next_model = {} # RoutingTableCollectionNext - routing_table_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + routing_table_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' resource_filter_model = {} # ResourceFilter resource_filter_model['resource_type'] = 'vpn_gateway' route_reference_deleted_model = {} # RouteReferenceDeleted - route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + route_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' route_reference_model = {} # RouteReference route_reference_model['deleted'] = route_reference_deleted_model - route_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-ae54c371-56be-4306-91bd-bb64df239d69' - route_reference_model['id'] = 'r006-ae54c371-56be-4306-91bd-bb64df239d69' + route_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840/routes/r006-ae54c371-56be-4306-91bd-bb64df239d69' + route_reference_model[ + 'id'] = 'r006-ae54c371-56be-4306-91bd-bb64df239d69' route_reference_model['name'] = 'my-route-1' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-8722d01c-9c78-4555-82b5-53ad1266f959' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-8722d01c-9c78-4555-82b5-53ad1266f959' - subnet_reference_model['id'] = '0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-8722d01c-9c78-4555-82b5-53ad1266f959' + subnet_reference_model[ + 'id'] = '0717-8722d01c-9c78-4555-82b5-53ad1266f959' subnet_reference_model['name'] = 'my-subnet-1' subnet_reference_model['resource_type'] = 'subnet' @@ -66486,7 +75443,8 @@ def test_routing_table_collection_serialization(self): routing_table_model['accept_routes_from'] = [resource_filter_model] routing_table_model['advertise_routes_to'] = [] routing_table_model['created_at'] = '2019-01-07T16:56:54Z' - routing_table_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_model['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_model['is_default'] = True routing_table_model['lifecycle_state'] = 'stable' @@ -66501,25 +75459,33 @@ def test_routing_table_collection_serialization(self): # Construct a json representation of a RoutingTableCollection model routing_table_collection_model_json = {} - routing_table_collection_model_json['first'] = routing_table_collection_first_model + routing_table_collection_model_json[ + 'first'] = routing_table_collection_first_model routing_table_collection_model_json['limit'] = 20 - routing_table_collection_model_json['next'] = routing_table_collection_next_model - routing_table_collection_model_json['routing_tables'] = [routing_table_model] + routing_table_collection_model_json[ + 'next'] = routing_table_collection_next_model + routing_table_collection_model_json['routing_tables'] = [ + routing_table_model + ] routing_table_collection_model_json['total_count'] = 132 # Construct a model instance of RoutingTableCollection by calling from_dict on the json representation - routing_table_collection_model = RoutingTableCollection.from_dict(routing_table_collection_model_json) + routing_table_collection_model = RoutingTableCollection.from_dict( + routing_table_collection_model_json) assert routing_table_collection_model != False # Construct a model instance of RoutingTableCollection by calling from_dict on the json representation - routing_table_collection_model_dict = RoutingTableCollection.from_dict(routing_table_collection_model_json).__dict__ - routing_table_collection_model2 = RoutingTableCollection(**routing_table_collection_model_dict) + routing_table_collection_model_dict = RoutingTableCollection.from_dict( + routing_table_collection_model_json).__dict__ + routing_table_collection_model2 = RoutingTableCollection( + **routing_table_collection_model_dict) # Verify the model instances are equivalent assert routing_table_collection_model == routing_table_collection_model2 # Convert model instance back to dict and verify no loss of data - routing_table_collection_model_json2 = routing_table_collection_model.to_dict() + routing_table_collection_model_json2 = routing_table_collection_model.to_dict( + ) assert routing_table_collection_model_json2 == routing_table_collection_model_json @@ -66535,21 +75501,26 @@ def test_routing_table_collection_first_serialization(self): # Construct a json representation of a RoutingTableCollectionFirst model routing_table_collection_first_model_json = {} - routing_table_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=20' + routing_table_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=20' # Construct a model instance of RoutingTableCollectionFirst by calling from_dict on the json representation - routing_table_collection_first_model = RoutingTableCollectionFirst.from_dict(routing_table_collection_first_model_json) + routing_table_collection_first_model = RoutingTableCollectionFirst.from_dict( + routing_table_collection_first_model_json) assert routing_table_collection_first_model != False # Construct a model instance of RoutingTableCollectionFirst by calling from_dict on the json representation - routing_table_collection_first_model_dict = RoutingTableCollectionFirst.from_dict(routing_table_collection_first_model_json).__dict__ - routing_table_collection_first_model2 = RoutingTableCollectionFirst(**routing_table_collection_first_model_dict) + routing_table_collection_first_model_dict = RoutingTableCollectionFirst.from_dict( + routing_table_collection_first_model_json).__dict__ + routing_table_collection_first_model2 = RoutingTableCollectionFirst( + **routing_table_collection_first_model_dict) # Verify the model instances are equivalent assert routing_table_collection_first_model == routing_table_collection_first_model2 # Convert model instance back to dict and verify no loss of data - routing_table_collection_first_model_json2 = routing_table_collection_first_model.to_dict() + routing_table_collection_first_model_json2 = routing_table_collection_first_model.to_dict( + ) assert routing_table_collection_first_model_json2 == routing_table_collection_first_model_json @@ -66565,21 +75536,26 @@ def test_routing_table_collection_next_serialization(self): # Construct a json representation of a RoutingTableCollectionNext model routing_table_collection_next_model_json = {} - routing_table_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + routing_table_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of RoutingTableCollectionNext by calling from_dict on the json representation - routing_table_collection_next_model = RoutingTableCollectionNext.from_dict(routing_table_collection_next_model_json) + routing_table_collection_next_model = RoutingTableCollectionNext.from_dict( + routing_table_collection_next_model_json) assert routing_table_collection_next_model != False # Construct a model instance of RoutingTableCollectionNext by calling from_dict on the json representation - routing_table_collection_next_model_dict = RoutingTableCollectionNext.from_dict(routing_table_collection_next_model_json).__dict__ - routing_table_collection_next_model2 = RoutingTableCollectionNext(**routing_table_collection_next_model_dict) + routing_table_collection_next_model_dict = RoutingTableCollectionNext.from_dict( + routing_table_collection_next_model_json).__dict__ + routing_table_collection_next_model2 = RoutingTableCollectionNext( + **routing_table_collection_next_model_dict) # Verify the model instances are equivalent assert routing_table_collection_next_model == routing_table_collection_next_model2 # Convert model instance back to dict and verify no loss of data - routing_table_collection_next_model_json2 = routing_table_collection_next_model.to_dict() + routing_table_collection_next_model_json2 = routing_table_collection_next_model.to_dict( + ) assert routing_table_collection_next_model_json2 == routing_table_collection_next_model_json @@ -66600,8 +75576,12 @@ def test_routing_table_patch_serialization(self): # Construct a json representation of a RoutingTablePatch model routing_table_patch_model_json = {} - routing_table_patch_model_json['accept_routes_from'] = [resource_filter_model] - routing_table_patch_model_json['advertise_routes_to'] = ['transit_gateway'] + routing_table_patch_model_json['accept_routes_from'] = [ + resource_filter_model + ] + routing_table_patch_model_json['advertise_routes_to'] = [ + 'transit_gateway' + ] routing_table_patch_model_json['name'] = 'my-routing-table-2' routing_table_patch_model_json['route_direct_link_ingress'] = True routing_table_patch_model_json['route_internet_ingress'] = True @@ -66609,12 +75589,15 @@ def test_routing_table_patch_serialization(self): routing_table_patch_model_json['route_vpc_zone_ingress'] = True # Construct a model instance of RoutingTablePatch by calling from_dict on the json representation - routing_table_patch_model = RoutingTablePatch.from_dict(routing_table_patch_model_json) + routing_table_patch_model = RoutingTablePatch.from_dict( + routing_table_patch_model_json) assert routing_table_patch_model != False # Construct a model instance of RoutingTablePatch by calling from_dict on the json representation - routing_table_patch_model_dict = RoutingTablePatch.from_dict(routing_table_patch_model_json).__dict__ - routing_table_patch_model2 = RoutingTablePatch(**routing_table_patch_model_dict) + routing_table_patch_model_dict = RoutingTablePatch.from_dict( + routing_table_patch_model_json).__dict__ + routing_table_patch_model2 = RoutingTablePatch( + **routing_table_patch_model_dict) # Verify the model instances are equivalent assert routing_table_patch_model == routing_table_patch_model2 @@ -66636,30 +75619,39 @@ def test_routing_table_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted - routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + routing_table_reference_deleted_model = { + } # RoutingTableReferenceDeleted + routing_table_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a RoutingTableReference model routing_table_reference_model_json = {} - routing_table_reference_model_json['deleted'] = routing_table_reference_deleted_model - routing_table_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - routing_table_reference_model_json['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model_json[ + 'deleted'] = routing_table_reference_deleted_model + routing_table_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model_json[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model_json['name'] = 'my-routing-table-1' routing_table_reference_model_json['resource_type'] = 'routing_table' # Construct a model instance of RoutingTableReference by calling from_dict on the json representation - routing_table_reference_model = RoutingTableReference.from_dict(routing_table_reference_model_json) + routing_table_reference_model = RoutingTableReference.from_dict( + routing_table_reference_model_json) assert routing_table_reference_model != False # Construct a model instance of RoutingTableReference by calling from_dict on the json representation - routing_table_reference_model_dict = RoutingTableReference.from_dict(routing_table_reference_model_json).__dict__ - routing_table_reference_model2 = RoutingTableReference(**routing_table_reference_model_dict) + routing_table_reference_model_dict = RoutingTableReference.from_dict( + routing_table_reference_model_json).__dict__ + routing_table_reference_model2 = RoutingTableReference( + **routing_table_reference_model_dict) # Verify the model instances are equivalent assert routing_table_reference_model == routing_table_reference_model2 # Convert model instance back to dict and verify no loss of data - routing_table_reference_model_json2 = routing_table_reference_model.to_dict() + routing_table_reference_model_json2 = routing_table_reference_model.to_dict( + ) assert routing_table_reference_model_json2 == routing_table_reference_model_json @@ -66675,21 +75667,26 @@ def test_routing_table_reference_deleted_serialization(self): # Construct a json representation of a RoutingTableReferenceDeleted model routing_table_reference_deleted_model_json = {} - routing_table_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + routing_table_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of RoutingTableReferenceDeleted by calling from_dict on the json representation - routing_table_reference_deleted_model = RoutingTableReferenceDeleted.from_dict(routing_table_reference_deleted_model_json) + routing_table_reference_deleted_model = RoutingTableReferenceDeleted.from_dict( + routing_table_reference_deleted_model_json) assert routing_table_reference_deleted_model != False # Construct a model instance of RoutingTableReferenceDeleted by calling from_dict on the json representation - routing_table_reference_deleted_model_dict = RoutingTableReferenceDeleted.from_dict(routing_table_reference_deleted_model_json).__dict__ - routing_table_reference_deleted_model2 = RoutingTableReferenceDeleted(**routing_table_reference_deleted_model_dict) + routing_table_reference_deleted_model_dict = RoutingTableReferenceDeleted.from_dict( + routing_table_reference_deleted_model_json).__dict__ + routing_table_reference_deleted_model2 = RoutingTableReferenceDeleted( + **routing_table_reference_deleted_model_dict) # Verify the model instances are equivalent assert routing_table_reference_deleted_model == routing_table_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - routing_table_reference_deleted_model_json2 = routing_table_reference_deleted_model.to_dict() + routing_table_reference_deleted_model_json2 = routing_table_reference_deleted_model.to_dict( + ) assert routing_table_reference_deleted_model_json2 == routing_table_reference_deleted_model_json @@ -66706,8 +75703,10 @@ def test_security_group_serialization(self): # Construct dict forms of any model objects needed in order to build this model. resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' security_group_rule_local_model = {} # SecurityGroupRuleLocalIP @@ -66716,32 +75715,45 @@ def test_security_group_serialization(self): security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP security_group_rule_remote_model['address'] = '192.168.3.4' - security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll + security_group_rule_model = { + } # SecurityGroupRuleSecurityGroupRuleProtocolAll security_group_rule_model['direction'] = 'inbound' - security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model security_group_rule_model['remote'] = security_group_rule_remote_model security_group_rule_model['protocol'] = 'all' - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext - security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model - security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['name'] = 'my-instance-network-interface' - security_group_target_reference_model['resource_type'] = 'network_interface' + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + security_group_target_reference_model = { + } # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext + security_group_target_reference_model[ + 'deleted'] = network_interface_reference_target_context_deleted_model + security_group_target_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'name'] = 'my-instance-network-interface' + security_group_target_reference_model[ + 'resource_type'] = 'network_interface' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -66749,21 +75761,29 @@ def test_security_group_serialization(self): # Construct a json representation of a SecurityGroup model security_group_model_json = {} security_group_model_json['created_at'] = '2019-01-01T12:00:00Z' - security_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_model_json['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_model_json[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_model_json['name'] = 'my-security-group' - security_group_model_json['resource_group'] = resource_group_reference_model + security_group_model_json[ + 'resource_group'] = resource_group_reference_model security_group_model_json['rules'] = [security_group_rule_model] - security_group_model_json['targets'] = [security_group_target_reference_model] + security_group_model_json['targets'] = [ + security_group_target_reference_model + ] security_group_model_json['vpc'] = vpc_reference_model # Construct a model instance of SecurityGroup by calling from_dict on the json representation - security_group_model = SecurityGroup.from_dict(security_group_model_json) + security_group_model = SecurityGroup.from_dict( + security_group_model_json) assert security_group_model != False # Construct a model instance of SecurityGroup by calling from_dict on the json representation - security_group_model_dict = SecurityGroup.from_dict(security_group_model_json).__dict__ + security_group_model_dict = SecurityGroup.from_dict( + security_group_model_json).__dict__ security_group_model2 = SecurityGroup(**security_group_model_dict) # Verify the model instances are equivalent @@ -66786,15 +75806,20 @@ def test_security_group_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - security_group_collection_first_model = {} # SecurityGroupCollectionFirst - security_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20' + security_group_collection_first_model = { + } # SecurityGroupCollectionFirst + security_group_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20' security_group_collection_next_model = {} # SecurityGroupCollectionNext - security_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + security_group_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' security_group_rule_local_model = {} # SecurityGroupRuleLocalIP @@ -66803,68 +75828,93 @@ def test_security_group_collection_serialization(self): security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP security_group_rule_remote_model['address'] = '192.168.3.4' - security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll + security_group_rule_model = { + } # SecurityGroupRuleSecurityGroupRuleProtocolAll security_group_rule_model['direction'] = 'inbound' - security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model security_group_rule_model['remote'] = security_group_rule_remote_model security_group_rule_model['protocol'] = 'all' - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext - security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model - security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['name'] = 'my-instance-network-interface' - security_group_target_reference_model['resource_type'] = 'network_interface' + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + security_group_target_reference_model = { + } # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext + security_group_target_reference_model[ + 'deleted'] = network_interface_reference_target_context_deleted_model + security_group_target_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'name'] = 'my-instance-network-interface' + security_group_target_reference_model[ + 'resource_type'] = 'network_interface' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' security_group_model = {} # SecurityGroup security_group_model['created_at'] = '2019-01-01T12:00:00Z' - security_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_model['name'] = 'my-security-group' security_group_model['resource_group'] = resource_group_reference_model security_group_model['rules'] = [security_group_rule_model] - security_group_model['targets'] = [security_group_target_reference_model] + security_group_model['targets'] = [ + security_group_target_reference_model + ] security_group_model['vpc'] = vpc_reference_model # Construct a json representation of a SecurityGroupCollection model security_group_collection_model_json = {} - security_group_collection_model_json['first'] = security_group_collection_first_model + security_group_collection_model_json[ + 'first'] = security_group_collection_first_model security_group_collection_model_json['limit'] = 20 - security_group_collection_model_json['next'] = security_group_collection_next_model - security_group_collection_model_json['security_groups'] = [security_group_model] + security_group_collection_model_json[ + 'next'] = security_group_collection_next_model + security_group_collection_model_json['security_groups'] = [ + security_group_model + ] security_group_collection_model_json['total_count'] = 132 # Construct a model instance of SecurityGroupCollection by calling from_dict on the json representation - security_group_collection_model = SecurityGroupCollection.from_dict(security_group_collection_model_json) + security_group_collection_model = SecurityGroupCollection.from_dict( + security_group_collection_model_json) assert security_group_collection_model != False # Construct a model instance of SecurityGroupCollection by calling from_dict on the json representation - security_group_collection_model_dict = SecurityGroupCollection.from_dict(security_group_collection_model_json).__dict__ - security_group_collection_model2 = SecurityGroupCollection(**security_group_collection_model_dict) + security_group_collection_model_dict = SecurityGroupCollection.from_dict( + security_group_collection_model_json).__dict__ + security_group_collection_model2 = SecurityGroupCollection( + **security_group_collection_model_dict) # Verify the model instances are equivalent assert security_group_collection_model == security_group_collection_model2 # Convert model instance back to dict and verify no loss of data - security_group_collection_model_json2 = security_group_collection_model.to_dict() + security_group_collection_model_json2 = security_group_collection_model.to_dict( + ) assert security_group_collection_model_json2 == security_group_collection_model_json @@ -66880,21 +75930,26 @@ def test_security_group_collection_first_serialization(self): # Construct a json representation of a SecurityGroupCollectionFirst model security_group_collection_first_model_json = {} - security_group_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20' + security_group_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20' # Construct a model instance of SecurityGroupCollectionFirst by calling from_dict on the json representation - security_group_collection_first_model = SecurityGroupCollectionFirst.from_dict(security_group_collection_first_model_json) + security_group_collection_first_model = SecurityGroupCollectionFirst.from_dict( + security_group_collection_first_model_json) assert security_group_collection_first_model != False # Construct a model instance of SecurityGroupCollectionFirst by calling from_dict on the json representation - security_group_collection_first_model_dict = SecurityGroupCollectionFirst.from_dict(security_group_collection_first_model_json).__dict__ - security_group_collection_first_model2 = SecurityGroupCollectionFirst(**security_group_collection_first_model_dict) + security_group_collection_first_model_dict = SecurityGroupCollectionFirst.from_dict( + security_group_collection_first_model_json).__dict__ + security_group_collection_first_model2 = SecurityGroupCollectionFirst( + **security_group_collection_first_model_dict) # Verify the model instances are equivalent assert security_group_collection_first_model == security_group_collection_first_model2 # Convert model instance back to dict and verify no loss of data - security_group_collection_first_model_json2 = security_group_collection_first_model.to_dict() + security_group_collection_first_model_json2 = security_group_collection_first_model.to_dict( + ) assert security_group_collection_first_model_json2 == security_group_collection_first_model_json @@ -66910,21 +75965,26 @@ def test_security_group_collection_next_serialization(self): # Construct a json representation of a SecurityGroupCollectionNext model security_group_collection_next_model_json = {} - security_group_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + security_group_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of SecurityGroupCollectionNext by calling from_dict on the json representation - security_group_collection_next_model = SecurityGroupCollectionNext.from_dict(security_group_collection_next_model_json) + security_group_collection_next_model = SecurityGroupCollectionNext.from_dict( + security_group_collection_next_model_json) assert security_group_collection_next_model != False # Construct a model instance of SecurityGroupCollectionNext by calling from_dict on the json representation - security_group_collection_next_model_dict = SecurityGroupCollectionNext.from_dict(security_group_collection_next_model_json).__dict__ - security_group_collection_next_model2 = SecurityGroupCollectionNext(**security_group_collection_next_model_dict) + security_group_collection_next_model_dict = SecurityGroupCollectionNext.from_dict( + security_group_collection_next_model_json).__dict__ + security_group_collection_next_model2 = SecurityGroupCollectionNext( + **security_group_collection_next_model_dict) # Verify the model instances are equivalent assert security_group_collection_next_model == security_group_collection_next_model2 # Convert model instance back to dict and verify no loss of data - security_group_collection_next_model_json2 = security_group_collection_next_model.to_dict() + security_group_collection_next_model_json2 = security_group_collection_next_model.to_dict( + ) assert security_group_collection_next_model_json2 == security_group_collection_next_model_json @@ -66943,12 +76003,15 @@ def test_security_group_patch_serialization(self): security_group_patch_model_json['name'] = 'my-security-group' # Construct a model instance of SecurityGroupPatch by calling from_dict on the json representation - security_group_patch_model = SecurityGroupPatch.from_dict(security_group_patch_model_json) + security_group_patch_model = SecurityGroupPatch.from_dict( + security_group_patch_model_json) assert security_group_patch_model != False # Construct a model instance of SecurityGroupPatch by calling from_dict on the json representation - security_group_patch_model_dict = SecurityGroupPatch.from_dict(security_group_patch_model_json).__dict__ - security_group_patch_model2 = SecurityGroupPatch(**security_group_patch_model_dict) + security_group_patch_model_dict = SecurityGroupPatch.from_dict( + security_group_patch_model_json).__dict__ + security_group_patch_model2 = SecurityGroupPatch( + **security_group_patch_model_dict) # Verify the model instances are equivalent assert security_group_patch_model == security_group_patch_model2 @@ -66970,30 +76033,40 @@ def test_security_group_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SecurityGroupReference model security_group_reference_model_json = {} - security_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model_json['deleted'] = security_group_reference_deleted_model - security_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model_json['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model_json[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model_json[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model_json['name'] = 'my-security-group' # Construct a model instance of SecurityGroupReference by calling from_dict on the json representation - security_group_reference_model = SecurityGroupReference.from_dict(security_group_reference_model_json) + security_group_reference_model = SecurityGroupReference.from_dict( + security_group_reference_model_json) assert security_group_reference_model != False # Construct a model instance of SecurityGroupReference by calling from_dict on the json representation - security_group_reference_model_dict = SecurityGroupReference.from_dict(security_group_reference_model_json).__dict__ - security_group_reference_model2 = SecurityGroupReference(**security_group_reference_model_dict) + security_group_reference_model_dict = SecurityGroupReference.from_dict( + security_group_reference_model_json).__dict__ + security_group_reference_model2 = SecurityGroupReference( + **security_group_reference_model_dict) # Verify the model instances are equivalent assert security_group_reference_model == security_group_reference_model2 # Convert model instance back to dict and verify no loss of data - security_group_reference_model_json2 = security_group_reference_model.to_dict() + security_group_reference_model_json2 = security_group_reference_model.to_dict( + ) assert security_group_reference_model_json2 == security_group_reference_model_json @@ -67009,21 +76082,26 @@ def test_security_group_reference_deleted_serialization(self): # Construct a json representation of a SecurityGroupReferenceDeleted model security_group_reference_deleted_model_json = {} - security_group_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of SecurityGroupReferenceDeleted by calling from_dict on the json representation - security_group_reference_deleted_model = SecurityGroupReferenceDeleted.from_dict(security_group_reference_deleted_model_json) + security_group_reference_deleted_model = SecurityGroupReferenceDeleted.from_dict( + security_group_reference_deleted_model_json) assert security_group_reference_deleted_model != False # Construct a model instance of SecurityGroupReferenceDeleted by calling from_dict on the json representation - security_group_reference_deleted_model_dict = SecurityGroupReferenceDeleted.from_dict(security_group_reference_deleted_model_json).__dict__ - security_group_reference_deleted_model2 = SecurityGroupReferenceDeleted(**security_group_reference_deleted_model_dict) + security_group_reference_deleted_model_dict = SecurityGroupReferenceDeleted.from_dict( + security_group_reference_deleted_model_json).__dict__ + security_group_reference_deleted_model2 = SecurityGroupReferenceDeleted( + **security_group_reference_deleted_model_dict) # Verify the model instances are equivalent assert security_group_reference_deleted_model == security_group_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - security_group_reference_deleted_model_json2 = security_group_reference_deleted_model.to_dict() + security_group_reference_deleted_model_json2 = security_group_reference_deleted_model.to_dict( + ) assert security_group_reference_deleted_model_json2 == security_group_reference_deleted_model_json @@ -67045,9 +76123,11 @@ def test_security_group_rule_collection_serialization(self): security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP security_group_rule_remote_model['address'] = '192.168.3.4' - security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll + security_group_rule_model = { + } # SecurityGroupRuleSecurityGroupRuleProtocolAll security_group_rule_model['direction'] = 'inbound' - security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model @@ -67056,21 +76136,27 @@ def test_security_group_rule_collection_serialization(self): # Construct a json representation of a SecurityGroupRuleCollection model security_group_rule_collection_model_json = {} - security_group_rule_collection_model_json['rules'] = [security_group_rule_model] + security_group_rule_collection_model_json['rules'] = [ + security_group_rule_model + ] # Construct a model instance of SecurityGroupRuleCollection by calling from_dict on the json representation - security_group_rule_collection_model = SecurityGroupRuleCollection.from_dict(security_group_rule_collection_model_json) + security_group_rule_collection_model = SecurityGroupRuleCollection.from_dict( + security_group_rule_collection_model_json) assert security_group_rule_collection_model != False # Construct a model instance of SecurityGroupRuleCollection by calling from_dict on the json representation - security_group_rule_collection_model_dict = SecurityGroupRuleCollection.from_dict(security_group_rule_collection_model_json).__dict__ - security_group_rule_collection_model2 = SecurityGroupRuleCollection(**security_group_rule_collection_model_dict) + security_group_rule_collection_model_dict = SecurityGroupRuleCollection.from_dict( + security_group_rule_collection_model_json).__dict__ + security_group_rule_collection_model2 = SecurityGroupRuleCollection( + **security_group_rule_collection_model_dict) # Verify the model instances are equivalent assert security_group_rule_collection_model == security_group_rule_collection_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_collection_model_json2 = security_group_rule_collection_model.to_dict() + security_group_rule_collection_model_json2 = security_group_rule_collection_model.to_dict( + ) assert security_group_rule_collection_model_json2 == security_group_rule_collection_model_json @@ -67086,10 +76172,12 @@ def test_security_group_rule_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - security_group_rule_local_patch_model = {} # SecurityGroupRuleLocalPatchIP + security_group_rule_local_patch_model = { + } # SecurityGroupRuleLocalPatchIP security_group_rule_local_patch_model['address'] = '10.10.1.5' - security_group_rule_remote_patch_model = {} # SecurityGroupRuleRemotePatchCIDR + security_group_rule_remote_patch_model = { + } # SecurityGroupRuleRemotePatchCIDR security_group_rule_remote_patch_model['cidr_block'] = '10.0.0.0/16' # Construct a json representation of a SecurityGroupRulePatch model @@ -67097,25 +76185,31 @@ def test_security_group_rule_patch_serialization(self): security_group_rule_patch_model_json['code'] = 0 security_group_rule_patch_model_json['direction'] = 'inbound' security_group_rule_patch_model_json['ip_version'] = 'ipv4' - security_group_rule_patch_model_json['local'] = security_group_rule_local_patch_model + security_group_rule_patch_model_json[ + 'local'] = security_group_rule_local_patch_model security_group_rule_patch_model_json['port_max'] = 22 security_group_rule_patch_model_json['port_min'] = 22 - security_group_rule_patch_model_json['remote'] = security_group_rule_remote_patch_model + security_group_rule_patch_model_json[ + 'remote'] = security_group_rule_remote_patch_model security_group_rule_patch_model_json['type'] = 8 # Construct a model instance of SecurityGroupRulePatch by calling from_dict on the json representation - security_group_rule_patch_model = SecurityGroupRulePatch.from_dict(security_group_rule_patch_model_json) + security_group_rule_patch_model = SecurityGroupRulePatch.from_dict( + security_group_rule_patch_model_json) assert security_group_rule_patch_model != False # Construct a model instance of SecurityGroupRulePatch by calling from_dict on the json representation - security_group_rule_patch_model_dict = SecurityGroupRulePatch.from_dict(security_group_rule_patch_model_json).__dict__ - security_group_rule_patch_model2 = SecurityGroupRulePatch(**security_group_rule_patch_model_dict) + security_group_rule_patch_model_dict = SecurityGroupRulePatch.from_dict( + security_group_rule_patch_model_json).__dict__ + security_group_rule_patch_model2 = SecurityGroupRulePatch( + **security_group_rule_patch_model_dict) # Verify the model instances are equivalent assert security_group_rule_patch_model == security_group_rule_patch_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_patch_model_json2 = security_group_rule_patch_model.to_dict() + security_group_rule_patch_model_json2 = security_group_rule_patch_model.to_dict( + ) assert security_group_rule_patch_model_json2 == security_group_rule_patch_model_json @@ -67131,43 +76225,63 @@ def test_security_group_target_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - security_group_target_collection_first_model = {} # SecurityGroupTargetCollectionFirst - security_group_target_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20' - - security_group_target_collection_next_model = {} # SecurityGroupTargetCollectionNext - security_group_target_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext - security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model - security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_model['name'] = 'my-instance-network-interface' - security_group_target_reference_model['resource_type'] = 'network_interface' + security_group_target_collection_first_model = { + } # SecurityGroupTargetCollectionFirst + security_group_target_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20' + + security_group_target_collection_next_model = { + } # SecurityGroupTargetCollectionNext + security_group_target_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + security_group_target_reference_model = { + } # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext + security_group_target_reference_model[ + 'deleted'] = network_interface_reference_target_context_deleted_model + security_group_target_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_model[ + 'name'] = 'my-instance-network-interface' + security_group_target_reference_model[ + 'resource_type'] = 'network_interface' # Construct a json representation of a SecurityGroupTargetCollection model security_group_target_collection_model_json = {} - security_group_target_collection_model_json['first'] = security_group_target_collection_first_model + security_group_target_collection_model_json[ + 'first'] = security_group_target_collection_first_model security_group_target_collection_model_json['limit'] = 20 - security_group_target_collection_model_json['next'] = security_group_target_collection_next_model - security_group_target_collection_model_json['targets'] = [security_group_target_reference_model] + security_group_target_collection_model_json[ + 'next'] = security_group_target_collection_next_model + security_group_target_collection_model_json['targets'] = [ + security_group_target_reference_model + ] security_group_target_collection_model_json['total_count'] = 132 # Construct a model instance of SecurityGroupTargetCollection by calling from_dict on the json representation - security_group_target_collection_model = SecurityGroupTargetCollection.from_dict(security_group_target_collection_model_json) + security_group_target_collection_model = SecurityGroupTargetCollection.from_dict( + security_group_target_collection_model_json) assert security_group_target_collection_model != False # Construct a model instance of SecurityGroupTargetCollection by calling from_dict on the json representation - security_group_target_collection_model_dict = SecurityGroupTargetCollection.from_dict(security_group_target_collection_model_json).__dict__ - security_group_target_collection_model2 = SecurityGroupTargetCollection(**security_group_target_collection_model_dict) + security_group_target_collection_model_dict = SecurityGroupTargetCollection.from_dict( + security_group_target_collection_model_json).__dict__ + security_group_target_collection_model2 = SecurityGroupTargetCollection( + **security_group_target_collection_model_dict) # Verify the model instances are equivalent assert security_group_target_collection_model == security_group_target_collection_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_collection_model_json2 = security_group_target_collection_model.to_dict() + security_group_target_collection_model_json2 = security_group_target_collection_model.to_dict( + ) assert security_group_target_collection_model_json2 == security_group_target_collection_model_json @@ -67183,21 +76297,26 @@ def test_security_group_target_collection_first_serialization(self): # Construct a json representation of a SecurityGroupTargetCollectionFirst model security_group_target_collection_first_model_json = {} - security_group_target_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20' + security_group_target_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20' # Construct a model instance of SecurityGroupTargetCollectionFirst by calling from_dict on the json representation - security_group_target_collection_first_model = SecurityGroupTargetCollectionFirst.from_dict(security_group_target_collection_first_model_json) + security_group_target_collection_first_model = SecurityGroupTargetCollectionFirst.from_dict( + security_group_target_collection_first_model_json) assert security_group_target_collection_first_model != False # Construct a model instance of SecurityGroupTargetCollectionFirst by calling from_dict on the json representation - security_group_target_collection_first_model_dict = SecurityGroupTargetCollectionFirst.from_dict(security_group_target_collection_first_model_json).__dict__ - security_group_target_collection_first_model2 = SecurityGroupTargetCollectionFirst(**security_group_target_collection_first_model_dict) + security_group_target_collection_first_model_dict = SecurityGroupTargetCollectionFirst.from_dict( + security_group_target_collection_first_model_json).__dict__ + security_group_target_collection_first_model2 = SecurityGroupTargetCollectionFirst( + **security_group_target_collection_first_model_dict) # Verify the model instances are equivalent assert security_group_target_collection_first_model == security_group_target_collection_first_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_collection_first_model_json2 = security_group_target_collection_first_model.to_dict() + security_group_target_collection_first_model_json2 = security_group_target_collection_first_model.to_dict( + ) assert security_group_target_collection_first_model_json2 == security_group_target_collection_first_model_json @@ -67213,21 +76332,26 @@ def test_security_group_target_collection_next_serialization(self): # Construct a json representation of a SecurityGroupTargetCollectionNext model security_group_target_collection_next_model_json = {} - security_group_target_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + security_group_target_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of SecurityGroupTargetCollectionNext by calling from_dict on the json representation - security_group_target_collection_next_model = SecurityGroupTargetCollectionNext.from_dict(security_group_target_collection_next_model_json) + security_group_target_collection_next_model = SecurityGroupTargetCollectionNext.from_dict( + security_group_target_collection_next_model_json) assert security_group_target_collection_next_model != False # Construct a model instance of SecurityGroupTargetCollectionNext by calling from_dict on the json representation - security_group_target_collection_next_model_dict = SecurityGroupTargetCollectionNext.from_dict(security_group_target_collection_next_model_json).__dict__ - security_group_target_collection_next_model2 = SecurityGroupTargetCollectionNext(**security_group_target_collection_next_model_dict) + security_group_target_collection_next_model_dict = SecurityGroupTargetCollectionNext.from_dict( + security_group_target_collection_next_model_json).__dict__ + security_group_target_collection_next_model2 = SecurityGroupTargetCollectionNext( + **security_group_target_collection_next_model_dict) # Verify the model instances are equivalent assert security_group_target_collection_next_model == security_group_target_collection_next_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_collection_next_model_json2 = security_group_target_collection_next_model.to_dict() + security_group_target_collection_next_model_json2 = security_group_target_collection_next_model.to_dict( + ) assert security_group_target_collection_next_model_json2 == security_group_target_collection_next_model_json @@ -67243,13 +76367,25 @@ def test_share_serialization(self): # Construct dict forms of any model objects needed in order to build this model. + share_accessor_binding_reference_model = { + } # ShareAccessorBindingReference + share_accessor_binding_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' + share_accessor_binding_reference_model[ + 'id'] = 'r134-ce9dac18-dea0-4392-841c-142d3300674f' + share_accessor_binding_reference_model[ + 'resource_type'] = 'share_accessor_binding' + encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' share_job_status_reason_model = {} # ShareJobStatusReason share_job_status_reason_model['code'] = 'cannot_reach_source_share' - share_job_status_reason_model['message'] = 'The replication failover failed because the source share cannot be reached.' - share_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' + share_job_status_reason_model[ + 'message'] = 'The replication failover failed because the source share cannot be reached.' + share_job_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' share_job_model = {} # ShareJob share_job_model['status'] = 'cancelled' @@ -67261,75 +76397,116 @@ def test_share_serialization(self): share_latest_sync_model['data_transferred'] = 0 share_latest_sync_model['started_at'] = '2019-01-01T12:00:00Z' - share_mount_target_reference_deleted_model = {} # ShareMountTargetReferenceDeleted - share_mount_target_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_lifecycle_reason_model = {} # ShareLifecycleReason + share_lifecycle_reason_model['code'] = 'origin_share_access_revoked' + share_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + share_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + share_mount_target_reference_deleted_model = { + } # ShareMountTargetReferenceDeleted + share_mount_target_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' share_mount_target_reference_model = {} # ShareMountTargetReference - share_mount_target_reference_model['deleted'] = share_mount_target_reference_deleted_model - share_mount_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - share_mount_target_reference_model['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_model[ + 'deleted'] = share_mount_target_reference_deleted_model + share_mount_target_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_model[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' share_mount_target_reference_model['name'] = 'my-share-mount-target' - share_mount_target_reference_model['resource_type'] = 'share_mount_target' - - share_profile_reference_model = {} # ShareProfileReference - share_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' - share_profile_reference_model['name'] = 'tier-3iops' - share_profile_reference_model['resource_type'] = 'share_profile' + share_mount_target_reference_model[ + 'resource_type'] = 'share_mount_target' share_reference_deleted_model = {} # ShareReferenceDeleted - share_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + account_reference_model = {} # AccountReference + account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' + account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' share_remote_model = {} # ShareRemote + share_remote_model['account'] = account_reference_model share_remote_model['region'] = region_reference_model share_reference_model = {} # ShareReference - share_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['deleted'] = share_reference_deleted_model - share_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['name'] = 'my-share' share_reference_model['remote'] = share_remote_model share_reference_model['resource_type'] = 'share' - share_replication_status_reason_model = {} # ShareReplicationStatusReason - share_replication_status_reason_model['code'] = 'cannot_reach_source_share' - share_replication_status_reason_model['message'] = 'The replication failover failed because the source share cannot be reached.' - share_replication_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' + share_profile_reference_model = {} # ShareProfileReference + share_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' + share_profile_reference_model['name'] = 'tier-3iops' + share_profile_reference_model['resource_type'] = 'share_profile' + + share_replication_status_reason_model = { + } # ShareReplicationStatusReason + share_replication_status_reason_model[ + 'code'] = 'cannot_reach_source_share' + share_replication_status_reason_model[ + 'message'] = 'The replication failover failed because the source share cannot be reached.' + share_replication_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a Share model share_model_json = {} share_model_json['access_control_mode'] = 'security_group' + share_model_json['accessor_binding_role'] = 'accessor' + share_model_json['accessor_bindings'] = [ + share_accessor_binding_reference_model + ] + share_model_json['allowed_transit_encryption_modes'] = ['none'] share_model_json['created_at'] = '2019-01-01T12:00:00Z' - share_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_model_json['encryption'] = 'provider_managed' share_model_json['encryption_key'] = encryption_key_reference_model - share_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_model_json['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_model_json['iops'] = 100 share_model_json['latest_job'] = share_job_model share_model_json['latest_sync'] = share_latest_sync_model + share_model_json['lifecycle_reasons'] = [share_lifecycle_reason_model] share_model_json['lifecycle_state'] = 'stable' share_model_json['mount_targets'] = [share_mount_target_reference_model] share_model_json['name'] = 'my-share' + share_model_json['origin_share'] = share_reference_model share_model_json['profile'] = share_profile_reference_model share_model_json['replica_share'] = share_reference_model share_model_json['replication_cron_spec'] = '0 */5 * * *' share_model_json['replication_role'] = 'none' share_model_json['replication_status'] = 'active' - share_model_json['replication_status_reasons'] = [share_replication_status_reason_model] + share_model_json['replication_status_reasons'] = [ + share_replication_status_reason_model + ] share_model_json['resource_group'] = resource_group_reference_model share_model_json['resource_type'] = 'share' share_model_json['size'] = 200 @@ -67353,6 +76530,288 @@ def test_share_serialization(self): assert share_model_json2 == share_model_json +class TestModel_ShareAccessorBinding: + """ + Test Class for ShareAccessorBinding + """ + + def test_share_accessor_binding_serialization(self): + """ + Test serialization/deserialization for ShareAccessorBinding + """ + + # Construct dict forms of any model objects needed in order to build this model. + + share_reference_deleted_model = {} # ShareReferenceDeleted + share_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + account_reference_model = {} # AccountReference + account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' + account_reference_model['resource_type'] = 'account' + + region_reference_model = {} # RegionReference + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model['name'] = 'us-south' + + share_remote_model = {} # ShareRemote + share_remote_model['account'] = account_reference_model + share_remote_model['region'] = region_reference_model + + share_accessor_binding_accessor_model = { + } # ShareAccessorBindingAccessorShareReference + share_accessor_binding_accessor_model[ + 'crn'] = 'crn:v1:bluemix:public:pm-20:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:6500f05d-a5b5-4ecf-91ba-0d12b9dee607::' + share_accessor_binding_accessor_model[ + 'deleted'] = share_reference_deleted_model + share_accessor_binding_accessor_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_model[ + 'id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_model['name'] = 'my-share' + share_accessor_binding_accessor_model['remote'] = share_remote_model + share_accessor_binding_accessor_model[ + 'resource_type'] = 'watsonx_machine_learning' + + # Construct a json representation of a ShareAccessorBinding model + share_accessor_binding_model_json = {} + share_accessor_binding_model_json[ + 'accessor'] = share_accessor_binding_accessor_model + share_accessor_binding_model_json['created_at'] = '2019-01-01T12:00:00Z' + share_accessor_binding_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' + share_accessor_binding_model_json[ + 'id'] = 'r134-ce9dac18-dea0-4392-841c-142d3300674f' + share_accessor_binding_model_json['lifecycle_state'] = 'stable' + share_accessor_binding_model_json[ + 'resource_type'] = 'share_accessor_binding' + + # Construct a model instance of ShareAccessorBinding by calling from_dict on the json representation + share_accessor_binding_model = ShareAccessorBinding.from_dict( + share_accessor_binding_model_json) + assert share_accessor_binding_model != False + + # Construct a model instance of ShareAccessorBinding by calling from_dict on the json representation + share_accessor_binding_model_dict = ShareAccessorBinding.from_dict( + share_accessor_binding_model_json).__dict__ + share_accessor_binding_model2 = ShareAccessorBinding( + **share_accessor_binding_model_dict) + + # Verify the model instances are equivalent + assert share_accessor_binding_model == share_accessor_binding_model2 + + # Convert model instance back to dict and verify no loss of data + share_accessor_binding_model_json2 = share_accessor_binding_model.to_dict( + ) + assert share_accessor_binding_model_json2 == share_accessor_binding_model_json + + +class TestModel_ShareAccessorBindingCollection: + """ + Test Class for ShareAccessorBindingCollection + """ + + def test_share_accessor_binding_collection_serialization(self): + """ + Test serialization/deserialization for ShareAccessorBindingCollection + """ + + # Construct dict forms of any model objects needed in order to build this model. + + share_reference_deleted_model = {} # ShareReferenceDeleted + share_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + account_reference_model = {} # AccountReference + account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' + account_reference_model['resource_type'] = 'account' + + region_reference_model = {} # RegionReference + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model['name'] = 'us-south' + + share_remote_model = {} # ShareRemote + share_remote_model['account'] = account_reference_model + share_remote_model['region'] = region_reference_model + + share_accessor_binding_accessor_model = { + } # ShareAccessorBindingAccessorShareReference + share_accessor_binding_accessor_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_model[ + 'deleted'] = share_reference_deleted_model + share_accessor_binding_accessor_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_model[ + 'id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_model['name'] = 'my-share' + share_accessor_binding_accessor_model['remote'] = share_remote_model + share_accessor_binding_accessor_model['resource_type'] = 'share' + + share_accessor_binding_model = {} # ShareAccessorBinding + share_accessor_binding_model[ + 'accessor'] = share_accessor_binding_accessor_model + share_accessor_binding_model['created_at'] = '2019-01-01T12:00:00Z' + share_accessor_binding_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' + share_accessor_binding_model[ + 'id'] = 'r134-ce9dac18-dea0-4392-841c-142d3300674f' + share_accessor_binding_model['lifecycle_state'] = 'stable' + share_accessor_binding_model['resource_type'] = 'share_accessor_binding' + + share_accessor_binding_collection_first_model = { + } # ShareAccessorBindingCollectionFirst + share_accessor_binding_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?limit=20' + + share_accessor_binding_collection_next_model = { + } # ShareAccessorBindingCollectionNext + share_accessor_binding_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + + # Construct a json representation of a ShareAccessorBindingCollection model + share_accessor_binding_collection_model_json = {} + share_accessor_binding_collection_model_json['accessor_bindings'] = [ + share_accessor_binding_model + ] + share_accessor_binding_collection_model_json[ + 'first'] = share_accessor_binding_collection_first_model + share_accessor_binding_collection_model_json['limit'] = 20 + share_accessor_binding_collection_model_json[ + 'next'] = share_accessor_binding_collection_next_model + share_accessor_binding_collection_model_json['total_count'] = 132 + + # Construct a model instance of ShareAccessorBindingCollection by calling from_dict on the json representation + share_accessor_binding_collection_model = ShareAccessorBindingCollection.from_dict( + share_accessor_binding_collection_model_json) + assert share_accessor_binding_collection_model != False + + # Construct a model instance of ShareAccessorBindingCollection by calling from_dict on the json representation + share_accessor_binding_collection_model_dict = ShareAccessorBindingCollection.from_dict( + share_accessor_binding_collection_model_json).__dict__ + share_accessor_binding_collection_model2 = ShareAccessorBindingCollection( + **share_accessor_binding_collection_model_dict) + + # Verify the model instances are equivalent + assert share_accessor_binding_collection_model == share_accessor_binding_collection_model2 + + # Convert model instance back to dict and verify no loss of data + share_accessor_binding_collection_model_json2 = share_accessor_binding_collection_model.to_dict( + ) + assert share_accessor_binding_collection_model_json2 == share_accessor_binding_collection_model_json + + +class TestModel_ShareAccessorBindingCollectionFirst: + """ + Test Class for ShareAccessorBindingCollectionFirst + """ + + def test_share_accessor_binding_collection_first_serialization(self): + """ + Test serialization/deserialization for ShareAccessorBindingCollectionFirst + """ + + # Construct a json representation of a ShareAccessorBindingCollectionFirst model + share_accessor_binding_collection_first_model_json = {} + share_accessor_binding_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?limit=20' + + # Construct a model instance of ShareAccessorBindingCollectionFirst by calling from_dict on the json representation + share_accessor_binding_collection_first_model = ShareAccessorBindingCollectionFirst.from_dict( + share_accessor_binding_collection_first_model_json) + assert share_accessor_binding_collection_first_model != False + + # Construct a model instance of ShareAccessorBindingCollectionFirst by calling from_dict on the json representation + share_accessor_binding_collection_first_model_dict = ShareAccessorBindingCollectionFirst.from_dict( + share_accessor_binding_collection_first_model_json).__dict__ + share_accessor_binding_collection_first_model2 = ShareAccessorBindingCollectionFirst( + **share_accessor_binding_collection_first_model_dict) + + # Verify the model instances are equivalent + assert share_accessor_binding_collection_first_model == share_accessor_binding_collection_first_model2 + + # Convert model instance back to dict and verify no loss of data + share_accessor_binding_collection_first_model_json2 = share_accessor_binding_collection_first_model.to_dict( + ) + assert share_accessor_binding_collection_first_model_json2 == share_accessor_binding_collection_first_model_json + + +class TestModel_ShareAccessorBindingCollectionNext: + """ + Test Class for ShareAccessorBindingCollectionNext + """ + + def test_share_accessor_binding_collection_next_serialization(self): + """ + Test serialization/deserialization for ShareAccessorBindingCollectionNext + """ + + # Construct a json representation of a ShareAccessorBindingCollectionNext model + share_accessor_binding_collection_next_model_json = {} + share_accessor_binding_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + + # Construct a model instance of ShareAccessorBindingCollectionNext by calling from_dict on the json representation + share_accessor_binding_collection_next_model = ShareAccessorBindingCollectionNext.from_dict( + share_accessor_binding_collection_next_model_json) + assert share_accessor_binding_collection_next_model != False + + # Construct a model instance of ShareAccessorBindingCollectionNext by calling from_dict on the json representation + share_accessor_binding_collection_next_model_dict = ShareAccessorBindingCollectionNext.from_dict( + share_accessor_binding_collection_next_model_json).__dict__ + share_accessor_binding_collection_next_model2 = ShareAccessorBindingCollectionNext( + **share_accessor_binding_collection_next_model_dict) + + # Verify the model instances are equivalent + assert share_accessor_binding_collection_next_model == share_accessor_binding_collection_next_model2 + + # Convert model instance back to dict and verify no loss of data + share_accessor_binding_collection_next_model_json2 = share_accessor_binding_collection_next_model.to_dict( + ) + assert share_accessor_binding_collection_next_model_json2 == share_accessor_binding_collection_next_model_json + + +class TestModel_ShareAccessorBindingReference: + """ + Test Class for ShareAccessorBindingReference + """ + + def test_share_accessor_binding_reference_serialization(self): + """ + Test serialization/deserialization for ShareAccessorBindingReference + """ + + # Construct a json representation of a ShareAccessorBindingReference model + share_accessor_binding_reference_model_json = {} + share_accessor_binding_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' + share_accessor_binding_reference_model_json[ + 'id'] = 'r134-ce9dac18-dea0-4392-841c-142d3300674f' + share_accessor_binding_reference_model_json[ + 'resource_type'] = 'share_accessor_binding' + + # Construct a model instance of ShareAccessorBindingReference by calling from_dict on the json representation + share_accessor_binding_reference_model = ShareAccessorBindingReference.from_dict( + share_accessor_binding_reference_model_json) + assert share_accessor_binding_reference_model != False + + # Construct a model instance of ShareAccessorBindingReference by calling from_dict on the json representation + share_accessor_binding_reference_model_dict = ShareAccessorBindingReference.from_dict( + share_accessor_binding_reference_model_json).__dict__ + share_accessor_binding_reference_model2 = ShareAccessorBindingReference( + **share_accessor_binding_reference_model_dict) + + # Verify the model instances are equivalent + assert share_accessor_binding_reference_model == share_accessor_binding_reference_model2 + + # Convert model instance back to dict and verify no loss of data + share_accessor_binding_reference_model_json2 = share_accessor_binding_reference_model.to_dict( + ) + assert share_accessor_binding_reference_model_json2 == share_accessor_binding_reference_model_json + + class TestModel_ShareCollection: """ Test Class for ShareCollection @@ -67366,18 +76825,32 @@ def test_share_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. share_collection_first_model = {} # ShareCollectionFirst - share_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20' + share_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20' share_collection_next_model = {} # ShareCollectionNext - share_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + share_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + + share_accessor_binding_reference_model = { + } # ShareAccessorBindingReference + share_accessor_binding_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' + share_accessor_binding_reference_model[ + 'id'] = 'r134-ce9dac18-dea0-4392-841c-142d3300674f' + share_accessor_binding_reference_model[ + 'resource_type'] = 'share_accessor_binding' encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' share_job_status_reason_model = {} # ShareJobStatusReason share_job_status_reason_model['code'] = 'cannot_reach_source_share' - share_job_status_reason_model['message'] = 'The replication failover failed because the source share cannot be reached.' - share_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' + share_job_status_reason_model[ + 'message'] = 'The replication failover failed because the source share cannot be reached.' + share_job_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' share_job_model = {} # ShareJob share_job_model['status'] = 'cancelled' @@ -67389,74 +76862,115 @@ def test_share_collection_serialization(self): share_latest_sync_model['data_transferred'] = 0 share_latest_sync_model['started_at'] = '2019-01-01T12:00:00Z' - share_mount_target_reference_deleted_model = {} # ShareMountTargetReferenceDeleted - share_mount_target_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_lifecycle_reason_model = {} # ShareLifecycleReason + share_lifecycle_reason_model['code'] = 'origin_share_access_revoked' + share_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + share_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + share_mount_target_reference_deleted_model = { + } # ShareMountTargetReferenceDeleted + share_mount_target_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' share_mount_target_reference_model = {} # ShareMountTargetReference - share_mount_target_reference_model['deleted'] = share_mount_target_reference_deleted_model - share_mount_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - share_mount_target_reference_model['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_model[ + 'deleted'] = share_mount_target_reference_deleted_model + share_mount_target_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_model[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' share_mount_target_reference_model['name'] = 'my-share-mount-target' - share_mount_target_reference_model['resource_type'] = 'share_mount_target' - - share_profile_reference_model = {} # ShareProfileReference - share_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' - share_profile_reference_model['name'] = 'tier-3iops' - share_profile_reference_model['resource_type'] = 'share_profile' + share_mount_target_reference_model[ + 'resource_type'] = 'share_mount_target' share_reference_deleted_model = {} # ShareReferenceDeleted - share_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + account_reference_model = {} # AccountReference + account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' + account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' share_remote_model = {} # ShareRemote + share_remote_model['account'] = account_reference_model share_remote_model['region'] = region_reference_model share_reference_model = {} # ShareReference - share_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['deleted'] = share_reference_deleted_model - share_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['name'] = 'my-share' share_reference_model['remote'] = share_remote_model share_reference_model['resource_type'] = 'share' - share_replication_status_reason_model = {} # ShareReplicationStatusReason - share_replication_status_reason_model['code'] = 'cannot_reach_source_share' - share_replication_status_reason_model['message'] = 'The replication failover failed because the source share cannot be reached.' - share_replication_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' + share_profile_reference_model = {} # ShareProfileReference + share_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' + share_profile_reference_model['name'] = 'tier-3iops' + share_profile_reference_model['resource_type'] = 'share_profile' + + share_replication_status_reason_model = { + } # ShareReplicationStatusReason + share_replication_status_reason_model[ + 'code'] = 'cannot_reach_source_share' + share_replication_status_reason_model[ + 'message'] = 'The replication failover failed because the source share cannot be reached.' + share_replication_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' share_model = {} # Share share_model['access_control_mode'] = 'security_group' + share_model['accessor_binding_role'] = 'accessor' + share_model['accessor_bindings'] = [ + share_accessor_binding_reference_model + ] + share_model['allowed_transit_encryption_modes'] = ['none'] share_model['created_at'] = '2019-01-01T12:00:00Z' - share_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_model['encryption'] = 'provider_managed' share_model['encryption_key'] = encryption_key_reference_model - share_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_model['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_model['iops'] = 100 share_model['latest_job'] = share_job_model share_model['latest_sync'] = share_latest_sync_model + share_model['lifecycle_reasons'] = [share_lifecycle_reason_model] share_model['lifecycle_state'] = 'stable' share_model['mount_targets'] = [share_mount_target_reference_model] share_model['name'] = 'my-share' + share_model['origin_share'] = share_reference_model share_model['profile'] = share_profile_reference_model share_model['replica_share'] = share_reference_model share_model['replication_cron_spec'] = '0 */5 * * *' share_model['replication_role'] = 'none' share_model['replication_status'] = 'active' - share_model['replication_status_reasons'] = [share_replication_status_reason_model] + share_model['replication_status_reasons'] = [ + share_replication_status_reason_model + ] share_model['resource_group'] = resource_group_reference_model share_model['resource_type'] = 'share' share_model['size'] = 200 @@ -67473,11 +76987,13 @@ def test_share_collection_serialization(self): share_collection_model_json['total_count'] = 132 # Construct a model instance of ShareCollection by calling from_dict on the json representation - share_collection_model = ShareCollection.from_dict(share_collection_model_json) + share_collection_model = ShareCollection.from_dict( + share_collection_model_json) assert share_collection_model != False # Construct a model instance of ShareCollection by calling from_dict on the json representation - share_collection_model_dict = ShareCollection.from_dict(share_collection_model_json).__dict__ + share_collection_model_dict = ShareCollection.from_dict( + share_collection_model_json).__dict__ share_collection_model2 = ShareCollection(**share_collection_model_dict) # Verify the model instances are equivalent @@ -67500,21 +77016,26 @@ def test_share_collection_first_serialization(self): # Construct a json representation of a ShareCollectionFirst model share_collection_first_model_json = {} - share_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20' + share_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20' # Construct a model instance of ShareCollectionFirst by calling from_dict on the json representation - share_collection_first_model = ShareCollectionFirst.from_dict(share_collection_first_model_json) + share_collection_first_model = ShareCollectionFirst.from_dict( + share_collection_first_model_json) assert share_collection_first_model != False # Construct a model instance of ShareCollectionFirst by calling from_dict on the json representation - share_collection_first_model_dict = ShareCollectionFirst.from_dict(share_collection_first_model_json).__dict__ - share_collection_first_model2 = ShareCollectionFirst(**share_collection_first_model_dict) + share_collection_first_model_dict = ShareCollectionFirst.from_dict( + share_collection_first_model_json).__dict__ + share_collection_first_model2 = ShareCollectionFirst( + **share_collection_first_model_dict) # Verify the model instances are equivalent assert share_collection_first_model == share_collection_first_model2 # Convert model instance back to dict and verify no loss of data - share_collection_first_model_json2 = share_collection_first_model.to_dict() + share_collection_first_model_json2 = share_collection_first_model.to_dict( + ) assert share_collection_first_model_json2 == share_collection_first_model_json @@ -67530,21 +77051,26 @@ def test_share_collection_next_serialization(self): # Construct a json representation of a ShareCollectionNext model share_collection_next_model_json = {} - share_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + share_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of ShareCollectionNext by calling from_dict on the json representation - share_collection_next_model = ShareCollectionNext.from_dict(share_collection_next_model_json) + share_collection_next_model = ShareCollectionNext.from_dict( + share_collection_next_model_json) assert share_collection_next_model != False # Construct a model instance of ShareCollectionNext by calling from_dict on the json representation - share_collection_next_model_dict = ShareCollectionNext.from_dict(share_collection_next_model_json).__dict__ - share_collection_next_model2 = ShareCollectionNext(**share_collection_next_model_dict) + share_collection_next_model_dict = ShareCollectionNext.from_dict( + share_collection_next_model_json).__dict__ + share_collection_next_model2 = ShareCollectionNext( + **share_collection_next_model_dict) # Verify the model instances are equivalent assert share_collection_next_model == share_collection_next_model2 # Convert model instance back to dict and verify no loss of data - share_collection_next_model_json2 = share_collection_next_model.to_dict() + share_collection_next_model_json2 = share_collection_next_model.to_dict( + ) assert share_collection_next_model_json2 == share_collection_next_model_json @@ -67564,12 +77090,15 @@ def test_share_initial_owner_serialization(self): share_initial_owner_model_json['uid'] = 50 # Construct a model instance of ShareInitialOwner by calling from_dict on the json representation - share_initial_owner_model = ShareInitialOwner.from_dict(share_initial_owner_model_json) + share_initial_owner_model = ShareInitialOwner.from_dict( + share_initial_owner_model_json) assert share_initial_owner_model != False # Construct a model instance of ShareInitialOwner by calling from_dict on the json representation - share_initial_owner_model_dict = ShareInitialOwner.from_dict(share_initial_owner_model_json).__dict__ - share_initial_owner_model2 = ShareInitialOwner(**share_initial_owner_model_dict) + share_initial_owner_model_dict = ShareInitialOwner.from_dict( + share_initial_owner_model_json).__dict__ + share_initial_owner_model2 = ShareInitialOwner( + **share_initial_owner_model_dict) # Verify the model instances are equivalent assert share_initial_owner_model == share_initial_owner_model2 @@ -67593,8 +77122,10 @@ def test_share_job_serialization(self): share_job_status_reason_model = {} # ShareJobStatusReason share_job_status_reason_model['code'] = 'cannot_reach_source_share' - share_job_status_reason_model['message'] = 'The replication failover failed because the source share cannot be reached.' - share_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' + share_job_status_reason_model[ + 'message'] = 'The replication failover failed because the source share cannot be reached.' + share_job_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' # Construct a json representation of a ShareJob model share_job_model_json = {} @@ -67631,22 +77162,28 @@ def test_share_job_status_reason_serialization(self): # Construct a json representation of a ShareJobStatusReason model share_job_status_reason_model_json = {} share_job_status_reason_model_json['code'] = 'cannot_reach_source_share' - share_job_status_reason_model_json['message'] = 'The replication failover failed because the source share cannot be reached.' - share_job_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' + share_job_status_reason_model_json[ + 'message'] = 'The replication failover failed because the source share cannot be reached.' + share_job_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' # Construct a model instance of ShareJobStatusReason by calling from_dict on the json representation - share_job_status_reason_model = ShareJobStatusReason.from_dict(share_job_status_reason_model_json) + share_job_status_reason_model = ShareJobStatusReason.from_dict( + share_job_status_reason_model_json) assert share_job_status_reason_model != False # Construct a model instance of ShareJobStatusReason by calling from_dict on the json representation - share_job_status_reason_model_dict = ShareJobStatusReason.from_dict(share_job_status_reason_model_json).__dict__ - share_job_status_reason_model2 = ShareJobStatusReason(**share_job_status_reason_model_dict) + share_job_status_reason_model_dict = ShareJobStatusReason.from_dict( + share_job_status_reason_model_json).__dict__ + share_job_status_reason_model2 = ShareJobStatusReason( + **share_job_status_reason_model_dict) # Verify the model instances are equivalent assert share_job_status_reason_model == share_job_status_reason_model2 # Convert model instance back to dict and verify no loss of data - share_job_status_reason_model_json2 = share_job_status_reason_model.to_dict() + share_job_status_reason_model_json2 = share_job_status_reason_model.to_dict( + ) assert share_job_status_reason_model_json2 == share_job_status_reason_model_json @@ -67667,12 +77204,15 @@ def test_share_latest_sync_serialization(self): share_latest_sync_model_json['started_at'] = '2019-01-01T12:00:00Z' # Construct a model instance of ShareLatestSync by calling from_dict on the json representation - share_latest_sync_model = ShareLatestSync.from_dict(share_latest_sync_model_json) + share_latest_sync_model = ShareLatestSync.from_dict( + share_latest_sync_model_json) assert share_latest_sync_model != False # Construct a model instance of ShareLatestSync by calling from_dict on the json representation - share_latest_sync_model_dict = ShareLatestSync.from_dict(share_latest_sync_model_json).__dict__ - share_latest_sync_model2 = ShareLatestSync(**share_latest_sync_model_dict) + share_latest_sync_model_dict = ShareLatestSync.from_dict( + share_latest_sync_model_json).__dict__ + share_latest_sync_model2 = ShareLatestSync( + **share_latest_sync_model_dict) # Verify the model instances are equivalent assert share_latest_sync_model == share_latest_sync_model2 @@ -67682,6 +77222,45 @@ def test_share_latest_sync_serialization(self): assert share_latest_sync_model_json2 == share_latest_sync_model_json +class TestModel_ShareLifecycleReason: + """ + Test Class for ShareLifecycleReason + """ + + def test_share_lifecycle_reason_serialization(self): + """ + Test serialization/deserialization for ShareLifecycleReason + """ + + # Construct a json representation of a ShareLifecycleReason model + share_lifecycle_reason_model_json = {} + share_lifecycle_reason_model_json[ + 'code'] = 'origin_share_access_revoked' + share_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + share_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + # Construct a model instance of ShareLifecycleReason by calling from_dict on the json representation + share_lifecycle_reason_model = ShareLifecycleReason.from_dict( + share_lifecycle_reason_model_json) + assert share_lifecycle_reason_model != False + + # Construct a model instance of ShareLifecycleReason by calling from_dict on the json representation + share_lifecycle_reason_model_dict = ShareLifecycleReason.from_dict( + share_lifecycle_reason_model_json).__dict__ + share_lifecycle_reason_model2 = ShareLifecycleReason( + **share_lifecycle_reason_model_dict) + + # Verify the model instances are equivalent + assert share_lifecycle_reason_model == share_lifecycle_reason_model2 + + # Convert model instance back to dict and verify no loss of data + share_lifecycle_reason_model_json2 = share_lifecycle_reason_model.to_dict( + ) + assert share_lifecycle_reason_model_json2 == share_lifecycle_reason_model_json + + class TestModel_ShareMountTarget: """ Test Class for ShareMountTarget @@ -67695,41 +77274,58 @@ def test_share_mount_target_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - virtual_network_interface_reference_attachment_context_model = {} # VirtualNetworkInterfaceReferenceAttachmentContext - virtual_network_interface_reference_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model['resource_type'] = 'virtual_network_interface' + virtual_network_interface_reference_attachment_context_model = { + } # VirtualNetworkInterfaceReferenceAttachmentContext + virtual_network_interface_reference_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model[ + 'resource_type'] = 'virtual_network_interface' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -67738,25 +77334,33 @@ def test_share_mount_target_serialization(self): share_mount_target_model_json = {} share_mount_target_model_json['access_control_mode'] = 'security_group' share_mount_target_model_json['created_at'] = '2019-01-01T12:00:00Z' - share_mount_target_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - share_mount_target_model_json['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_model_json[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' share_mount_target_model_json['lifecycle_state'] = 'stable' - share_mount_target_model_json['mount_path'] = '10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e' + share_mount_target_model_json[ + 'mount_path'] = '10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e' share_mount_target_model_json['name'] = 'my-share-mount-target' - share_mount_target_model_json['primary_ip'] = reserved_ip_reference_model + share_mount_target_model_json[ + 'primary_ip'] = reserved_ip_reference_model share_mount_target_model_json['resource_type'] = 'share_mount_target' share_mount_target_model_json['subnet'] = subnet_reference_model share_mount_target_model_json['transit_encryption'] = 'none' - share_mount_target_model_json['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model + share_mount_target_model_json[ + 'virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model share_mount_target_model_json['vpc'] = vpc_reference_model # Construct a model instance of ShareMountTarget by calling from_dict on the json representation - share_mount_target_model = ShareMountTarget.from_dict(share_mount_target_model_json) + share_mount_target_model = ShareMountTarget.from_dict( + share_mount_target_model_json) assert share_mount_target_model != False # Construct a model instance of ShareMountTarget by calling from_dict on the json representation - share_mount_target_model_dict = ShareMountTarget.from_dict(share_mount_target_model_json).__dict__ - share_mount_target_model2 = ShareMountTarget(**share_mount_target_model_dict) + share_mount_target_model_dict = ShareMountTarget.from_dict( + share_mount_target_model_json).__dict__ + share_mount_target_model2 = ShareMountTarget( + **share_mount_target_model_dict) # Verify the model instances are equivalent assert share_mount_target_model == share_mount_target_model2 @@ -67778,45 +77382,64 @@ def test_share_mount_target_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - share_mount_target_collection_first_model = {} # ShareMountTargetCollectionFirst - share_mount_target_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20' + share_mount_target_collection_first_model = { + } # ShareMountTargetCollectionFirst + share_mount_target_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - virtual_network_interface_reference_attachment_context_model = {} # VirtualNetworkInterfaceReferenceAttachmentContext - virtual_network_interface_reference_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model['resource_type'] = 'virtual_network_interface' + virtual_network_interface_reference_attachment_context_model = { + } # VirtualNetworkInterfaceReferenceAttachmentContext + virtual_network_interface_reference_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model[ + 'resource_type'] = 'virtual_network_interface' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' @@ -67824,42 +77447,55 @@ def test_share_mount_target_collection_serialization(self): share_mount_target_model = {} # ShareMountTarget share_mount_target_model['access_control_mode'] = 'security_group' share_mount_target_model['created_at'] = '2019-01-01T12:00:00Z' - share_mount_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' share_mount_target_model['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' share_mount_target_model['lifecycle_state'] = 'stable' - share_mount_target_model['mount_path'] = '10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e' + share_mount_target_model[ + 'mount_path'] = '10.240.1.23:/nxg_s_voll_mz7121_58e7e963_8f4b_4a0c_b71a_8ba8d9cd1e2e' share_mount_target_model['name'] = 'my-share-mount-target' share_mount_target_model['primary_ip'] = reserved_ip_reference_model share_mount_target_model['resource_type'] = 'share_mount_target' share_mount_target_model['subnet'] = subnet_reference_model share_mount_target_model['transit_encryption'] = 'none' - share_mount_target_model['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model + share_mount_target_model[ + 'virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model share_mount_target_model['vpc'] = vpc_reference_model - share_mount_target_collection_next_model = {} # ShareMountTargetCollectionNext - share_mount_target_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + share_mount_target_collection_next_model = { + } # ShareMountTargetCollectionNext + share_mount_target_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a ShareMountTargetCollection model share_mount_target_collection_model_json = {} - share_mount_target_collection_model_json['first'] = share_mount_target_collection_first_model + share_mount_target_collection_model_json[ + 'first'] = share_mount_target_collection_first_model share_mount_target_collection_model_json['limit'] = 20 - share_mount_target_collection_model_json['mount_targets'] = [share_mount_target_model] - share_mount_target_collection_model_json['next'] = share_mount_target_collection_next_model + share_mount_target_collection_model_json['mount_targets'] = [ + share_mount_target_model + ] + share_mount_target_collection_model_json[ + 'next'] = share_mount_target_collection_next_model share_mount_target_collection_model_json['total_count'] = 132 # Construct a model instance of ShareMountTargetCollection by calling from_dict on the json representation - share_mount_target_collection_model = ShareMountTargetCollection.from_dict(share_mount_target_collection_model_json) + share_mount_target_collection_model = ShareMountTargetCollection.from_dict( + share_mount_target_collection_model_json) assert share_mount_target_collection_model != False # Construct a model instance of ShareMountTargetCollection by calling from_dict on the json representation - share_mount_target_collection_model_dict = ShareMountTargetCollection.from_dict(share_mount_target_collection_model_json).__dict__ - share_mount_target_collection_model2 = ShareMountTargetCollection(**share_mount_target_collection_model_dict) + share_mount_target_collection_model_dict = ShareMountTargetCollection.from_dict( + share_mount_target_collection_model_json).__dict__ + share_mount_target_collection_model2 = ShareMountTargetCollection( + **share_mount_target_collection_model_dict) # Verify the model instances are equivalent assert share_mount_target_collection_model == share_mount_target_collection_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_collection_model_json2 = share_mount_target_collection_model.to_dict() + share_mount_target_collection_model_json2 = share_mount_target_collection_model.to_dict( + ) assert share_mount_target_collection_model_json2 == share_mount_target_collection_model_json @@ -67875,21 +77511,26 @@ def test_share_mount_target_collection_first_serialization(self): # Construct a json representation of a ShareMountTargetCollectionFirst model share_mount_target_collection_first_model_json = {} - share_mount_target_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20' + share_mount_target_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20' # Construct a model instance of ShareMountTargetCollectionFirst by calling from_dict on the json representation - share_mount_target_collection_first_model = ShareMountTargetCollectionFirst.from_dict(share_mount_target_collection_first_model_json) + share_mount_target_collection_first_model = ShareMountTargetCollectionFirst.from_dict( + share_mount_target_collection_first_model_json) assert share_mount_target_collection_first_model != False # Construct a model instance of ShareMountTargetCollectionFirst by calling from_dict on the json representation - share_mount_target_collection_first_model_dict = ShareMountTargetCollectionFirst.from_dict(share_mount_target_collection_first_model_json).__dict__ - share_mount_target_collection_first_model2 = ShareMountTargetCollectionFirst(**share_mount_target_collection_first_model_dict) + share_mount_target_collection_first_model_dict = ShareMountTargetCollectionFirst.from_dict( + share_mount_target_collection_first_model_json).__dict__ + share_mount_target_collection_first_model2 = ShareMountTargetCollectionFirst( + **share_mount_target_collection_first_model_dict) # Verify the model instances are equivalent assert share_mount_target_collection_first_model == share_mount_target_collection_first_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_collection_first_model_json2 = share_mount_target_collection_first_model.to_dict() + share_mount_target_collection_first_model_json2 = share_mount_target_collection_first_model.to_dict( + ) assert share_mount_target_collection_first_model_json2 == share_mount_target_collection_first_model_json @@ -67905,21 +77546,26 @@ def test_share_mount_target_collection_next_serialization(self): # Construct a json representation of a ShareMountTargetCollectionNext model share_mount_target_collection_next_model_json = {} - share_mount_target_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + share_mount_target_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of ShareMountTargetCollectionNext by calling from_dict on the json representation - share_mount_target_collection_next_model = ShareMountTargetCollectionNext.from_dict(share_mount_target_collection_next_model_json) + share_mount_target_collection_next_model = ShareMountTargetCollectionNext.from_dict( + share_mount_target_collection_next_model_json) assert share_mount_target_collection_next_model != False # Construct a model instance of ShareMountTargetCollectionNext by calling from_dict on the json representation - share_mount_target_collection_next_model_dict = ShareMountTargetCollectionNext.from_dict(share_mount_target_collection_next_model_json).__dict__ - share_mount_target_collection_next_model2 = ShareMountTargetCollectionNext(**share_mount_target_collection_next_model_dict) + share_mount_target_collection_next_model_dict = ShareMountTargetCollectionNext.from_dict( + share_mount_target_collection_next_model_json).__dict__ + share_mount_target_collection_next_model2 = ShareMountTargetCollectionNext( + **share_mount_target_collection_next_model_dict) # Verify the model instances are equivalent assert share_mount_target_collection_next_model == share_mount_target_collection_next_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_collection_next_model_json2 = share_mount_target_collection_next_model.to_dict() + share_mount_target_collection_next_model_json2 = share_mount_target_collection_next_model.to_dict( + ) assert share_mount_target_collection_next_model_json2 == share_mount_target_collection_next_model_json @@ -67938,18 +77584,22 @@ def test_share_mount_target_patch_serialization(self): share_mount_target_patch_model_json['name'] = 'my-share-mount-target' # Construct a model instance of ShareMountTargetPatch by calling from_dict on the json representation - share_mount_target_patch_model = ShareMountTargetPatch.from_dict(share_mount_target_patch_model_json) + share_mount_target_patch_model = ShareMountTargetPatch.from_dict( + share_mount_target_patch_model_json) assert share_mount_target_patch_model != False # Construct a model instance of ShareMountTargetPatch by calling from_dict on the json representation - share_mount_target_patch_model_dict = ShareMountTargetPatch.from_dict(share_mount_target_patch_model_json).__dict__ - share_mount_target_patch_model2 = ShareMountTargetPatch(**share_mount_target_patch_model_dict) + share_mount_target_patch_model_dict = ShareMountTargetPatch.from_dict( + share_mount_target_patch_model_json).__dict__ + share_mount_target_patch_model2 = ShareMountTargetPatch( + **share_mount_target_patch_model_dict) # Verify the model instances are equivalent assert share_mount_target_patch_model == share_mount_target_patch_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_patch_model_json2 = share_mount_target_patch_model.to_dict() + share_mount_target_patch_model_json2 = share_mount_target_patch_model.to_dict( + ) assert share_mount_target_patch_model_json2 == share_mount_target_patch_model_json @@ -67965,30 +77615,41 @@ def test_share_mount_target_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - share_mount_target_reference_deleted_model = {} # ShareMountTargetReferenceDeleted - share_mount_target_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_mount_target_reference_deleted_model = { + } # ShareMountTargetReferenceDeleted + share_mount_target_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ShareMountTargetReference model share_mount_target_reference_model_json = {} - share_mount_target_reference_model_json['deleted'] = share_mount_target_reference_deleted_model - share_mount_target_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - share_mount_target_reference_model_json['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' - share_mount_target_reference_model_json['name'] = 'my-share-mount-target' - share_mount_target_reference_model_json['resource_type'] = 'share_mount_target' + share_mount_target_reference_model_json[ + 'deleted'] = share_mount_target_reference_deleted_model + share_mount_target_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_model_json[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_model_json[ + 'name'] = 'my-share-mount-target' + share_mount_target_reference_model_json[ + 'resource_type'] = 'share_mount_target' # Construct a model instance of ShareMountTargetReference by calling from_dict on the json representation - share_mount_target_reference_model = ShareMountTargetReference.from_dict(share_mount_target_reference_model_json) + share_mount_target_reference_model = ShareMountTargetReference.from_dict( + share_mount_target_reference_model_json) assert share_mount_target_reference_model != False # Construct a model instance of ShareMountTargetReference by calling from_dict on the json representation - share_mount_target_reference_model_dict = ShareMountTargetReference.from_dict(share_mount_target_reference_model_json).__dict__ - share_mount_target_reference_model2 = ShareMountTargetReference(**share_mount_target_reference_model_dict) + share_mount_target_reference_model_dict = ShareMountTargetReference.from_dict( + share_mount_target_reference_model_json).__dict__ + share_mount_target_reference_model2 = ShareMountTargetReference( + **share_mount_target_reference_model_dict) # Verify the model instances are equivalent assert share_mount_target_reference_model == share_mount_target_reference_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_reference_model_json2 = share_mount_target_reference_model.to_dict() + share_mount_target_reference_model_json2 = share_mount_target_reference_model.to_dict( + ) assert share_mount_target_reference_model_json2 == share_mount_target_reference_model_json @@ -68004,21 +77665,26 @@ def test_share_mount_target_reference_deleted_serialization(self): # Construct a json representation of a ShareMountTargetReferenceDeleted model share_mount_target_reference_deleted_model_json = {} - share_mount_target_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_mount_target_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of ShareMountTargetReferenceDeleted by calling from_dict on the json representation - share_mount_target_reference_deleted_model = ShareMountTargetReferenceDeleted.from_dict(share_mount_target_reference_deleted_model_json) + share_mount_target_reference_deleted_model = ShareMountTargetReferenceDeleted.from_dict( + share_mount_target_reference_deleted_model_json) assert share_mount_target_reference_deleted_model != False # Construct a model instance of ShareMountTargetReferenceDeleted by calling from_dict on the json representation - share_mount_target_reference_deleted_model_dict = ShareMountTargetReferenceDeleted.from_dict(share_mount_target_reference_deleted_model_json).__dict__ - share_mount_target_reference_deleted_model2 = ShareMountTargetReferenceDeleted(**share_mount_target_reference_deleted_model_dict) + share_mount_target_reference_deleted_model_dict = ShareMountTargetReferenceDeleted.from_dict( + share_mount_target_reference_deleted_model_json).__dict__ + share_mount_target_reference_deleted_model2 = ShareMountTargetReferenceDeleted( + **share_mount_target_reference_deleted_model_dict) # Verify the model instances are equivalent assert share_mount_target_reference_deleted_model == share_mount_target_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_reference_deleted_model_json2 = share_mount_target_reference_deleted_model.to_dict() + share_mount_target_reference_deleted_model_json2 = share_mount_target_reference_deleted_model.to_dict( + ) assert share_mount_target_reference_deleted_model_json2 == share_mount_target_reference_deleted_model_json @@ -68040,6 +77706,7 @@ def test_share_patch_serialization(self): # Construct a json representation of a SharePatch model share_patch_model_json = {} share_patch_model_json['access_control_mode'] = 'security_group' + share_patch_model_json['allowed_transit_encryption_modes'] = ['none'] share_patch_model_json['iops'] = 100 share_patch_model_json['name'] = 'my-share' share_patch_model_json['profile'] = share_profile_identity_model @@ -68052,7 +77719,8 @@ def test_share_patch_serialization(self): assert share_patch_model != False # Construct a model instance of SharePatch by calling from_dict on the json representation - share_patch_model_dict = SharePatch.from_dict(share_patch_model_json).__dict__ + share_patch_model_dict = SharePatch.from_dict( + share_patch_model_json).__dict__ share_patch_model2 = SharePatch(**share_patch_model_dict) # Verify the model instances are equivalent @@ -68087,7 +77755,8 @@ def test_share_profile_serialization(self): share_profile_model_json = {} share_profile_model_json['capacity'] = share_profile_capacity_model share_profile_model_json['family'] = 'defined_performance' - share_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' + share_profile_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' share_profile_model_json['iops'] = share_profile_iops_model share_profile_model_json['name'] = 'tier-3iops' share_profile_model_json['resource_type'] = 'share_profile' @@ -68097,7 +77766,8 @@ def test_share_profile_serialization(self): assert share_profile_model != False # Construct a model instance of ShareProfile by calling from_dict on the json representation - share_profile_model_dict = ShareProfile.from_dict(share_profile_model_json).__dict__ + share_profile_model_dict = ShareProfile.from_dict( + share_profile_model_json).__dict__ share_profile_model2 = ShareProfile(**share_profile_model_dict) # Verify the model instances are equivalent @@ -68121,10 +77791,12 @@ def test_share_profile_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. share_profile_collection_first_model = {} # ShareProfileCollectionFirst - share_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?limit=20' + share_profile_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?limit=20' share_profile_collection_next_model = {} # ShareProfileCollectionNext - share_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + share_profile_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' share_profile_capacity_model = {} # ShareProfileCapacityFixed share_profile_capacity_model['type'] = 'fixed' @@ -68137,32 +77809,39 @@ def test_share_profile_collection_serialization(self): share_profile_model = {} # ShareProfile share_profile_model['capacity'] = share_profile_capacity_model share_profile_model['family'] = 'defined_performance' - share_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' + share_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' share_profile_model['iops'] = share_profile_iops_model share_profile_model['name'] = 'tier-3iops' share_profile_model['resource_type'] = 'share_profile' # Construct a json representation of a ShareProfileCollection model share_profile_collection_model_json = {} - share_profile_collection_model_json['first'] = share_profile_collection_first_model + share_profile_collection_model_json[ + 'first'] = share_profile_collection_first_model share_profile_collection_model_json['limit'] = 20 - share_profile_collection_model_json['next'] = share_profile_collection_next_model + share_profile_collection_model_json[ + 'next'] = share_profile_collection_next_model share_profile_collection_model_json['profiles'] = [share_profile_model] share_profile_collection_model_json['total_count'] = 132 # Construct a model instance of ShareProfileCollection by calling from_dict on the json representation - share_profile_collection_model = ShareProfileCollection.from_dict(share_profile_collection_model_json) + share_profile_collection_model = ShareProfileCollection.from_dict( + share_profile_collection_model_json) assert share_profile_collection_model != False # Construct a model instance of ShareProfileCollection by calling from_dict on the json representation - share_profile_collection_model_dict = ShareProfileCollection.from_dict(share_profile_collection_model_json).__dict__ - share_profile_collection_model2 = ShareProfileCollection(**share_profile_collection_model_dict) + share_profile_collection_model_dict = ShareProfileCollection.from_dict( + share_profile_collection_model_json).__dict__ + share_profile_collection_model2 = ShareProfileCollection( + **share_profile_collection_model_dict) # Verify the model instances are equivalent assert share_profile_collection_model == share_profile_collection_model2 # Convert model instance back to dict and verify no loss of data - share_profile_collection_model_json2 = share_profile_collection_model.to_dict() + share_profile_collection_model_json2 = share_profile_collection_model.to_dict( + ) assert share_profile_collection_model_json2 == share_profile_collection_model_json @@ -68178,21 +77857,26 @@ def test_share_profile_collection_first_serialization(self): # Construct a json representation of a ShareProfileCollectionFirst model share_profile_collection_first_model_json = {} - share_profile_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?limit=20' + share_profile_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?limit=20' # Construct a model instance of ShareProfileCollectionFirst by calling from_dict on the json representation - share_profile_collection_first_model = ShareProfileCollectionFirst.from_dict(share_profile_collection_first_model_json) + share_profile_collection_first_model = ShareProfileCollectionFirst.from_dict( + share_profile_collection_first_model_json) assert share_profile_collection_first_model != False # Construct a model instance of ShareProfileCollectionFirst by calling from_dict on the json representation - share_profile_collection_first_model_dict = ShareProfileCollectionFirst.from_dict(share_profile_collection_first_model_json).__dict__ - share_profile_collection_first_model2 = ShareProfileCollectionFirst(**share_profile_collection_first_model_dict) + share_profile_collection_first_model_dict = ShareProfileCollectionFirst.from_dict( + share_profile_collection_first_model_json).__dict__ + share_profile_collection_first_model2 = ShareProfileCollectionFirst( + **share_profile_collection_first_model_dict) # Verify the model instances are equivalent assert share_profile_collection_first_model == share_profile_collection_first_model2 # Convert model instance back to dict and verify no loss of data - share_profile_collection_first_model_json2 = share_profile_collection_first_model.to_dict() + share_profile_collection_first_model_json2 = share_profile_collection_first_model.to_dict( + ) assert share_profile_collection_first_model_json2 == share_profile_collection_first_model_json @@ -68208,21 +77892,26 @@ def test_share_profile_collection_next_serialization(self): # Construct a json representation of a ShareProfileCollectionNext model share_profile_collection_next_model_json = {} - share_profile_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + share_profile_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of ShareProfileCollectionNext by calling from_dict on the json representation - share_profile_collection_next_model = ShareProfileCollectionNext.from_dict(share_profile_collection_next_model_json) + share_profile_collection_next_model = ShareProfileCollectionNext.from_dict( + share_profile_collection_next_model_json) assert share_profile_collection_next_model != False # Construct a model instance of ShareProfileCollectionNext by calling from_dict on the json representation - share_profile_collection_next_model_dict = ShareProfileCollectionNext.from_dict(share_profile_collection_next_model_json).__dict__ - share_profile_collection_next_model2 = ShareProfileCollectionNext(**share_profile_collection_next_model_dict) + share_profile_collection_next_model_dict = ShareProfileCollectionNext.from_dict( + share_profile_collection_next_model_json).__dict__ + share_profile_collection_next_model2 = ShareProfileCollectionNext( + **share_profile_collection_next_model_dict) # Verify the model instances are equivalent assert share_profile_collection_next_model == share_profile_collection_next_model2 # Convert model instance back to dict and verify no loss of data - share_profile_collection_next_model_json2 = share_profile_collection_next_model.to_dict() + share_profile_collection_next_model_json2 = share_profile_collection_next_model.to_dict( + ) assert share_profile_collection_next_model_json2 == share_profile_collection_next_model_json @@ -68238,23 +77927,28 @@ def test_share_profile_reference_serialization(self): # Construct a json representation of a ShareProfileReference model share_profile_reference_model_json = {} - share_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' + share_profile_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' share_profile_reference_model_json['name'] = 'tier-3iops' share_profile_reference_model_json['resource_type'] = 'share_profile' # Construct a model instance of ShareProfileReference by calling from_dict on the json representation - share_profile_reference_model = ShareProfileReference.from_dict(share_profile_reference_model_json) + share_profile_reference_model = ShareProfileReference.from_dict( + share_profile_reference_model_json) assert share_profile_reference_model != False # Construct a model instance of ShareProfileReference by calling from_dict on the json representation - share_profile_reference_model_dict = ShareProfileReference.from_dict(share_profile_reference_model_json).__dict__ - share_profile_reference_model2 = ShareProfileReference(**share_profile_reference_model_dict) + share_profile_reference_model_dict = ShareProfileReference.from_dict( + share_profile_reference_model_json).__dict__ + share_profile_reference_model2 = ShareProfileReference( + **share_profile_reference_model_dict) # Verify the model instances are equivalent assert share_profile_reference_model == share_profile_reference_model2 # Convert model instance back to dict and verify no loss of data - share_profile_reference_model_json2 = share_profile_reference_model.to_dict() + share_profile_reference_model_json2 = share_profile_reference_model.to_dict( + ) assert share_profile_reference_model_json2 == share_profile_reference_model_json @@ -68270,40 +77964,61 @@ def test_share_prototype_share_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - share_mount_target_virtual_network_interface_prototype_model = {} # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model - - share_mount_target_prototype_model = {} # ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup + share_mount_target_virtual_network_interface_prototype_model = { + } # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model + + share_mount_target_prototype_model = { + } # ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup share_mount_target_prototype_model['name'] = 'my-share-mount-target' share_mount_target_prototype_model['transit_encryption'] = 'none' - share_mount_target_prototype_model['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model share_profile_identity_model = {} # ShareProfileIdentityByName share_profile_identity_model['name'] = 'tier-3iops' @@ -68313,28 +78028,39 @@ def test_share_prototype_share_context_serialization(self): # Construct a json representation of a SharePrototypeShareContext model share_prototype_share_context_model_json = {} + share_prototype_share_context_model_json[ + 'allowed_transit_encryption_modes'] = ['none'] share_prototype_share_context_model_json['iops'] = 100 - share_prototype_share_context_model_json['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_context_model_json['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_share_context_model_json['name'] = 'my-share' - share_prototype_share_context_model_json['profile'] = share_profile_identity_model - share_prototype_share_context_model_json['replication_cron_spec'] = '0 */5 * * *' - share_prototype_share_context_model_json['resource_group'] = resource_group_identity_model + share_prototype_share_context_model_json[ + 'profile'] = share_profile_identity_model + share_prototype_share_context_model_json[ + 'replication_cron_spec'] = '0 */5 * * *' + share_prototype_share_context_model_json[ + 'resource_group'] = resource_group_identity_model share_prototype_share_context_model_json['user_tags'] = [] share_prototype_share_context_model_json['zone'] = zone_identity_model # Construct a model instance of SharePrototypeShareContext by calling from_dict on the json representation - share_prototype_share_context_model = SharePrototypeShareContext.from_dict(share_prototype_share_context_model_json) + share_prototype_share_context_model = SharePrototypeShareContext.from_dict( + share_prototype_share_context_model_json) assert share_prototype_share_context_model != False # Construct a model instance of SharePrototypeShareContext by calling from_dict on the json representation - share_prototype_share_context_model_dict = SharePrototypeShareContext.from_dict(share_prototype_share_context_model_json).__dict__ - share_prototype_share_context_model2 = SharePrototypeShareContext(**share_prototype_share_context_model_dict) + share_prototype_share_context_model_dict = SharePrototypeShareContext.from_dict( + share_prototype_share_context_model_json).__dict__ + share_prototype_share_context_model2 = SharePrototypeShareContext( + **share_prototype_share_context_model_dict) # Verify the model instances are equivalent assert share_prototype_share_context_model == share_prototype_share_context_model2 # Convert model instance back to dict and verify no loss of data - share_prototype_share_context_model_json2 = share_prototype_share_context_model.to_dict() + share_prototype_share_context_model_json2 = share_prototype_share_context_model.to_dict( + ) assert share_prototype_share_context_model_json2 == share_prototype_share_context_model_json @@ -68351,31 +78077,43 @@ def test_share_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. share_reference_deleted_model = {} # ShareReferenceDeleted - share_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + account_reference_model = {} # AccountReference + account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' + account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' share_remote_model = {} # ShareRemote + share_remote_model['account'] = account_reference_model share_remote_model['region'] = region_reference_model # Construct a json representation of a ShareReference model share_reference_model_json = {} - share_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model_json['deleted'] = share_reference_deleted_model - share_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' - share_reference_model_json['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_reference_model_json[ + 'id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model_json['name'] = 'my-share' share_reference_model_json['remote'] = share_remote_model share_reference_model_json['resource_type'] = 'share' # Construct a model instance of ShareReference by calling from_dict on the json representation - share_reference_model = ShareReference.from_dict(share_reference_model_json) + share_reference_model = ShareReference.from_dict( + share_reference_model_json) assert share_reference_model != False # Construct a model instance of ShareReference by calling from_dict on the json representation - share_reference_model_dict = ShareReference.from_dict(share_reference_model_json).__dict__ + share_reference_model_dict = ShareReference.from_dict( + share_reference_model_json).__dict__ share_reference_model2 = ShareReference(**share_reference_model_dict) # Verify the model instances are equivalent @@ -68398,21 +78136,26 @@ def test_share_reference_deleted_serialization(self): # Construct a json representation of a ShareReferenceDeleted model share_reference_deleted_model_json = {} - share_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of ShareReferenceDeleted by calling from_dict on the json representation - share_reference_deleted_model = ShareReferenceDeleted.from_dict(share_reference_deleted_model_json) + share_reference_deleted_model = ShareReferenceDeleted.from_dict( + share_reference_deleted_model_json) assert share_reference_deleted_model != False # Construct a model instance of ShareReferenceDeleted by calling from_dict on the json representation - share_reference_deleted_model_dict = ShareReferenceDeleted.from_dict(share_reference_deleted_model_json).__dict__ - share_reference_deleted_model2 = ShareReferenceDeleted(**share_reference_deleted_model_dict) + share_reference_deleted_model_dict = ShareReferenceDeleted.from_dict( + share_reference_deleted_model_json).__dict__ + share_reference_deleted_model2 = ShareReferenceDeleted( + **share_reference_deleted_model_dict) # Verify the model instances are equivalent assert share_reference_deleted_model == share_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - share_reference_deleted_model_json2 = share_reference_deleted_model.to_dict() + share_reference_deleted_model_json2 = share_reference_deleted_model.to_dict( + ) assert share_reference_deleted_model_json2 == share_reference_deleted_model_json @@ -68428,12 +78171,18 @@ def test_share_remote_serialization(self): # Construct dict forms of any model objects needed in order to build this model. + account_reference_model = {} # AccountReference + account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' + account_reference_model['resource_type'] = 'account' + region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a ShareRemote model share_remote_model_json = {} + share_remote_model_json['account'] = account_reference_model share_remote_model_json['region'] = region_reference_model # Construct a model instance of ShareRemote by calling from_dict on the json representation @@ -68441,7 +78190,8 @@ def test_share_remote_serialization(self): assert share_remote_model != False # Construct a model instance of ShareRemote by calling from_dict on the json representation - share_remote_model_dict = ShareRemote.from_dict(share_remote_model_json).__dict__ + share_remote_model_dict = ShareRemote.from_dict( + share_remote_model_json).__dict__ share_remote_model2 = ShareRemote(**share_remote_model_dict) # Verify the model instances are equivalent @@ -68464,23 +78214,30 @@ def test_share_replication_status_reason_serialization(self): # Construct a json representation of a ShareReplicationStatusReason model share_replication_status_reason_model_json = {} - share_replication_status_reason_model_json['code'] = 'cannot_reach_source_share' - share_replication_status_reason_model_json['message'] = 'The replication failover failed because the source share cannot be reached.' - share_replication_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' + share_replication_status_reason_model_json[ + 'code'] = 'cannot_reach_source_share' + share_replication_status_reason_model_json[ + 'message'] = 'The replication failover failed because the source share cannot be reached.' + share_replication_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-planning' # Construct a model instance of ShareReplicationStatusReason by calling from_dict on the json representation - share_replication_status_reason_model = ShareReplicationStatusReason.from_dict(share_replication_status_reason_model_json) + share_replication_status_reason_model = ShareReplicationStatusReason.from_dict( + share_replication_status_reason_model_json) assert share_replication_status_reason_model != False # Construct a model instance of ShareReplicationStatusReason by calling from_dict on the json representation - share_replication_status_reason_model_dict = ShareReplicationStatusReason.from_dict(share_replication_status_reason_model_json).__dict__ - share_replication_status_reason_model2 = ShareReplicationStatusReason(**share_replication_status_reason_model_dict) + share_replication_status_reason_model_dict = ShareReplicationStatusReason.from_dict( + share_replication_status_reason_model_json).__dict__ + share_replication_status_reason_model2 = ShareReplicationStatusReason( + **share_replication_status_reason_model_dict) # Verify the model instances are equivalent assert share_replication_status_reason_model == share_replication_status_reason_model2 # Convert model instance back to dict and verify no loss of data - share_replication_status_reason_model_json2 = share_replication_status_reason_model.to_dict() + share_replication_status_reason_model_json2 = share_replication_status_reason_model.to_dict( + ) assert share_replication_status_reason_model_json2 == share_replication_status_reason_model_json @@ -68496,26 +78253,58 @@ def test_snapshot_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + + snapshot_catalog_offering_model = {} # SnapshotCatalogOffering + snapshot_catalog_offering_model[ + 'plan'] = catalog_offering_version_plan_reference_model + snapshot_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' snapshot_clone_model = {} # SnapshotClone @@ -68524,51 +78313,71 @@ def test_snapshot_serialization(self): snapshot_clone_model['zone'] = zone_reference_model snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_copies_item_model = {} # SnapshotCopiesItem - snapshot_copies_item_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_copies_item_model['deleted'] = snapshot_reference_deleted_model - snapshot_copies_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_copies_item_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_copies_item_model['name'] = 'my-snapshot' snapshot_copies_item_model['remote'] = snapshot_remote_model snapshot_copies_item_model['resource_type'] = 'snapshot' encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' operating_system_model = {} # OperatingSystem + operating_system_model['allow_user_image_creation'] = True operating_system_model['architecture'] = 'amd64' operating_system_model['dedicated_host_only'] = False operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model['family'] = 'Ubuntu Server' - operating_system_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model['name'] = 'ubuntu-16-amd64' + operating_system_model['user_data_format'] = 'cloud_init' operating_system_model['vendor'] = 'Canonical' operating_system_model['version'] = '16.04 LTS' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - snapshot_consistency_group_reference_deleted_model = {} # SnapshotConsistencyGroupReferenceDeleted - snapshot_consistency_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - snapshot_consistency_group_reference_model = {} # SnapshotConsistencyGroupReference - snapshot_consistency_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model['deleted'] = snapshot_consistency_group_reference_deleted_model - snapshot_consistency_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model['id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_reference_model['resource_type'] = 'snapshot_consistency_group' + snapshot_consistency_group_reference_deleted_model = { + } # SnapshotConsistencyGroupReferenceDeleted + snapshot_consistency_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + snapshot_consistency_group_reference_model = { + } # SnapshotConsistencyGroupReference + snapshot_consistency_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model[ + 'deleted'] = snapshot_consistency_group_reference_deleted_model + snapshot_consistency_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model[ + 'id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_reference_model[ + 'resource_type'] = 'snapshot_consistency_group' image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' @@ -68579,51 +78388,67 @@ def test_snapshot_serialization(self): image_remote_model['region'] = region_reference_model image_reference_model = {} # ImageReference - image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['deleted'] = image_reference_deleted_model - image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['name'] = 'my-image' image_reference_model['remote'] = image_remote_model image_reference_model['resource_type'] = 'image' snapshot_source_snapshot_model = {} # SnapshotSourceSnapshot - snapshot_source_snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_source_snapshot_model['deleted'] = snapshot_reference_deleted_model - snapshot_source_snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_source_snapshot_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model[ + 'deleted'] = snapshot_reference_deleted_model + snapshot_source_snapshot_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_source_snapshot_model['name'] = 'my-snapshot' snapshot_source_snapshot_model['remote'] = snapshot_remote_model snapshot_source_snapshot_model['resource_type'] = 'snapshot' volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_remote_model = {} # VolumeRemote volume_remote_model['region'] = region_reference_model volume_reference_model = {} # VolumeReference - volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['deleted'] = volume_reference_deleted_model - volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['name'] = 'my-volume' volume_reference_model['remote'] = volume_remote_model volume_reference_model['resource_type'] = 'volume' # Construct a json representation of a Snapshot model snapshot_model_json = {} - snapshot_model_json['backup_policy_plan'] = backup_policy_plan_reference_model + snapshot_model_json[ + 'backup_policy_plan'] = backup_policy_plan_reference_model snapshot_model_json['bootable'] = True snapshot_model_json['captured_at'] = '2019-01-01T12:00:00Z' + snapshot_model_json[ + 'catalog_offering'] = snapshot_catalog_offering_model snapshot_model_json['clones'] = [snapshot_clone_model] snapshot_model_json['copies'] = [snapshot_copies_item_model] snapshot_model_json['created_at'] = '2019-01-01T12:00:00Z' - snapshot_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_model_json['deletable'] = True snapshot_model_json['encryption'] = 'provider_managed' snapshot_model_json['encryption_key'] = encryption_key_reference_model - snapshot_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_model_json['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_model_json['lifecycle_state'] = 'stable' snapshot_model_json['minimum_capacity'] = 1 @@ -68633,7 +78458,8 @@ def test_snapshot_serialization(self): snapshot_model_json['resource_type'] = 'snapshot' snapshot_model_json['service_tags'] = ['testString'] snapshot_model_json['size'] = 1 - snapshot_model_json['snapshot_consistency_group'] = snapshot_consistency_group_reference_model + snapshot_model_json[ + 'snapshot_consistency_group'] = snapshot_consistency_group_reference_model snapshot_model_json['source_image'] = image_reference_model snapshot_model_json['source_snapshot'] = snapshot_source_snapshot_model snapshot_model_json['source_volume'] = volume_reference_model @@ -68655,6 +78481,62 @@ def test_snapshot_serialization(self): assert snapshot_model_json2 == snapshot_model_json +class TestModel_SnapshotCatalogOffering: + """ + Test Class for SnapshotCatalogOffering + """ + + def test_snapshot_catalog_offering_serialization(self): + """ + Test serialization/deserialization for SnapshotCatalogOffering + """ + + # Construct dict forms of any model objects needed in order to build this model. + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + + # Construct a json representation of a SnapshotCatalogOffering model + snapshot_catalog_offering_model_json = {} + snapshot_catalog_offering_model_json[ + 'plan'] = catalog_offering_version_plan_reference_model + snapshot_catalog_offering_model_json[ + 'version'] = catalog_offering_version_reference_model + + # Construct a model instance of SnapshotCatalogOffering by calling from_dict on the json representation + snapshot_catalog_offering_model = SnapshotCatalogOffering.from_dict( + snapshot_catalog_offering_model_json) + assert snapshot_catalog_offering_model != False + + # Construct a model instance of SnapshotCatalogOffering by calling from_dict on the json representation + snapshot_catalog_offering_model_dict = SnapshotCatalogOffering.from_dict( + snapshot_catalog_offering_model_json).__dict__ + snapshot_catalog_offering_model2 = SnapshotCatalogOffering( + **snapshot_catalog_offering_model_dict) + + # Verify the model instances are equivalent + assert snapshot_catalog_offering_model == snapshot_catalog_offering_model2 + + # Convert model instance back to dict and verify no loss of data + snapshot_catalog_offering_model_json2 = snapshot_catalog_offering_model.to_dict( + ) + assert snapshot_catalog_offering_model_json2 == snapshot_catalog_offering_model_json + + class TestModel_SnapshotClone: """ Test Class for SnapshotClone @@ -68668,7 +78550,8 @@ def test_snapshot_clone_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a SnapshotClone model @@ -68678,11 +78561,13 @@ def test_snapshot_clone_serialization(self): snapshot_clone_model_json['zone'] = zone_reference_model # Construct a model instance of SnapshotClone by calling from_dict on the json representation - snapshot_clone_model = SnapshotClone.from_dict(snapshot_clone_model_json) + snapshot_clone_model = SnapshotClone.from_dict( + snapshot_clone_model_json) assert snapshot_clone_model != False # Construct a model instance of SnapshotClone by calling from_dict on the json representation - snapshot_clone_model_dict = SnapshotClone.from_dict(snapshot_clone_model_json).__dict__ + snapshot_clone_model_dict = SnapshotClone.from_dict( + snapshot_clone_model_json).__dict__ snapshot_clone_model2 = SnapshotClone(**snapshot_clone_model_dict) # Verify the model instances are equivalent @@ -68706,7 +78591,8 @@ def test_snapshot_clone_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' snapshot_clone_model = {} # SnapshotClone @@ -68719,18 +78605,22 @@ def test_snapshot_clone_collection_serialization(self): snapshot_clone_collection_model_json['clones'] = [snapshot_clone_model] # Construct a model instance of SnapshotCloneCollection by calling from_dict on the json representation - snapshot_clone_collection_model = SnapshotCloneCollection.from_dict(snapshot_clone_collection_model_json) + snapshot_clone_collection_model = SnapshotCloneCollection.from_dict( + snapshot_clone_collection_model_json) assert snapshot_clone_collection_model != False # Construct a model instance of SnapshotCloneCollection by calling from_dict on the json representation - snapshot_clone_collection_model_dict = SnapshotCloneCollection.from_dict(snapshot_clone_collection_model_json).__dict__ - snapshot_clone_collection_model2 = SnapshotCloneCollection(**snapshot_clone_collection_model_dict) + snapshot_clone_collection_model_dict = SnapshotCloneCollection.from_dict( + snapshot_clone_collection_model_json).__dict__ + snapshot_clone_collection_model2 = SnapshotCloneCollection( + **snapshot_clone_collection_model_dict) # Verify the model instances are equivalent assert snapshot_clone_collection_model == snapshot_clone_collection_model2 # Convert model instance back to dict and verify no loss of data - snapshot_clone_collection_model_json2 = snapshot_clone_collection_model.to_dict() + snapshot_clone_collection_model_json2 = snapshot_clone_collection_model.to_dict( + ) assert snapshot_clone_collection_model_json2 == snapshot_clone_collection_model_json @@ -68754,18 +78644,22 @@ def test_snapshot_clone_prototype_serialization(self): snapshot_clone_prototype_model_json['zone'] = zone_identity_model # Construct a model instance of SnapshotClonePrototype by calling from_dict on the json representation - snapshot_clone_prototype_model = SnapshotClonePrototype.from_dict(snapshot_clone_prototype_model_json) + snapshot_clone_prototype_model = SnapshotClonePrototype.from_dict( + snapshot_clone_prototype_model_json) assert snapshot_clone_prototype_model != False # Construct a model instance of SnapshotClonePrototype by calling from_dict on the json representation - snapshot_clone_prototype_model_dict = SnapshotClonePrototype.from_dict(snapshot_clone_prototype_model_json).__dict__ - snapshot_clone_prototype_model2 = SnapshotClonePrototype(**snapshot_clone_prototype_model_dict) + snapshot_clone_prototype_model_dict = SnapshotClonePrototype.from_dict( + snapshot_clone_prototype_model_json).__dict__ + snapshot_clone_prototype_model2 = SnapshotClonePrototype( + **snapshot_clone_prototype_model_dict) # Verify the model instances are equivalent assert snapshot_clone_prototype_model == snapshot_clone_prototype_model2 # Convert model instance back to dict and verify no loss of data - snapshot_clone_prototype_model_json2 = snapshot_clone_prototype_model.to_dict() + snapshot_clone_prototype_model_json2 = snapshot_clone_prototype_model.to_dict( + ) assert snapshot_clone_prototype_model_json2 == snapshot_clone_prototype_model_json @@ -68782,31 +78676,65 @@ def test_snapshot_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. snapshot_collection_first_model = {} # SnapshotCollectionFirst - snapshot_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20' + snapshot_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20' snapshot_collection_next_model = {} # SnapshotCollectionNext - snapshot_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + snapshot_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + + snapshot_catalog_offering_model = {} # SnapshotCatalogOffering + snapshot_catalog_offering_model[ + 'plan'] = catalog_offering_version_plan_reference_model + snapshot_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' snapshot_clone_model = {} # SnapshotClone @@ -68815,51 +78743,71 @@ def test_snapshot_collection_serialization(self): snapshot_clone_model['zone'] = zone_reference_model snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_copies_item_model = {} # SnapshotCopiesItem - snapshot_copies_item_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_copies_item_model['deleted'] = snapshot_reference_deleted_model - snapshot_copies_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_copies_item_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_copies_item_model['name'] = 'my-snapshot' snapshot_copies_item_model['remote'] = snapshot_remote_model snapshot_copies_item_model['resource_type'] = 'snapshot' encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' operating_system_model = {} # OperatingSystem + operating_system_model['allow_user_image_creation'] = True operating_system_model['architecture'] = 'amd64' operating_system_model['dedicated_host_only'] = False operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model['family'] = 'Ubuntu Server' - operating_system_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model['name'] = 'ubuntu-16-amd64' + operating_system_model['user_data_format'] = 'cloud_init' operating_system_model['vendor'] = 'Canonical' operating_system_model['version'] = '16.04 LTS' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - snapshot_consistency_group_reference_deleted_model = {} # SnapshotConsistencyGroupReferenceDeleted - snapshot_consistency_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - snapshot_consistency_group_reference_model = {} # SnapshotConsistencyGroupReference - snapshot_consistency_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model['deleted'] = snapshot_consistency_group_reference_deleted_model - snapshot_consistency_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model['id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_reference_model['resource_type'] = 'snapshot_consistency_group' + snapshot_consistency_group_reference_deleted_model = { + } # SnapshotConsistencyGroupReferenceDeleted + snapshot_consistency_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + snapshot_consistency_group_reference_model = { + } # SnapshotConsistencyGroupReference + snapshot_consistency_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model[ + 'deleted'] = snapshot_consistency_group_reference_deleted_model + snapshot_consistency_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model[ + 'id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_reference_model[ + 'resource_type'] = 'snapshot_consistency_group' image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' @@ -68870,50 +78818,65 @@ def test_snapshot_collection_serialization(self): image_remote_model['region'] = region_reference_model image_reference_model = {} # ImageReference - image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['deleted'] = image_reference_deleted_model - image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['name'] = 'my-image' image_reference_model['remote'] = image_remote_model image_reference_model['resource_type'] = 'image' snapshot_source_snapshot_model = {} # SnapshotSourceSnapshot - snapshot_source_snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_source_snapshot_model['deleted'] = snapshot_reference_deleted_model - snapshot_source_snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_source_snapshot_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model[ + 'deleted'] = snapshot_reference_deleted_model + snapshot_source_snapshot_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_source_snapshot_model['name'] = 'my-snapshot' snapshot_source_snapshot_model['remote'] = snapshot_remote_model snapshot_source_snapshot_model['resource_type'] = 'snapshot' volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_remote_model = {} # VolumeRemote volume_remote_model['region'] = region_reference_model volume_reference_model = {} # VolumeReference - volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['deleted'] = volume_reference_deleted_model - volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model['name'] = 'my-volume' volume_reference_model['remote'] = volume_remote_model volume_reference_model['resource_type'] = 'volume' snapshot_model = {} # Snapshot - snapshot_model['backup_policy_plan'] = backup_policy_plan_reference_model + snapshot_model[ + 'backup_policy_plan'] = backup_policy_plan_reference_model snapshot_model['bootable'] = True snapshot_model['captured_at'] = '2019-01-01T12:00:00Z' + snapshot_model['catalog_offering'] = snapshot_catalog_offering_model snapshot_model['clones'] = [snapshot_clone_model] snapshot_model['copies'] = [snapshot_copies_item_model] snapshot_model['created_at'] = '2019-01-01T12:00:00Z' - snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_model['deletable'] = True snapshot_model['encryption'] = 'provider_managed' snapshot_model['encryption_key'] = encryption_key_reference_model - snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_model['lifecycle_state'] = 'stable' snapshot_model['minimum_capacity'] = 1 @@ -68923,7 +78886,8 @@ def test_snapshot_collection_serialization(self): snapshot_model['resource_type'] = 'snapshot' snapshot_model['service_tags'] = ['testString'] snapshot_model['size'] = 1 - snapshot_model['snapshot_consistency_group'] = snapshot_consistency_group_reference_model + snapshot_model[ + 'snapshot_consistency_group'] = snapshot_consistency_group_reference_model snapshot_model['source_image'] = image_reference_model snapshot_model['source_snapshot'] = snapshot_source_snapshot_model snapshot_model['source_volume'] = volume_reference_model @@ -68931,19 +78895,23 @@ def test_snapshot_collection_serialization(self): # Construct a json representation of a SnapshotCollection model snapshot_collection_model_json = {} - snapshot_collection_model_json['first'] = snapshot_collection_first_model + snapshot_collection_model_json[ + 'first'] = snapshot_collection_first_model snapshot_collection_model_json['limit'] = 20 snapshot_collection_model_json['next'] = snapshot_collection_next_model snapshot_collection_model_json['snapshots'] = [snapshot_model] snapshot_collection_model_json['total_count'] = 132 # Construct a model instance of SnapshotCollection by calling from_dict on the json representation - snapshot_collection_model = SnapshotCollection.from_dict(snapshot_collection_model_json) + snapshot_collection_model = SnapshotCollection.from_dict( + snapshot_collection_model_json) assert snapshot_collection_model != False # Construct a model instance of SnapshotCollection by calling from_dict on the json representation - snapshot_collection_model_dict = SnapshotCollection.from_dict(snapshot_collection_model_json).__dict__ - snapshot_collection_model2 = SnapshotCollection(**snapshot_collection_model_dict) + snapshot_collection_model_dict = SnapshotCollection.from_dict( + snapshot_collection_model_json).__dict__ + snapshot_collection_model2 = SnapshotCollection( + **snapshot_collection_model_dict) # Verify the model instances are equivalent assert snapshot_collection_model == snapshot_collection_model2 @@ -68965,21 +78933,26 @@ def test_snapshot_collection_first_serialization(self): # Construct a json representation of a SnapshotCollectionFirst model snapshot_collection_first_model_json = {} - snapshot_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20' + snapshot_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20' # Construct a model instance of SnapshotCollectionFirst by calling from_dict on the json representation - snapshot_collection_first_model = SnapshotCollectionFirst.from_dict(snapshot_collection_first_model_json) + snapshot_collection_first_model = SnapshotCollectionFirst.from_dict( + snapshot_collection_first_model_json) assert snapshot_collection_first_model != False # Construct a model instance of SnapshotCollectionFirst by calling from_dict on the json representation - snapshot_collection_first_model_dict = SnapshotCollectionFirst.from_dict(snapshot_collection_first_model_json).__dict__ - snapshot_collection_first_model2 = SnapshotCollectionFirst(**snapshot_collection_first_model_dict) + snapshot_collection_first_model_dict = SnapshotCollectionFirst.from_dict( + snapshot_collection_first_model_json).__dict__ + snapshot_collection_first_model2 = SnapshotCollectionFirst( + **snapshot_collection_first_model_dict) # Verify the model instances are equivalent assert snapshot_collection_first_model == snapshot_collection_first_model2 # Convert model instance back to dict and verify no loss of data - snapshot_collection_first_model_json2 = snapshot_collection_first_model.to_dict() + snapshot_collection_first_model_json2 = snapshot_collection_first_model.to_dict( + ) assert snapshot_collection_first_model_json2 == snapshot_collection_first_model_json @@ -68995,21 +78968,26 @@ def test_snapshot_collection_next_serialization(self): # Construct a json representation of a SnapshotCollectionNext model snapshot_collection_next_model_json = {} - snapshot_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + snapshot_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of SnapshotCollectionNext by calling from_dict on the json representation - snapshot_collection_next_model = SnapshotCollectionNext.from_dict(snapshot_collection_next_model_json) + snapshot_collection_next_model = SnapshotCollectionNext.from_dict( + snapshot_collection_next_model_json) assert snapshot_collection_next_model != False # Construct a model instance of SnapshotCollectionNext by calling from_dict on the json representation - snapshot_collection_next_model_dict = SnapshotCollectionNext.from_dict(snapshot_collection_next_model_json).__dict__ - snapshot_collection_next_model2 = SnapshotCollectionNext(**snapshot_collection_next_model_dict) + snapshot_collection_next_model_dict = SnapshotCollectionNext.from_dict( + snapshot_collection_next_model_json).__dict__ + snapshot_collection_next_model2 = SnapshotCollectionNext( + **snapshot_collection_next_model_dict) # Verify the model instances are equivalent assert snapshot_collection_next_model == snapshot_collection_next_model2 # Convert model instance back to dict and verify no loss of data - snapshot_collection_next_model_json2 = snapshot_collection_next_model.to_dict() + snapshot_collection_next_model_json2 = snapshot_collection_next_model.to_dict( + ) assert snapshot_collection_next_model_json2 == snapshot_collection_next_model_json @@ -69025,72 +79003,101 @@ def test_snapshot_consistency_group_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_reference_model = {} # SnapshotReference - snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['deleted'] = snapshot_reference_deleted_model - snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['name'] = 'my-snapshot' snapshot_reference_model['remote'] = snapshot_remote_model snapshot_reference_model['resource_type'] = 'snapshot' # Construct a json representation of a SnapshotConsistencyGroup model snapshot_consistency_group_model_json = {} - snapshot_consistency_group_model_json['backup_policy_plan'] = backup_policy_plan_reference_model - snapshot_consistency_group_model_json['created_at'] = '2019-01-01T12:00:00Z' - snapshot_consistency_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_model_json['delete_snapshots_on_delete'] = True - snapshot_consistency_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_model_json['id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_model_json[ + 'backup_policy_plan'] = backup_policy_plan_reference_model + snapshot_consistency_group_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + snapshot_consistency_group_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_model_json[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_model_json[ + 'id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' snapshot_consistency_group_model_json['lifecycle_state'] = 'stable' - snapshot_consistency_group_model_json['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_model_json['resource_group'] = resource_group_reference_model - snapshot_consistency_group_model_json['resource_type'] = 'snapshot_consistency_group' + snapshot_consistency_group_model_json[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_model_json[ + 'resource_group'] = resource_group_reference_model + snapshot_consistency_group_model_json[ + 'resource_type'] = 'snapshot_consistency_group' snapshot_consistency_group_model_json['service_tags'] = ['testString'] - snapshot_consistency_group_model_json['snapshots'] = [snapshot_reference_model] + snapshot_consistency_group_model_json['snapshots'] = [ + snapshot_reference_model + ] # Construct a model instance of SnapshotConsistencyGroup by calling from_dict on the json representation - snapshot_consistency_group_model = SnapshotConsistencyGroup.from_dict(snapshot_consistency_group_model_json) + snapshot_consistency_group_model = SnapshotConsistencyGroup.from_dict( + snapshot_consistency_group_model_json) assert snapshot_consistency_group_model != False # Construct a model instance of SnapshotConsistencyGroup by calling from_dict on the json representation - snapshot_consistency_group_model_dict = SnapshotConsistencyGroup.from_dict(snapshot_consistency_group_model_json).__dict__ - snapshot_consistency_group_model2 = SnapshotConsistencyGroup(**snapshot_consistency_group_model_dict) + snapshot_consistency_group_model_dict = SnapshotConsistencyGroup.from_dict( + snapshot_consistency_group_model_json).__dict__ + snapshot_consistency_group_model2 = SnapshotConsistencyGroup( + **snapshot_consistency_group_model_dict) # Verify the model instances are equivalent assert snapshot_consistency_group_model == snapshot_consistency_group_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_model_json2 = snapshot_consistency_group_model.to_dict() + snapshot_consistency_group_model_json2 = snapshot_consistency_group_model.to_dict( + ) assert snapshot_consistency_group_model_json2 == snapshot_consistency_group_model_json @@ -69106,85 +79113,119 @@ def test_snapshot_consistency_group_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - snapshot_consistency_group_collection_first_model = {} # SnapshotConsistencyGroupCollectionFirst - snapshot_consistency_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20' + snapshot_consistency_group_collection_first_model = { + } # SnapshotConsistencyGroupCollectionFirst + snapshot_consistency_group_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20' - snapshot_consistency_group_collection_next_model = {} # SnapshotConsistencyGroupCollectionNext - snapshot_consistency_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + snapshot_consistency_group_collection_next_model = { + } # SnapshotConsistencyGroupCollectionNext + snapshot_consistency_group_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_reference_model = {} # SnapshotReference - snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['deleted'] = snapshot_reference_deleted_model - snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['name'] = 'my-snapshot' snapshot_reference_model['remote'] = snapshot_remote_model snapshot_reference_model['resource_type'] = 'snapshot' snapshot_consistency_group_model = {} # SnapshotConsistencyGroup - snapshot_consistency_group_model['backup_policy_plan'] = backup_policy_plan_reference_model + snapshot_consistency_group_model[ + 'backup_policy_plan'] = backup_policy_plan_reference_model snapshot_consistency_group_model['created_at'] = '2019-01-01T12:00:00Z' - snapshot_consistency_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' snapshot_consistency_group_model['delete_snapshots_on_delete'] = True - snapshot_consistency_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_model['id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_model[ + 'id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' snapshot_consistency_group_model['lifecycle_state'] = 'stable' - snapshot_consistency_group_model['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_model['resource_group'] = resource_group_reference_model - snapshot_consistency_group_model['resource_type'] = 'snapshot_consistency_group' + snapshot_consistency_group_model[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_model[ + 'resource_group'] = resource_group_reference_model + snapshot_consistency_group_model[ + 'resource_type'] = 'snapshot_consistency_group' snapshot_consistency_group_model['service_tags'] = ['testString'] - snapshot_consistency_group_model['snapshots'] = [snapshot_reference_model] + snapshot_consistency_group_model['snapshots'] = [ + snapshot_reference_model + ] # Construct a json representation of a SnapshotConsistencyGroupCollection model snapshot_consistency_group_collection_model_json = {} - snapshot_consistency_group_collection_model_json['first'] = snapshot_consistency_group_collection_first_model + snapshot_consistency_group_collection_model_json[ + 'first'] = snapshot_consistency_group_collection_first_model snapshot_consistency_group_collection_model_json['limit'] = 20 - snapshot_consistency_group_collection_model_json['next'] = snapshot_consistency_group_collection_next_model - snapshot_consistency_group_collection_model_json['snapshot_consistency_groups'] = [snapshot_consistency_group_model] + snapshot_consistency_group_collection_model_json[ + 'next'] = snapshot_consistency_group_collection_next_model + snapshot_consistency_group_collection_model_json[ + 'snapshot_consistency_groups'] = [snapshot_consistency_group_model] snapshot_consistency_group_collection_model_json['total_count'] = 132 # Construct a model instance of SnapshotConsistencyGroupCollection by calling from_dict on the json representation - snapshot_consistency_group_collection_model = SnapshotConsistencyGroupCollection.from_dict(snapshot_consistency_group_collection_model_json) + snapshot_consistency_group_collection_model = SnapshotConsistencyGroupCollection.from_dict( + snapshot_consistency_group_collection_model_json) assert snapshot_consistency_group_collection_model != False # Construct a model instance of SnapshotConsistencyGroupCollection by calling from_dict on the json representation - snapshot_consistency_group_collection_model_dict = SnapshotConsistencyGroupCollection.from_dict(snapshot_consistency_group_collection_model_json).__dict__ - snapshot_consistency_group_collection_model2 = SnapshotConsistencyGroupCollection(**snapshot_consistency_group_collection_model_dict) + snapshot_consistency_group_collection_model_dict = SnapshotConsistencyGroupCollection.from_dict( + snapshot_consistency_group_collection_model_json).__dict__ + snapshot_consistency_group_collection_model2 = SnapshotConsistencyGroupCollection( + **snapshot_consistency_group_collection_model_dict) # Verify the model instances are equivalent assert snapshot_consistency_group_collection_model == snapshot_consistency_group_collection_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_collection_model_json2 = snapshot_consistency_group_collection_model.to_dict() + snapshot_consistency_group_collection_model_json2 = snapshot_consistency_group_collection_model.to_dict( + ) assert snapshot_consistency_group_collection_model_json2 == snapshot_consistency_group_collection_model_json @@ -69200,21 +79241,26 @@ def test_snapshot_consistency_group_collection_first_serialization(self): # Construct a json representation of a SnapshotConsistencyGroupCollectionFirst model snapshot_consistency_group_collection_first_model_json = {} - snapshot_consistency_group_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20' + snapshot_consistency_group_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?limit=20' # Construct a model instance of SnapshotConsistencyGroupCollectionFirst by calling from_dict on the json representation - snapshot_consistency_group_collection_first_model = SnapshotConsistencyGroupCollectionFirst.from_dict(snapshot_consistency_group_collection_first_model_json) + snapshot_consistency_group_collection_first_model = SnapshotConsistencyGroupCollectionFirst.from_dict( + snapshot_consistency_group_collection_first_model_json) assert snapshot_consistency_group_collection_first_model != False # Construct a model instance of SnapshotConsistencyGroupCollectionFirst by calling from_dict on the json representation - snapshot_consistency_group_collection_first_model_dict = SnapshotConsistencyGroupCollectionFirst.from_dict(snapshot_consistency_group_collection_first_model_json).__dict__ - snapshot_consistency_group_collection_first_model2 = SnapshotConsistencyGroupCollectionFirst(**snapshot_consistency_group_collection_first_model_dict) + snapshot_consistency_group_collection_first_model_dict = SnapshotConsistencyGroupCollectionFirst.from_dict( + snapshot_consistency_group_collection_first_model_json).__dict__ + snapshot_consistency_group_collection_first_model2 = SnapshotConsistencyGroupCollectionFirst( + **snapshot_consistency_group_collection_first_model_dict) # Verify the model instances are equivalent assert snapshot_consistency_group_collection_first_model == snapshot_consistency_group_collection_first_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_collection_first_model_json2 = snapshot_consistency_group_collection_first_model.to_dict() + snapshot_consistency_group_collection_first_model_json2 = snapshot_consistency_group_collection_first_model.to_dict( + ) assert snapshot_consistency_group_collection_first_model_json2 == snapshot_consistency_group_collection_first_model_json @@ -69230,21 +79276,26 @@ def test_snapshot_consistency_group_collection_next_serialization(self): # Construct a json representation of a SnapshotConsistencyGroupCollectionNext model snapshot_consistency_group_collection_next_model_json = {} - snapshot_consistency_group_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + snapshot_consistency_group_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of SnapshotConsistencyGroupCollectionNext by calling from_dict on the json representation - snapshot_consistency_group_collection_next_model = SnapshotConsistencyGroupCollectionNext.from_dict(snapshot_consistency_group_collection_next_model_json) + snapshot_consistency_group_collection_next_model = SnapshotConsistencyGroupCollectionNext.from_dict( + snapshot_consistency_group_collection_next_model_json) assert snapshot_consistency_group_collection_next_model != False # Construct a model instance of SnapshotConsistencyGroupCollectionNext by calling from_dict on the json representation - snapshot_consistency_group_collection_next_model_dict = SnapshotConsistencyGroupCollectionNext.from_dict(snapshot_consistency_group_collection_next_model_json).__dict__ - snapshot_consistency_group_collection_next_model2 = SnapshotConsistencyGroupCollectionNext(**snapshot_consistency_group_collection_next_model_dict) + snapshot_consistency_group_collection_next_model_dict = SnapshotConsistencyGroupCollectionNext.from_dict( + snapshot_consistency_group_collection_next_model_json).__dict__ + snapshot_consistency_group_collection_next_model2 = SnapshotConsistencyGroupCollectionNext( + **snapshot_consistency_group_collection_next_model_dict) # Verify the model instances are equivalent assert snapshot_consistency_group_collection_next_model == snapshot_consistency_group_collection_next_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_collection_next_model_json2 = snapshot_consistency_group_collection_next_model.to_dict() + snapshot_consistency_group_collection_next_model_json2 = snapshot_consistency_group_collection_next_model.to_dict( + ) assert snapshot_consistency_group_collection_next_model_json2 == snapshot_consistency_group_collection_next_model_json @@ -69260,22 +79311,28 @@ def test_snapshot_consistency_group_patch_serialization(self): # Construct a json representation of a SnapshotConsistencyGroupPatch model snapshot_consistency_group_patch_model_json = {} - snapshot_consistency_group_patch_model_json['delete_snapshots_on_delete'] = True - snapshot_consistency_group_patch_model_json['name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_patch_model_json[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_patch_model_json[ + 'name'] = 'my-snapshot-consistency-group' # Construct a model instance of SnapshotConsistencyGroupPatch by calling from_dict on the json representation - snapshot_consistency_group_patch_model = SnapshotConsistencyGroupPatch.from_dict(snapshot_consistency_group_patch_model_json) + snapshot_consistency_group_patch_model = SnapshotConsistencyGroupPatch.from_dict( + snapshot_consistency_group_patch_model_json) assert snapshot_consistency_group_patch_model != False # Construct a model instance of SnapshotConsistencyGroupPatch by calling from_dict on the json representation - snapshot_consistency_group_patch_model_dict = SnapshotConsistencyGroupPatch.from_dict(snapshot_consistency_group_patch_model_json).__dict__ - snapshot_consistency_group_patch_model2 = SnapshotConsistencyGroupPatch(**snapshot_consistency_group_patch_model_dict) + snapshot_consistency_group_patch_model_dict = SnapshotConsistencyGroupPatch.from_dict( + snapshot_consistency_group_patch_model_json).__dict__ + snapshot_consistency_group_patch_model2 = SnapshotConsistencyGroupPatch( + **snapshot_consistency_group_patch_model_dict) # Verify the model instances are equivalent assert snapshot_consistency_group_patch_model == snapshot_consistency_group_patch_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_patch_model_json2 = snapshot_consistency_group_patch_model.to_dict() + snapshot_consistency_group_patch_model_json2 = snapshot_consistency_group_patch_model.to_dict( + ) assert snapshot_consistency_group_patch_model_json2 == snapshot_consistency_group_patch_model_json @@ -69291,31 +79348,43 @@ def test_snapshot_consistency_group_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - snapshot_consistency_group_reference_deleted_model = {} # SnapshotConsistencyGroupReferenceDeleted - snapshot_consistency_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_consistency_group_reference_deleted_model = { + } # SnapshotConsistencyGroupReferenceDeleted + snapshot_consistency_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SnapshotConsistencyGroupReference model snapshot_consistency_group_reference_model_json = {} - snapshot_consistency_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model_json['deleted'] = snapshot_consistency_group_reference_deleted_model - snapshot_consistency_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model_json['id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' - snapshot_consistency_group_reference_model_json['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_reference_model_json['resource_type'] = 'snapshot_consistency_group' + snapshot_consistency_group_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model_json[ + 'deleted'] = snapshot_consistency_group_reference_deleted_model + snapshot_consistency_group_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model_json[ + 'id'] = 'r134-fa329f6b-0e36-433f-a3bb-0df632e79263' + snapshot_consistency_group_reference_model_json[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_reference_model_json[ + 'resource_type'] = 'snapshot_consistency_group' # Construct a model instance of SnapshotConsistencyGroupReference by calling from_dict on the json representation - snapshot_consistency_group_reference_model = SnapshotConsistencyGroupReference.from_dict(snapshot_consistency_group_reference_model_json) + snapshot_consistency_group_reference_model = SnapshotConsistencyGroupReference.from_dict( + snapshot_consistency_group_reference_model_json) assert snapshot_consistency_group_reference_model != False # Construct a model instance of SnapshotConsistencyGroupReference by calling from_dict on the json representation - snapshot_consistency_group_reference_model_dict = SnapshotConsistencyGroupReference.from_dict(snapshot_consistency_group_reference_model_json).__dict__ - snapshot_consistency_group_reference_model2 = SnapshotConsistencyGroupReference(**snapshot_consistency_group_reference_model_dict) + snapshot_consistency_group_reference_model_dict = SnapshotConsistencyGroupReference.from_dict( + snapshot_consistency_group_reference_model_json).__dict__ + snapshot_consistency_group_reference_model2 = SnapshotConsistencyGroupReference( + **snapshot_consistency_group_reference_model_dict) # Verify the model instances are equivalent assert snapshot_consistency_group_reference_model == snapshot_consistency_group_reference_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_reference_model_json2 = snapshot_consistency_group_reference_model.to_dict() + snapshot_consistency_group_reference_model_json2 = snapshot_consistency_group_reference_model.to_dict( + ) assert snapshot_consistency_group_reference_model_json2 == snapshot_consistency_group_reference_model_json @@ -69331,21 +79400,26 @@ def test_snapshot_consistency_group_reference_deleted_serialization(self): # Construct a json representation of a SnapshotConsistencyGroupReferenceDeleted model snapshot_consistency_group_reference_deleted_model_json = {} - snapshot_consistency_group_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_consistency_group_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of SnapshotConsistencyGroupReferenceDeleted by calling from_dict on the json representation - snapshot_consistency_group_reference_deleted_model = SnapshotConsistencyGroupReferenceDeleted.from_dict(snapshot_consistency_group_reference_deleted_model_json) + snapshot_consistency_group_reference_deleted_model = SnapshotConsistencyGroupReferenceDeleted.from_dict( + snapshot_consistency_group_reference_deleted_model_json) assert snapshot_consistency_group_reference_deleted_model != False # Construct a model instance of SnapshotConsistencyGroupReferenceDeleted by calling from_dict on the json representation - snapshot_consistency_group_reference_deleted_model_dict = SnapshotConsistencyGroupReferenceDeleted.from_dict(snapshot_consistency_group_reference_deleted_model_json).__dict__ - snapshot_consistency_group_reference_deleted_model2 = SnapshotConsistencyGroupReferenceDeleted(**snapshot_consistency_group_reference_deleted_model_dict) + snapshot_consistency_group_reference_deleted_model_dict = SnapshotConsistencyGroupReferenceDeleted.from_dict( + snapshot_consistency_group_reference_deleted_model_json).__dict__ + snapshot_consistency_group_reference_deleted_model2 = SnapshotConsistencyGroupReferenceDeleted( + **snapshot_consistency_group_reference_deleted_model_dict) # Verify the model instances are equivalent assert snapshot_consistency_group_reference_deleted_model == snapshot_consistency_group_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_reference_deleted_model_json2 = snapshot_consistency_group_reference_deleted_model.to_dict() + snapshot_consistency_group_reference_deleted_model_json2 = snapshot_consistency_group_reference_deleted_model.to_dict( + ) assert snapshot_consistency_group_reference_deleted_model_json2 == snapshot_consistency_group_reference_deleted_model_json @@ -69362,10 +79436,12 @@ def test_snapshot_copies_item_serialization(self): # Construct dict forms of any model objects needed in order to build this model. snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' snapshot_remote_model = {} # SnapshotRemote @@ -69373,21 +79449,28 @@ def test_snapshot_copies_item_serialization(self): # Construct a json representation of a SnapshotCopiesItem model snapshot_copies_item_model_json = {} - snapshot_copies_item_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_copies_item_model_json['deleted'] = snapshot_reference_deleted_model - snapshot_copies_item_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_copies_item_model_json['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model_json[ + 'deleted'] = snapshot_reference_deleted_model + snapshot_copies_item_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_copies_item_model_json[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_copies_item_model_json['name'] = 'my-snapshot' snapshot_copies_item_model_json['remote'] = snapshot_remote_model snapshot_copies_item_model_json['resource_type'] = 'snapshot' # Construct a model instance of SnapshotCopiesItem by calling from_dict on the json representation - snapshot_copies_item_model = SnapshotCopiesItem.from_dict(snapshot_copies_item_model_json) + snapshot_copies_item_model = SnapshotCopiesItem.from_dict( + snapshot_copies_item_model_json) assert snapshot_copies_item_model != False # Construct a model instance of SnapshotCopiesItem by calling from_dict on the json representation - snapshot_copies_item_model_dict = SnapshotCopiesItem.from_dict(snapshot_copies_item_model_json).__dict__ - snapshot_copies_item_model2 = SnapshotCopiesItem(**snapshot_copies_item_model_dict) + snapshot_copies_item_model_dict = SnapshotCopiesItem.from_dict( + snapshot_copies_item_model_json).__dict__ + snapshot_copies_item_model2 = SnapshotCopiesItem( + **snapshot_copies_item_model_dict) # Verify the model instances are equivalent assert snapshot_copies_item_model == snapshot_copies_item_model2 @@ -69413,11 +79496,13 @@ def test_snapshot_patch_serialization(self): snapshot_patch_model_json['user_tags'] = ['testString'] # Construct a model instance of SnapshotPatch by calling from_dict on the json representation - snapshot_patch_model = SnapshotPatch.from_dict(snapshot_patch_model_json) + snapshot_patch_model = SnapshotPatch.from_dict( + snapshot_patch_model_json) assert snapshot_patch_model != False # Construct a model instance of SnapshotPatch by calling from_dict on the json representation - snapshot_patch_model_dict = SnapshotPatch.from_dict(snapshot_patch_model_json).__dict__ + snapshot_patch_model_dict = SnapshotPatch.from_dict( + snapshot_patch_model_json).__dict__ snapshot_patch_model2 = SnapshotPatch(**snapshot_patch_model_dict) # Verify the model instances are equivalent @@ -69433,7 +79518,8 @@ class TestModel_SnapshotPrototypeSnapshotConsistencyGroupContext: Test Class for SnapshotPrototypeSnapshotConsistencyGroupContext """ - def test_snapshot_prototype_snapshot_consistency_group_context_serialization(self): + def test_snapshot_prototype_snapshot_consistency_group_context_serialization( + self): """ Test serialization/deserialization for SnapshotPrototypeSnapshotConsistencyGroupContext """ @@ -69441,27 +79527,36 @@ def test_snapshot_prototype_snapshot_consistency_group_context_serialization(sel # Construct dict forms of any model objects needed in order to build this model. volume_identity_model = {} # VolumeIdentityById - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a json representation of a SnapshotPrototypeSnapshotConsistencyGroupContext model snapshot_prototype_snapshot_consistency_group_context_model_json = {} - snapshot_prototype_snapshot_consistency_group_context_model_json['name'] = 'my-snapshot' - snapshot_prototype_snapshot_consistency_group_context_model_json['source_volume'] = volume_identity_model - snapshot_prototype_snapshot_consistency_group_context_model_json['user_tags'] = ['testString'] + snapshot_prototype_snapshot_consistency_group_context_model_json[ + 'name'] = 'my-snapshot' + snapshot_prototype_snapshot_consistency_group_context_model_json[ + 'source_volume'] = volume_identity_model + snapshot_prototype_snapshot_consistency_group_context_model_json[ + 'user_tags'] = ['testString'] # Construct a model instance of SnapshotPrototypeSnapshotConsistencyGroupContext by calling from_dict on the json representation - snapshot_prototype_snapshot_consistency_group_context_model = SnapshotPrototypeSnapshotConsistencyGroupContext.from_dict(snapshot_prototype_snapshot_consistency_group_context_model_json) + snapshot_prototype_snapshot_consistency_group_context_model = SnapshotPrototypeSnapshotConsistencyGroupContext.from_dict( + snapshot_prototype_snapshot_consistency_group_context_model_json) assert snapshot_prototype_snapshot_consistency_group_context_model != False # Construct a model instance of SnapshotPrototypeSnapshotConsistencyGroupContext by calling from_dict on the json representation - snapshot_prototype_snapshot_consistency_group_context_model_dict = SnapshotPrototypeSnapshotConsistencyGroupContext.from_dict(snapshot_prototype_snapshot_consistency_group_context_model_json).__dict__ - snapshot_prototype_snapshot_consistency_group_context_model2 = SnapshotPrototypeSnapshotConsistencyGroupContext(**snapshot_prototype_snapshot_consistency_group_context_model_dict) + snapshot_prototype_snapshot_consistency_group_context_model_dict = SnapshotPrototypeSnapshotConsistencyGroupContext.from_dict( + snapshot_prototype_snapshot_consistency_group_context_model_json + ).__dict__ + snapshot_prototype_snapshot_consistency_group_context_model2 = SnapshotPrototypeSnapshotConsistencyGroupContext( + **snapshot_prototype_snapshot_consistency_group_context_model_dict) # Verify the model instances are equivalent assert snapshot_prototype_snapshot_consistency_group_context_model == snapshot_prototype_snapshot_consistency_group_context_model2 # Convert model instance back to dict and verify no loss of data - snapshot_prototype_snapshot_consistency_group_context_model_json2 = snapshot_prototype_snapshot_consistency_group_context_model.to_dict() + snapshot_prototype_snapshot_consistency_group_context_model_json2 = snapshot_prototype_snapshot_consistency_group_context_model.to_dict( + ) assert snapshot_prototype_snapshot_consistency_group_context_model_json2 == snapshot_prototype_snapshot_consistency_group_context_model_json @@ -69478,10 +79573,12 @@ def test_snapshot_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' snapshot_remote_model = {} # SnapshotRemote @@ -69489,21 +79586,28 @@ def test_snapshot_reference_serialization(self): # Construct a json representation of a SnapshotReference model snapshot_reference_model_json = {} - snapshot_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model_json['deleted'] = snapshot_reference_deleted_model - snapshot_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model_json['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model_json[ + 'deleted'] = snapshot_reference_deleted_model + snapshot_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model_json[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model_json['name'] = 'my-snapshot' snapshot_reference_model_json['remote'] = snapshot_remote_model snapshot_reference_model_json['resource_type'] = 'snapshot' # Construct a model instance of SnapshotReference by calling from_dict on the json representation - snapshot_reference_model = SnapshotReference.from_dict(snapshot_reference_model_json) + snapshot_reference_model = SnapshotReference.from_dict( + snapshot_reference_model_json) assert snapshot_reference_model != False # Construct a model instance of SnapshotReference by calling from_dict on the json representation - snapshot_reference_model_dict = SnapshotReference.from_dict(snapshot_reference_model_json).__dict__ - snapshot_reference_model2 = SnapshotReference(**snapshot_reference_model_dict) + snapshot_reference_model_dict = SnapshotReference.from_dict( + snapshot_reference_model_json).__dict__ + snapshot_reference_model2 = SnapshotReference( + **snapshot_reference_model_dict) # Verify the model instances are equivalent assert snapshot_reference_model == snapshot_reference_model2 @@ -69525,21 +79629,26 @@ def test_snapshot_reference_deleted_serialization(self): # Construct a json representation of a SnapshotReferenceDeleted model snapshot_reference_deleted_model_json = {} - snapshot_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of SnapshotReferenceDeleted by calling from_dict on the json representation - snapshot_reference_deleted_model = SnapshotReferenceDeleted.from_dict(snapshot_reference_deleted_model_json) + snapshot_reference_deleted_model = SnapshotReferenceDeleted.from_dict( + snapshot_reference_deleted_model_json) assert snapshot_reference_deleted_model != False # Construct a model instance of SnapshotReferenceDeleted by calling from_dict on the json representation - snapshot_reference_deleted_model_dict = SnapshotReferenceDeleted.from_dict(snapshot_reference_deleted_model_json).__dict__ - snapshot_reference_deleted_model2 = SnapshotReferenceDeleted(**snapshot_reference_deleted_model_dict) + snapshot_reference_deleted_model_dict = SnapshotReferenceDeleted.from_dict( + snapshot_reference_deleted_model_json).__dict__ + snapshot_reference_deleted_model2 = SnapshotReferenceDeleted( + **snapshot_reference_deleted_model_dict) # Verify the model instances are equivalent assert snapshot_reference_deleted_model == snapshot_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - snapshot_reference_deleted_model_json2 = snapshot_reference_deleted_model.to_dict() + snapshot_reference_deleted_model_json2 = snapshot_reference_deleted_model.to_dict( + ) assert snapshot_reference_deleted_model_json2 == snapshot_reference_deleted_model_json @@ -69556,7 +79665,8 @@ def test_snapshot_remote_serialization(self): # Construct dict forms of any model objects needed in order to build this model. region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a SnapshotRemote model @@ -69564,11 +79674,13 @@ def test_snapshot_remote_serialization(self): snapshot_remote_model_json['region'] = region_reference_model # Construct a model instance of SnapshotRemote by calling from_dict on the json representation - snapshot_remote_model = SnapshotRemote.from_dict(snapshot_remote_model_json) + snapshot_remote_model = SnapshotRemote.from_dict( + snapshot_remote_model_json) assert snapshot_remote_model != False # Construct a model instance of SnapshotRemote by calling from_dict on the json representation - snapshot_remote_model_dict = SnapshotRemote.from_dict(snapshot_remote_model_json).__dict__ + snapshot_remote_model_dict = SnapshotRemote.from_dict( + snapshot_remote_model_json).__dict__ snapshot_remote_model2 = SnapshotRemote(**snapshot_remote_model_dict) # Verify the model instances are equivalent @@ -69592,10 +79704,12 @@ def test_snapshot_source_snapshot_serialization(self): # Construct dict forms of any model objects needed in order to build this model. snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' snapshot_remote_model = {} # SnapshotRemote @@ -69603,27 +79717,35 @@ def test_snapshot_source_snapshot_serialization(self): # Construct a json representation of a SnapshotSourceSnapshot model snapshot_source_snapshot_model_json = {} - snapshot_source_snapshot_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_source_snapshot_model_json['deleted'] = snapshot_reference_deleted_model - snapshot_source_snapshot_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_source_snapshot_model_json['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model_json[ + 'deleted'] = snapshot_reference_deleted_model + snapshot_source_snapshot_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_source_snapshot_model_json[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_source_snapshot_model_json['name'] = 'my-snapshot' snapshot_source_snapshot_model_json['remote'] = snapshot_remote_model snapshot_source_snapshot_model_json['resource_type'] = 'snapshot' # Construct a model instance of SnapshotSourceSnapshot by calling from_dict on the json representation - snapshot_source_snapshot_model = SnapshotSourceSnapshot.from_dict(snapshot_source_snapshot_model_json) + snapshot_source_snapshot_model = SnapshotSourceSnapshot.from_dict( + snapshot_source_snapshot_model_json) assert snapshot_source_snapshot_model != False # Construct a model instance of SnapshotSourceSnapshot by calling from_dict on the json representation - snapshot_source_snapshot_model_dict = SnapshotSourceSnapshot.from_dict(snapshot_source_snapshot_model_json).__dict__ - snapshot_source_snapshot_model2 = SnapshotSourceSnapshot(**snapshot_source_snapshot_model_dict) + snapshot_source_snapshot_model_dict = SnapshotSourceSnapshot.from_dict( + snapshot_source_snapshot_model_json).__dict__ + snapshot_source_snapshot_model2 = SnapshotSourceSnapshot( + **snapshot_source_snapshot_model_dict) # Verify the model instances are equivalent assert snapshot_source_snapshot_model == snapshot_source_snapshot_model2 # Convert model instance back to dict and verify no loss of data - snapshot_source_snapshot_model_json2 = snapshot_source_snapshot_model.to_dict() + snapshot_source_snapshot_model_json2 = snapshot_source_snapshot_model.to_dict( + ) assert snapshot_source_snapshot_model_json2 == snapshot_source_snapshot_model_json @@ -69640,62 +79762,86 @@ def test_subnet_serialization(self): # Construct dict forms of any model objects needed in order to build this model. network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted - network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_reference_model = {} # NetworkACLReference - network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['deleted'] = network_acl_reference_deleted_model - network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'deleted'] = network_acl_reference_deleted_model + network_acl_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['name'] = 'my-network-acl' - public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted - public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + public_gateway_reference_deleted_model = { + } # PublicGatewayReferenceDeleted + public_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' public_gateway_reference_model = {} # PublicGatewayReference - public_gateway_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' - public_gateway_reference_model['deleted'] = public_gateway_reference_deleted_model - public_gateway_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' - public_gateway_reference_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model[ + 'deleted'] = public_gateway_reference_deleted_model + public_gateway_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_reference_model['name'] = 'my-public-gateway' public_gateway_reference_model['resource_type'] = 'public_gateway' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' - routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted - routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + routing_table_reference_deleted_model = { + } # RoutingTableReferenceDeleted + routing_table_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' routing_table_reference_model = {} # RoutingTableReference - routing_table_reference_model['deleted'] = routing_table_reference_deleted_model - routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - routing_table_reference_model['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'deleted'] = routing_table_reference_deleted_model + routing_table_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['name'] = 'my-routing-table' routing_table_reference_model['resource_type'] = 'routing_table' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a Subnet model subnet_model_json = {} subnet_model_json['available_ipv4_address_count'] = 15 subnet_model_json['created_at'] = '2019-01-01T12:00:00Z' - subnet_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_model_json['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_model_json['ip_version'] = 'ipv4' subnet_model_json['ipv4_cidr_block'] = '10.0.0.0/24' @@ -69739,67 +79885,93 @@ def test_subnet_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. subnet_collection_first_model = {} # SubnetCollectionFirst - subnet_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20' + subnet_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20' subnet_collection_next_model = {} # SubnetCollectionNext - subnet_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + subnet_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted - network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_reference_model = {} # NetworkACLReference - network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['deleted'] = network_acl_reference_deleted_model - network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'deleted'] = network_acl_reference_deleted_model + network_acl_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['name'] = 'my-network-acl' - public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted - public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + public_gateway_reference_deleted_model = { + } # PublicGatewayReferenceDeleted + public_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' public_gateway_reference_model = {} # PublicGatewayReference - public_gateway_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' - public_gateway_reference_model['deleted'] = public_gateway_reference_deleted_model - public_gateway_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' - public_gateway_reference_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model[ + 'deleted'] = public_gateway_reference_deleted_model + public_gateway_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_reference_model['name'] = 'my-public-gateway' public_gateway_reference_model['resource_type'] = 'public_gateway' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' - routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted - routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + routing_table_reference_deleted_model = { + } # RoutingTableReferenceDeleted + routing_table_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' routing_table_reference_model = {} # RoutingTableReference - routing_table_reference_model['deleted'] = routing_table_reference_deleted_model - routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - routing_table_reference_model['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'deleted'] = routing_table_reference_deleted_model + routing_table_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['name'] = 'my-routing-table' routing_table_reference_model['resource_type'] = 'routing_table' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' subnet_model = {} # Subnet subnet_model['available_ipv4_address_count'] = 251 subnet_model['created_at'] = '2019-01-28T11:59:46Z' - subnet_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_model['ip_version'] = 'ipv4' subnet_model['ipv4_cidr_block'] = '10.0.1.0/24' @@ -69823,12 +79995,15 @@ def test_subnet_collection_serialization(self): subnet_collection_model_json['total_count'] = 132 # Construct a model instance of SubnetCollection by calling from_dict on the json representation - subnet_collection_model = SubnetCollection.from_dict(subnet_collection_model_json) + subnet_collection_model = SubnetCollection.from_dict( + subnet_collection_model_json) assert subnet_collection_model != False # Construct a model instance of SubnetCollection by calling from_dict on the json representation - subnet_collection_model_dict = SubnetCollection.from_dict(subnet_collection_model_json).__dict__ - subnet_collection_model2 = SubnetCollection(**subnet_collection_model_dict) + subnet_collection_model_dict = SubnetCollection.from_dict( + subnet_collection_model_json).__dict__ + subnet_collection_model2 = SubnetCollection( + **subnet_collection_model_dict) # Verify the model instances are equivalent assert subnet_collection_model == subnet_collection_model2 @@ -69850,21 +80025,26 @@ def test_subnet_collection_first_serialization(self): # Construct a json representation of a SubnetCollectionFirst model subnet_collection_first_model_json = {} - subnet_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20' + subnet_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20' # Construct a model instance of SubnetCollectionFirst by calling from_dict on the json representation - subnet_collection_first_model = SubnetCollectionFirst.from_dict(subnet_collection_first_model_json) + subnet_collection_first_model = SubnetCollectionFirst.from_dict( + subnet_collection_first_model_json) assert subnet_collection_first_model != False # Construct a model instance of SubnetCollectionFirst by calling from_dict on the json representation - subnet_collection_first_model_dict = SubnetCollectionFirst.from_dict(subnet_collection_first_model_json).__dict__ - subnet_collection_first_model2 = SubnetCollectionFirst(**subnet_collection_first_model_dict) + subnet_collection_first_model_dict = SubnetCollectionFirst.from_dict( + subnet_collection_first_model_json).__dict__ + subnet_collection_first_model2 = SubnetCollectionFirst( + **subnet_collection_first_model_dict) # Verify the model instances are equivalent assert subnet_collection_first_model == subnet_collection_first_model2 # Convert model instance back to dict and verify no loss of data - subnet_collection_first_model_json2 = subnet_collection_first_model.to_dict() + subnet_collection_first_model_json2 = subnet_collection_first_model.to_dict( + ) assert subnet_collection_first_model_json2 == subnet_collection_first_model_json @@ -69880,21 +80060,26 @@ def test_subnet_collection_next_serialization(self): # Construct a json representation of a SubnetCollectionNext model subnet_collection_next_model_json = {} - subnet_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + subnet_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of SubnetCollectionNext by calling from_dict on the json representation - subnet_collection_next_model = SubnetCollectionNext.from_dict(subnet_collection_next_model_json) + subnet_collection_next_model = SubnetCollectionNext.from_dict( + subnet_collection_next_model_json) assert subnet_collection_next_model != False # Construct a model instance of SubnetCollectionNext by calling from_dict on the json representation - subnet_collection_next_model_dict = SubnetCollectionNext.from_dict(subnet_collection_next_model_json).__dict__ - subnet_collection_next_model2 = SubnetCollectionNext(**subnet_collection_next_model_dict) + subnet_collection_next_model_dict = SubnetCollectionNext.from_dict( + subnet_collection_next_model_json).__dict__ + subnet_collection_next_model2 = SubnetCollectionNext( + **subnet_collection_next_model_dict) # Verify the model instances are equivalent assert subnet_collection_next_model == subnet_collection_next_model2 # Convert model instance back to dict and verify no loss of data - subnet_collection_next_model_json2 = subnet_collection_next_model.to_dict() + subnet_collection_next_model_json2 = subnet_collection_next_model.to_dict( + ) assert subnet_collection_next_model_json2 == subnet_collection_next_model_json @@ -69911,19 +80096,24 @@ def test_subnet_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. network_acl_identity_model = {} # NetworkACLIdentityById - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' - subnet_public_gateway_patch_model = {} # SubnetPublicGatewayPatchPublicGatewayIdentityById - subnet_public_gateway_patch_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + subnet_public_gateway_patch_model = { + } # SubnetPublicGatewayPatchPublicGatewayIdentityById + subnet_public_gateway_patch_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' routing_table_identity_model = {} # RoutingTableIdentityById - routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a json representation of a SubnetPatch model subnet_patch_model_json = {} subnet_patch_model_json['name'] = 'my-subnet' subnet_patch_model_json['network_acl'] = network_acl_identity_model - subnet_patch_model_json['public_gateway'] = subnet_public_gateway_patch_model + subnet_patch_model_json[ + 'public_gateway'] = subnet_public_gateway_patch_model subnet_patch_model_json['routing_table'] = routing_table_identity_model # Construct a model instance of SubnetPatch by calling from_dict on the json representation @@ -69931,7 +80121,8 @@ def test_subnet_patch_serialization(self): assert subnet_patch_model != False # Construct a model instance of SubnetPatch by calling from_dict on the json representation - subnet_patch_model_dict = SubnetPatch.from_dict(subnet_patch_model_json).__dict__ + subnet_patch_model_dict = SubnetPatch.from_dict( + subnet_patch_model_json).__dict__ subnet_patch_model2 = SubnetPatch(**subnet_patch_model_dict) # Verify the model instances are equivalent @@ -69955,23 +80146,29 @@ def test_subnet_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SubnetReference model subnet_reference_model_json = {} - subnet_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model_json['deleted'] = subnet_reference_deleted_model - subnet_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model_json['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model_json[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model_json['name'] = 'my-subnet' subnet_reference_model_json['resource_type'] = 'subnet' # Construct a model instance of SubnetReference by calling from_dict on the json representation - subnet_reference_model = SubnetReference.from_dict(subnet_reference_model_json) + subnet_reference_model = SubnetReference.from_dict( + subnet_reference_model_json) assert subnet_reference_model != False # Construct a model instance of SubnetReference by calling from_dict on the json representation - subnet_reference_model_dict = SubnetReference.from_dict(subnet_reference_model_json).__dict__ + subnet_reference_model_dict = SubnetReference.from_dict( + subnet_reference_model_json).__dict__ subnet_reference_model2 = SubnetReference(**subnet_reference_model_dict) # Verify the model instances are equivalent @@ -69994,21 +80191,26 @@ def test_subnet_reference_deleted_serialization(self): # Construct a json representation of a SubnetReferenceDeleted model subnet_reference_deleted_model_json = {} - subnet_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of SubnetReferenceDeleted by calling from_dict on the json representation - subnet_reference_deleted_model = SubnetReferenceDeleted.from_dict(subnet_reference_deleted_model_json) + subnet_reference_deleted_model = SubnetReferenceDeleted.from_dict( + subnet_reference_deleted_model_json) assert subnet_reference_deleted_model != False # Construct a model instance of SubnetReferenceDeleted by calling from_dict on the json representation - subnet_reference_deleted_model_dict = SubnetReferenceDeleted.from_dict(subnet_reference_deleted_model_json).__dict__ - subnet_reference_deleted_model2 = SubnetReferenceDeleted(**subnet_reference_deleted_model_dict) + subnet_reference_deleted_model_dict = SubnetReferenceDeleted.from_dict( + subnet_reference_deleted_model_json).__dict__ + subnet_reference_deleted_model2 = SubnetReferenceDeleted( + **subnet_reference_deleted_model_dict) # Verify the model instances are equivalent assert subnet_reference_deleted_model == subnet_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - subnet_reference_deleted_model_json2 = subnet_reference_deleted_model.to_dict() + subnet_reference_deleted_model_json2 = subnet_reference_deleted_model.to_dict( + ) assert subnet_reference_deleted_model_json2 == subnet_reference_deleted_model_json @@ -70024,23 +80226,30 @@ def test_trusted_profile_reference_serialization(self): # Construct a json representation of a TrustedProfileReference model trusted_profile_reference_model_json = {} - trusted_profile_reference_model_json['crn'] = 'crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - trusted_profile_reference_model_json['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - trusted_profile_reference_model_json['resource_type'] = 'trusted_profile' + trusted_profile_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_reference_model_json[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_reference_model_json[ + 'resource_type'] = 'trusted_profile' # Construct a model instance of TrustedProfileReference by calling from_dict on the json representation - trusted_profile_reference_model = TrustedProfileReference.from_dict(trusted_profile_reference_model_json) + trusted_profile_reference_model = TrustedProfileReference.from_dict( + trusted_profile_reference_model_json) assert trusted_profile_reference_model != False # Construct a model instance of TrustedProfileReference by calling from_dict on the json representation - trusted_profile_reference_model_dict = TrustedProfileReference.from_dict(trusted_profile_reference_model_json).__dict__ - trusted_profile_reference_model2 = TrustedProfileReference(**trusted_profile_reference_model_dict) + trusted_profile_reference_model_dict = TrustedProfileReference.from_dict( + trusted_profile_reference_model_json).__dict__ + trusted_profile_reference_model2 = TrustedProfileReference( + **trusted_profile_reference_model_dict) # Verify the model instances are equivalent assert trusted_profile_reference_model == trusted_profile_reference_model2 # Convert model instance back to dict and verify no loss of data - trusted_profile_reference_model_json2 = trusted_profile_reference_model.to_dict() + trusted_profile_reference_model_json2 = trusted_profile_reference_model.to_dict( + ) assert trusted_profile_reference_model_json2 == trusted_profile_reference_model_json @@ -70092,7 +80301,8 @@ def test_vpc_serialization(self): ip_model['address'] = '192.168.3.4' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' vpccse_source_ip_model = {} # VPCCSESourceIP @@ -70100,33 +80310,49 @@ def test_vpc_serialization(self): vpccse_source_ip_model['zone'] = zone_reference_model network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted - network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_reference_model = {} # NetworkACLReference - network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['deleted'] = network_acl_reference_deleted_model - network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'deleted'] = network_acl_reference_deleted_model + network_acl_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['name'] = 'my-network-acl' - routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted - routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + routing_table_reference_deleted_model = { + } # RoutingTableReferenceDeleted + routing_table_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' routing_table_reference_model = {} # RoutingTableReference - routing_table_reference_model['deleted'] = routing_table_reference_deleted_model - routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - routing_table_reference_model['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'deleted'] = routing_table_reference_deleted_model + routing_table_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['name'] = 'my-routing-table' routing_table_reference_model['resource_type'] = 'routing_table' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' dns_server_model = {} # DNSServer @@ -70145,27 +80371,34 @@ def test_vpc_serialization(self): vpc_health_reason_model = {} # VPCHealthReason vpc_health_reason_model['code'] = 'dns_resolution_binding_failed' - vpc_health_reason_model['message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' - vpc_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' + vpc_health_reason_model[ + 'message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' + vpc_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' # Construct a json representation of a VPC model vpc_model_json = {} vpc_model_json['classic_access'] = False vpc_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpc_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_model_json['cse_source_ips'] = [vpccse_source_ip_model] vpc_model_json['default_network_acl'] = network_acl_reference_model vpc_model_json['default_routing_table'] = routing_table_reference_model - vpc_model_json['default_security_group'] = security_group_reference_model + vpc_model_json[ + 'default_security_group'] = security_group_reference_model vpc_model_json['dns'] = vpcdns_model vpc_model_json['health_reasons'] = [vpc_health_reason_model] vpc_model_json['health_state'] = 'ok' - vpc_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_model_json['name'] = 'my-vpc' vpc_model_json['resource_group'] = resource_group_reference_model @@ -70204,7 +80437,8 @@ def test_vpccse_source_ip_serialization(self): ip_model['address'] = '192.168.3.4' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a VPCCSESourceIP model @@ -70213,11 +80447,13 @@ def test_vpccse_source_ip_serialization(self): vpccse_source_ip_model_json['zone'] = zone_reference_model # Construct a model instance of VPCCSESourceIP by calling from_dict on the json representation - vpccse_source_ip_model = VPCCSESourceIP.from_dict(vpccse_source_ip_model_json) + vpccse_source_ip_model = VPCCSESourceIP.from_dict( + vpccse_source_ip_model_json) assert vpccse_source_ip_model != False # Construct a model instance of VPCCSESourceIP by calling from_dict on the json representation - vpccse_source_ip_model_dict = VPCCSESourceIP.from_dict(vpccse_source_ip_model_json).__dict__ + vpccse_source_ip_model_dict = VPCCSESourceIP.from_dict( + vpccse_source_ip_model_json).__dict__ vpccse_source_ip_model2 = VPCCSESourceIP(**vpccse_source_ip_model_dict) # Verify the model instances are equivalent @@ -70241,16 +80477,19 @@ def test_vpc_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpc_collection_first_model = {} # VPCCollectionFirst - vpc_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20' + vpc_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20' vpc_collection_next_model = {} # VPCCollectionNext - vpc_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + vpc_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' ip_model = {} # IP ip_model['address'] = '192.168.3.4' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' vpccse_source_ip_model = {} # VPCCSESourceIP @@ -70258,33 +80497,49 @@ def test_vpc_collection_serialization(self): vpccse_source_ip_model['zone'] = zone_reference_model network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted - network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_reference_model = {} # NetworkACLReference - network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['deleted'] = network_acl_reference_deleted_model - network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' - network_acl_reference_model['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'deleted'] = network_acl_reference_deleted_model + network_acl_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_reference_model[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['name'] = 'my-network-acl' - routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted - routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + routing_table_reference_deleted_model = { + } # RoutingTableReferenceDeleted + routing_table_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' routing_table_reference_model = {} # RoutingTableReference - routing_table_reference_model['deleted'] = routing_table_reference_deleted_model - routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - routing_table_reference_model['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'deleted'] = routing_table_reference_deleted_model + routing_table_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_reference_model[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['name'] = 'my-routing-table' routing_table_reference_model['resource_type'] = 'routing_table' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' dns_server_model = {} # DNSServer @@ -70303,18 +80558,23 @@ def test_vpc_collection_serialization(self): vpc_health_reason_model = {} # VPCHealthReason vpc_health_reason_model['code'] = 'dns_resolution_binding_failed' - vpc_health_reason_model['message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' - vpc_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' + vpc_health_reason_model[ + 'message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' + vpc_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' vpc_model = {} # VPC vpc_model['classic_access'] = False vpc_model['created_at'] = '2019-01-27T14:39:40Z' - vpc_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_model['cse_source_ips'] = [vpccse_source_ip_model] vpc_model['default_network_acl'] = network_acl_reference_model vpc_model['default_routing_table'] = routing_table_reference_model @@ -70322,7 +80582,8 @@ def test_vpc_collection_serialization(self): vpc_model['dns'] = vpcdns_model vpc_model['health_reasons'] = [vpc_health_reason_model] vpc_model['health_state'] = 'ok' - vpc_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_model['name'] = 'my-vpc' vpc_model['resource_group'] = resource_group_reference_model @@ -70338,11 +80599,13 @@ def test_vpc_collection_serialization(self): vpc_collection_model_json['vpcs'] = [vpc_model] # Construct a model instance of VPCCollection by calling from_dict on the json representation - vpc_collection_model = VPCCollection.from_dict(vpc_collection_model_json) + vpc_collection_model = VPCCollection.from_dict( + vpc_collection_model_json) assert vpc_collection_model != False # Construct a model instance of VPCCollection by calling from_dict on the json representation - vpc_collection_model_dict = VPCCollection.from_dict(vpc_collection_model_json).__dict__ + vpc_collection_model_dict = VPCCollection.from_dict( + vpc_collection_model_json).__dict__ vpc_collection_model2 = VPCCollection(**vpc_collection_model_dict) # Verify the model instances are equivalent @@ -70365,15 +80628,19 @@ def test_vpc_collection_first_serialization(self): # Construct a json representation of a VPCCollectionFirst model vpc_collection_first_model_json = {} - vpc_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20' + vpc_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20' # Construct a model instance of VPCCollectionFirst by calling from_dict on the json representation - vpc_collection_first_model = VPCCollectionFirst.from_dict(vpc_collection_first_model_json) + vpc_collection_first_model = VPCCollectionFirst.from_dict( + vpc_collection_first_model_json) assert vpc_collection_first_model != False # Construct a model instance of VPCCollectionFirst by calling from_dict on the json representation - vpc_collection_first_model_dict = VPCCollectionFirst.from_dict(vpc_collection_first_model_json).__dict__ - vpc_collection_first_model2 = VPCCollectionFirst(**vpc_collection_first_model_dict) + vpc_collection_first_model_dict = VPCCollectionFirst.from_dict( + vpc_collection_first_model_json).__dict__ + vpc_collection_first_model2 = VPCCollectionFirst( + **vpc_collection_first_model_dict) # Verify the model instances are equivalent assert vpc_collection_first_model == vpc_collection_first_model2 @@ -70395,15 +80662,19 @@ def test_vpc_collection_next_serialization(self): # Construct a json representation of a VPCCollectionNext model vpc_collection_next_model_json = {} - vpc_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + vpc_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of VPCCollectionNext by calling from_dict on the json representation - vpc_collection_next_model = VPCCollectionNext.from_dict(vpc_collection_next_model_json) + vpc_collection_next_model = VPCCollectionNext.from_dict( + vpc_collection_next_model_json) assert vpc_collection_next_model != False # Construct a model instance of VPCCollectionNext by calling from_dict on the json representation - vpc_collection_next_model_dict = VPCCollectionNext.from_dict(vpc_collection_next_model_json).__dict__ - vpc_collection_next_model2 = VPCCollectionNext(**vpc_collection_next_model_dict) + vpc_collection_next_model_dict = VPCCollectionNext.from_dict( + vpc_collection_next_model_json).__dict__ + vpc_collection_next_model2 = VPCCollectionNext( + **vpc_collection_next_model_dict) # Verify the model instances are equivalent assert vpc_collection_next_model == vpc_collection_next_model2 @@ -70426,33 +80697,42 @@ def test_vpcdns_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' dns_server_model = {} # DNSServer dns_server_model['address'] = '192.168.3.4' dns_server_model['zone_affinity'] = zone_reference_model - vpc_reference_dns_resolver_context_deleted_model = {} # VPCReferenceDNSResolverContextDeleted - vpc_reference_dns_resolver_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_dns_resolver_context_deleted_model = { + } # VPCReferenceDNSResolverContextDeleted + vpc_reference_dns_resolver_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' vpc_remote_model = {} # VPCRemote vpc_remote_model['account'] = account_reference_model vpc_remote_model['region'] = region_reference_model - vpc_reference_dns_resolver_context_model = {} # VPCReferenceDNSResolverContext - vpc_reference_dns_resolver_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_dns_resolver_context_model['deleted'] = vpc_reference_dns_resolver_context_deleted_model - vpc_reference_dns_resolver_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_dns_resolver_context_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model = { + } # VPCReferenceDNSResolverContext + vpc_reference_dns_resolver_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model[ + 'deleted'] = vpc_reference_dns_resolver_context_deleted_model + vpc_reference_dns_resolver_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_dns_resolver_context_model['name'] = 'my-vpc' vpc_reference_dns_resolver_context_model['remote'] = vpc_remote_model vpc_reference_dns_resolver_context_model['resource_type'] = 'vpc' @@ -70503,11 +80783,15 @@ def test_vpcdns_patch_serialization(self): dns_server_prototype_model['address'] = '192.168.3.4' dns_server_prototype_model['zone_affinity'] = zone_identity_model - vpcdns_resolver_vpc_patch_model = {} # VPCDNSResolverVPCPatchVPCIdentityById - vpcdns_resolver_vpc_patch_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_model = { + } # VPCDNSResolverVPCPatchVPCIdentityById + vpcdns_resolver_vpc_patch_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpcdns_resolver_patch_model = {} # VPCDNSResolverPatch - vpcdns_resolver_patch_model['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_patch_model['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_patch_model['type'] = 'delegated' vpcdns_resolver_patch_model['vpc'] = vpcdns_resolver_vpc_patch_model @@ -70521,7 +80805,8 @@ def test_vpcdns_patch_serialization(self): assert vpcdns_patch_model != False # Construct a model instance of VPCDNSPatch by calling from_dict on the json representation - vpcdns_patch_model_dict = VPCDNSPatch.from_dict(vpcdns_patch_model_json).__dict__ + vpcdns_patch_model_dict = VPCDNSPatch.from_dict( + vpcdns_patch_model_json).__dict__ vpcdns_patch_model2 = VPCDNSPatch(**vpcdns_patch_model_dict) # Verify the model instances are equivalent @@ -70551,21 +80836,27 @@ def test_vpcdns_prototype_serialization(self): dns_server_prototype_model['address'] = '192.168.3.4' dns_server_prototype_model['zone_affinity'] = zone_identity_model - vpcdns_resolver_prototype_model = {} # VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype - vpcdns_resolver_prototype_model['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_prototype_model = { + } # VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype + vpcdns_resolver_prototype_model['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_prototype_model['type'] = 'manual' # Construct a json representation of a VPCDNSPrototype model vpcdns_prototype_model_json = {} vpcdns_prototype_model_json['enable_hub'] = False - vpcdns_prototype_model_json['resolver'] = vpcdns_resolver_prototype_model + vpcdns_prototype_model_json[ + 'resolver'] = vpcdns_resolver_prototype_model # Construct a model instance of VPCDNSPrototype by calling from_dict on the json representation - vpcdns_prototype_model = VPCDNSPrototype.from_dict(vpcdns_prototype_model_json) + vpcdns_prototype_model = VPCDNSPrototype.from_dict( + vpcdns_prototype_model_json) assert vpcdns_prototype_model != False # Construct a model instance of VPCDNSPrototype by calling from_dict on the json representation - vpcdns_prototype_model_dict = VPCDNSPrototype.from_dict(vpcdns_prototype_model_json).__dict__ + vpcdns_prototype_model_dict = VPCDNSPrototype.from_dict( + vpcdns_prototype_model_json).__dict__ vpcdns_prototype_model2 = VPCDNSPrototype(**vpcdns_prototype_model_dict) # Verify the model instances are equivalent @@ -70593,64 +80884,91 @@ def test_vpcdns_resolution_binding_serialization(self): account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' endpoint_gateway_remote_model = {} # EndpointGatewayRemote endpoint_gateway_remote_model['account'] = account_reference_model endpoint_gateway_remote_model['region'] = region_reference_model - endpoint_gateway_reference_remote_model = {} # EndpointGatewayReferenceRemote - endpoint_gateway_reference_remote_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_reference_remote_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_reference_remote_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model = { + } # EndpointGatewayReferenceRemote + endpoint_gateway_reference_remote_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' endpoint_gateway_reference_remote_model['name'] = 'my-endpoint-gateway' - endpoint_gateway_reference_remote_model['remote'] = endpoint_gateway_remote_model - endpoint_gateway_reference_remote_model['resource_type'] = 'endpoint_gateway' - - vpcdns_resolution_binding_health_reason_model = {} # VPCDNSResolutionBindingHealthReason - vpcdns_resolution_binding_health_reason_model['code'] = 'disconnected_from_bound_vpc' - vpcdns_resolution_binding_health_reason_model['message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' - vpcdns_resolution_binding_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' + endpoint_gateway_reference_remote_model[ + 'remote'] = endpoint_gateway_remote_model + endpoint_gateway_reference_remote_model[ + 'resource_type'] = 'endpoint_gateway' + + vpcdns_resolution_binding_health_reason_model = { + } # VPCDNSResolutionBindingHealthReason + vpcdns_resolution_binding_health_reason_model[ + 'code'] = 'disconnected_from_bound_vpc' + vpcdns_resolution_binding_health_reason_model[ + 'message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' + vpcdns_resolution_binding_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' vpc_remote_model = {} # VPCRemote vpc_remote_model['account'] = account_reference_model vpc_remote_model['region'] = region_reference_model vpc_reference_remote_model = {} # VPCReferenceRemote - vpc_reference_remote_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_remote_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_remote_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_remote_model['name'] = 'my-vpc' vpc_reference_remote_model['remote'] = vpc_remote_model vpc_reference_remote_model['resource_type'] = 'vpc' # Construct a json representation of a VPCDNSResolutionBinding model vpcdns_resolution_binding_model_json = {} - vpcdns_resolution_binding_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpcdns_resolution_binding_model_json['endpoint_gateways'] = [endpoint_gateway_reference_remote_model] - vpcdns_resolution_binding_model_json['health_reasons'] = [vpcdns_resolution_binding_health_reason_model] + vpcdns_resolution_binding_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + vpcdns_resolution_binding_model_json['endpoint_gateways'] = [ + endpoint_gateway_reference_remote_model + ] + vpcdns_resolution_binding_model_json['health_reasons'] = [ + vpcdns_resolution_binding_health_reason_model + ] vpcdns_resolution_binding_model_json['health_state'] = 'ok' - vpcdns_resolution_binding_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' - vpcdns_resolution_binding_model_json['id'] = 'r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' + vpcdns_resolution_binding_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' + vpcdns_resolution_binding_model_json[ + 'id'] = 'r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' vpcdns_resolution_binding_model_json['lifecycle_state'] = 'stable' - vpcdns_resolution_binding_model_json['name'] = 'my-dns-resolution-binding' - vpcdns_resolution_binding_model_json['resource_type'] = 'vpc_dns_resolution_binding' + vpcdns_resolution_binding_model_json[ + 'name'] = 'my-dns-resolution-binding' + vpcdns_resolution_binding_model_json[ + 'resource_type'] = 'vpc_dns_resolution_binding' vpcdns_resolution_binding_model_json['vpc'] = vpc_reference_remote_model # Construct a model instance of VPCDNSResolutionBinding by calling from_dict on the json representation - vpcdns_resolution_binding_model = VPCDNSResolutionBinding.from_dict(vpcdns_resolution_binding_model_json) + vpcdns_resolution_binding_model = VPCDNSResolutionBinding.from_dict( + vpcdns_resolution_binding_model_json) assert vpcdns_resolution_binding_model != False # Construct a model instance of VPCDNSResolutionBinding by calling from_dict on the json representation - vpcdns_resolution_binding_model_dict = VPCDNSResolutionBinding.from_dict(vpcdns_resolution_binding_model_json).__dict__ - vpcdns_resolution_binding_model2 = VPCDNSResolutionBinding(**vpcdns_resolution_binding_model_dict) + vpcdns_resolution_binding_model_dict = VPCDNSResolutionBinding.from_dict( + vpcdns_resolution_binding_model_json).__dict__ + vpcdns_resolution_binding_model2 = VPCDNSResolutionBinding( + **vpcdns_resolution_binding_model_dict) # Verify the model instances are equivalent assert vpcdns_resolution_binding_model == vpcdns_resolution_binding_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolution_binding_model_json2 = vpcdns_resolution_binding_model.to_dict() + vpcdns_resolution_binding_model_json2 = vpcdns_resolution_binding_model.to_dict( + ) assert vpcdns_resolution_binding_model_json2 == vpcdns_resolution_binding_model_json @@ -70671,77 +80989,109 @@ def test_vpcdns_resolution_binding_collection_serialization(self): account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' endpoint_gateway_remote_model = {} # EndpointGatewayRemote endpoint_gateway_remote_model['account'] = account_reference_model endpoint_gateway_remote_model['region'] = region_reference_model - endpoint_gateway_reference_remote_model = {} # EndpointGatewayReferenceRemote - endpoint_gateway_reference_remote_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_reference_remote_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - endpoint_gateway_reference_remote_model['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model = { + } # EndpointGatewayReferenceRemote + endpoint_gateway_reference_remote_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + endpoint_gateway_reference_remote_model[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' endpoint_gateway_reference_remote_model['name'] = 'my-endpoint-gateway' - endpoint_gateway_reference_remote_model['remote'] = endpoint_gateway_remote_model - endpoint_gateway_reference_remote_model['resource_type'] = 'endpoint_gateway' - - vpcdns_resolution_binding_health_reason_model = {} # VPCDNSResolutionBindingHealthReason - vpcdns_resolution_binding_health_reason_model['code'] = 'disconnected_from_bound_vpc' - vpcdns_resolution_binding_health_reason_model['message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' - vpcdns_resolution_binding_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' + endpoint_gateway_reference_remote_model[ + 'remote'] = endpoint_gateway_remote_model + endpoint_gateway_reference_remote_model[ + 'resource_type'] = 'endpoint_gateway' + + vpcdns_resolution_binding_health_reason_model = { + } # VPCDNSResolutionBindingHealthReason + vpcdns_resolution_binding_health_reason_model[ + 'code'] = 'disconnected_from_bound_vpc' + vpcdns_resolution_binding_health_reason_model[ + 'message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' + vpcdns_resolution_binding_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' vpc_remote_model = {} # VPCRemote vpc_remote_model['account'] = account_reference_model vpc_remote_model['region'] = region_reference_model vpc_reference_remote_model = {} # VPCReferenceRemote - vpc_reference_remote_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_remote_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_remote_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_remote_model['name'] = 'my-vpc' vpc_reference_remote_model['remote'] = vpc_remote_model vpc_reference_remote_model['resource_type'] = 'vpc' vpcdns_resolution_binding_model = {} # VPCDNSResolutionBinding vpcdns_resolution_binding_model['created_at'] = '2019-01-01T12:00:00Z' - vpcdns_resolution_binding_model['endpoint_gateways'] = [endpoint_gateway_reference_remote_model] - vpcdns_resolution_binding_model['health_reasons'] = [vpcdns_resolution_binding_health_reason_model] + vpcdns_resolution_binding_model['endpoint_gateways'] = [ + endpoint_gateway_reference_remote_model + ] + vpcdns_resolution_binding_model['health_reasons'] = [ + vpcdns_resolution_binding_health_reason_model + ] vpcdns_resolution_binding_model['health_state'] = 'ok' - vpcdns_resolution_binding_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' - vpcdns_resolution_binding_model['id'] = 'r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' + vpcdns_resolution_binding_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings/r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' + vpcdns_resolution_binding_model[ + 'id'] = 'r006-8a524686-fcf6-4947-a59b-188c1ed78ad1' vpcdns_resolution_binding_model['lifecycle_state'] = 'stable' vpcdns_resolution_binding_model['name'] = 'my-dns-resolution-binding' - vpcdns_resolution_binding_model['resource_type'] = 'vpc_dns_resolution_binding' + vpcdns_resolution_binding_model[ + 'resource_type'] = 'vpc_dns_resolution_binding' vpcdns_resolution_binding_model['vpc'] = vpc_reference_remote_model - vpcdns_resolution_binding_collection_first_model = {} # VPCDNSResolutionBindingCollectionFirst - vpcdns_resolution_binding_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20' + vpcdns_resolution_binding_collection_first_model = { + } # VPCDNSResolutionBindingCollectionFirst + vpcdns_resolution_binding_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20' - vpcdns_resolution_binding_collection_next_model = {} # VPCDNSResolutionBindingCollectionNext - vpcdns_resolution_binding_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + vpcdns_resolution_binding_collection_next_model = { + } # VPCDNSResolutionBindingCollectionNext + vpcdns_resolution_binding_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a json representation of a VPCDNSResolutionBindingCollection model vpcdns_resolution_binding_collection_model_json = {} - vpcdns_resolution_binding_collection_model_json['dns_resolution_bindings'] = [vpcdns_resolution_binding_model] - vpcdns_resolution_binding_collection_model_json['first'] = vpcdns_resolution_binding_collection_first_model + vpcdns_resolution_binding_collection_model_json[ + 'dns_resolution_bindings'] = [vpcdns_resolution_binding_model] + vpcdns_resolution_binding_collection_model_json[ + 'first'] = vpcdns_resolution_binding_collection_first_model vpcdns_resolution_binding_collection_model_json['limit'] = 20 - vpcdns_resolution_binding_collection_model_json['next'] = vpcdns_resolution_binding_collection_next_model + vpcdns_resolution_binding_collection_model_json[ + 'next'] = vpcdns_resolution_binding_collection_next_model vpcdns_resolution_binding_collection_model_json['total_count'] = 132 # Construct a model instance of VPCDNSResolutionBindingCollection by calling from_dict on the json representation - vpcdns_resolution_binding_collection_model = VPCDNSResolutionBindingCollection.from_dict(vpcdns_resolution_binding_collection_model_json) + vpcdns_resolution_binding_collection_model = VPCDNSResolutionBindingCollection.from_dict( + vpcdns_resolution_binding_collection_model_json) assert vpcdns_resolution_binding_collection_model != False # Construct a model instance of VPCDNSResolutionBindingCollection by calling from_dict on the json representation - vpcdns_resolution_binding_collection_model_dict = VPCDNSResolutionBindingCollection.from_dict(vpcdns_resolution_binding_collection_model_json).__dict__ - vpcdns_resolution_binding_collection_model2 = VPCDNSResolutionBindingCollection(**vpcdns_resolution_binding_collection_model_dict) + vpcdns_resolution_binding_collection_model_dict = VPCDNSResolutionBindingCollection.from_dict( + vpcdns_resolution_binding_collection_model_json).__dict__ + vpcdns_resolution_binding_collection_model2 = VPCDNSResolutionBindingCollection( + **vpcdns_resolution_binding_collection_model_dict) # Verify the model instances are equivalent assert vpcdns_resolution_binding_collection_model == vpcdns_resolution_binding_collection_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolution_binding_collection_model_json2 = vpcdns_resolution_binding_collection_model.to_dict() + vpcdns_resolution_binding_collection_model_json2 = vpcdns_resolution_binding_collection_model.to_dict( + ) assert vpcdns_resolution_binding_collection_model_json2 == vpcdns_resolution_binding_collection_model_json @@ -70757,21 +81107,26 @@ def test_vpcdns_resolution_binding_collection_first_serialization(self): # Construct a json representation of a VPCDNSResolutionBindingCollectionFirst model vpcdns_resolution_binding_collection_first_model_json = {} - vpcdns_resolution_binding_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20' + vpcdns_resolution_binding_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20' # Construct a model instance of VPCDNSResolutionBindingCollectionFirst by calling from_dict on the json representation - vpcdns_resolution_binding_collection_first_model = VPCDNSResolutionBindingCollectionFirst.from_dict(vpcdns_resolution_binding_collection_first_model_json) + vpcdns_resolution_binding_collection_first_model = VPCDNSResolutionBindingCollectionFirst.from_dict( + vpcdns_resolution_binding_collection_first_model_json) assert vpcdns_resolution_binding_collection_first_model != False # Construct a model instance of VPCDNSResolutionBindingCollectionFirst by calling from_dict on the json representation - vpcdns_resolution_binding_collection_first_model_dict = VPCDNSResolutionBindingCollectionFirst.from_dict(vpcdns_resolution_binding_collection_first_model_json).__dict__ - vpcdns_resolution_binding_collection_first_model2 = VPCDNSResolutionBindingCollectionFirst(**vpcdns_resolution_binding_collection_first_model_dict) + vpcdns_resolution_binding_collection_first_model_dict = VPCDNSResolutionBindingCollectionFirst.from_dict( + vpcdns_resolution_binding_collection_first_model_json).__dict__ + vpcdns_resolution_binding_collection_first_model2 = VPCDNSResolutionBindingCollectionFirst( + **vpcdns_resolution_binding_collection_first_model_dict) # Verify the model instances are equivalent assert vpcdns_resolution_binding_collection_first_model == vpcdns_resolution_binding_collection_first_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolution_binding_collection_first_model_json2 = vpcdns_resolution_binding_collection_first_model.to_dict() + vpcdns_resolution_binding_collection_first_model_json2 = vpcdns_resolution_binding_collection_first_model.to_dict( + ) assert vpcdns_resolution_binding_collection_first_model_json2 == vpcdns_resolution_binding_collection_first_model_json @@ -70787,21 +81142,26 @@ def test_vpcdns_resolution_binding_collection_next_serialization(self): # Construct a json representation of a VPCDNSResolutionBindingCollectionNext model vpcdns_resolution_binding_collection_next_model_json = {} - vpcdns_resolution_binding_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + vpcdns_resolution_binding_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of VPCDNSResolutionBindingCollectionNext by calling from_dict on the json representation - vpcdns_resolution_binding_collection_next_model = VPCDNSResolutionBindingCollectionNext.from_dict(vpcdns_resolution_binding_collection_next_model_json) + vpcdns_resolution_binding_collection_next_model = VPCDNSResolutionBindingCollectionNext.from_dict( + vpcdns_resolution_binding_collection_next_model_json) assert vpcdns_resolution_binding_collection_next_model != False # Construct a model instance of VPCDNSResolutionBindingCollectionNext by calling from_dict on the json representation - vpcdns_resolution_binding_collection_next_model_dict = VPCDNSResolutionBindingCollectionNext.from_dict(vpcdns_resolution_binding_collection_next_model_json).__dict__ - vpcdns_resolution_binding_collection_next_model2 = VPCDNSResolutionBindingCollectionNext(**vpcdns_resolution_binding_collection_next_model_dict) + vpcdns_resolution_binding_collection_next_model_dict = VPCDNSResolutionBindingCollectionNext.from_dict( + vpcdns_resolution_binding_collection_next_model_json).__dict__ + vpcdns_resolution_binding_collection_next_model2 = VPCDNSResolutionBindingCollectionNext( + **vpcdns_resolution_binding_collection_next_model_dict) # Verify the model instances are equivalent assert vpcdns_resolution_binding_collection_next_model == vpcdns_resolution_binding_collection_next_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolution_binding_collection_next_model_json2 = vpcdns_resolution_binding_collection_next_model.to_dict() + vpcdns_resolution_binding_collection_next_model_json2 = vpcdns_resolution_binding_collection_next_model.to_dict( + ) assert vpcdns_resolution_binding_collection_next_model_json2 == vpcdns_resolution_binding_collection_next_model_json @@ -70817,23 +81177,30 @@ def test_vpcdns_resolution_binding_health_reason_serialization(self): # Construct a json representation of a VPCDNSResolutionBindingHealthReason model vpcdns_resolution_binding_health_reason_model_json = {} - vpcdns_resolution_binding_health_reason_model_json['code'] = 'disconnected_from_bound_vpc' - vpcdns_resolution_binding_health_reason_model_json['message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' - vpcdns_resolution_binding_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' + vpcdns_resolution_binding_health_reason_model_json[ + 'code'] = 'disconnected_from_bound_vpc' + vpcdns_resolution_binding_health_reason_model_json[ + 'message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' + vpcdns_resolution_binding_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' # Construct a model instance of VPCDNSResolutionBindingHealthReason by calling from_dict on the json representation - vpcdns_resolution_binding_health_reason_model = VPCDNSResolutionBindingHealthReason.from_dict(vpcdns_resolution_binding_health_reason_model_json) + vpcdns_resolution_binding_health_reason_model = VPCDNSResolutionBindingHealthReason.from_dict( + vpcdns_resolution_binding_health_reason_model_json) assert vpcdns_resolution_binding_health_reason_model != False # Construct a model instance of VPCDNSResolutionBindingHealthReason by calling from_dict on the json representation - vpcdns_resolution_binding_health_reason_model_dict = VPCDNSResolutionBindingHealthReason.from_dict(vpcdns_resolution_binding_health_reason_model_json).__dict__ - vpcdns_resolution_binding_health_reason_model2 = VPCDNSResolutionBindingHealthReason(**vpcdns_resolution_binding_health_reason_model_dict) + vpcdns_resolution_binding_health_reason_model_dict = VPCDNSResolutionBindingHealthReason.from_dict( + vpcdns_resolution_binding_health_reason_model_json).__dict__ + vpcdns_resolution_binding_health_reason_model2 = VPCDNSResolutionBindingHealthReason( + **vpcdns_resolution_binding_health_reason_model_dict) # Verify the model instances are equivalent assert vpcdns_resolution_binding_health_reason_model == vpcdns_resolution_binding_health_reason_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolution_binding_health_reason_model_json2 = vpcdns_resolution_binding_health_reason_model.to_dict() + vpcdns_resolution_binding_health_reason_model_json2 = vpcdns_resolution_binding_health_reason_model.to_dict( + ) assert vpcdns_resolution_binding_health_reason_model_json2 == vpcdns_resolution_binding_health_reason_model_json @@ -70849,21 +81216,26 @@ def test_vpcdns_resolution_binding_patch_serialization(self): # Construct a json representation of a VPCDNSResolutionBindingPatch model vpcdns_resolution_binding_patch_model_json = {} - vpcdns_resolution_binding_patch_model_json['name'] = 'my-dns-resolution-binding-updated' + vpcdns_resolution_binding_patch_model_json[ + 'name'] = 'my-dns-resolution-binding-updated' # Construct a model instance of VPCDNSResolutionBindingPatch by calling from_dict on the json representation - vpcdns_resolution_binding_patch_model = VPCDNSResolutionBindingPatch.from_dict(vpcdns_resolution_binding_patch_model_json) + vpcdns_resolution_binding_patch_model = VPCDNSResolutionBindingPatch.from_dict( + vpcdns_resolution_binding_patch_model_json) assert vpcdns_resolution_binding_patch_model != False # Construct a model instance of VPCDNSResolutionBindingPatch by calling from_dict on the json representation - vpcdns_resolution_binding_patch_model_dict = VPCDNSResolutionBindingPatch.from_dict(vpcdns_resolution_binding_patch_model_json).__dict__ - vpcdns_resolution_binding_patch_model2 = VPCDNSResolutionBindingPatch(**vpcdns_resolution_binding_patch_model_dict) + vpcdns_resolution_binding_patch_model_dict = VPCDNSResolutionBindingPatch.from_dict( + vpcdns_resolution_binding_patch_model_json).__dict__ + vpcdns_resolution_binding_patch_model2 = VPCDNSResolutionBindingPatch( + **vpcdns_resolution_binding_patch_model_dict) # Verify the model instances are equivalent assert vpcdns_resolution_binding_patch_model == vpcdns_resolution_binding_patch_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolution_binding_patch_model_json2 = vpcdns_resolution_binding_patch_model.to_dict() + vpcdns_resolution_binding_patch_model_json2 = vpcdns_resolution_binding_patch_model.to_dict( + ) assert vpcdns_resolution_binding_patch_model_json2 == vpcdns_resolution_binding_patch_model_json @@ -70886,28 +81258,37 @@ def test_vpcdns_resolver_patch_serialization(self): dns_server_prototype_model['address'] = '192.168.3.4' dns_server_prototype_model['zone_affinity'] = zone_identity_model - vpcdns_resolver_vpc_patch_model = {} # VPCDNSResolverVPCPatchVPCIdentityById - vpcdns_resolver_vpc_patch_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_model = { + } # VPCDNSResolverVPCPatchVPCIdentityById + vpcdns_resolver_vpc_patch_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a json representation of a VPCDNSResolverPatch model vpcdns_resolver_patch_model_json = {} - vpcdns_resolver_patch_model_json['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_patch_model_json['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_patch_model_json['type'] = 'delegated' - vpcdns_resolver_patch_model_json['vpc'] = vpcdns_resolver_vpc_patch_model + vpcdns_resolver_patch_model_json[ + 'vpc'] = vpcdns_resolver_vpc_patch_model # Construct a model instance of VPCDNSResolverPatch by calling from_dict on the json representation - vpcdns_resolver_patch_model = VPCDNSResolverPatch.from_dict(vpcdns_resolver_patch_model_json) + vpcdns_resolver_patch_model = VPCDNSResolverPatch.from_dict( + vpcdns_resolver_patch_model_json) assert vpcdns_resolver_patch_model != False # Construct a model instance of VPCDNSResolverPatch by calling from_dict on the json representation - vpcdns_resolver_patch_model_dict = VPCDNSResolverPatch.from_dict(vpcdns_resolver_patch_model_json).__dict__ - vpcdns_resolver_patch_model2 = VPCDNSResolverPatch(**vpcdns_resolver_patch_model_dict) + vpcdns_resolver_patch_model_dict = VPCDNSResolverPatch.from_dict( + vpcdns_resolver_patch_model_json).__dict__ + vpcdns_resolver_patch_model2 = VPCDNSResolverPatch( + **vpcdns_resolver_patch_model_dict) # Verify the model instances are equivalent assert vpcdns_resolver_patch_model == vpcdns_resolver_patch_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_patch_model_json2 = vpcdns_resolver_patch_model.to_dict() + vpcdns_resolver_patch_model_json2 = vpcdns_resolver_patch_model.to_dict( + ) assert vpcdns_resolver_patch_model_json2 == vpcdns_resolver_patch_model_json @@ -70924,16 +81305,21 @@ def test_vpc_health_reason_serialization(self): # Construct a json representation of a VPCHealthReason model vpc_health_reason_model_json = {} vpc_health_reason_model_json['code'] = 'dns_resolution_binding_failed' - vpc_health_reason_model_json['message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' - vpc_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' + vpc_health_reason_model_json[ + 'message'] = 'The VPC specified in the DNS resolution binding has been disconnected.' + vpc_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-spoke-1' # Construct a model instance of VPCHealthReason by calling from_dict on the json representation - vpc_health_reason_model = VPCHealthReason.from_dict(vpc_health_reason_model_json) + vpc_health_reason_model = VPCHealthReason.from_dict( + vpc_health_reason_model_json) assert vpc_health_reason_model != False # Construct a model instance of VPCHealthReason by calling from_dict on the json representation - vpc_health_reason_model_dict = VPCHealthReason.from_dict(vpc_health_reason_model_json).__dict__ - vpc_health_reason_model2 = VPCHealthReason(**vpc_health_reason_model_dict) + vpc_health_reason_model_dict = VPCHealthReason.from_dict( + vpc_health_reason_model_json).__dict__ + vpc_health_reason_model2 = VPCHealthReason( + **vpc_health_reason_model_dict) # Verify the model instances are equivalent assert vpc_health_reason_model == vpc_health_reason_model2 @@ -70962,11 +81348,15 @@ def test_vpc_patch_serialization(self): dns_server_prototype_model['address'] = '192.168.3.4' dns_server_prototype_model['zone_affinity'] = zone_identity_model - vpcdns_resolver_vpc_patch_model = {} # VPCDNSResolverVPCPatchVPCIdentityById - vpcdns_resolver_vpc_patch_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_model = { + } # VPCDNSResolverVPCPatchVPCIdentityById + vpcdns_resolver_vpc_patch_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpcdns_resolver_patch_model = {} # VPCDNSResolverPatch - vpcdns_resolver_patch_model['manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_patch_model['manual_servers'] = [ + dns_server_prototype_model + ] vpcdns_resolver_patch_model['type'] = 'delegated' vpcdns_resolver_patch_model['vpc'] = vpcdns_resolver_vpc_patch_model @@ -71008,14 +81398,18 @@ def test_vpc_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a VPCReference model vpc_reference_model_json = {} - vpc_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model_json['deleted'] = vpc_reference_deleted_model - vpc_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model_json[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model_json['name'] = 'my-vpc' vpc_reference_model_json['resource_type'] = 'vpc' @@ -71024,7 +81418,8 @@ def test_vpc_reference_serialization(self): assert vpc_reference_model != False # Construct a model instance of VPCReference by calling from_dict on the json representation - vpc_reference_model_dict = VPCReference.from_dict(vpc_reference_model_json).__dict__ + vpc_reference_model_dict = VPCReference.from_dict( + vpc_reference_model_json).__dict__ vpc_reference_model2 = VPCReference(**vpc_reference_model_dict) # Verify the model instances are equivalent @@ -71047,15 +81442,18 @@ def test_vpc_reference_dns_resolver_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpc_reference_dns_resolver_context_deleted_model = {} # VPCReferenceDNSResolverContextDeleted - vpc_reference_dns_resolver_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_dns_resolver_context_deleted_model = { + } # VPCReferenceDNSResolverContextDeleted + vpc_reference_dns_resolver_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' vpc_remote_model = {} # VPCRemote @@ -71064,27 +81462,36 @@ def test_vpc_reference_dns_resolver_context_serialization(self): # Construct a json representation of a VPCReferenceDNSResolverContext model vpc_reference_dns_resolver_context_model_json = {} - vpc_reference_dns_resolver_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_dns_resolver_context_model_json['deleted'] = vpc_reference_dns_resolver_context_deleted_model - vpc_reference_dns_resolver_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_dns_resolver_context_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model_json[ + 'deleted'] = vpc_reference_dns_resolver_context_deleted_model + vpc_reference_dns_resolver_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model_json[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_dns_resolver_context_model_json['name'] = 'my-vpc' - vpc_reference_dns_resolver_context_model_json['remote'] = vpc_remote_model + vpc_reference_dns_resolver_context_model_json[ + 'remote'] = vpc_remote_model vpc_reference_dns_resolver_context_model_json['resource_type'] = 'vpc' # Construct a model instance of VPCReferenceDNSResolverContext by calling from_dict on the json representation - vpc_reference_dns_resolver_context_model = VPCReferenceDNSResolverContext.from_dict(vpc_reference_dns_resolver_context_model_json) + vpc_reference_dns_resolver_context_model = VPCReferenceDNSResolverContext.from_dict( + vpc_reference_dns_resolver_context_model_json) assert vpc_reference_dns_resolver_context_model != False # Construct a model instance of VPCReferenceDNSResolverContext by calling from_dict on the json representation - vpc_reference_dns_resolver_context_model_dict = VPCReferenceDNSResolverContext.from_dict(vpc_reference_dns_resolver_context_model_json).__dict__ - vpc_reference_dns_resolver_context_model2 = VPCReferenceDNSResolverContext(**vpc_reference_dns_resolver_context_model_dict) + vpc_reference_dns_resolver_context_model_dict = VPCReferenceDNSResolverContext.from_dict( + vpc_reference_dns_resolver_context_model_json).__dict__ + vpc_reference_dns_resolver_context_model2 = VPCReferenceDNSResolverContext( + **vpc_reference_dns_resolver_context_model_dict) # Verify the model instances are equivalent assert vpc_reference_dns_resolver_context_model == vpc_reference_dns_resolver_context_model2 # Convert model instance back to dict and verify no loss of data - vpc_reference_dns_resolver_context_model_json2 = vpc_reference_dns_resolver_context_model.to_dict() + vpc_reference_dns_resolver_context_model_json2 = vpc_reference_dns_resolver_context_model.to_dict( + ) assert vpc_reference_dns_resolver_context_model_json2 == vpc_reference_dns_resolver_context_model_json @@ -71100,21 +81507,26 @@ def test_vpc_reference_dns_resolver_context_deleted_serialization(self): # Construct a json representation of a VPCReferenceDNSResolverContextDeleted model vpc_reference_dns_resolver_context_deleted_model_json = {} - vpc_reference_dns_resolver_context_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_dns_resolver_context_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VPCReferenceDNSResolverContextDeleted by calling from_dict on the json representation - vpc_reference_dns_resolver_context_deleted_model = VPCReferenceDNSResolverContextDeleted.from_dict(vpc_reference_dns_resolver_context_deleted_model_json) + vpc_reference_dns_resolver_context_deleted_model = VPCReferenceDNSResolverContextDeleted.from_dict( + vpc_reference_dns_resolver_context_deleted_model_json) assert vpc_reference_dns_resolver_context_deleted_model != False # Construct a model instance of VPCReferenceDNSResolverContextDeleted by calling from_dict on the json representation - vpc_reference_dns_resolver_context_deleted_model_dict = VPCReferenceDNSResolverContextDeleted.from_dict(vpc_reference_dns_resolver_context_deleted_model_json).__dict__ - vpc_reference_dns_resolver_context_deleted_model2 = VPCReferenceDNSResolverContextDeleted(**vpc_reference_dns_resolver_context_deleted_model_dict) + vpc_reference_dns_resolver_context_deleted_model_dict = VPCReferenceDNSResolverContextDeleted.from_dict( + vpc_reference_dns_resolver_context_deleted_model_json).__dict__ + vpc_reference_dns_resolver_context_deleted_model2 = VPCReferenceDNSResolverContextDeleted( + **vpc_reference_dns_resolver_context_deleted_model_dict) # Verify the model instances are equivalent assert vpc_reference_dns_resolver_context_deleted_model == vpc_reference_dns_resolver_context_deleted_model2 # Convert model instance back to dict and verify no loss of data - vpc_reference_dns_resolver_context_deleted_model_json2 = vpc_reference_dns_resolver_context_deleted_model.to_dict() + vpc_reference_dns_resolver_context_deleted_model_json2 = vpc_reference_dns_resolver_context_deleted_model.to_dict( + ) assert vpc_reference_dns_resolver_context_deleted_model_json2 == vpc_reference_dns_resolver_context_deleted_model_json @@ -71130,21 +81542,26 @@ def test_vpc_reference_deleted_serialization(self): # Construct a json representation of a VPCReferenceDeleted model vpc_reference_deleted_model_json = {} - vpc_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VPCReferenceDeleted by calling from_dict on the json representation - vpc_reference_deleted_model = VPCReferenceDeleted.from_dict(vpc_reference_deleted_model_json) + vpc_reference_deleted_model = VPCReferenceDeleted.from_dict( + vpc_reference_deleted_model_json) assert vpc_reference_deleted_model != False # Construct a model instance of VPCReferenceDeleted by calling from_dict on the json representation - vpc_reference_deleted_model_dict = VPCReferenceDeleted.from_dict(vpc_reference_deleted_model_json).__dict__ - vpc_reference_deleted_model2 = VPCReferenceDeleted(**vpc_reference_deleted_model_dict) + vpc_reference_deleted_model_dict = VPCReferenceDeleted.from_dict( + vpc_reference_deleted_model_json).__dict__ + vpc_reference_deleted_model2 = VPCReferenceDeleted( + **vpc_reference_deleted_model_dict) # Verify the model instances are equivalent assert vpc_reference_deleted_model == vpc_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - vpc_reference_deleted_model_json2 = vpc_reference_deleted_model.to_dict() + vpc_reference_deleted_model_json2 = vpc_reference_deleted_model.to_dict( + ) assert vpc_reference_deleted_model_json2 == vpc_reference_deleted_model_json @@ -71165,7 +81582,8 @@ def test_vpc_reference_remote_serialization(self): account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' vpc_remote_model = {} # VPCRemote @@ -71174,20 +81592,26 @@ def test_vpc_reference_remote_serialization(self): # Construct a json representation of a VPCReferenceRemote model vpc_reference_remote_model_json = {} - vpc_reference_remote_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_remote_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_remote_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_remote_model_json[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_remote_model_json['name'] = 'my-vpc' vpc_reference_remote_model_json['remote'] = vpc_remote_model vpc_reference_remote_model_json['resource_type'] = 'vpc' # Construct a model instance of VPCReferenceRemote by calling from_dict on the json representation - vpc_reference_remote_model = VPCReferenceRemote.from_dict(vpc_reference_remote_model_json) + vpc_reference_remote_model = VPCReferenceRemote.from_dict( + vpc_reference_remote_model_json) assert vpc_reference_remote_model != False # Construct a model instance of VPCReferenceRemote by calling from_dict on the json representation - vpc_reference_remote_model_dict = VPCReferenceRemote.from_dict(vpc_reference_remote_model_json).__dict__ - vpc_reference_remote_model2 = VPCReferenceRemote(**vpc_reference_remote_model_dict) + vpc_reference_remote_model_dict = VPCReferenceRemote.from_dict( + vpc_reference_remote_model_json).__dict__ + vpc_reference_remote_model2 = VPCReferenceRemote( + **vpc_reference_remote_model_dict) # Verify the model instances are equivalent assert vpc_reference_remote_model == vpc_reference_remote_model2 @@ -71214,7 +81638,8 @@ def test_vpc_remote_serialization(self): account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a VPCRemote model @@ -71227,7 +81652,8 @@ def test_vpc_remote_serialization(self): assert vpc_remote_model != False # Construct a model instance of VPCRemote by calling from_dict on the json representation - vpc_remote_model_dict = VPCRemote.from_dict(vpc_remote_model_json).__dict__ + vpc_remote_model_dict = VPCRemote.from_dict( + vpc_remote_model_json).__dict__ vpc_remote_model2 = VPCRemote(**vpc_remote_model_dict) # Verify the model instances are equivalent @@ -71251,49 +81677,75 @@ def test_vpn_gateway_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpn_gateway_collection_first_model = {} # VPNGatewayCollectionFirst - vpn_gateway_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20' + vpn_gateway_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20' vpn_gateway_collection_next_model = {} # VPNGatewayCollectionNext - vpn_gateway_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' - - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference - vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + vpn_gateway_connection_reference_model = { + } # VPNGatewayConnectionReference + vpn_gateway_connection_reference_model[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model[ + 'resource_type'] = 'vpn_gateway_connection' vpn_gateway_health_reason_model = {} # VPNGatewayHealthReason vpn_gateway_health_reason_model['code'] = 'cannot_reserve_ip_address' - vpn_gateway_health_reason_model['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + vpn_gateway_health_reason_model[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' vpn_gateway_lifecycle_reason_model = {} # VPNGatewayLifecycleReason - vpn_gateway_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_gateway_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - - vpn_gateway_member_health_reason_model = {} # VPNGatewayMemberHealthReason - vpn_gateway_member_health_reason_model['code'] = 'cannot_reserve_ip_address' - vpn_gateway_member_health_reason_model['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_member_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' - - vpn_gateway_member_lifecycle_reason_model = {} # VPNGatewayMemberLifecycleReason - vpn_gateway_member_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_gateway_member_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_member_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_gateway_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + vpn_gateway_member_health_reason_model = { + } # VPNGatewayMemberHealthReason + vpn_gateway_member_health_reason_model[ + 'code'] = 'cannot_reserve_ip_address' + vpn_gateway_member_health_reason_model[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_member_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + + vpn_gateway_member_lifecycle_reason_model = { + } # VPNGatewayMemberLifecycleReason + vpn_gateway_member_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_member_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_member_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' @@ -71301,50 +81753,69 @@ def test_vpn_gateway_collection_serialization(self): ip_model['address'] = '192.168.3.4' vpn_gateway_member_model = {} # VPNGatewayMember - vpn_gateway_member_model['health_reasons'] = [vpn_gateway_member_health_reason_model] + vpn_gateway_member_model['health_reasons'] = [ + vpn_gateway_member_health_reason_model + ] vpn_gateway_member_model['health_state'] = 'ok' - vpn_gateway_member_model['lifecycle_reasons'] = [vpn_gateway_member_lifecycle_reason_model] + vpn_gateway_member_model['lifecycle_reasons'] = [ + vpn_gateway_member_lifecycle_reason_model + ] vpn_gateway_member_model['lifecycle_state'] = 'stable' vpn_gateway_member_model['private_ip'] = reserved_ip_reference_model vpn_gateway_member_model['public_ip'] = ip_model vpn_gateway_member_model['role'] = 'active' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' vpn_gateway_model = {} # VPNGatewayRouteMode - vpn_gateway_model['connections'] = [vpn_gateway_connection_reference_model] + vpn_gateway_model['connections'] = [ + vpn_gateway_connection_reference_model + ] vpn_gateway_model['created_at'] = '2019-01-01T12:00:00Z' - vpn_gateway_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' vpn_gateway_model['health_reasons'] = [vpn_gateway_health_reason_model] vpn_gateway_model['health_state'] = 'ok' - vpn_gateway_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' vpn_gateway_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_model['lifecycle_reasons'] = [vpn_gateway_lifecycle_reason_model] + vpn_gateway_model['lifecycle_reasons'] = [ + vpn_gateway_lifecycle_reason_model + ] vpn_gateway_model['lifecycle_state'] = 'stable' vpn_gateway_model['members'] = [vpn_gateway_member_model] vpn_gateway_model['name'] = 'my-vpn-gateway' @@ -71356,25 +81827,31 @@ def test_vpn_gateway_collection_serialization(self): # Construct a json representation of a VPNGatewayCollection model vpn_gateway_collection_model_json = {} - vpn_gateway_collection_model_json['first'] = vpn_gateway_collection_first_model + vpn_gateway_collection_model_json[ + 'first'] = vpn_gateway_collection_first_model vpn_gateway_collection_model_json['limit'] = 20 - vpn_gateway_collection_model_json['next'] = vpn_gateway_collection_next_model + vpn_gateway_collection_model_json[ + 'next'] = vpn_gateway_collection_next_model vpn_gateway_collection_model_json['total_count'] = 132 vpn_gateway_collection_model_json['vpn_gateways'] = [vpn_gateway_model] # Construct a model instance of VPNGatewayCollection by calling from_dict on the json representation - vpn_gateway_collection_model = VPNGatewayCollection.from_dict(vpn_gateway_collection_model_json) + vpn_gateway_collection_model = VPNGatewayCollection.from_dict( + vpn_gateway_collection_model_json) assert vpn_gateway_collection_model != False # Construct a model instance of VPNGatewayCollection by calling from_dict on the json representation - vpn_gateway_collection_model_dict = VPNGatewayCollection.from_dict(vpn_gateway_collection_model_json).__dict__ - vpn_gateway_collection_model2 = VPNGatewayCollection(**vpn_gateway_collection_model_dict) + vpn_gateway_collection_model_dict = VPNGatewayCollection.from_dict( + vpn_gateway_collection_model_json).__dict__ + vpn_gateway_collection_model2 = VPNGatewayCollection( + **vpn_gateway_collection_model_dict) # Verify the model instances are equivalent assert vpn_gateway_collection_model == vpn_gateway_collection_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_collection_model_json2 = vpn_gateway_collection_model.to_dict() + vpn_gateway_collection_model_json2 = vpn_gateway_collection_model.to_dict( + ) assert vpn_gateway_collection_model_json2 == vpn_gateway_collection_model_json @@ -71390,21 +81867,26 @@ def test_vpn_gateway_collection_first_serialization(self): # Construct a json representation of a VPNGatewayCollectionFirst model vpn_gateway_collection_first_model_json = {} - vpn_gateway_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20' + vpn_gateway_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20' # Construct a model instance of VPNGatewayCollectionFirst by calling from_dict on the json representation - vpn_gateway_collection_first_model = VPNGatewayCollectionFirst.from_dict(vpn_gateway_collection_first_model_json) + vpn_gateway_collection_first_model = VPNGatewayCollectionFirst.from_dict( + vpn_gateway_collection_first_model_json) assert vpn_gateway_collection_first_model != False # Construct a model instance of VPNGatewayCollectionFirst by calling from_dict on the json representation - vpn_gateway_collection_first_model_dict = VPNGatewayCollectionFirst.from_dict(vpn_gateway_collection_first_model_json).__dict__ - vpn_gateway_collection_first_model2 = VPNGatewayCollectionFirst(**vpn_gateway_collection_first_model_dict) + vpn_gateway_collection_first_model_dict = VPNGatewayCollectionFirst.from_dict( + vpn_gateway_collection_first_model_json).__dict__ + vpn_gateway_collection_first_model2 = VPNGatewayCollectionFirst( + **vpn_gateway_collection_first_model_dict) # Verify the model instances are equivalent assert vpn_gateway_collection_first_model == vpn_gateway_collection_first_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_collection_first_model_json2 = vpn_gateway_collection_first_model.to_dict() + vpn_gateway_collection_first_model_json2 = vpn_gateway_collection_first_model.to_dict( + ) assert vpn_gateway_collection_first_model_json2 == vpn_gateway_collection_first_model_json @@ -71420,21 +81902,26 @@ def test_vpn_gateway_collection_next_serialization(self): # Construct a json representation of a VPNGatewayCollectionNext model vpn_gateway_collection_next_model_json = {} - vpn_gateway_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' + vpn_gateway_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20' # Construct a model instance of VPNGatewayCollectionNext by calling from_dict on the json representation - vpn_gateway_collection_next_model = VPNGatewayCollectionNext.from_dict(vpn_gateway_collection_next_model_json) + vpn_gateway_collection_next_model = VPNGatewayCollectionNext.from_dict( + vpn_gateway_collection_next_model_json) assert vpn_gateway_collection_next_model != False # Construct a model instance of VPNGatewayCollectionNext by calling from_dict on the json representation - vpn_gateway_collection_next_model_dict = VPNGatewayCollectionNext.from_dict(vpn_gateway_collection_next_model_json).__dict__ - vpn_gateway_collection_next_model2 = VPNGatewayCollectionNext(**vpn_gateway_collection_next_model_dict) + vpn_gateway_collection_next_model_dict = VPNGatewayCollectionNext.from_dict( + vpn_gateway_collection_next_model_json).__dict__ + vpn_gateway_collection_next_model2 = VPNGatewayCollectionNext( + **vpn_gateway_collection_next_model_dict) # Verify the model instances are equivalent assert vpn_gateway_collection_next_model == vpn_gateway_collection_next_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_collection_next_model_json2 = vpn_gateway_collection_next_model.to_dict() + vpn_gateway_collection_next_model_json2 = vpn_gateway_collection_next_model.to_dict( + ) assert vpn_gateway_collection_next_model_json2 == vpn_gateway_collection_next_model_json @@ -71450,21 +81937,25 @@ def test_vpn_gateway_connection_cid_rs_serialization(self): # Construct a json representation of a VPNGatewayConnectionCIDRs model vpn_gateway_connection_cid_rs_model_json = {} - vpn_gateway_connection_cid_rs_model_json['cidrs'] = ['testString'] + vpn_gateway_connection_cid_rs_model_json['cidrs'] = ['192.168.1.0/24'] # Construct a model instance of VPNGatewayConnectionCIDRs by calling from_dict on the json representation - vpn_gateway_connection_cid_rs_model = VPNGatewayConnectionCIDRs.from_dict(vpn_gateway_connection_cid_rs_model_json) + vpn_gateway_connection_cid_rs_model = VPNGatewayConnectionCIDRs.from_dict( + vpn_gateway_connection_cid_rs_model_json) assert vpn_gateway_connection_cid_rs_model != False # Construct a model instance of VPNGatewayConnectionCIDRs by calling from_dict on the json representation - vpn_gateway_connection_cid_rs_model_dict = VPNGatewayConnectionCIDRs.from_dict(vpn_gateway_connection_cid_rs_model_json).__dict__ - vpn_gateway_connection_cid_rs_model2 = VPNGatewayConnectionCIDRs(**vpn_gateway_connection_cid_rs_model_dict) + vpn_gateway_connection_cid_rs_model_dict = VPNGatewayConnectionCIDRs.from_dict( + vpn_gateway_connection_cid_rs_model_json).__dict__ + vpn_gateway_connection_cid_rs_model2 = VPNGatewayConnectionCIDRs( + **vpn_gateway_connection_cid_rs_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_cid_rs_model == vpn_gateway_connection_cid_rs_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_cid_rs_model_json2 = vpn_gateway_connection_cid_rs_model.to_dict() + vpn_gateway_connection_cid_rs_model_json2 = vpn_gateway_connection_cid_rs_model.to_dict( + ) assert vpn_gateway_connection_cid_rs_model_json2 == vpn_gateway_connection_cid_rs_model_json @@ -71481,101 +81972,212 @@ def test_vpn_gateway_connection_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD - vpn_gateway_connection_dpd_model['action'] = 'restart' - vpn_gateway_connection_dpd_model['interval'] = 30 - vpn_gateway_connection_dpd_model['timeout'] = 120 + vpn_gateway_connection_dpd_model['action'] = 'none' + vpn_gateway_connection_dpd_model['interval'] = 15 + vpn_gateway_connection_dpd_model['timeout'] = 30 ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted - ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + ike_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' ike_policy_reference_model = {} # IKEPolicyReference - ike_policy_reference_model['deleted'] = ike_policy_reference_deleted_model - ike_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - ike_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'deleted'] = ike_policy_reference_deleted_model + ike_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_reference_model['name'] = 'my-ike-policy' ike_policy_reference_model['resource_type'] = 'ike_policy' - i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted - i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + i_psec_policy_reference_deleted_model = { + } # IPsecPolicyReferenceDeleted + i_psec_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' i_psec_policy_reference_model = {} # IPsecPolicyReference - i_psec_policy_reference_model['deleted'] = i_psec_policy_reference_deleted_model - i_psec_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - i_psec_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'deleted'] = i_psec_policy_reference_deleted_model + i_psec_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_reference_model['name'] = 'my-ipsec-policy' i_psec_policy_reference_model['resource_type'] = 'ipsec_policy' - vpn_gateway_connection_status_reason_model = {} # VPNGatewayConnectionStatusReason - vpn_gateway_connection_status_reason_model['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_status_reason_model['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' - - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN - vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' - - vpn_gateway_connection_static_route_mode_local_model = {} # VPNGatewayConnectionStaticRouteModeLocal - vpn_gateway_connection_static_route_mode_local_model['ike_identities'] = [vpn_gateway_connection_ike_identity_model] - - vpn_gateway_connection_static_route_mode_peer_model = {} # VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress - vpn_gateway_connection_static_route_mode_peer_model['ike_identity'] = vpn_gateway_connection_ike_identity_model - vpn_gateway_connection_static_route_mode_peer_model['type'] = 'address' - vpn_gateway_connection_static_route_mode_peer_model['address'] = '169.21.50.5' - - ip_model = {} # IP - ip_model['address'] = '192.168.3.4' - - vpn_gateway_connection_tunnel_status_reason_model = {} # VPNGatewayConnectionTunnelStatusReason - vpn_gateway_connection_tunnel_status_reason_model['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_tunnel_status_reason_model['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_tunnel_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' - - vpn_gateway_connection_static_route_mode_tunnel_model = {} # VPNGatewayConnectionStaticRouteModeTunnel - vpn_gateway_connection_static_route_mode_tunnel_model['public_ip'] = ip_model - vpn_gateway_connection_static_route_mode_tunnel_model['status'] = 'down' - vpn_gateway_connection_static_route_mode_tunnel_model['status_reasons'] = [vpn_gateway_connection_tunnel_status_reason_model] + vpn_gateway_connection_status_reason_model = { + } # VPNGatewayConnectionStatusReason + vpn_gateway_connection_status_reason_model[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_status_reason_model[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model['type'] = 'ipv4_address' + vpn_gateway_connection_ike_identity_model['value'] = '192.0.2.4' + + vpn_gateway_connection_policy_mode_local_model = { + } # VPNGatewayConnectionPolicyModeLocal + vpn_gateway_connection_policy_mode_local_model['cidrs'] = [ + '192.0.2.0/24' + ] + vpn_gateway_connection_policy_mode_local_model['ike_identities'] = [ + vpn_gateway_connection_ike_identity_model + ] + + vpn_gateway_connection_policy_mode_peer_model = { + } # VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress + vpn_gateway_connection_policy_mode_peer_model['cidrs'] = [ + '192.0.3.0/24' + ] + vpn_gateway_connection_policy_mode_peer_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_policy_mode_peer_model['type'] = 'address' + vpn_gateway_connection_policy_mode_peer_model['address'] = '192.0.2.5' - vpn_gateway_connection_model = {} # VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode + vpn_gateway_connection_model = {} # VPNGatewayConnectionPolicyMode vpn_gateway_connection_model['admin_state_up'] = True vpn_gateway_connection_model['authentication_mode'] = 'psk' - vpn_gateway_connection_model['created_at'] = '2019-01-01T12:00:00Z' - vpn_gateway_connection_model['dead_peer_detection'] = vpn_gateway_connection_dpd_model - vpn_gateway_connection_model['establish_mode'] = 'bidirectional' - vpn_gateway_connection_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_model[ + 'created_at'] = '2018-12-13T19:40:12.124000Z' + vpn_gateway_connection_model[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_model + vpn_gateway_connection_model['establish_mode'] = 'peer_only' + vpn_gateway_connection_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/52f69dc3-6a5c-4bcf-b264-e7fae279b15c' + vpn_gateway_connection_model[ + 'id'] = '52f69dc3-6a5c-4bcf-b264-e7fae279b15c' vpn_gateway_connection_model['ike_policy'] = ike_policy_reference_model - vpn_gateway_connection_model['ipsec_policy'] = i_psec_policy_reference_model - vpn_gateway_connection_model['mode'] = 'route' - vpn_gateway_connection_model['name'] = 'my-vpn-connection' + vpn_gateway_connection_model[ + 'ipsec_policy'] = i_psec_policy_reference_model + vpn_gateway_connection_model['mode'] = 'policy' + vpn_gateway_connection_model['name'] = 'my-vpn-connection-1' vpn_gateway_connection_model['psk'] = 'lkj14b1oi0alcniejkso' vpn_gateway_connection_model['resource_type'] = 'vpn_gateway_connection' vpn_gateway_connection_model['status'] = 'down' - vpn_gateway_connection_model['status_reasons'] = [vpn_gateway_connection_status_reason_model] - vpn_gateway_connection_model['local'] = vpn_gateway_connection_static_route_mode_local_model - vpn_gateway_connection_model['peer'] = vpn_gateway_connection_static_route_mode_peer_model - vpn_gateway_connection_model['routing_protocol'] = 'none' - vpn_gateway_connection_model['tunnels'] = [vpn_gateway_connection_static_route_mode_tunnel_model] + vpn_gateway_connection_model['status_reasons'] = [ + vpn_gateway_connection_status_reason_model + ] + vpn_gateway_connection_model[ + 'local'] = vpn_gateway_connection_policy_mode_local_model + vpn_gateway_connection_model[ + 'peer'] = vpn_gateway_connection_policy_mode_peer_model + + vpn_gateway_connection_collection_first_model = { + } # VPNGatewayConnectionCollectionFirst + vpn_gateway_connection_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?limit=20' + + vpn_gateway_connection_collection_next_model = { + } # VPNGatewayConnectionCollectionNext + vpn_gateway_connection_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?start=b67efb2c-bd17-457d-be8e-7b46404062dc&limit=20' # Construct a json representation of a VPNGatewayConnectionCollection model vpn_gateway_connection_collection_model_json = {} - vpn_gateway_connection_collection_model_json['connections'] = [vpn_gateway_connection_model] + vpn_gateway_connection_collection_model_json['connections'] = [ + vpn_gateway_connection_model + ] + vpn_gateway_connection_collection_model_json[ + 'first'] = vpn_gateway_connection_collection_first_model + vpn_gateway_connection_collection_model_json['limit'] = 20 + vpn_gateway_connection_collection_model_json[ + 'next'] = vpn_gateway_connection_collection_next_model + vpn_gateway_connection_collection_model_json['total_count'] = 132 # Construct a model instance of VPNGatewayConnectionCollection by calling from_dict on the json representation - vpn_gateway_connection_collection_model = VPNGatewayConnectionCollection.from_dict(vpn_gateway_connection_collection_model_json) + vpn_gateway_connection_collection_model = VPNGatewayConnectionCollection.from_dict( + vpn_gateway_connection_collection_model_json) assert vpn_gateway_connection_collection_model != False # Construct a model instance of VPNGatewayConnectionCollection by calling from_dict on the json representation - vpn_gateway_connection_collection_model_dict = VPNGatewayConnectionCollection.from_dict(vpn_gateway_connection_collection_model_json).__dict__ - vpn_gateway_connection_collection_model2 = VPNGatewayConnectionCollection(**vpn_gateway_connection_collection_model_dict) + vpn_gateway_connection_collection_model_dict = VPNGatewayConnectionCollection.from_dict( + vpn_gateway_connection_collection_model_json).__dict__ + vpn_gateway_connection_collection_model2 = VPNGatewayConnectionCollection( + **vpn_gateway_connection_collection_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_collection_model == vpn_gateway_connection_collection_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_collection_model_json2 = vpn_gateway_connection_collection_model.to_dict() + vpn_gateway_connection_collection_model_json2 = vpn_gateway_connection_collection_model.to_dict( + ) assert vpn_gateway_connection_collection_model_json2 == vpn_gateway_connection_collection_model_json +class TestModel_VPNGatewayConnectionCollectionFirst: + """ + Test Class for VPNGatewayConnectionCollectionFirst + """ + + def test_vpn_gateway_connection_collection_first_serialization(self): + """ + Test serialization/deserialization for VPNGatewayConnectionCollectionFirst + """ + + # Construct a json representation of a VPNGatewayConnectionCollectionFirst model + vpn_gateway_connection_collection_first_model_json = {} + vpn_gateway_connection_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?limit=20' + + # Construct a model instance of VPNGatewayConnectionCollectionFirst by calling from_dict on the json representation + vpn_gateway_connection_collection_first_model = VPNGatewayConnectionCollectionFirst.from_dict( + vpn_gateway_connection_collection_first_model_json) + assert vpn_gateway_connection_collection_first_model != False + + # Construct a model instance of VPNGatewayConnectionCollectionFirst by calling from_dict on the json representation + vpn_gateway_connection_collection_first_model_dict = VPNGatewayConnectionCollectionFirst.from_dict( + vpn_gateway_connection_collection_first_model_json).__dict__ + vpn_gateway_connection_collection_first_model2 = VPNGatewayConnectionCollectionFirst( + **vpn_gateway_connection_collection_first_model_dict) + + # Verify the model instances are equivalent + assert vpn_gateway_connection_collection_first_model == vpn_gateway_connection_collection_first_model2 + + # Convert model instance back to dict and verify no loss of data + vpn_gateway_connection_collection_first_model_json2 = vpn_gateway_connection_collection_first_model.to_dict( + ) + assert vpn_gateway_connection_collection_first_model_json2 == vpn_gateway_connection_collection_first_model_json + + +class TestModel_VPNGatewayConnectionCollectionNext: + """ + Test Class for VPNGatewayConnectionCollectionNext + """ + + def test_vpn_gateway_connection_collection_next_serialization(self): + """ + Test serialization/deserialization for VPNGatewayConnectionCollectionNext + """ + + # Construct a json representation of a VPNGatewayConnectionCollectionNext model + vpn_gateway_connection_collection_next_model_json = {} + vpn_gateway_connection_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?start=b67efb2c-bd17-457d-be8e-7b46404062dc&limit=20' + + # Construct a model instance of VPNGatewayConnectionCollectionNext by calling from_dict on the json representation + vpn_gateway_connection_collection_next_model = VPNGatewayConnectionCollectionNext.from_dict( + vpn_gateway_connection_collection_next_model_json) + assert vpn_gateway_connection_collection_next_model != False + + # Construct a model instance of VPNGatewayConnectionCollectionNext by calling from_dict on the json representation + vpn_gateway_connection_collection_next_model_dict = VPNGatewayConnectionCollectionNext.from_dict( + vpn_gateway_connection_collection_next_model_json).__dict__ + vpn_gateway_connection_collection_next_model2 = VPNGatewayConnectionCollectionNext( + **vpn_gateway_connection_collection_next_model_dict) + + # Verify the model instances are equivalent + assert vpn_gateway_connection_collection_next_model == vpn_gateway_connection_collection_next_model2 + + # Convert model instance back to dict and verify no loss of data + vpn_gateway_connection_collection_next_model_json2 = vpn_gateway_connection_collection_next_model.to_dict( + ) + assert vpn_gateway_connection_collection_next_model_json2 == vpn_gateway_connection_collection_next_model_json + + class TestModel_VPNGatewayConnectionDPD: """ Test Class for VPNGatewayConnectionDPD @@ -71593,18 +82195,22 @@ def test_vpn_gateway_connection_dpd_serialization(self): vpn_gateway_connection_dpd_model_json['timeout'] = 120 # Construct a model instance of VPNGatewayConnectionDPD by calling from_dict on the json representation - vpn_gateway_connection_dpd_model = VPNGatewayConnectionDPD.from_dict(vpn_gateway_connection_dpd_model_json) + vpn_gateway_connection_dpd_model = VPNGatewayConnectionDPD.from_dict( + vpn_gateway_connection_dpd_model_json) assert vpn_gateway_connection_dpd_model != False # Construct a model instance of VPNGatewayConnectionDPD by calling from_dict on the json representation - vpn_gateway_connection_dpd_model_dict = VPNGatewayConnectionDPD.from_dict(vpn_gateway_connection_dpd_model_json).__dict__ - vpn_gateway_connection_dpd_model2 = VPNGatewayConnectionDPD(**vpn_gateway_connection_dpd_model_dict) + vpn_gateway_connection_dpd_model_dict = VPNGatewayConnectionDPD.from_dict( + vpn_gateway_connection_dpd_model_json).__dict__ + vpn_gateway_connection_dpd_model2 = VPNGatewayConnectionDPD( + **vpn_gateway_connection_dpd_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_dpd_model == vpn_gateway_connection_dpd_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_dpd_model_json2 = vpn_gateway_connection_dpd_model.to_dict() + vpn_gateway_connection_dpd_model_json2 = vpn_gateway_connection_dpd_model.to_dict( + ) assert vpn_gateway_connection_dpd_model_json2 == vpn_gateway_connection_dpd_model_json @@ -71625,18 +82231,22 @@ def test_vpn_gateway_connection_dpd_patch_serialization(self): vpn_gateway_connection_dpd_patch_model_json['timeout'] = 120 # Construct a model instance of VPNGatewayConnectionDPDPatch by calling from_dict on the json representation - vpn_gateway_connection_dpd_patch_model = VPNGatewayConnectionDPDPatch.from_dict(vpn_gateway_connection_dpd_patch_model_json) + vpn_gateway_connection_dpd_patch_model = VPNGatewayConnectionDPDPatch.from_dict( + vpn_gateway_connection_dpd_patch_model_json) assert vpn_gateway_connection_dpd_patch_model != False # Construct a model instance of VPNGatewayConnectionDPDPatch by calling from_dict on the json representation - vpn_gateway_connection_dpd_patch_model_dict = VPNGatewayConnectionDPDPatch.from_dict(vpn_gateway_connection_dpd_patch_model_json).__dict__ - vpn_gateway_connection_dpd_patch_model2 = VPNGatewayConnectionDPDPatch(**vpn_gateway_connection_dpd_patch_model_dict) + vpn_gateway_connection_dpd_patch_model_dict = VPNGatewayConnectionDPDPatch.from_dict( + vpn_gateway_connection_dpd_patch_model_json).__dict__ + vpn_gateway_connection_dpd_patch_model2 = VPNGatewayConnectionDPDPatch( + **vpn_gateway_connection_dpd_patch_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_dpd_patch_model == vpn_gateway_connection_dpd_patch_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_dpd_patch_model_json2 = vpn_gateway_connection_dpd_patch_model.to_dict() + vpn_gateway_connection_dpd_patch_model_json2 = vpn_gateway_connection_dpd_patch_model.to_dict( + ) assert vpn_gateway_connection_dpd_patch_model_json2 == vpn_gateway_connection_dpd_patch_model_json @@ -71657,18 +82267,22 @@ def test_vpn_gateway_connection_dpd_prototype_serialization(self): vpn_gateway_connection_dpd_prototype_model_json['timeout'] = 120 # Construct a model instance of VPNGatewayConnectionDPDPrototype by calling from_dict on the json representation - vpn_gateway_connection_dpd_prototype_model = VPNGatewayConnectionDPDPrototype.from_dict(vpn_gateway_connection_dpd_prototype_model_json) + vpn_gateway_connection_dpd_prototype_model = VPNGatewayConnectionDPDPrototype.from_dict( + vpn_gateway_connection_dpd_prototype_model_json) assert vpn_gateway_connection_dpd_prototype_model != False # Construct a model instance of VPNGatewayConnectionDPDPrototype by calling from_dict on the json representation - vpn_gateway_connection_dpd_prototype_model_dict = VPNGatewayConnectionDPDPrototype.from_dict(vpn_gateway_connection_dpd_prototype_model_json).__dict__ - vpn_gateway_connection_dpd_prototype_model2 = VPNGatewayConnectionDPDPrototype(**vpn_gateway_connection_dpd_prototype_model_dict) + vpn_gateway_connection_dpd_prototype_model_dict = VPNGatewayConnectionDPDPrototype.from_dict( + vpn_gateway_connection_dpd_prototype_model_json).__dict__ + vpn_gateway_connection_dpd_prototype_model2 = VPNGatewayConnectionDPDPrototype( + **vpn_gateway_connection_dpd_prototype_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_dpd_prototype_model == vpn_gateway_connection_dpd_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_dpd_prototype_model_json2 = vpn_gateway_connection_dpd_prototype_model.to_dict() + vpn_gateway_connection_dpd_prototype_model_json2 = vpn_gateway_connection_dpd_prototype_model.to_dict( + ) assert vpn_gateway_connection_dpd_prototype_model_json2 == vpn_gateway_connection_dpd_prototype_model_json @@ -71684,45 +82298,59 @@ def test_vpn_gateway_connection_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_dpd_patch_model = {} # VPNGatewayConnectionDPDPatch + vpn_gateway_connection_dpd_patch_model = { + } # VPNGatewayConnectionDPDPatch vpn_gateway_connection_dpd_patch_model['action'] = 'restart' vpn_gateway_connection_dpd_patch_model['interval'] = 30 vpn_gateway_connection_dpd_patch_model['timeout'] = 120 - vpn_gateway_connection_ike_policy_patch_model = {} # VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById - vpn_gateway_connection_ike_policy_patch_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_patch_model = { + } # VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById + vpn_gateway_connection_ike_policy_patch_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_connection_i_psec_policy_patch_model = {} # VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById - vpn_gateway_connection_i_psec_policy_patch_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_patch_model = { + } # VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById + vpn_gateway_connection_i_psec_policy_patch_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_connection_peer_patch_model = {} # VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch + vpn_gateway_connection_peer_patch_model = { + } # VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch vpn_gateway_connection_peer_patch_model['address'] = '169.21.50.5' # Construct a json representation of a VPNGatewayConnectionPatch model vpn_gateway_connection_patch_model_json = {} vpn_gateway_connection_patch_model_json['admin_state_up'] = True - vpn_gateway_connection_patch_model_json['dead_peer_detection'] = vpn_gateway_connection_dpd_patch_model - vpn_gateway_connection_patch_model_json['establish_mode'] = 'bidirectional' - vpn_gateway_connection_patch_model_json['ike_policy'] = vpn_gateway_connection_ike_policy_patch_model - vpn_gateway_connection_patch_model_json['ipsec_policy'] = vpn_gateway_connection_i_psec_policy_patch_model + vpn_gateway_connection_patch_model_json[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_patch_model + vpn_gateway_connection_patch_model_json[ + 'establish_mode'] = 'bidirectional' + vpn_gateway_connection_patch_model_json[ + 'ike_policy'] = vpn_gateway_connection_ike_policy_patch_model + vpn_gateway_connection_patch_model_json[ + 'ipsec_policy'] = vpn_gateway_connection_i_psec_policy_patch_model vpn_gateway_connection_patch_model_json['name'] = 'my-vpn-connection' - vpn_gateway_connection_patch_model_json['peer'] = vpn_gateway_connection_peer_patch_model + vpn_gateway_connection_patch_model_json[ + 'peer'] = vpn_gateway_connection_peer_patch_model vpn_gateway_connection_patch_model_json['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_patch_model_json['routing_protocol'] = 'none' # Construct a model instance of VPNGatewayConnectionPatch by calling from_dict on the json representation - vpn_gateway_connection_patch_model = VPNGatewayConnectionPatch.from_dict(vpn_gateway_connection_patch_model_json) + vpn_gateway_connection_patch_model = VPNGatewayConnectionPatch.from_dict( + vpn_gateway_connection_patch_model_json) assert vpn_gateway_connection_patch_model != False # Construct a model instance of VPNGatewayConnectionPatch by calling from_dict on the json representation - vpn_gateway_connection_patch_model_dict = VPNGatewayConnectionPatch.from_dict(vpn_gateway_connection_patch_model_json).__dict__ - vpn_gateway_connection_patch_model2 = VPNGatewayConnectionPatch(**vpn_gateway_connection_patch_model_dict) + vpn_gateway_connection_patch_model_dict = VPNGatewayConnectionPatch.from_dict( + vpn_gateway_connection_patch_model_json).__dict__ + vpn_gateway_connection_patch_model2 = VPNGatewayConnectionPatch( + **vpn_gateway_connection_patch_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_patch_model == vpn_gateway_connection_patch_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_patch_model_json2 = vpn_gateway_connection_patch_model.to_dict() + vpn_gateway_connection_patch_model_json2 = vpn_gateway_connection_patch_model.to_dict( + ) assert vpn_gateway_connection_patch_model_json2 == vpn_gateway_connection_patch_model_json @@ -71738,28 +82366,37 @@ def test_vpn_gateway_connection_policy_mode_local_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionPolicyModeLocal model vpn_gateway_connection_policy_mode_local_model_json = {} - vpn_gateway_connection_policy_mode_local_model_json['cidrs'] = ['testString'] - vpn_gateway_connection_policy_mode_local_model_json['ike_identities'] = [vpn_gateway_connection_ike_identity_model] + vpn_gateway_connection_policy_mode_local_model_json['cidrs'] = [ + '192.168.1.0/24' + ] + vpn_gateway_connection_policy_mode_local_model_json[ + 'ike_identities'] = [vpn_gateway_connection_ike_identity_model] # Construct a model instance of VPNGatewayConnectionPolicyModeLocal by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_local_model = VPNGatewayConnectionPolicyModeLocal.from_dict(vpn_gateway_connection_policy_mode_local_model_json) + vpn_gateway_connection_policy_mode_local_model = VPNGatewayConnectionPolicyModeLocal.from_dict( + vpn_gateway_connection_policy_mode_local_model_json) assert vpn_gateway_connection_policy_mode_local_model != False # Construct a model instance of VPNGatewayConnectionPolicyModeLocal by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_local_model_dict = VPNGatewayConnectionPolicyModeLocal.from_dict(vpn_gateway_connection_policy_mode_local_model_json).__dict__ - vpn_gateway_connection_policy_mode_local_model2 = VPNGatewayConnectionPolicyModeLocal(**vpn_gateway_connection_policy_mode_local_model_dict) + vpn_gateway_connection_policy_mode_local_model_dict = VPNGatewayConnectionPolicyModeLocal.from_dict( + vpn_gateway_connection_policy_mode_local_model_json).__dict__ + vpn_gateway_connection_policy_mode_local_model2 = VPNGatewayConnectionPolicyModeLocal( + **vpn_gateway_connection_policy_mode_local_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_policy_mode_local_model == vpn_gateway_connection_policy_mode_local_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_policy_mode_local_model_json2 = vpn_gateway_connection_policy_mode_local_model.to_dict() + vpn_gateway_connection_policy_mode_local_model_json2 = vpn_gateway_connection_policy_mode_local_model.to_dict( + ) assert vpn_gateway_connection_policy_mode_local_model_json2 == vpn_gateway_connection_policy_mode_local_model_json @@ -71768,35 +82405,47 @@ class TestModel_VPNGatewayConnectionPolicyModeLocalPrototype: Test Class for VPNGatewayConnectionPolicyModeLocalPrototype """ - def test_vpn_gateway_connection_policy_mode_local_prototype_serialization(self): + def test_vpn_gateway_connection_policy_mode_local_prototype_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPolicyModeLocalPrototype """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionPolicyModeLocalPrototype model vpn_gateway_connection_policy_mode_local_prototype_model_json = {} - vpn_gateway_connection_policy_mode_local_prototype_model_json['cidrs'] = ['testString'] - vpn_gateway_connection_policy_mode_local_prototype_model_json['ike_identities'] = [vpn_gateway_connection_ike_identity_prototype_model] + vpn_gateway_connection_policy_mode_local_prototype_model_json[ + 'cidrs'] = ['192.168.1.0/24'] + vpn_gateway_connection_policy_mode_local_prototype_model_json[ + 'ike_identities'] = [ + vpn_gateway_connection_ike_identity_prototype_model + ] # Construct a model instance of VPNGatewayConnectionPolicyModeLocalPrototype by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_local_prototype_model = VPNGatewayConnectionPolicyModeLocalPrototype.from_dict(vpn_gateway_connection_policy_mode_local_prototype_model_json) + vpn_gateway_connection_policy_mode_local_prototype_model = VPNGatewayConnectionPolicyModeLocalPrototype.from_dict( + vpn_gateway_connection_policy_mode_local_prototype_model_json) assert vpn_gateway_connection_policy_mode_local_prototype_model != False # Construct a model instance of VPNGatewayConnectionPolicyModeLocalPrototype by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_local_prototype_model_dict = VPNGatewayConnectionPolicyModeLocalPrototype.from_dict(vpn_gateway_connection_policy_mode_local_prototype_model_json).__dict__ - vpn_gateway_connection_policy_mode_local_prototype_model2 = VPNGatewayConnectionPolicyModeLocalPrototype(**vpn_gateway_connection_policy_mode_local_prototype_model_dict) + vpn_gateway_connection_policy_mode_local_prototype_model_dict = VPNGatewayConnectionPolicyModeLocalPrototype.from_dict( + vpn_gateway_connection_policy_mode_local_prototype_model_json + ).__dict__ + vpn_gateway_connection_policy_mode_local_prototype_model2 = VPNGatewayConnectionPolicyModeLocalPrototype( + **vpn_gateway_connection_policy_mode_local_prototype_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_policy_mode_local_prototype_model == vpn_gateway_connection_policy_mode_local_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_policy_mode_local_prototype_model_json2 = vpn_gateway_connection_policy_mode_local_prototype_model.to_dict() + vpn_gateway_connection_policy_mode_local_prototype_model_json2 = vpn_gateway_connection_policy_mode_local_prototype_model.to_dict( + ) assert vpn_gateway_connection_policy_mode_local_prototype_model_json2 == vpn_gateway_connection_policy_mode_local_prototype_model_json @@ -71812,30 +82461,41 @@ def test_vpn_gateway_connection_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a VPNGatewayConnectionReference model vpn_gateway_connection_reference_model_json = {} - vpn_gateway_connection_reference_model_json['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model_json['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' - vpn_gateway_connection_reference_model_json['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model_json['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model_json[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model_json[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_reference_model_json[ + 'name'] = 'my-vpn-connection' + vpn_gateway_connection_reference_model_json[ + 'resource_type'] = 'vpn_gateway_connection' # Construct a model instance of VPNGatewayConnectionReference by calling from_dict on the json representation - vpn_gateway_connection_reference_model = VPNGatewayConnectionReference.from_dict(vpn_gateway_connection_reference_model_json) + vpn_gateway_connection_reference_model = VPNGatewayConnectionReference.from_dict( + vpn_gateway_connection_reference_model_json) assert vpn_gateway_connection_reference_model != False # Construct a model instance of VPNGatewayConnectionReference by calling from_dict on the json representation - vpn_gateway_connection_reference_model_dict = VPNGatewayConnectionReference.from_dict(vpn_gateway_connection_reference_model_json).__dict__ - vpn_gateway_connection_reference_model2 = VPNGatewayConnectionReference(**vpn_gateway_connection_reference_model_dict) + vpn_gateway_connection_reference_model_dict = VPNGatewayConnectionReference.from_dict( + vpn_gateway_connection_reference_model_json).__dict__ + vpn_gateway_connection_reference_model2 = VPNGatewayConnectionReference( + **vpn_gateway_connection_reference_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_reference_model == vpn_gateway_connection_reference_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_reference_model_json2 = vpn_gateway_connection_reference_model.to_dict() + vpn_gateway_connection_reference_model_json2 = vpn_gateway_connection_reference_model.to_dict( + ) assert vpn_gateway_connection_reference_model_json2 == vpn_gateway_connection_reference_model_json @@ -71851,21 +82511,26 @@ def test_vpn_gateway_connection_reference_deleted_serialization(self): # Construct a json representation of a VPNGatewayConnectionReferenceDeleted model vpn_gateway_connection_reference_deleted_model_json = {} - vpn_gateway_connection_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_gateway_connection_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VPNGatewayConnectionReferenceDeleted by calling from_dict on the json representation - vpn_gateway_connection_reference_deleted_model = VPNGatewayConnectionReferenceDeleted.from_dict(vpn_gateway_connection_reference_deleted_model_json) + vpn_gateway_connection_reference_deleted_model = VPNGatewayConnectionReferenceDeleted.from_dict( + vpn_gateway_connection_reference_deleted_model_json) assert vpn_gateway_connection_reference_deleted_model != False # Construct a model instance of VPNGatewayConnectionReferenceDeleted by calling from_dict on the json representation - vpn_gateway_connection_reference_deleted_model_dict = VPNGatewayConnectionReferenceDeleted.from_dict(vpn_gateway_connection_reference_deleted_model_json).__dict__ - vpn_gateway_connection_reference_deleted_model2 = VPNGatewayConnectionReferenceDeleted(**vpn_gateway_connection_reference_deleted_model_dict) + vpn_gateway_connection_reference_deleted_model_dict = VPNGatewayConnectionReferenceDeleted.from_dict( + vpn_gateway_connection_reference_deleted_model_json).__dict__ + vpn_gateway_connection_reference_deleted_model2 = VPNGatewayConnectionReferenceDeleted( + **vpn_gateway_connection_reference_deleted_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_reference_deleted_model == vpn_gateway_connection_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_reference_deleted_model_json2 = vpn_gateway_connection_reference_deleted_model.to_dict() + vpn_gateway_connection_reference_deleted_model_json2 = vpn_gateway_connection_reference_deleted_model.to_dict( + ) assert vpn_gateway_connection_reference_deleted_model_json2 == vpn_gateway_connection_reference_deleted_model_json @@ -71881,27 +82546,34 @@ def test_vpn_gateway_connection_static_route_mode_local_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionStaticRouteModeLocal model vpn_gateway_connection_static_route_mode_local_model_json = {} - vpn_gateway_connection_static_route_mode_local_model_json['ike_identities'] = [vpn_gateway_connection_ike_identity_model] + vpn_gateway_connection_static_route_mode_local_model_json[ + 'ike_identities'] = [vpn_gateway_connection_ike_identity_model] # Construct a model instance of VPNGatewayConnectionStaticRouteModeLocal by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_local_model = VPNGatewayConnectionStaticRouteModeLocal.from_dict(vpn_gateway_connection_static_route_mode_local_model_json) + vpn_gateway_connection_static_route_mode_local_model = VPNGatewayConnectionStaticRouteModeLocal.from_dict( + vpn_gateway_connection_static_route_mode_local_model_json) assert vpn_gateway_connection_static_route_mode_local_model != False # Construct a model instance of VPNGatewayConnectionStaticRouteModeLocal by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_local_model_dict = VPNGatewayConnectionStaticRouteModeLocal.from_dict(vpn_gateway_connection_static_route_mode_local_model_json).__dict__ - vpn_gateway_connection_static_route_mode_local_model2 = VPNGatewayConnectionStaticRouteModeLocal(**vpn_gateway_connection_static_route_mode_local_model_dict) + vpn_gateway_connection_static_route_mode_local_model_dict = VPNGatewayConnectionStaticRouteModeLocal.from_dict( + vpn_gateway_connection_static_route_mode_local_model_json).__dict__ + vpn_gateway_connection_static_route_mode_local_model2 = VPNGatewayConnectionStaticRouteModeLocal( + **vpn_gateway_connection_static_route_mode_local_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_static_route_mode_local_model == vpn_gateway_connection_static_route_mode_local_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_static_route_mode_local_model_json2 = vpn_gateway_connection_static_route_mode_local_model.to_dict() + vpn_gateway_connection_static_route_mode_local_model_json2 = vpn_gateway_connection_static_route_mode_local_model.to_dict( + ) assert vpn_gateway_connection_static_route_mode_local_model_json2 == vpn_gateway_connection_static_route_mode_local_model_json @@ -71910,34 +82582,46 @@ class TestModel_VPNGatewayConnectionStaticRouteModeLocalPrototype: Test Class for VPNGatewayConnectionStaticRouteModeLocalPrototype """ - def test_vpn_gateway_connection_static_route_mode_local_prototype_serialization(self): + def test_vpn_gateway_connection_static_route_mode_local_prototype_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionStaticRouteModeLocalPrototype """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionStaticRouteModeLocalPrototype model vpn_gateway_connection_static_route_mode_local_prototype_model_json = {} - vpn_gateway_connection_static_route_mode_local_prototype_model_json['ike_identities'] = [vpn_gateway_connection_ike_identity_prototype_model] + vpn_gateway_connection_static_route_mode_local_prototype_model_json[ + 'ike_identities'] = [ + vpn_gateway_connection_ike_identity_prototype_model + ] # Construct a model instance of VPNGatewayConnectionStaticRouteModeLocalPrototype by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_local_prototype_model = VPNGatewayConnectionStaticRouteModeLocalPrototype.from_dict(vpn_gateway_connection_static_route_mode_local_prototype_model_json) + vpn_gateway_connection_static_route_mode_local_prototype_model = VPNGatewayConnectionStaticRouteModeLocalPrototype.from_dict( + vpn_gateway_connection_static_route_mode_local_prototype_model_json) assert vpn_gateway_connection_static_route_mode_local_prototype_model != False # Construct a model instance of VPNGatewayConnectionStaticRouteModeLocalPrototype by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_local_prototype_model_dict = VPNGatewayConnectionStaticRouteModeLocalPrototype.from_dict(vpn_gateway_connection_static_route_mode_local_prototype_model_json).__dict__ - vpn_gateway_connection_static_route_mode_local_prototype_model2 = VPNGatewayConnectionStaticRouteModeLocalPrototype(**vpn_gateway_connection_static_route_mode_local_prototype_model_dict) + vpn_gateway_connection_static_route_mode_local_prototype_model_dict = VPNGatewayConnectionStaticRouteModeLocalPrototype.from_dict( + vpn_gateway_connection_static_route_mode_local_prototype_model_json + ).__dict__ + vpn_gateway_connection_static_route_mode_local_prototype_model2 = VPNGatewayConnectionStaticRouteModeLocalPrototype( + ** + vpn_gateway_connection_static_route_mode_local_prototype_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_static_route_mode_local_prototype_model == vpn_gateway_connection_static_route_mode_local_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_static_route_mode_local_prototype_model_json2 = vpn_gateway_connection_static_route_mode_local_prototype_model.to_dict() + vpn_gateway_connection_static_route_mode_local_prototype_model_json2 = vpn_gateway_connection_static_route_mode_local_prototype_model.to_dict( + ) assert vpn_gateway_connection_static_route_mode_local_prototype_model_json2 == vpn_gateway_connection_static_route_mode_local_prototype_model_json @@ -71946,7 +82630,8 @@ class TestModel_VPNGatewayConnectionStaticRouteModeTunnel: Test Class for VPNGatewayConnectionStaticRouteModeTunnel """ - def test_vpn_gateway_connection_static_route_mode_tunnel_serialization(self): + def test_vpn_gateway_connection_static_route_mode_tunnel_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionStaticRouteModeTunnel """ @@ -71956,30 +82641,43 @@ def test_vpn_gateway_connection_static_route_mode_tunnel_serialization(self): ip_model = {} # IP ip_model['address'] = '192.168.3.4' - vpn_gateway_connection_tunnel_status_reason_model = {} # VPNGatewayConnectionTunnelStatusReason - vpn_gateway_connection_tunnel_status_reason_model['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_tunnel_status_reason_model['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_tunnel_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + vpn_gateway_connection_tunnel_status_reason_model = { + } # VPNGatewayConnectionTunnelStatusReason + vpn_gateway_connection_tunnel_status_reason_model[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_tunnel_status_reason_model[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_tunnel_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' # Construct a json representation of a VPNGatewayConnectionStaticRouteModeTunnel model vpn_gateway_connection_static_route_mode_tunnel_model_json = {} - vpn_gateway_connection_static_route_mode_tunnel_model_json['public_ip'] = ip_model - vpn_gateway_connection_static_route_mode_tunnel_model_json['status'] = 'down' - vpn_gateway_connection_static_route_mode_tunnel_model_json['status_reasons'] = [vpn_gateway_connection_tunnel_status_reason_model] + vpn_gateway_connection_static_route_mode_tunnel_model_json[ + 'public_ip'] = ip_model + vpn_gateway_connection_static_route_mode_tunnel_model_json[ + 'status'] = 'down' + vpn_gateway_connection_static_route_mode_tunnel_model_json[ + 'status_reasons'] = [ + vpn_gateway_connection_tunnel_status_reason_model + ] # Construct a model instance of VPNGatewayConnectionStaticRouteModeTunnel by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_tunnel_model = VPNGatewayConnectionStaticRouteModeTunnel.from_dict(vpn_gateway_connection_static_route_mode_tunnel_model_json) + vpn_gateway_connection_static_route_mode_tunnel_model = VPNGatewayConnectionStaticRouteModeTunnel.from_dict( + vpn_gateway_connection_static_route_mode_tunnel_model_json) assert vpn_gateway_connection_static_route_mode_tunnel_model != False # Construct a model instance of VPNGatewayConnectionStaticRouteModeTunnel by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_tunnel_model_dict = VPNGatewayConnectionStaticRouteModeTunnel.from_dict(vpn_gateway_connection_static_route_mode_tunnel_model_json).__dict__ - vpn_gateway_connection_static_route_mode_tunnel_model2 = VPNGatewayConnectionStaticRouteModeTunnel(**vpn_gateway_connection_static_route_mode_tunnel_model_dict) + vpn_gateway_connection_static_route_mode_tunnel_model_dict = VPNGatewayConnectionStaticRouteModeTunnel.from_dict( + vpn_gateway_connection_static_route_mode_tunnel_model_json).__dict__ + vpn_gateway_connection_static_route_mode_tunnel_model2 = VPNGatewayConnectionStaticRouteModeTunnel( + **vpn_gateway_connection_static_route_mode_tunnel_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_static_route_mode_tunnel_model == vpn_gateway_connection_static_route_mode_tunnel_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_static_route_mode_tunnel_model_json2 = vpn_gateway_connection_static_route_mode_tunnel_model.to_dict() + vpn_gateway_connection_static_route_mode_tunnel_model_json2 = vpn_gateway_connection_static_route_mode_tunnel_model.to_dict( + ) assert vpn_gateway_connection_static_route_mode_tunnel_model_json2 == vpn_gateway_connection_static_route_mode_tunnel_model_json @@ -71995,23 +82693,30 @@ def test_vpn_gateway_connection_status_reason_serialization(self): # Construct a json representation of a VPNGatewayConnectionStatusReason model vpn_gateway_connection_status_reason_model_json = {} - vpn_gateway_connection_status_reason_model_json['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_status_reason_model_json['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + vpn_gateway_connection_status_reason_model_json[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_status_reason_model_json[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' # Construct a model instance of VPNGatewayConnectionStatusReason by calling from_dict on the json representation - vpn_gateway_connection_status_reason_model = VPNGatewayConnectionStatusReason.from_dict(vpn_gateway_connection_status_reason_model_json) + vpn_gateway_connection_status_reason_model = VPNGatewayConnectionStatusReason.from_dict( + vpn_gateway_connection_status_reason_model_json) assert vpn_gateway_connection_status_reason_model != False # Construct a model instance of VPNGatewayConnectionStatusReason by calling from_dict on the json representation - vpn_gateway_connection_status_reason_model_dict = VPNGatewayConnectionStatusReason.from_dict(vpn_gateway_connection_status_reason_model_json).__dict__ - vpn_gateway_connection_status_reason_model2 = VPNGatewayConnectionStatusReason(**vpn_gateway_connection_status_reason_model_dict) + vpn_gateway_connection_status_reason_model_dict = VPNGatewayConnectionStatusReason.from_dict( + vpn_gateway_connection_status_reason_model_json).__dict__ + vpn_gateway_connection_status_reason_model2 = VPNGatewayConnectionStatusReason( + **vpn_gateway_connection_status_reason_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_status_reason_model == vpn_gateway_connection_status_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_status_reason_model_json2 = vpn_gateway_connection_status_reason_model.to_dict() + vpn_gateway_connection_status_reason_model_json2 = vpn_gateway_connection_status_reason_model.to_dict( + ) assert vpn_gateway_connection_status_reason_model_json2 == vpn_gateway_connection_status_reason_model_json @@ -72027,23 +82732,30 @@ def test_vpn_gateway_connection_tunnel_status_reason_serialization(self): # Construct a json representation of a VPNGatewayConnectionTunnelStatusReason model vpn_gateway_connection_tunnel_status_reason_model_json = {} - vpn_gateway_connection_tunnel_status_reason_model_json['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_tunnel_status_reason_model_json['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_tunnel_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + vpn_gateway_connection_tunnel_status_reason_model_json[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_tunnel_status_reason_model_json[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_tunnel_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' # Construct a model instance of VPNGatewayConnectionTunnelStatusReason by calling from_dict on the json representation - vpn_gateway_connection_tunnel_status_reason_model = VPNGatewayConnectionTunnelStatusReason.from_dict(vpn_gateway_connection_tunnel_status_reason_model_json) + vpn_gateway_connection_tunnel_status_reason_model = VPNGatewayConnectionTunnelStatusReason.from_dict( + vpn_gateway_connection_tunnel_status_reason_model_json) assert vpn_gateway_connection_tunnel_status_reason_model != False # Construct a model instance of VPNGatewayConnectionTunnelStatusReason by calling from_dict on the json representation - vpn_gateway_connection_tunnel_status_reason_model_dict = VPNGatewayConnectionTunnelStatusReason.from_dict(vpn_gateway_connection_tunnel_status_reason_model_json).__dict__ - vpn_gateway_connection_tunnel_status_reason_model2 = VPNGatewayConnectionTunnelStatusReason(**vpn_gateway_connection_tunnel_status_reason_model_dict) + vpn_gateway_connection_tunnel_status_reason_model_dict = VPNGatewayConnectionTunnelStatusReason.from_dict( + vpn_gateway_connection_tunnel_status_reason_model_json).__dict__ + vpn_gateway_connection_tunnel_status_reason_model2 = VPNGatewayConnectionTunnelStatusReason( + **vpn_gateway_connection_tunnel_status_reason_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_tunnel_status_reason_model == vpn_gateway_connection_tunnel_status_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_tunnel_status_reason_model_json2 = vpn_gateway_connection_tunnel_status_reason_model.to_dict() + vpn_gateway_connection_tunnel_status_reason_model_json2 = vpn_gateway_connection_tunnel_status_reason_model.to_dict( + ) assert vpn_gateway_connection_tunnel_status_reason_model_json2 == vpn_gateway_connection_tunnel_status_reason_model_json @@ -72059,23 +82771,30 @@ def test_vpn_gateway_health_reason_serialization(self): # Construct a json representation of a VPNGatewayHealthReason model vpn_gateway_health_reason_model_json = {} - vpn_gateway_health_reason_model_json['code'] = 'cannot_reserve_ip_address' - vpn_gateway_health_reason_model_json['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + vpn_gateway_health_reason_model_json[ + 'code'] = 'cannot_reserve_ip_address' + vpn_gateway_health_reason_model_json[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' # Construct a model instance of VPNGatewayHealthReason by calling from_dict on the json representation - vpn_gateway_health_reason_model = VPNGatewayHealthReason.from_dict(vpn_gateway_health_reason_model_json) + vpn_gateway_health_reason_model = VPNGatewayHealthReason.from_dict( + vpn_gateway_health_reason_model_json) assert vpn_gateway_health_reason_model != False # Construct a model instance of VPNGatewayHealthReason by calling from_dict on the json representation - vpn_gateway_health_reason_model_dict = VPNGatewayHealthReason.from_dict(vpn_gateway_health_reason_model_json).__dict__ - vpn_gateway_health_reason_model2 = VPNGatewayHealthReason(**vpn_gateway_health_reason_model_dict) + vpn_gateway_health_reason_model_dict = VPNGatewayHealthReason.from_dict( + vpn_gateway_health_reason_model_json).__dict__ + vpn_gateway_health_reason_model2 = VPNGatewayHealthReason( + **vpn_gateway_health_reason_model_dict) # Verify the model instances are equivalent assert vpn_gateway_health_reason_model == vpn_gateway_health_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_health_reason_model_json2 = vpn_gateway_health_reason_model.to_dict() + vpn_gateway_health_reason_model_json2 = vpn_gateway_health_reason_model.to_dict( + ) assert vpn_gateway_health_reason_model_json2 == vpn_gateway_health_reason_model_json @@ -72091,23 +82810,30 @@ def test_vpn_gateway_lifecycle_reason_serialization(self): # Construct a json representation of a VPNGatewayLifecycleReason model vpn_gateway_lifecycle_reason_model_json = {} - vpn_gateway_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - vpn_gateway_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_gateway_lifecycle_reason_model_json[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of VPNGatewayLifecycleReason by calling from_dict on the json representation - vpn_gateway_lifecycle_reason_model = VPNGatewayLifecycleReason.from_dict(vpn_gateway_lifecycle_reason_model_json) + vpn_gateway_lifecycle_reason_model = VPNGatewayLifecycleReason.from_dict( + vpn_gateway_lifecycle_reason_model_json) assert vpn_gateway_lifecycle_reason_model != False # Construct a model instance of VPNGatewayLifecycleReason by calling from_dict on the json representation - vpn_gateway_lifecycle_reason_model_dict = VPNGatewayLifecycleReason.from_dict(vpn_gateway_lifecycle_reason_model_json).__dict__ - vpn_gateway_lifecycle_reason_model2 = VPNGatewayLifecycleReason(**vpn_gateway_lifecycle_reason_model_dict) + vpn_gateway_lifecycle_reason_model_dict = VPNGatewayLifecycleReason.from_dict( + vpn_gateway_lifecycle_reason_model_json).__dict__ + vpn_gateway_lifecycle_reason_model2 = VPNGatewayLifecycleReason( + **vpn_gateway_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert vpn_gateway_lifecycle_reason_model == vpn_gateway_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_lifecycle_reason_model_json2 = vpn_gateway_lifecycle_reason_model.to_dict() + vpn_gateway_lifecycle_reason_model_json2 = vpn_gateway_lifecycle_reason_model.to_dict( + ) assert vpn_gateway_lifecycle_reason_model_json2 == vpn_gateway_lifecycle_reason_model_json @@ -72123,24 +82849,36 @@ def test_vpn_gateway_member_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_member_health_reason_model = {} # VPNGatewayMemberHealthReason - vpn_gateway_member_health_reason_model['code'] = 'cannot_reserve_ip_address' - vpn_gateway_member_health_reason_model['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_member_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' - - vpn_gateway_member_lifecycle_reason_model = {} # VPNGatewayMemberLifecycleReason - vpn_gateway_member_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_gateway_member_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_member_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_gateway_member_health_reason_model = { + } # VPNGatewayMemberHealthReason + vpn_gateway_member_health_reason_model[ + 'code'] = 'cannot_reserve_ip_address' + vpn_gateway_member_health_reason_model[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_member_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + + vpn_gateway_member_lifecycle_reason_model = { + } # VPNGatewayMemberLifecycleReason + vpn_gateway_member_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_member_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_member_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' @@ -72149,21 +82887,29 @@ def test_vpn_gateway_member_serialization(self): # Construct a json representation of a VPNGatewayMember model vpn_gateway_member_model_json = {} - vpn_gateway_member_model_json['health_reasons'] = [vpn_gateway_member_health_reason_model] + vpn_gateway_member_model_json['health_reasons'] = [ + vpn_gateway_member_health_reason_model + ] vpn_gateway_member_model_json['health_state'] = 'ok' - vpn_gateway_member_model_json['lifecycle_reasons'] = [vpn_gateway_member_lifecycle_reason_model] + vpn_gateway_member_model_json['lifecycle_reasons'] = [ + vpn_gateway_member_lifecycle_reason_model + ] vpn_gateway_member_model_json['lifecycle_state'] = 'stable' - vpn_gateway_member_model_json['private_ip'] = reserved_ip_reference_model + vpn_gateway_member_model_json[ + 'private_ip'] = reserved_ip_reference_model vpn_gateway_member_model_json['public_ip'] = ip_model vpn_gateway_member_model_json['role'] = 'active' # Construct a model instance of VPNGatewayMember by calling from_dict on the json representation - vpn_gateway_member_model = VPNGatewayMember.from_dict(vpn_gateway_member_model_json) + vpn_gateway_member_model = VPNGatewayMember.from_dict( + vpn_gateway_member_model_json) assert vpn_gateway_member_model != False # Construct a model instance of VPNGatewayMember by calling from_dict on the json representation - vpn_gateway_member_model_dict = VPNGatewayMember.from_dict(vpn_gateway_member_model_json).__dict__ - vpn_gateway_member_model2 = VPNGatewayMember(**vpn_gateway_member_model_dict) + vpn_gateway_member_model_dict = VPNGatewayMember.from_dict( + vpn_gateway_member_model_json).__dict__ + vpn_gateway_member_model2 = VPNGatewayMember( + **vpn_gateway_member_model_dict) # Verify the model instances are equivalent assert vpn_gateway_member_model == vpn_gateway_member_model2 @@ -72185,23 +82931,30 @@ def test_vpn_gateway_member_health_reason_serialization(self): # Construct a json representation of a VPNGatewayMemberHealthReason model vpn_gateway_member_health_reason_model_json = {} - vpn_gateway_member_health_reason_model_json['code'] = 'cannot_reserve_ip_address' - vpn_gateway_member_health_reason_model_json['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_member_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + vpn_gateway_member_health_reason_model_json[ + 'code'] = 'cannot_reserve_ip_address' + vpn_gateway_member_health_reason_model_json[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_member_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' # Construct a model instance of VPNGatewayMemberHealthReason by calling from_dict on the json representation - vpn_gateway_member_health_reason_model = VPNGatewayMemberHealthReason.from_dict(vpn_gateway_member_health_reason_model_json) + vpn_gateway_member_health_reason_model = VPNGatewayMemberHealthReason.from_dict( + vpn_gateway_member_health_reason_model_json) assert vpn_gateway_member_health_reason_model != False # Construct a model instance of VPNGatewayMemberHealthReason by calling from_dict on the json representation - vpn_gateway_member_health_reason_model_dict = VPNGatewayMemberHealthReason.from_dict(vpn_gateway_member_health_reason_model_json).__dict__ - vpn_gateway_member_health_reason_model2 = VPNGatewayMemberHealthReason(**vpn_gateway_member_health_reason_model_dict) + vpn_gateway_member_health_reason_model_dict = VPNGatewayMemberHealthReason.from_dict( + vpn_gateway_member_health_reason_model_json).__dict__ + vpn_gateway_member_health_reason_model2 = VPNGatewayMemberHealthReason( + **vpn_gateway_member_health_reason_model_dict) # Verify the model instances are equivalent assert vpn_gateway_member_health_reason_model == vpn_gateway_member_health_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_member_health_reason_model_json2 = vpn_gateway_member_health_reason_model.to_dict() + vpn_gateway_member_health_reason_model_json2 = vpn_gateway_member_health_reason_model.to_dict( + ) assert vpn_gateway_member_health_reason_model_json2 == vpn_gateway_member_health_reason_model_json @@ -72217,23 +82970,30 @@ def test_vpn_gateway_member_lifecycle_reason_serialization(self): # Construct a json representation of a VPNGatewayMemberLifecycleReason model vpn_gateway_member_lifecycle_reason_model_json = {} - vpn_gateway_member_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - vpn_gateway_member_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_member_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_gateway_member_lifecycle_reason_model_json[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_member_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_member_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of VPNGatewayMemberLifecycleReason by calling from_dict on the json representation - vpn_gateway_member_lifecycle_reason_model = VPNGatewayMemberLifecycleReason.from_dict(vpn_gateway_member_lifecycle_reason_model_json) + vpn_gateway_member_lifecycle_reason_model = VPNGatewayMemberLifecycleReason.from_dict( + vpn_gateway_member_lifecycle_reason_model_json) assert vpn_gateway_member_lifecycle_reason_model != False # Construct a model instance of VPNGatewayMemberLifecycleReason by calling from_dict on the json representation - vpn_gateway_member_lifecycle_reason_model_dict = VPNGatewayMemberLifecycleReason.from_dict(vpn_gateway_member_lifecycle_reason_model_json).__dict__ - vpn_gateway_member_lifecycle_reason_model2 = VPNGatewayMemberLifecycleReason(**vpn_gateway_member_lifecycle_reason_model_dict) + vpn_gateway_member_lifecycle_reason_model_dict = VPNGatewayMemberLifecycleReason.from_dict( + vpn_gateway_member_lifecycle_reason_model_json).__dict__ + vpn_gateway_member_lifecycle_reason_model2 = VPNGatewayMemberLifecycleReason( + **vpn_gateway_member_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert vpn_gateway_member_lifecycle_reason_model == vpn_gateway_member_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_member_lifecycle_reason_model_json2 = vpn_gateway_member_lifecycle_reason_model.to_dict() + vpn_gateway_member_lifecycle_reason_model_json2 = vpn_gateway_member_lifecycle_reason_model.to_dict( + ) assert vpn_gateway_member_lifecycle_reason_model_json2 == vpn_gateway_member_lifecycle_reason_model_json @@ -72252,12 +83012,15 @@ def test_vpn_gateway_patch_serialization(self): vpn_gateway_patch_model_json['name'] = 'my-vpn-gateway' # Construct a model instance of VPNGatewayPatch by calling from_dict on the json representation - vpn_gateway_patch_model = VPNGatewayPatch.from_dict(vpn_gateway_patch_model_json) + vpn_gateway_patch_model = VPNGatewayPatch.from_dict( + vpn_gateway_patch_model_json) assert vpn_gateway_patch_model != False # Construct a model instance of VPNGatewayPatch by calling from_dict on the json representation - vpn_gateway_patch_model_dict = VPNGatewayPatch.from_dict(vpn_gateway_patch_model_json).__dict__ - vpn_gateway_patch_model2 = VPNGatewayPatch(**vpn_gateway_patch_model_dict) + vpn_gateway_patch_model_dict = VPNGatewayPatch.from_dict( + vpn_gateway_patch_model_json).__dict__ + vpn_gateway_patch_model2 = VPNGatewayPatch( + **vpn_gateway_patch_model_dict) # Verify the model instances are equivalent assert vpn_gateway_patch_model == vpn_gateway_patch_model2 @@ -72279,21 +83042,26 @@ def test_vpn_gateway_reference_deleted_serialization(self): # Construct a json representation of a VPNGatewayReferenceDeleted model vpn_gateway_reference_deleted_model_json = {} - vpn_gateway_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_gateway_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VPNGatewayReferenceDeleted by calling from_dict on the json representation - vpn_gateway_reference_deleted_model = VPNGatewayReferenceDeleted.from_dict(vpn_gateway_reference_deleted_model_json) + vpn_gateway_reference_deleted_model = VPNGatewayReferenceDeleted.from_dict( + vpn_gateway_reference_deleted_model_json) assert vpn_gateway_reference_deleted_model != False # Construct a model instance of VPNGatewayReferenceDeleted by calling from_dict on the json representation - vpn_gateway_reference_deleted_model_dict = VPNGatewayReferenceDeleted.from_dict(vpn_gateway_reference_deleted_model_json).__dict__ - vpn_gateway_reference_deleted_model2 = VPNGatewayReferenceDeleted(**vpn_gateway_reference_deleted_model_dict) + vpn_gateway_reference_deleted_model_dict = VPNGatewayReferenceDeleted.from_dict( + vpn_gateway_reference_deleted_model_json).__dict__ + vpn_gateway_reference_deleted_model2 = VPNGatewayReferenceDeleted( + **vpn_gateway_reference_deleted_model_dict) # Verify the model instances are equivalent assert vpn_gateway_reference_deleted_model == vpn_gateway_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_reference_deleted_model_json2 = vpn_gateway_reference_deleted_model.to_dict() + vpn_gateway_reference_deleted_model_json2 = vpn_gateway_reference_deleted_model.to_dict( + ) assert vpn_gateway_reference_deleted_model_json2 == vpn_gateway_reference_deleted_model_json @@ -72309,95 +83077,137 @@ def test_vpn_server_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_reference_model = {} # CertificateInstanceReference - certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_reference_model = { + } # CertificateInstanceReference + certificate_instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' - vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model = { + } # VPNServerAuthenticationByUsernameIdProviderByIAM + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' - vpn_server_authentication_model = {} # VPNServerAuthenticationByUsername + vpn_server_authentication_model = { + } # VPNServerAuthenticationByUsername vpn_server_authentication_model['method'] = 'certificate' - vpn_server_authentication_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model ip_model = {} # IP ip_model['address'] = '192.168.3.4' vpn_server_health_reason_model = {} # VPNServerHealthReason - vpn_server_health_reason_model['code'] = 'cannot_access_server_certificate' - vpn_server_health_reason_model['message'] = 'Failed to get VPN server\'s server certificate from Secrets Manager.' - vpn_server_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health' + vpn_server_health_reason_model[ + 'code'] = 'cannot_access_server_certificate' + vpn_server_health_reason_model[ + 'message'] = 'Failed to get VPN server\'s server certificate from Secrets Manager.' + vpn_server_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health' vpn_server_lifecycle_reason_model = {} # VPNServerLifecycleReason - vpn_server_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_server_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_server_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_server_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_server_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_server_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' # Construct a json representation of a VPNServer model vpn_server_model_json = {} - vpn_server_model_json['certificate'] = certificate_instance_reference_model - vpn_server_model_json['client_authentication'] = [vpn_server_authentication_model] + vpn_server_model_json[ + 'certificate'] = certificate_instance_reference_model + vpn_server_model_json['client_authentication'] = [ + vpn_server_authentication_model + ] vpn_server_model_json['client_auto_delete'] = True vpn_server_model_json['client_auto_delete_timeout'] = 1 vpn_server_model_json['client_dns_server_ips'] = [ip_model] vpn_server_model_json['client_idle_timeout'] = 600 vpn_server_model_json['client_ip_pool'] = '172.16.0.0/16' vpn_server_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpn_server_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + vpn_server_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' vpn_server_model_json['enable_split_tunneling'] = True - vpn_server_model_json['health_reasons'] = [vpn_server_health_reason_model] + vpn_server_model_json['health_reasons'] = [ + vpn_server_health_reason_model + ] vpn_server_model_json['health_state'] = 'ok' - vpn_server_model_json['hostname'] = 'a8506291.us-south.vpn-server.appdomain.cloud' - vpn_server_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - vpn_server_model_json['id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - vpn_server_model_json['lifecycle_reasons'] = [vpn_server_lifecycle_reason_model] + vpn_server_model_json[ + 'hostname'] = 'a8506291.us-south.vpn-server.appdomain.cloud' + vpn_server_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + vpn_server_model_json[ + 'id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + vpn_server_model_json['lifecycle_reasons'] = [ + vpn_server_lifecycle_reason_model + ] vpn_server_model_json['lifecycle_state'] = 'stable' vpn_server_model_json['name'] = 'my-vpn-server' vpn_server_model_json['port'] = 443 @@ -72405,7 +83215,9 @@ def test_vpn_server_serialization(self): vpn_server_model_json['protocol'] = 'udp' vpn_server_model_json['resource_group'] = resource_group_reference_model vpn_server_model_json['resource_type'] = 'vpn_server' - vpn_server_model_json['security_groups'] = [security_group_reference_model] + vpn_server_model_json['security_groups'] = [ + security_group_reference_model + ] vpn_server_model_json['subnets'] = [subnet_reference_model] vpn_server_model_json['vpc'] = vpc_reference_model @@ -72414,7 +83226,8 @@ def test_vpn_server_serialization(self): assert vpn_server_model != False # Construct a model instance of VPNServer by calling from_dict on the json representation - vpn_server_model_dict = VPNServer.from_dict(vpn_server_model_json).__dict__ + vpn_server_model_dict = VPNServer.from_dict( + vpn_server_model_json).__dict__ vpn_server_model2 = VPNServer(**vpn_server_model_dict) # Verify the model instances are equivalent @@ -72446,8 +83259,10 @@ def test_vpn_server_client_serialization(self): vpn_server_client_model_json['common_name'] = 'testString' vpn_server_client_model_json['created_at'] = '2019-01-01T12:00:00Z' vpn_server_client_model_json['disconnected_at'] = '2019-01-01T12:00:00Z' - vpn_server_client_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' - vpn_server_client_model_json['id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_client_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_client_model_json[ + 'id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' vpn_server_client_model_json['remote_ip'] = ip_model vpn_server_client_model_json['remote_port'] = 22 vpn_server_client_model_json['resource_type'] = 'vpn_server_client' @@ -72455,12 +83270,15 @@ def test_vpn_server_client_serialization(self): vpn_server_client_model_json['username'] = 'testString' # Construct a model instance of VPNServerClient by calling from_dict on the json representation - vpn_server_client_model = VPNServerClient.from_dict(vpn_server_client_model_json) + vpn_server_client_model = VPNServerClient.from_dict( + vpn_server_client_model_json) assert vpn_server_client_model != False # Construct a model instance of VPNServerClient by calling from_dict on the json representation - vpn_server_client_model_dict = VPNServerClient.from_dict(vpn_server_client_model_json).__dict__ - vpn_server_client_model2 = VPNServerClient(**vpn_server_client_model_dict) + vpn_server_client_model_dict = VPNServerClient.from_dict( + vpn_server_client_model_json).__dict__ + vpn_server_client_model2 = VPNServerClient( + **vpn_server_client_model_dict) # Verify the model instances are equivalent assert vpn_server_client_model == vpn_server_client_model2 @@ -72490,41 +83308,55 @@ def test_vpn_server_client_collection_serialization(self): vpn_server_client_model['common_name'] = 'testString' vpn_server_client_model['created_at'] = '2019-01-01T12:00:00Z' vpn_server_client_model['disconnected_at'] = '2019-01-01T12:00:00Z' - vpn_server_client_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' - vpn_server_client_model['id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_client_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_client_model[ + 'id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' vpn_server_client_model['remote_ip'] = ip_model vpn_server_client_model['remote_port'] = 22 vpn_server_client_model['resource_type'] = 'vpn_server_client' vpn_server_client_model['status'] = 'connected' vpn_server_client_model['username'] = 'testString' - vpn_server_client_collection_first_model = {} # VPNServerClientCollectionFirst - vpn_server_client_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?limit=20' + vpn_server_client_collection_first_model = { + } # VPNServerClientCollectionFirst + vpn_server_client_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?limit=20' - vpn_server_client_collection_next_model = {} # VPNServerClientCollectionNext - vpn_server_client_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + vpn_server_client_collection_next_model = { + } # VPNServerClientCollectionNext + vpn_server_client_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' # Construct a json representation of a VPNServerClientCollection model vpn_server_client_collection_model_json = {} - vpn_server_client_collection_model_json['clients'] = [vpn_server_client_model] - vpn_server_client_collection_model_json['first'] = vpn_server_client_collection_first_model + vpn_server_client_collection_model_json['clients'] = [ + vpn_server_client_model + ] + vpn_server_client_collection_model_json[ + 'first'] = vpn_server_client_collection_first_model vpn_server_client_collection_model_json['limit'] = 20 - vpn_server_client_collection_model_json['next'] = vpn_server_client_collection_next_model + vpn_server_client_collection_model_json[ + 'next'] = vpn_server_client_collection_next_model vpn_server_client_collection_model_json['total_count'] = 132 # Construct a model instance of VPNServerClientCollection by calling from_dict on the json representation - vpn_server_client_collection_model = VPNServerClientCollection.from_dict(vpn_server_client_collection_model_json) + vpn_server_client_collection_model = VPNServerClientCollection.from_dict( + vpn_server_client_collection_model_json) assert vpn_server_client_collection_model != False # Construct a model instance of VPNServerClientCollection by calling from_dict on the json representation - vpn_server_client_collection_model_dict = VPNServerClientCollection.from_dict(vpn_server_client_collection_model_json).__dict__ - vpn_server_client_collection_model2 = VPNServerClientCollection(**vpn_server_client_collection_model_dict) + vpn_server_client_collection_model_dict = VPNServerClientCollection.from_dict( + vpn_server_client_collection_model_json).__dict__ + vpn_server_client_collection_model2 = VPNServerClientCollection( + **vpn_server_client_collection_model_dict) # Verify the model instances are equivalent assert vpn_server_client_collection_model == vpn_server_client_collection_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_client_collection_model_json2 = vpn_server_client_collection_model.to_dict() + vpn_server_client_collection_model_json2 = vpn_server_client_collection_model.to_dict( + ) assert vpn_server_client_collection_model_json2 == vpn_server_client_collection_model_json @@ -72540,21 +83372,26 @@ def test_vpn_server_client_collection_first_serialization(self): # Construct a json representation of a VPNServerClientCollectionFirst model vpn_server_client_collection_first_model_json = {} - vpn_server_client_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?limit=20' + vpn_server_client_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?limit=20' # Construct a model instance of VPNServerClientCollectionFirst by calling from_dict on the json representation - vpn_server_client_collection_first_model = VPNServerClientCollectionFirst.from_dict(vpn_server_client_collection_first_model_json) + vpn_server_client_collection_first_model = VPNServerClientCollectionFirst.from_dict( + vpn_server_client_collection_first_model_json) assert vpn_server_client_collection_first_model != False # Construct a model instance of VPNServerClientCollectionFirst by calling from_dict on the json representation - vpn_server_client_collection_first_model_dict = VPNServerClientCollectionFirst.from_dict(vpn_server_client_collection_first_model_json).__dict__ - vpn_server_client_collection_first_model2 = VPNServerClientCollectionFirst(**vpn_server_client_collection_first_model_dict) + vpn_server_client_collection_first_model_dict = VPNServerClientCollectionFirst.from_dict( + vpn_server_client_collection_first_model_json).__dict__ + vpn_server_client_collection_first_model2 = VPNServerClientCollectionFirst( + **vpn_server_client_collection_first_model_dict) # Verify the model instances are equivalent assert vpn_server_client_collection_first_model == vpn_server_client_collection_first_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_client_collection_first_model_json2 = vpn_server_client_collection_first_model.to_dict() + vpn_server_client_collection_first_model_json2 = vpn_server_client_collection_first_model.to_dict( + ) assert vpn_server_client_collection_first_model_json2 == vpn_server_client_collection_first_model_json @@ -72570,21 +83407,26 @@ def test_vpn_server_client_collection_next_serialization(self): # Construct a json representation of a VPNServerClientCollectionNext model vpn_server_client_collection_next_model_json = {} - vpn_server_client_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + vpn_server_client_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' # Construct a model instance of VPNServerClientCollectionNext by calling from_dict on the json representation - vpn_server_client_collection_next_model = VPNServerClientCollectionNext.from_dict(vpn_server_client_collection_next_model_json) + vpn_server_client_collection_next_model = VPNServerClientCollectionNext.from_dict( + vpn_server_client_collection_next_model_json) assert vpn_server_client_collection_next_model != False # Construct a model instance of VPNServerClientCollectionNext by calling from_dict on the json representation - vpn_server_client_collection_next_model_dict = VPNServerClientCollectionNext.from_dict(vpn_server_client_collection_next_model_json).__dict__ - vpn_server_client_collection_next_model2 = VPNServerClientCollectionNext(**vpn_server_client_collection_next_model_dict) + vpn_server_client_collection_next_model_dict = VPNServerClientCollectionNext.from_dict( + vpn_server_client_collection_next_model_json).__dict__ + vpn_server_client_collection_next_model2 = VPNServerClientCollectionNext( + **vpn_server_client_collection_next_model_dict) # Verify the model instances are equivalent assert vpn_server_client_collection_next_model == vpn_server_client_collection_next_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_client_collection_next_model_json2 = vpn_server_client_collection_next_model.to_dict() + vpn_server_client_collection_next_model_json2 = vpn_server_client_collection_next_model.to_dict( + ) assert vpn_server_client_collection_next_model_json2 == vpn_server_client_collection_next_model_json @@ -72601,99 +83443,139 @@ def test_vpn_server_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpn_server_collection_first_model = {} # VPNServerCollectionFirst - vpn_server_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20' + vpn_server_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20' vpn_server_collection_next_model = {} # VPNServerCollectionNext - vpn_server_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20' + vpn_server_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20' - certificate_instance_reference_model = {} # CertificateInstanceReference - certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_reference_model = { + } # CertificateInstanceReference + certificate_instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' - vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model = { + } # VPNServerAuthenticationByUsernameIdProviderByIAM + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' - vpn_server_authentication_model = {} # VPNServerAuthenticationByUsername + vpn_server_authentication_model = { + } # VPNServerAuthenticationByUsername vpn_server_authentication_model['method'] = 'certificate' - vpn_server_authentication_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model ip_model = {} # IP ip_model['address'] = '192.168.3.4' vpn_server_health_reason_model = {} # VPNServerHealthReason - vpn_server_health_reason_model['code'] = 'cannot_access_server_certificate' - vpn_server_health_reason_model['message'] = 'Failed to get VPN server\'s server certificate from Secrets Manager.' - vpn_server_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health' + vpn_server_health_reason_model[ + 'code'] = 'cannot_access_server_certificate' + vpn_server_health_reason_model[ + 'message'] = 'Failed to get VPN server\'s server certificate from Secrets Manager.' + vpn_server_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health' vpn_server_lifecycle_reason_model = {} # VPNServerLifecycleReason - vpn_server_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_server_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_server_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_server_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_server_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_server_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' vpn_server_model = {} # VPNServer vpn_server_model['certificate'] = certificate_instance_reference_model - vpn_server_model['client_authentication'] = [vpn_server_authentication_model] + vpn_server_model['client_authentication'] = [ + vpn_server_authentication_model + ] vpn_server_model['client_auto_delete'] = True vpn_server_model['client_auto_delete_timeout'] = 1 vpn_server_model['client_dns_server_ips'] = [ip_model] vpn_server_model['client_idle_timeout'] = 600 vpn_server_model['client_ip_pool'] = '172.16.0.0/16' vpn_server_model['created_at'] = '2019-01-01T12:00:00Z' - vpn_server_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + vpn_server_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' vpn_server_model['enable_split_tunneling'] = True vpn_server_model['health_reasons'] = [vpn_server_health_reason_model] vpn_server_model['health_state'] = 'ok' - vpn_server_model['hostname'] = 'a8506291.us-south.vpn-server.appdomain.cloud' - vpn_server_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + vpn_server_model[ + 'hostname'] = 'a8506291.us-south.vpn-server.appdomain.cloud' + vpn_server_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' vpn_server_model['id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - vpn_server_model['lifecycle_reasons'] = [vpn_server_lifecycle_reason_model] + vpn_server_model['lifecycle_reasons'] = [ + vpn_server_lifecycle_reason_model + ] vpn_server_model['lifecycle_state'] = 'stable' vpn_server_model['name'] = 'my-vpn-server' vpn_server_model['port'] = 443 @@ -72707,25 +83589,31 @@ def test_vpn_server_collection_serialization(self): # Construct a json representation of a VPNServerCollection model vpn_server_collection_model_json = {} - vpn_server_collection_model_json['first'] = vpn_server_collection_first_model + vpn_server_collection_model_json[ + 'first'] = vpn_server_collection_first_model vpn_server_collection_model_json['limit'] = 20 - vpn_server_collection_model_json['next'] = vpn_server_collection_next_model + vpn_server_collection_model_json[ + 'next'] = vpn_server_collection_next_model vpn_server_collection_model_json['total_count'] = 132 vpn_server_collection_model_json['vpn_servers'] = [vpn_server_model] # Construct a model instance of VPNServerCollection by calling from_dict on the json representation - vpn_server_collection_model = VPNServerCollection.from_dict(vpn_server_collection_model_json) + vpn_server_collection_model = VPNServerCollection.from_dict( + vpn_server_collection_model_json) assert vpn_server_collection_model != False # Construct a model instance of VPNServerCollection by calling from_dict on the json representation - vpn_server_collection_model_dict = VPNServerCollection.from_dict(vpn_server_collection_model_json).__dict__ - vpn_server_collection_model2 = VPNServerCollection(**vpn_server_collection_model_dict) + vpn_server_collection_model_dict = VPNServerCollection.from_dict( + vpn_server_collection_model_json).__dict__ + vpn_server_collection_model2 = VPNServerCollection( + **vpn_server_collection_model_dict) # Verify the model instances are equivalent assert vpn_server_collection_model == vpn_server_collection_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_collection_model_json2 = vpn_server_collection_model.to_dict() + vpn_server_collection_model_json2 = vpn_server_collection_model.to_dict( + ) assert vpn_server_collection_model_json2 == vpn_server_collection_model_json @@ -72741,21 +83629,26 @@ def test_vpn_server_collection_first_serialization(self): # Construct a json representation of a VPNServerCollectionFirst model vpn_server_collection_first_model_json = {} - vpn_server_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20' + vpn_server_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20' # Construct a model instance of VPNServerCollectionFirst by calling from_dict on the json representation - vpn_server_collection_first_model = VPNServerCollectionFirst.from_dict(vpn_server_collection_first_model_json) + vpn_server_collection_first_model = VPNServerCollectionFirst.from_dict( + vpn_server_collection_first_model_json) assert vpn_server_collection_first_model != False # Construct a model instance of VPNServerCollectionFirst by calling from_dict on the json representation - vpn_server_collection_first_model_dict = VPNServerCollectionFirst.from_dict(vpn_server_collection_first_model_json).__dict__ - vpn_server_collection_first_model2 = VPNServerCollectionFirst(**vpn_server_collection_first_model_dict) + vpn_server_collection_first_model_dict = VPNServerCollectionFirst.from_dict( + vpn_server_collection_first_model_json).__dict__ + vpn_server_collection_first_model2 = VPNServerCollectionFirst( + **vpn_server_collection_first_model_dict) # Verify the model instances are equivalent assert vpn_server_collection_first_model == vpn_server_collection_first_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_collection_first_model_json2 = vpn_server_collection_first_model.to_dict() + vpn_server_collection_first_model_json2 = vpn_server_collection_first_model.to_dict( + ) assert vpn_server_collection_first_model_json2 == vpn_server_collection_first_model_json @@ -72771,21 +83664,26 @@ def test_vpn_server_collection_next_serialization(self): # Construct a json representation of a VPNServerCollectionNext model vpn_server_collection_next_model_json = {} - vpn_server_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20' + vpn_server_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20' # Construct a model instance of VPNServerCollectionNext by calling from_dict on the json representation - vpn_server_collection_next_model = VPNServerCollectionNext.from_dict(vpn_server_collection_next_model_json) + vpn_server_collection_next_model = VPNServerCollectionNext.from_dict( + vpn_server_collection_next_model_json) assert vpn_server_collection_next_model != False # Construct a model instance of VPNServerCollectionNext by calling from_dict on the json representation - vpn_server_collection_next_model_dict = VPNServerCollectionNext.from_dict(vpn_server_collection_next_model_json).__dict__ - vpn_server_collection_next_model2 = VPNServerCollectionNext(**vpn_server_collection_next_model_dict) + vpn_server_collection_next_model_dict = VPNServerCollectionNext.from_dict( + vpn_server_collection_next_model_json).__dict__ + vpn_server_collection_next_model2 = VPNServerCollectionNext( + **vpn_server_collection_next_model_dict) # Verify the model instances are equivalent assert vpn_server_collection_next_model == vpn_server_collection_next_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_collection_next_model_json2 = vpn_server_collection_next_model.to_dict() + vpn_server_collection_next_model_json2 = vpn_server_collection_next_model.to_dict( + ) assert vpn_server_collection_next_model_json2 == vpn_server_collection_next_model_json @@ -72801,23 +83699,30 @@ def test_vpn_server_health_reason_serialization(self): # Construct a json representation of a VPNServerHealthReason model vpn_server_health_reason_model_json = {} - vpn_server_health_reason_model_json['code'] = 'cannot_access_server_certificate' - vpn_server_health_reason_model_json['message'] = 'Failed to get VPN server\'s server certificate from Secrets Manager.' - vpn_server_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health' + vpn_server_health_reason_model_json[ + 'code'] = 'cannot_access_server_certificate' + vpn_server_health_reason_model_json[ + 'message'] = 'Failed to get VPN server\'s server certificate from Secrets Manager.' + vpn_server_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-health' # Construct a model instance of VPNServerHealthReason by calling from_dict on the json representation - vpn_server_health_reason_model = VPNServerHealthReason.from_dict(vpn_server_health_reason_model_json) + vpn_server_health_reason_model = VPNServerHealthReason.from_dict( + vpn_server_health_reason_model_json) assert vpn_server_health_reason_model != False # Construct a model instance of VPNServerHealthReason by calling from_dict on the json representation - vpn_server_health_reason_model_dict = VPNServerHealthReason.from_dict(vpn_server_health_reason_model_json).__dict__ - vpn_server_health_reason_model2 = VPNServerHealthReason(**vpn_server_health_reason_model_dict) + vpn_server_health_reason_model_dict = VPNServerHealthReason.from_dict( + vpn_server_health_reason_model_json).__dict__ + vpn_server_health_reason_model2 = VPNServerHealthReason( + **vpn_server_health_reason_model_dict) # Verify the model instances are equivalent assert vpn_server_health_reason_model == vpn_server_health_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_health_reason_model_json2 = vpn_server_health_reason_model.to_dict() + vpn_server_health_reason_model_json2 = vpn_server_health_reason_model.to_dict( + ) assert vpn_server_health_reason_model_json2 == vpn_server_health_reason_model_json @@ -72833,23 +83738,30 @@ def test_vpn_server_lifecycle_reason_serialization(self): # Construct a json representation of a VPNServerLifecycleReason model vpn_server_lifecycle_reason_model_json = {} - vpn_server_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - vpn_server_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_server_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_server_lifecycle_reason_model_json[ + 'code'] = 'resource_suspended_by_provider' + vpn_server_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_server_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of VPNServerLifecycleReason by calling from_dict on the json representation - vpn_server_lifecycle_reason_model = VPNServerLifecycleReason.from_dict(vpn_server_lifecycle_reason_model_json) + vpn_server_lifecycle_reason_model = VPNServerLifecycleReason.from_dict( + vpn_server_lifecycle_reason_model_json) assert vpn_server_lifecycle_reason_model != False # Construct a model instance of VPNServerLifecycleReason by calling from_dict on the json representation - vpn_server_lifecycle_reason_model_dict = VPNServerLifecycleReason.from_dict(vpn_server_lifecycle_reason_model_json).__dict__ - vpn_server_lifecycle_reason_model2 = VPNServerLifecycleReason(**vpn_server_lifecycle_reason_model_dict) + vpn_server_lifecycle_reason_model_dict = VPNServerLifecycleReason.from_dict( + vpn_server_lifecycle_reason_model_json).__dict__ + vpn_server_lifecycle_reason_model2 = VPNServerLifecycleReason( + **vpn_server_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert vpn_server_lifecycle_reason_model == vpn_server_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_lifecycle_reason_model_json2 = vpn_server_lifecycle_reason_model.to_dict() + vpn_server_lifecycle_reason_model_json2 = vpn_server_lifecycle_reason_model.to_dict( + ) assert vpn_server_lifecycle_reason_model_json2 == vpn_server_lifecycle_reason_model_json @@ -72865,26 +83777,36 @@ def test_vpn_server_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_identity_model = {} # CertificateInstanceIdentityByCRN - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model = { + } # CertificateInstanceIdentityByCRN + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' - vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model = { + } # VPNServerAuthenticationByUsernameIdProviderByIAM + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' - vpn_server_authentication_prototype_model = {} # VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype + vpn_server_authentication_prototype_model = { + } # VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype vpn_server_authentication_prototype_model['method'] = 'username' - vpn_server_authentication_prototype_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_prototype_model[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model ip_model = {} # IP ip_model['address'] = '192.168.3.4' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a VPNServerPatch model vpn_server_patch_model_json = {} - vpn_server_patch_model_json['certificate'] = certificate_instance_identity_model - vpn_server_patch_model_json['client_authentication'] = [vpn_server_authentication_prototype_model] + vpn_server_patch_model_json[ + 'certificate'] = certificate_instance_identity_model + vpn_server_patch_model_json['client_authentication'] = [ + vpn_server_authentication_prototype_model + ] vpn_server_patch_model_json['client_dns_server_ips'] = [ip_model] vpn_server_patch_model_json['client_idle_timeout'] = 600 vpn_server_patch_model_json['client_ip_pool'] = '172.16.0.0/16' @@ -72895,11 +83817,13 @@ def test_vpn_server_patch_serialization(self): vpn_server_patch_model_json['subnets'] = [subnet_identity_model] # Construct a model instance of VPNServerPatch by calling from_dict on the json representation - vpn_server_patch_model = VPNServerPatch.from_dict(vpn_server_patch_model_json) + vpn_server_patch_model = VPNServerPatch.from_dict( + vpn_server_patch_model_json) assert vpn_server_patch_model != False # Construct a model instance of VPNServerPatch by calling from_dict on the json representation - vpn_server_patch_model_dict = VPNServerPatch.from_dict(vpn_server_patch_model_json).__dict__ + vpn_server_patch_model_dict = VPNServerPatch.from_dict( + vpn_server_patch_model_json).__dict__ vpn_server_patch_model2 = VPNServerPatch(**vpn_server_patch_model_dict) # Verify the model instances are equivalent @@ -72922,21 +83846,26 @@ def test_vpn_server_reference_deleted_serialization(self): # Construct a json representation of a VPNServerReferenceDeleted model vpn_server_reference_deleted_model_json = {} - vpn_server_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_server_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VPNServerReferenceDeleted by calling from_dict on the json representation - vpn_server_reference_deleted_model = VPNServerReferenceDeleted.from_dict(vpn_server_reference_deleted_model_json) + vpn_server_reference_deleted_model = VPNServerReferenceDeleted.from_dict( + vpn_server_reference_deleted_model_json) assert vpn_server_reference_deleted_model != False # Construct a model instance of VPNServerReferenceDeleted by calling from_dict on the json representation - vpn_server_reference_deleted_model_dict = VPNServerReferenceDeleted.from_dict(vpn_server_reference_deleted_model_json).__dict__ - vpn_server_reference_deleted_model2 = VPNServerReferenceDeleted(**vpn_server_reference_deleted_model_dict) + vpn_server_reference_deleted_model_dict = VPNServerReferenceDeleted.from_dict( + vpn_server_reference_deleted_model_json).__dict__ + vpn_server_reference_deleted_model2 = VPNServerReferenceDeleted( + **vpn_server_reference_deleted_model_dict) # Verify the model instances are equivalent assert vpn_server_reference_deleted_model == vpn_server_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_reference_deleted_model_json2 = vpn_server_reference_deleted_model.to_dict() + vpn_server_reference_deleted_model_json2 = vpn_server_reference_deleted_model.to_dict( + ) assert vpn_server_reference_deleted_model_json2 == vpn_server_reference_deleted_model_json @@ -72954,34 +83883,48 @@ def test_vpn_server_route_serialization(self): vpn_server_route_health_reason_model = {} # VPNServerRouteHealthReason vpn_server_route_health_reason_model['code'] = 'internal_error' - vpn_server_route_health_reason_model['message'] = 'Internal error (contact IBM support).' - vpn_server_route_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health' - - vpn_server_route_lifecycle_reason_model = {} # VPNServerRouteLifecycleReason - vpn_server_route_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_server_route_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_server_route_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_server_route_health_reason_model[ + 'message'] = 'Internal error (contact IBM support).' + vpn_server_route_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health' + + vpn_server_route_lifecycle_reason_model = { + } # VPNServerRouteLifecycleReason + vpn_server_route_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_server_route_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_server_route_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a json representation of a VPNServerRoute model vpn_server_route_model_json = {} vpn_server_route_model_json['action'] = 'deliver' vpn_server_route_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpn_server_route_model_json['destination'] = 'testString' - vpn_server_route_model_json['health_reasons'] = [vpn_server_route_health_reason_model] + vpn_server_route_model_json['destination'] = '192.168.3.0/24' + vpn_server_route_model_json['health_reasons'] = [ + vpn_server_route_health_reason_model + ] vpn_server_route_model_json['health_state'] = 'ok' - vpn_server_route_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' - vpn_server_route_model_json['id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' - vpn_server_route_model_json['lifecycle_reasons'] = [vpn_server_route_lifecycle_reason_model] + vpn_server_route_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_route_model_json[ + 'id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_route_model_json['lifecycle_reasons'] = [ + vpn_server_route_lifecycle_reason_model + ] vpn_server_route_model_json['lifecycle_state'] = 'stable' vpn_server_route_model_json['name'] = 'my-vpn-route-1' vpn_server_route_model_json['resource_type'] = 'vpn_server_route' # Construct a model instance of VPNServerRoute by calling from_dict on the json representation - vpn_server_route_model = VPNServerRoute.from_dict(vpn_server_route_model_json) + vpn_server_route_model = VPNServerRoute.from_dict( + vpn_server_route_model_json) assert vpn_server_route_model != False # Construct a model instance of VPNServerRoute by calling from_dict on the json representation - vpn_server_route_model_dict = VPNServerRoute.from_dict(vpn_server_route_model_json).__dict__ + vpn_server_route_model_dict = VPNServerRoute.from_dict( + vpn_server_route_model_json).__dict__ vpn_server_route_model2 = VPNServerRoute(**vpn_server_route_model_dict) # Verify the model instances are equivalent @@ -73004,56 +83947,80 @@ def test_vpn_server_route_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_server_route_collection_first_model = {} # VPNServerRouteCollectionFirst - vpn_server_route_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20' + vpn_server_route_collection_first_model = { + } # VPNServerRouteCollectionFirst + vpn_server_route_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20' - vpn_server_route_collection_next_model = {} # VPNServerRouteCollectionNext - vpn_server_route_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + vpn_server_route_collection_next_model = { + } # VPNServerRouteCollectionNext + vpn_server_route_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' vpn_server_route_health_reason_model = {} # VPNServerRouteHealthReason vpn_server_route_health_reason_model['code'] = 'internal_error' - vpn_server_route_health_reason_model['message'] = 'Internal error (contact IBM support).' - vpn_server_route_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health' - - vpn_server_route_lifecycle_reason_model = {} # VPNServerRouteLifecycleReason - vpn_server_route_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_server_route_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_server_route_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_server_route_health_reason_model[ + 'message'] = 'Internal error (contact IBM support).' + vpn_server_route_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health' + + vpn_server_route_lifecycle_reason_model = { + } # VPNServerRouteLifecycleReason + vpn_server_route_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_server_route_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_server_route_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' vpn_server_route_model = {} # VPNServerRoute vpn_server_route_model['action'] = 'deliver' vpn_server_route_model['created_at'] = '2019-01-01T12:00:00Z' - vpn_server_route_model['destination'] = 'testString' - vpn_server_route_model['health_reasons'] = [vpn_server_route_health_reason_model] + vpn_server_route_model['destination'] = '192.168.3.0/24' + vpn_server_route_model['health_reasons'] = [ + vpn_server_route_health_reason_model + ] vpn_server_route_model['health_state'] = 'ok' - vpn_server_route_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' - vpn_server_route_model['id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' - vpn_server_route_model['lifecycle_reasons'] = [vpn_server_route_lifecycle_reason_model] + vpn_server_route_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_route_model[ + 'id'] = 'r006-1a15dca5-7e33-45e1-b7c5-bc690e569531' + vpn_server_route_model['lifecycle_reasons'] = [ + vpn_server_route_lifecycle_reason_model + ] vpn_server_route_model['lifecycle_state'] = 'stable' vpn_server_route_model['name'] = 'my-vpn-route-1' vpn_server_route_model['resource_type'] = 'vpn_server_route' # Construct a json representation of a VPNServerRouteCollection model vpn_server_route_collection_model_json = {} - vpn_server_route_collection_model_json['first'] = vpn_server_route_collection_first_model + vpn_server_route_collection_model_json[ + 'first'] = vpn_server_route_collection_first_model vpn_server_route_collection_model_json['limit'] = 20 - vpn_server_route_collection_model_json['next'] = vpn_server_route_collection_next_model - vpn_server_route_collection_model_json['routes'] = [vpn_server_route_model] + vpn_server_route_collection_model_json[ + 'next'] = vpn_server_route_collection_next_model + vpn_server_route_collection_model_json['routes'] = [ + vpn_server_route_model + ] vpn_server_route_collection_model_json['total_count'] = 132 # Construct a model instance of VPNServerRouteCollection by calling from_dict on the json representation - vpn_server_route_collection_model = VPNServerRouteCollection.from_dict(vpn_server_route_collection_model_json) + vpn_server_route_collection_model = VPNServerRouteCollection.from_dict( + vpn_server_route_collection_model_json) assert vpn_server_route_collection_model != False # Construct a model instance of VPNServerRouteCollection by calling from_dict on the json representation - vpn_server_route_collection_model_dict = VPNServerRouteCollection.from_dict(vpn_server_route_collection_model_json).__dict__ - vpn_server_route_collection_model2 = VPNServerRouteCollection(**vpn_server_route_collection_model_dict) + vpn_server_route_collection_model_dict = VPNServerRouteCollection.from_dict( + vpn_server_route_collection_model_json).__dict__ + vpn_server_route_collection_model2 = VPNServerRouteCollection( + **vpn_server_route_collection_model_dict) # Verify the model instances are equivalent assert vpn_server_route_collection_model == vpn_server_route_collection_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_route_collection_model_json2 = vpn_server_route_collection_model.to_dict() + vpn_server_route_collection_model_json2 = vpn_server_route_collection_model.to_dict( + ) assert vpn_server_route_collection_model_json2 == vpn_server_route_collection_model_json @@ -73069,21 +84036,26 @@ def test_vpn_server_route_collection_first_serialization(self): # Construct a json representation of a VPNServerRouteCollectionFirst model vpn_server_route_collection_first_model_json = {} - vpn_server_route_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20' + vpn_server_route_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20' # Construct a model instance of VPNServerRouteCollectionFirst by calling from_dict on the json representation - vpn_server_route_collection_first_model = VPNServerRouteCollectionFirst.from_dict(vpn_server_route_collection_first_model_json) + vpn_server_route_collection_first_model = VPNServerRouteCollectionFirst.from_dict( + vpn_server_route_collection_first_model_json) assert vpn_server_route_collection_first_model != False # Construct a model instance of VPNServerRouteCollectionFirst by calling from_dict on the json representation - vpn_server_route_collection_first_model_dict = VPNServerRouteCollectionFirst.from_dict(vpn_server_route_collection_first_model_json).__dict__ - vpn_server_route_collection_first_model2 = VPNServerRouteCollectionFirst(**vpn_server_route_collection_first_model_dict) + vpn_server_route_collection_first_model_dict = VPNServerRouteCollectionFirst.from_dict( + vpn_server_route_collection_first_model_json).__dict__ + vpn_server_route_collection_first_model2 = VPNServerRouteCollectionFirst( + **vpn_server_route_collection_first_model_dict) # Verify the model instances are equivalent assert vpn_server_route_collection_first_model == vpn_server_route_collection_first_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_route_collection_first_model_json2 = vpn_server_route_collection_first_model.to_dict() + vpn_server_route_collection_first_model_json2 = vpn_server_route_collection_first_model.to_dict( + ) assert vpn_server_route_collection_first_model_json2 == vpn_server_route_collection_first_model_json @@ -73099,21 +84071,26 @@ def test_vpn_server_route_collection_next_serialization(self): # Construct a json representation of a VPNServerRouteCollectionNext model vpn_server_route_collection_next_model_json = {} - vpn_server_route_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' + vpn_server_route_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20' # Construct a model instance of VPNServerRouteCollectionNext by calling from_dict on the json representation - vpn_server_route_collection_next_model = VPNServerRouteCollectionNext.from_dict(vpn_server_route_collection_next_model_json) + vpn_server_route_collection_next_model = VPNServerRouteCollectionNext.from_dict( + vpn_server_route_collection_next_model_json) assert vpn_server_route_collection_next_model != False # Construct a model instance of VPNServerRouteCollectionNext by calling from_dict on the json representation - vpn_server_route_collection_next_model_dict = VPNServerRouteCollectionNext.from_dict(vpn_server_route_collection_next_model_json).__dict__ - vpn_server_route_collection_next_model2 = VPNServerRouteCollectionNext(**vpn_server_route_collection_next_model_dict) + vpn_server_route_collection_next_model_dict = VPNServerRouteCollectionNext.from_dict( + vpn_server_route_collection_next_model_json).__dict__ + vpn_server_route_collection_next_model2 = VPNServerRouteCollectionNext( + **vpn_server_route_collection_next_model_dict) # Verify the model instances are equivalent assert vpn_server_route_collection_next_model == vpn_server_route_collection_next_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_route_collection_next_model_json2 = vpn_server_route_collection_next_model.to_dict() + vpn_server_route_collection_next_model_json2 = vpn_server_route_collection_next_model.to_dict( + ) assert vpn_server_route_collection_next_model_json2 == vpn_server_route_collection_next_model_json @@ -73130,22 +84107,28 @@ def test_vpn_server_route_health_reason_serialization(self): # Construct a json representation of a VPNServerRouteHealthReason model vpn_server_route_health_reason_model_json = {} vpn_server_route_health_reason_model_json['code'] = 'internal_error' - vpn_server_route_health_reason_model_json['message'] = 'Internal error (contact IBM support).' - vpn_server_route_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health' + vpn_server_route_health_reason_model_json[ + 'message'] = 'Internal error (contact IBM support).' + vpn_server_route_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-server-route-health' # Construct a model instance of VPNServerRouteHealthReason by calling from_dict on the json representation - vpn_server_route_health_reason_model = VPNServerRouteHealthReason.from_dict(vpn_server_route_health_reason_model_json) + vpn_server_route_health_reason_model = VPNServerRouteHealthReason.from_dict( + vpn_server_route_health_reason_model_json) assert vpn_server_route_health_reason_model != False # Construct a model instance of VPNServerRouteHealthReason by calling from_dict on the json representation - vpn_server_route_health_reason_model_dict = VPNServerRouteHealthReason.from_dict(vpn_server_route_health_reason_model_json).__dict__ - vpn_server_route_health_reason_model2 = VPNServerRouteHealthReason(**vpn_server_route_health_reason_model_dict) + vpn_server_route_health_reason_model_dict = VPNServerRouteHealthReason.from_dict( + vpn_server_route_health_reason_model_json).__dict__ + vpn_server_route_health_reason_model2 = VPNServerRouteHealthReason( + **vpn_server_route_health_reason_model_dict) # Verify the model instances are equivalent assert vpn_server_route_health_reason_model == vpn_server_route_health_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_route_health_reason_model_json2 = vpn_server_route_health_reason_model.to_dict() + vpn_server_route_health_reason_model_json2 = vpn_server_route_health_reason_model.to_dict( + ) assert vpn_server_route_health_reason_model_json2 == vpn_server_route_health_reason_model_json @@ -73161,23 +84144,30 @@ def test_vpn_server_route_lifecycle_reason_serialization(self): # Construct a json representation of a VPNServerRouteLifecycleReason model vpn_server_route_lifecycle_reason_model_json = {} - vpn_server_route_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - vpn_server_route_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_server_route_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_server_route_lifecycle_reason_model_json[ + 'code'] = 'resource_suspended_by_provider' + vpn_server_route_lifecycle_reason_model_json[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_server_route_lifecycle_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of VPNServerRouteLifecycleReason by calling from_dict on the json representation - vpn_server_route_lifecycle_reason_model = VPNServerRouteLifecycleReason.from_dict(vpn_server_route_lifecycle_reason_model_json) + vpn_server_route_lifecycle_reason_model = VPNServerRouteLifecycleReason.from_dict( + vpn_server_route_lifecycle_reason_model_json) assert vpn_server_route_lifecycle_reason_model != False # Construct a model instance of VPNServerRouteLifecycleReason by calling from_dict on the json representation - vpn_server_route_lifecycle_reason_model_dict = VPNServerRouteLifecycleReason.from_dict(vpn_server_route_lifecycle_reason_model_json).__dict__ - vpn_server_route_lifecycle_reason_model2 = VPNServerRouteLifecycleReason(**vpn_server_route_lifecycle_reason_model_dict) + vpn_server_route_lifecycle_reason_model_dict = VPNServerRouteLifecycleReason.from_dict( + vpn_server_route_lifecycle_reason_model_json).__dict__ + vpn_server_route_lifecycle_reason_model2 = VPNServerRouteLifecycleReason( + **vpn_server_route_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert vpn_server_route_lifecycle_reason_model == vpn_server_route_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_route_lifecycle_reason_model_json2 = vpn_server_route_lifecycle_reason_model.to_dict() + vpn_server_route_lifecycle_reason_model_json2 = vpn_server_route_lifecycle_reason_model.to_dict( + ) assert vpn_server_route_lifecycle_reason_model_json2 == vpn_server_route_lifecycle_reason_model_json @@ -73196,18 +84186,22 @@ def test_vpn_server_route_patch_serialization(self): vpn_server_route_patch_model_json['name'] = 'my-vpn-route-2' # Construct a model instance of VPNServerRoutePatch by calling from_dict on the json representation - vpn_server_route_patch_model = VPNServerRoutePatch.from_dict(vpn_server_route_patch_model_json) + vpn_server_route_patch_model = VPNServerRoutePatch.from_dict( + vpn_server_route_patch_model_json) assert vpn_server_route_patch_model != False # Construct a model instance of VPNServerRoutePatch by calling from_dict on the json representation - vpn_server_route_patch_model_dict = VPNServerRoutePatch.from_dict(vpn_server_route_patch_model_json).__dict__ - vpn_server_route_patch_model2 = VPNServerRoutePatch(**vpn_server_route_patch_model_dict) + vpn_server_route_patch_model_dict = VPNServerRoutePatch.from_dict( + vpn_server_route_patch_model_json).__dict__ + vpn_server_route_patch_model2 = VPNServerRoutePatch( + **vpn_server_route_patch_model_dict) # Verify the model instances are equivalent assert vpn_server_route_patch_model == vpn_server_route_patch_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_route_patch_model_json2 = vpn_server_route_patch_model.to_dict() + vpn_server_route_patch_model_json2 = vpn_server_route_patch_model.to_dict( + ) assert vpn_server_route_patch_model_json2 == vpn_server_route_patch_model_json @@ -73224,102 +84218,145 @@ def test_virtual_network_interface_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.0.32' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' - reserved_ip_reference_model['id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' reserved_ip_reference_model['name'] = 'my-reserved-ip-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' - resource_group_reference_model['id'] = '4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'id'] = '4bbce614c13444cd8fc5e7e878ef8e21' resource_group_reference_model['name'] = 'Default' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference security_group_reference_model['crn'] = 'crn:[...]' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' - security_group_reference_model['id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference subnet_reference_model['crn'] = 'crn:[...]' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['id'] = '9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - share_mount_target_reference_deleted_model = {} # ShareMountTargetReferenceDeleted - share_mount_target_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - virtual_network_interface_target_model = {} # VirtualNetworkInterfaceTargetShareMountTargetReference - virtual_network_interface_target_model['deleted'] = share_mount_target_reference_deleted_model - virtual_network_interface_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - virtual_network_interface_target_model['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_deleted_model = { + } # ShareMountTargetReferenceDeleted + share_mount_target_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + virtual_network_interface_target_model = { + } # VirtualNetworkInterfaceTargetShareMountTargetReference + virtual_network_interface_target_model[ + 'deleted'] = share_mount_target_reference_deleted_model + virtual_network_interface_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + virtual_network_interface_target_model[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' virtual_network_interface_target_model['name'] = 'my-share-mount-target' - virtual_network_interface_target_model['resource_type'] = 'share_mount_target' + virtual_network_interface_target_model[ + 'resource_type'] = 'share_mount_target' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference vpc_reference_model['crn'] = 'crn:[...]' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a0819609-0997-4f92-9409-86c95ddf59d3' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a0819609-0997-4f92-9409-86c95ddf59d3' vpc_reference_model['id'] = 'a0819609-0997-4f92-9409-86c95ddf59d3' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a VirtualNetworkInterface model virtual_network_interface_model_json = {} virtual_network_interface_model_json['allow_ip_spoofing'] = True virtual_network_interface_model_json['auto_delete'] = False - virtual_network_interface_model_json['created_at'] = '2019-01-01T12:00:00Z' - virtual_network_interface_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + virtual_network_interface_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' virtual_network_interface_model_json['enable_infrastructure_nat'] = True - virtual_network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_model_json['ips'] = [reserved_ip_reference_model] + virtual_network_interface_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_model_json['ips'] = [ + reserved_ip_reference_model + ] virtual_network_interface_model_json['lifecycle_state'] = 'stable' - virtual_network_interface_model_json['mac_address'] = '02:00:4D:45:45:4D' - virtual_network_interface_model_json['name'] = 'my-virtual-network-interface' - virtual_network_interface_model_json['primary_ip'] = reserved_ip_reference_model - virtual_network_interface_model_json['resource_group'] = resource_group_reference_model - virtual_network_interface_model_json['resource_type'] = 'virtual_network_interface' - virtual_network_interface_model_json['security_groups'] = [security_group_reference_model] + virtual_network_interface_model_json[ + 'mac_address'] = '02:00:4D:45:45:4D' + virtual_network_interface_model_json[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_model_json[ + 'primary_ip'] = reserved_ip_reference_model + virtual_network_interface_model_json[ + 'protocol_state_filtering_mode'] = 'auto' + virtual_network_interface_model_json[ + 'resource_group'] = resource_group_reference_model + virtual_network_interface_model_json[ + 'resource_type'] = 'virtual_network_interface' + virtual_network_interface_model_json['security_groups'] = [ + security_group_reference_model + ] virtual_network_interface_model_json['subnet'] = subnet_reference_model - virtual_network_interface_model_json['target'] = virtual_network_interface_target_model + virtual_network_interface_model_json[ + 'target'] = virtual_network_interface_target_model virtual_network_interface_model_json['vpc'] = vpc_reference_model virtual_network_interface_model_json['zone'] = zone_reference_model # Construct a model instance of VirtualNetworkInterface by calling from_dict on the json representation - virtual_network_interface_model = VirtualNetworkInterface.from_dict(virtual_network_interface_model_json) + virtual_network_interface_model = VirtualNetworkInterface.from_dict( + virtual_network_interface_model_json) assert virtual_network_interface_model != False # Construct a model instance of VirtualNetworkInterface by calling from_dict on the json representation - virtual_network_interface_model_dict = VirtualNetworkInterface.from_dict(virtual_network_interface_model_json).__dict__ - virtual_network_interface_model2 = VirtualNetworkInterface(**virtual_network_interface_model_dict) + virtual_network_interface_model_dict = VirtualNetworkInterface.from_dict( + virtual_network_interface_model_json).__dict__ + virtual_network_interface_model2 = VirtualNetworkInterface( + **virtual_network_interface_model_dict) # Verify the model instances are equivalent assert virtual_network_interface_model == virtual_network_interface_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_model_json2 = virtual_network_interface_model.to_dict() + virtual_network_interface_model_json2 = virtual_network_interface_model.to_dict( + ) assert virtual_network_interface_model_json2 == virtual_network_interface_model_json @@ -73335,116 +84372,161 @@ def test_virtual_network_interface_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_collection_first_model = {} # VirtualNetworkInterfaceCollectionFirst - virtual_network_interface_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20' + virtual_network_interface_collection_first_model = { + } # VirtualNetworkInterfaceCollectionFirst + virtual_network_interface_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20' - virtual_network_interface_collection_next_model = {} # VirtualNetworkInterfaceCollectionNext - virtual_network_interface_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' + virtual_network_interface_collection_next_model = { + } # VirtualNetworkInterfaceCollectionNext + virtual_network_interface_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.0.32' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' - reserved_ip_reference_model['id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' + reserved_ip_reference_model[ + 'id'] = '0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5' reserved_ip_reference_model['name'] = 'my-reserved-ip-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' - resource_group_reference_model['id'] = '4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/4bbce614c13444cd8fc5e7e878ef8e21' + resource_group_reference_model[ + 'id'] = '4bbce614c13444cd8fc5e7e878ef8e21' resource_group_reference_model['name'] = 'Default' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference security_group_reference_model['crn'] = 'crn:[...]' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' - security_group_reference_model['id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589' + security_group_reference_model[ + 'id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference subnet_reference_model['crn'] = 'crn:[...]' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['id'] = '9270d819-c05e-4352-99e4-80c4680cdb7c' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - share_mount_target_reference_deleted_model = {} # ShareMountTargetReferenceDeleted - share_mount_target_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - virtual_network_interface_target_model = {} # VirtualNetworkInterfaceTargetShareMountTargetReference - virtual_network_interface_target_model['deleted'] = share_mount_target_reference_deleted_model - virtual_network_interface_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - virtual_network_interface_target_model['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + share_mount_target_reference_deleted_model = { + } # ShareMountTargetReferenceDeleted + share_mount_target_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + virtual_network_interface_target_model = { + } # VirtualNetworkInterfaceTargetShareMountTargetReference + virtual_network_interface_target_model[ + 'deleted'] = share_mount_target_reference_deleted_model + virtual_network_interface_target_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + virtual_network_interface_target_model[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' virtual_network_interface_target_model['name'] = 'my-share-mount-target' - virtual_network_interface_target_model['resource_type'] = 'share_mount_target' + virtual_network_interface_target_model[ + 'resource_type'] = 'share_mount_target' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference vpc_reference_model['crn'] = 'crn:[...]' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a0819609-0997-4f92-9409-86c95ddf59d3' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a0819609-0997-4f92-9409-86c95ddf59d3' vpc_reference_model['id'] = 'a0819609-0997-4f92-9409-86c95ddf59d3' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' virtual_network_interface_model = {} # VirtualNetworkInterface virtual_network_interface_model['allow_ip_spoofing'] = False virtual_network_interface_model['auto_delete'] = True - virtual_network_interface_model['created_at'] = '2019-01-31T03:42:32.993000Z' + virtual_network_interface_model[ + 'created_at'] = '2019-01-31T03:42:32.993000Z' virtual_network_interface_model['crn'] = 'crn:[...]' virtual_network_interface_model['enable_infrastructure_nat'] = False - virtual_network_interface_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' - virtual_network_interface_model['id'] = '0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_model[ + 'id'] = '0767-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_model['ips'] = [reserved_ip_reference_model] virtual_network_interface_model['lifecycle_state'] = 'stable' virtual_network_interface_model['mac_address'] = '02:00:04:00:C4:6A' virtual_network_interface_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_model['primary_ip'] = reserved_ip_reference_model - virtual_network_interface_model['resource_group'] = resource_group_reference_model - virtual_network_interface_model['resource_type'] = 'virtual_network_interface' - virtual_network_interface_model['security_groups'] = [security_group_reference_model] + virtual_network_interface_model[ + 'primary_ip'] = reserved_ip_reference_model + virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + virtual_network_interface_model[ + 'resource_group'] = resource_group_reference_model + virtual_network_interface_model[ + 'resource_type'] = 'virtual_network_interface' + virtual_network_interface_model['security_groups'] = [ + security_group_reference_model + ] virtual_network_interface_model['subnet'] = subnet_reference_model - virtual_network_interface_model['target'] = virtual_network_interface_target_model + virtual_network_interface_model[ + 'target'] = virtual_network_interface_target_model virtual_network_interface_model['vpc'] = vpc_reference_model virtual_network_interface_model['zone'] = zone_reference_model # Construct a json representation of a VirtualNetworkInterfaceCollection model virtual_network_interface_collection_model_json = {} - virtual_network_interface_collection_model_json['first'] = virtual_network_interface_collection_first_model + virtual_network_interface_collection_model_json[ + 'first'] = virtual_network_interface_collection_first_model virtual_network_interface_collection_model_json['limit'] = 20 - virtual_network_interface_collection_model_json['next'] = virtual_network_interface_collection_next_model + virtual_network_interface_collection_model_json[ + 'next'] = virtual_network_interface_collection_next_model virtual_network_interface_collection_model_json['total_count'] = 132 - virtual_network_interface_collection_model_json['virtual_network_interfaces'] = [virtual_network_interface_model] + virtual_network_interface_collection_model_json[ + 'virtual_network_interfaces'] = [virtual_network_interface_model] # Construct a model instance of VirtualNetworkInterfaceCollection by calling from_dict on the json representation - virtual_network_interface_collection_model = VirtualNetworkInterfaceCollection.from_dict(virtual_network_interface_collection_model_json) + virtual_network_interface_collection_model = VirtualNetworkInterfaceCollection.from_dict( + virtual_network_interface_collection_model_json) assert virtual_network_interface_collection_model != False # Construct a model instance of VirtualNetworkInterfaceCollection by calling from_dict on the json representation - virtual_network_interface_collection_model_dict = VirtualNetworkInterfaceCollection.from_dict(virtual_network_interface_collection_model_json).__dict__ - virtual_network_interface_collection_model2 = VirtualNetworkInterfaceCollection(**virtual_network_interface_collection_model_dict) + virtual_network_interface_collection_model_dict = VirtualNetworkInterfaceCollection.from_dict( + virtual_network_interface_collection_model_json).__dict__ + virtual_network_interface_collection_model2 = VirtualNetworkInterfaceCollection( + **virtual_network_interface_collection_model_dict) # Verify the model instances are equivalent assert virtual_network_interface_collection_model == virtual_network_interface_collection_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_collection_model_json2 = virtual_network_interface_collection_model.to_dict() + virtual_network_interface_collection_model_json2 = virtual_network_interface_collection_model.to_dict( + ) assert virtual_network_interface_collection_model_json2 == virtual_network_interface_collection_model_json @@ -73460,21 +84542,26 @@ def test_virtual_network_interface_collection_first_serialization(self): # Construct a json representation of a VirtualNetworkInterfaceCollectionFirst model virtual_network_interface_collection_first_model_json = {} - virtual_network_interface_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20' + virtual_network_interface_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?limit=20' # Construct a model instance of VirtualNetworkInterfaceCollectionFirst by calling from_dict on the json representation - virtual_network_interface_collection_first_model = VirtualNetworkInterfaceCollectionFirst.from_dict(virtual_network_interface_collection_first_model_json) + virtual_network_interface_collection_first_model = VirtualNetworkInterfaceCollectionFirst.from_dict( + virtual_network_interface_collection_first_model_json) assert virtual_network_interface_collection_first_model != False # Construct a model instance of VirtualNetworkInterfaceCollectionFirst by calling from_dict on the json representation - virtual_network_interface_collection_first_model_dict = VirtualNetworkInterfaceCollectionFirst.from_dict(virtual_network_interface_collection_first_model_json).__dict__ - virtual_network_interface_collection_first_model2 = VirtualNetworkInterfaceCollectionFirst(**virtual_network_interface_collection_first_model_dict) + virtual_network_interface_collection_first_model_dict = VirtualNetworkInterfaceCollectionFirst.from_dict( + virtual_network_interface_collection_first_model_json).__dict__ + virtual_network_interface_collection_first_model2 = VirtualNetworkInterfaceCollectionFirst( + **virtual_network_interface_collection_first_model_dict) # Verify the model instances are equivalent assert virtual_network_interface_collection_first_model == virtual_network_interface_collection_first_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_collection_first_model_json2 = virtual_network_interface_collection_first_model.to_dict() + virtual_network_interface_collection_first_model_json2 = virtual_network_interface_collection_first_model.to_dict( + ) assert virtual_network_interface_collection_first_model_json2 == virtual_network_interface_collection_first_model_json @@ -73490,21 +84577,26 @@ def test_virtual_network_interface_collection_next_serialization(self): # Construct a json representation of a VirtualNetworkInterfaceCollectionNext model virtual_network_interface_collection_next_model_json = {} - virtual_network_interface_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' + virtual_network_interface_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20' # Construct a model instance of VirtualNetworkInterfaceCollectionNext by calling from_dict on the json representation - virtual_network_interface_collection_next_model = VirtualNetworkInterfaceCollectionNext.from_dict(virtual_network_interface_collection_next_model_json) + virtual_network_interface_collection_next_model = VirtualNetworkInterfaceCollectionNext.from_dict( + virtual_network_interface_collection_next_model_json) assert virtual_network_interface_collection_next_model != False # Construct a model instance of VirtualNetworkInterfaceCollectionNext by calling from_dict on the json representation - virtual_network_interface_collection_next_model_dict = VirtualNetworkInterfaceCollectionNext.from_dict(virtual_network_interface_collection_next_model_json).__dict__ - virtual_network_interface_collection_next_model2 = VirtualNetworkInterfaceCollectionNext(**virtual_network_interface_collection_next_model_dict) + virtual_network_interface_collection_next_model_dict = VirtualNetworkInterfaceCollectionNext.from_dict( + virtual_network_interface_collection_next_model_json).__dict__ + virtual_network_interface_collection_next_model2 = VirtualNetworkInterfaceCollectionNext( + **virtual_network_interface_collection_next_model_dict) # Verify the model instances are equivalent assert virtual_network_interface_collection_next_model == virtual_network_interface_collection_next_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_collection_next_model_json2 = virtual_network_interface_collection_next_model.to_dict() + virtual_network_interface_collection_next_model_json2 = virtual_network_interface_collection_next_model.to_dict( + ) assert virtual_network_interface_collection_next_model_json2 == virtual_network_interface_collection_next_model_json @@ -73522,22 +84614,30 @@ def test_virtual_network_interface_patch_serialization(self): virtual_network_interface_patch_model_json = {} virtual_network_interface_patch_model_json['allow_ip_spoofing'] = True virtual_network_interface_patch_model_json['auto_delete'] = False - virtual_network_interface_patch_model_json['enable_infrastructure_nat'] = True - virtual_network_interface_patch_model_json['name'] = 'my-virtual-network-interface' + virtual_network_interface_patch_model_json[ + 'enable_infrastructure_nat'] = True + virtual_network_interface_patch_model_json[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_patch_model_json[ + 'protocol_state_filtering_mode'] = 'auto' # Construct a model instance of VirtualNetworkInterfacePatch by calling from_dict on the json representation - virtual_network_interface_patch_model = VirtualNetworkInterfacePatch.from_dict(virtual_network_interface_patch_model_json) + virtual_network_interface_patch_model = VirtualNetworkInterfacePatch.from_dict( + virtual_network_interface_patch_model_json) assert virtual_network_interface_patch_model != False # Construct a model instance of VirtualNetworkInterfacePatch by calling from_dict on the json representation - virtual_network_interface_patch_model_dict = VirtualNetworkInterfacePatch.from_dict(virtual_network_interface_patch_model_json).__dict__ - virtual_network_interface_patch_model2 = VirtualNetworkInterfacePatch(**virtual_network_interface_patch_model_dict) + virtual_network_interface_patch_model_dict = VirtualNetworkInterfacePatch.from_dict( + virtual_network_interface_patch_model_json).__dict__ + virtual_network_interface_patch_model2 = VirtualNetworkInterfacePatch( + **virtual_network_interface_patch_model_dict) # Verify the model instances are equivalent assert virtual_network_interface_patch_model == virtual_network_interface_patch_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_patch_model_json2 = virtual_network_interface_patch_model.to_dict() + virtual_network_interface_patch_model_json2 = virtual_network_interface_patch_model.to_dict( + ) assert virtual_network_interface_patch_model_json2 == virtual_network_interface_patch_model_json @@ -73546,32 +84646,43 @@ class TestModel_VirtualNetworkInterfaceReferenceAttachmentContext: Test Class for VirtualNetworkInterfaceReferenceAttachmentContext """ - def test_virtual_network_interface_reference_attachment_context_serialization(self): + def test_virtual_network_interface_reference_attachment_context_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfaceReferenceAttachmentContext """ # Construct a json representation of a VirtualNetworkInterfaceReferenceAttachmentContext model virtual_network_interface_reference_attachment_context_model_json = {} - virtual_network_interface_reference_attachment_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model_json['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model_json['resource_type'] = 'virtual_network_interface' + virtual_network_interface_reference_attachment_context_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model_json[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model_json[ + 'resource_type'] = 'virtual_network_interface' # Construct a model instance of VirtualNetworkInterfaceReferenceAttachmentContext by calling from_dict on the json representation - virtual_network_interface_reference_attachment_context_model = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface_reference_attachment_context_model_json) + virtual_network_interface_reference_attachment_context_model = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + virtual_network_interface_reference_attachment_context_model_json) assert virtual_network_interface_reference_attachment_context_model != False # Construct a model instance of VirtualNetworkInterfaceReferenceAttachmentContext by calling from_dict on the json representation - virtual_network_interface_reference_attachment_context_model_dict = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface_reference_attachment_context_model_json).__dict__ - virtual_network_interface_reference_attachment_context_model2 = VirtualNetworkInterfaceReferenceAttachmentContext(**virtual_network_interface_reference_attachment_context_model_dict) + virtual_network_interface_reference_attachment_context_model_dict = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + virtual_network_interface_reference_attachment_context_model_json + ).__dict__ + virtual_network_interface_reference_attachment_context_model2 = VirtualNetworkInterfaceReferenceAttachmentContext( + **virtual_network_interface_reference_attachment_context_model_dict) # Verify the model instances are equivalent assert virtual_network_interface_reference_attachment_context_model == virtual_network_interface_reference_attachment_context_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_reference_attachment_context_model_json2 = virtual_network_interface_reference_attachment_context_model.to_dict() + virtual_network_interface_reference_attachment_context_model_json2 = virtual_network_interface_reference_attachment_context_model.to_dict( + ) assert virtual_network_interface_reference_attachment_context_model_json2 == virtual_network_interface_reference_attachment_context_model_json @@ -73587,21 +84698,26 @@ def test_virtual_network_interface_reference_deleted_serialization(self): # Construct a json representation of a VirtualNetworkInterfaceReferenceDeleted model virtual_network_interface_reference_deleted_model_json = {} - virtual_network_interface_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + virtual_network_interface_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VirtualNetworkInterfaceReferenceDeleted by calling from_dict on the json representation - virtual_network_interface_reference_deleted_model = VirtualNetworkInterfaceReferenceDeleted.from_dict(virtual_network_interface_reference_deleted_model_json) + virtual_network_interface_reference_deleted_model = VirtualNetworkInterfaceReferenceDeleted.from_dict( + virtual_network_interface_reference_deleted_model_json) assert virtual_network_interface_reference_deleted_model != False # Construct a model instance of VirtualNetworkInterfaceReferenceDeleted by calling from_dict on the json representation - virtual_network_interface_reference_deleted_model_dict = VirtualNetworkInterfaceReferenceDeleted.from_dict(virtual_network_interface_reference_deleted_model_json).__dict__ - virtual_network_interface_reference_deleted_model2 = VirtualNetworkInterfaceReferenceDeleted(**virtual_network_interface_reference_deleted_model_dict) + virtual_network_interface_reference_deleted_model_dict = VirtualNetworkInterfaceReferenceDeleted.from_dict( + virtual_network_interface_reference_deleted_model_json).__dict__ + virtual_network_interface_reference_deleted_model2 = VirtualNetworkInterfaceReferenceDeleted( + **virtual_network_interface_reference_deleted_model_dict) # Verify the model instances are equivalent assert virtual_network_interface_reference_deleted_model == virtual_network_interface_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_reference_deleted_model_json2 = virtual_network_interface_reference_deleted_model.to_dict() + virtual_network_interface_reference_deleted_model_json2 = virtual_network_interface_reference_deleted_model.to_dict( + ) assert virtual_network_interface_reference_deleted_model_json2 == virtual_network_interface_reference_deleted_model_json @@ -73617,42 +84733,76 @@ def test_volume_serialization(self): # Construct dict forms of any model objects needed in order to build this model. + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + + volume_catalog_offering_model = {} # VolumeCatalogOffering + volume_catalog_offering_model[ + 'plan'] = catalog_offering_version_plan_reference_model + volume_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model + encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_health_reason_model = {} # VolumeHealthReason volume_health_reason_model['code'] = 'initializing_from_snapshot' - volume_health_reason_model['message'] = 'Performance will be degraded while this volume is being initialized from its snapshot' - volume_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf' + volume_health_reason_model[ + 'message'] = 'Performance will be degraded while this volume is being initialized from its snapshot' + volume_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf' operating_system_model = {} # OperatingSystem + operating_system_model['allow_user_image_creation'] = True operating_system_model['architecture'] = 'amd64' operating_system_model['dedicated_host_only'] = False operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model['family'] = 'Ubuntu Server' - operating_system_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model['name'] = 'ubuntu-16-amd64' + operating_system_model['user_data_format'] = 'cloud_init' operating_system_model['vendor'] = 'Canonical' operating_system_model['version'] = '16.04 LTS' volume_profile_reference_model = {} # VolumeProfileReference - volume_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' + volume_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' volume_profile_reference_model['name'] = 'general-purpose' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' image_remote_model = {} # ImageRemote @@ -73660,25 +84810,32 @@ def test_volume_serialization(self): image_remote_model['region'] = region_reference_model image_reference_model = {} # ImageReference - image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['deleted'] = image_reference_deleted_model - image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['name'] = 'my-image' image_reference_model['remote'] = image_remote_model image_reference_model['resource_type'] = 'image' snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_reference_model = {} # SnapshotReference - snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['deleted'] = snapshot_reference_deleted_model - snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['name'] = 'my-snapshot' snapshot_reference_model['remote'] = snapshot_remote_model snapshot_reference_model['resource_type'] = 'snapshot' @@ -73686,36 +84843,53 @@ def test_volume_serialization(self): volume_status_reason_model = {} # VolumeStatusReason volume_status_reason_model['code'] = 'encryption_key_deleted' volume_status_reason_model['message'] = 'testString' - volume_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + volume_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' - volume_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted - volume_attachment_reference_volume_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_volume_context_deleted_model = { + } # VolumeAttachmentReferenceVolumeContextDeleted + volume_attachment_reference_volume_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' + volume_attachment_device_model[ + 'id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['deleted'] = instance_reference_deleted_model - instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['name'] = 'my-instance' - volume_attachment_reference_volume_context_model = {} # VolumeAttachmentReferenceVolumeContext - volume_attachment_reference_volume_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_reference_volume_context_model['deleted'] = volume_attachment_reference_volume_context_deleted_model - volume_attachment_reference_volume_context_model['device'] = volume_attachment_device_model - volume_attachment_reference_volume_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_volume_context_model['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_volume_context_model['instance'] = instance_reference_model - volume_attachment_reference_volume_context_model['name'] = 'my-volume-attachment' + volume_attachment_reference_volume_context_model = { + } # VolumeAttachmentReferenceVolumeContext + volume_attachment_reference_volume_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_reference_volume_context_model[ + 'deleted'] = volume_attachment_reference_volume_context_deleted_model + volume_attachment_reference_volume_context_model[ + 'device'] = volume_attachment_device_model + volume_attachment_reference_volume_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_volume_context_model[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_volume_context_model[ + 'instance'] = instance_reference_model + volume_attachment_reference_volume_context_model[ + 'name'] = 'my-volume-attachment' volume_attachment_reference_volume_context_model['type'] = 'boot' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' # Construct a json representation of a Volume model @@ -73725,13 +84899,16 @@ def test_volume_serialization(self): volume_model_json['bandwidth'] = 1000 volume_model_json['busy'] = True volume_model_json['capacity'] = 1000 + volume_model_json['catalog_offering'] = volume_catalog_offering_model volume_model_json['created_at'] = '2019-01-01T12:00:00Z' - volume_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_model_json['encryption'] = 'provider_managed' volume_model_json['encryption_key'] = encryption_key_reference_model volume_model_json['health_reasons'] = [volume_health_reason_model] volume_model_json['health_state'] = 'ok' - volume_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_model_json['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_model_json['iops'] = 10000 volume_model_json['name'] = 'my-volume' @@ -73744,7 +84921,9 @@ def test_volume_serialization(self): volume_model_json['status'] = 'available' volume_model_json['status_reasons'] = [volume_status_reason_model] volume_model_json['user_tags'] = ['testString'] - volume_model_json['volume_attachments'] = [volume_attachment_reference_volume_context_model] + volume_model_json['volume_attachments'] = [ + volume_attachment_reference_volume_context_model + ] volume_model_json['zone'] = zone_reference_model # Construct a model instance of Volume by calling from_dict on the json representation @@ -73776,18 +84955,27 @@ def test_volume_attachment_serialization(self): # Construct dict forms of any model objects needed in order to build this model. volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' + volume_attachment_device_model[ + 'id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' - volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted - volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_volume_attachment_context_deleted_model = { + } # VolumeReferenceVolumeAttachmentContextDeleted + volume_reference_volume_attachment_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext + volume_reference_volume_attachment_context_model = { + } # VolumeReferenceVolumeAttachmentContext volume_reference_volume_attachment_context_model['crn'] = 'crn:[...]' - volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model - volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/ca4b6df3-f5a8-4667-b5f2-f3b9b4160781' - volume_reference_volume_attachment_context_model['id'] = 'ca4b6df3-f5a8-4667-b5f2-f3b9b4160781' - volume_reference_volume_attachment_context_model['name'] = 'my-data-volume' - volume_reference_volume_attachment_context_model['resource_type'] = 'volume' + volume_reference_volume_attachment_context_model[ + 'deleted'] = volume_reference_volume_attachment_context_deleted_model + volume_reference_volume_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/ca4b6df3-f5a8-4667-b5f2-f3b9b4160781' + volume_reference_volume_attachment_context_model[ + 'id'] = 'ca4b6df3-f5a8-4667-b5f2-f3b9b4160781' + volume_reference_volume_attachment_context_model[ + 'name'] = 'my-data-volume' + volume_reference_volume_attachment_context_model[ + 'resource_type'] = 'volume' # Construct a json representation of a VolumeAttachment model volume_attachment_model_json = {} @@ -73795,20 +84983,26 @@ def test_volume_attachment_serialization(self): volume_attachment_model_json['created_at'] = '2019-01-01T12:00:00Z' volume_attachment_model_json['delete_volume_on_instance_delete'] = True volume_attachment_model_json['device'] = volume_attachment_device_model - volume_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_model_json['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_model_json[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' volume_attachment_model_json['name'] = 'my-volume-attachment' volume_attachment_model_json['status'] = 'attached' volume_attachment_model_json['type'] = 'boot' - volume_attachment_model_json['volume'] = volume_reference_volume_attachment_context_model + volume_attachment_model_json[ + 'volume'] = volume_reference_volume_attachment_context_model # Construct a model instance of VolumeAttachment by calling from_dict on the json representation - volume_attachment_model = VolumeAttachment.from_dict(volume_attachment_model_json) + volume_attachment_model = VolumeAttachment.from_dict( + volume_attachment_model_json) assert volume_attachment_model != False # Construct a model instance of VolumeAttachment by calling from_dict on the json representation - volume_attachment_model_dict = VolumeAttachment.from_dict(volume_attachment_model_json).__dict__ - volume_attachment_model2 = VolumeAttachment(**volume_attachment_model_dict) + volume_attachment_model_dict = VolumeAttachment.from_dict( + volume_attachment_model_json).__dict__ + volume_attachment_model2 = VolumeAttachment( + **volume_attachment_model_dict) # Verify the model instances are equivalent assert volume_attachment_model == volume_attachment_model2 @@ -73831,48 +85025,65 @@ def test_volume_attachment_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' + volume_attachment_device_model[ + 'id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' - volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted - volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_volume_attachment_context_deleted_model = { + } # VolumeReferenceVolumeAttachmentContextDeleted + volume_reference_volume_attachment_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext + volume_reference_volume_attachment_context_model = { + } # VolumeReferenceVolumeAttachmentContext volume_reference_volume_attachment_context_model['crn'] = 'crn:[...]' - volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model - volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/ac0b16a5-ccc2-47dd-90e2-b9e5f367b6c6' - volume_reference_volume_attachment_context_model['id'] = 'ac0b16a5-ccc2-47dd-90e2-b9e5f367b6c6' - volume_reference_volume_attachment_context_model['name'] = 'my-boot-volume' - volume_reference_volume_attachment_context_model['resource_type'] = 'volume' + volume_reference_volume_attachment_context_model[ + 'deleted'] = volume_reference_volume_attachment_context_deleted_model + volume_reference_volume_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/ac0b16a5-ccc2-47dd-90e2-b9e5f367b6c6' + volume_reference_volume_attachment_context_model[ + 'id'] = 'ac0b16a5-ccc2-47dd-90e2-b9e5f367b6c6' + volume_reference_volume_attachment_context_model[ + 'name'] = 'my-boot-volume' + volume_reference_volume_attachment_context_model[ + 'resource_type'] = 'volume' volume_attachment_model = {} # VolumeAttachment volume_attachment_model['bandwidth'] = 250 volume_attachment_model['created_at'] = '2019-02-28T16:32:05Z' volume_attachment_model['delete_volume_on_instance_delete'] = False volume_attachment_model['device'] = volume_attachment_device_model - volume_attachment_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/8f06378c-ed0e-481e-b98c-9a6dfbee1ed5/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88' + volume_attachment_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/8f06378c-ed0e-481e-b98c-9a6dfbee1ed5/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88' volume_attachment_model['id'] = 'fdb3642d-c849-4c29-97a9-03b868616f88' volume_attachment_model['name'] = 'my-boot-volume-attachment' volume_attachment_model['status'] = 'attached' volume_attachment_model['type'] = 'boot' - volume_attachment_model['volume'] = volume_reference_volume_attachment_context_model + volume_attachment_model[ + 'volume'] = volume_reference_volume_attachment_context_model # Construct a json representation of a VolumeAttachmentCollection model volume_attachment_collection_model_json = {} - volume_attachment_collection_model_json['volume_attachments'] = [volume_attachment_model] + volume_attachment_collection_model_json['volume_attachments'] = [ + volume_attachment_model + ] # Construct a model instance of VolumeAttachmentCollection by calling from_dict on the json representation - volume_attachment_collection_model = VolumeAttachmentCollection.from_dict(volume_attachment_collection_model_json) + volume_attachment_collection_model = VolumeAttachmentCollection.from_dict( + volume_attachment_collection_model_json) assert volume_attachment_collection_model != False # Construct a model instance of VolumeAttachmentCollection by calling from_dict on the json representation - volume_attachment_collection_model_dict = VolumeAttachmentCollection.from_dict(volume_attachment_collection_model_json).__dict__ - volume_attachment_collection_model2 = VolumeAttachmentCollection(**volume_attachment_collection_model_dict) + volume_attachment_collection_model_dict = VolumeAttachmentCollection.from_dict( + volume_attachment_collection_model_json).__dict__ + volume_attachment_collection_model2 = VolumeAttachmentCollection( + **volume_attachment_collection_model_dict) # Verify the model instances are equivalent assert volume_attachment_collection_model == volume_attachment_collection_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_collection_model_json2 = volume_attachment_collection_model.to_dict() + volume_attachment_collection_model_json2 = volume_attachment_collection_model.to_dict( + ) assert volume_attachment_collection_model_json2 == volume_attachment_collection_model_json @@ -73888,21 +85099,26 @@ def test_volume_attachment_device_serialization(self): # Construct a json representation of a VolumeAttachmentDevice model volume_attachment_device_model_json = {} - volume_attachment_device_model_json['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' + volume_attachment_device_model_json[ + 'id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' # Construct a model instance of VolumeAttachmentDevice by calling from_dict on the json representation - volume_attachment_device_model = VolumeAttachmentDevice.from_dict(volume_attachment_device_model_json) + volume_attachment_device_model = VolumeAttachmentDevice.from_dict( + volume_attachment_device_model_json) assert volume_attachment_device_model != False # Construct a model instance of VolumeAttachmentDevice by calling from_dict on the json representation - volume_attachment_device_model_dict = VolumeAttachmentDevice.from_dict(volume_attachment_device_model_json).__dict__ - volume_attachment_device_model2 = VolumeAttachmentDevice(**volume_attachment_device_model_dict) + volume_attachment_device_model_dict = VolumeAttachmentDevice.from_dict( + volume_attachment_device_model_json).__dict__ + volume_attachment_device_model2 = VolumeAttachmentDevice( + **volume_attachment_device_model_dict) # Verify the model instances are equivalent assert volume_attachment_device_model == volume_attachment_device_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_device_model_json2 = volume_attachment_device_model.to_dict() + volume_attachment_device_model_json2 = volume_attachment_device_model.to_dict( + ) assert volume_attachment_device_model_json2 == volume_attachment_device_model_json @@ -73918,22 +85134,27 @@ def test_volume_attachment_patch_serialization(self): # Construct a json representation of a VolumeAttachmentPatch model volume_attachment_patch_model_json = {} - volume_attachment_patch_model_json['delete_volume_on_instance_delete'] = True + volume_attachment_patch_model_json[ + 'delete_volume_on_instance_delete'] = True volume_attachment_patch_model_json['name'] = 'my-volume-attachment' # Construct a model instance of VolumeAttachmentPatch by calling from_dict on the json representation - volume_attachment_patch_model = VolumeAttachmentPatch.from_dict(volume_attachment_patch_model_json) + volume_attachment_patch_model = VolumeAttachmentPatch.from_dict( + volume_attachment_patch_model_json) assert volume_attachment_patch_model != False # Construct a model instance of VolumeAttachmentPatch by calling from_dict on the json representation - volume_attachment_patch_model_dict = VolumeAttachmentPatch.from_dict(volume_attachment_patch_model_json).__dict__ - volume_attachment_patch_model2 = VolumeAttachmentPatch(**volume_attachment_patch_model_dict) + volume_attachment_patch_model_dict = VolumeAttachmentPatch.from_dict( + volume_attachment_patch_model_json).__dict__ + volume_attachment_patch_model2 = VolumeAttachmentPatch( + **volume_attachment_patch_model_dict) # Verify the model instances are equivalent assert volume_attachment_patch_model == volume_attachment_patch_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_patch_model_json2 = volume_attachment_patch_model.to_dict() + volume_attachment_patch_model_json2 = volume_attachment_patch_model.to_dict( + ) assert volume_attachment_patch_model_json2 == volume_attachment_patch_model_json @@ -73949,28 +85170,36 @@ def test_volume_attachment_prototype_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a json representation of a VolumeAttachmentPrototype model volume_attachment_prototype_model_json = {} - volume_attachment_prototype_model_json['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model_json[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model_json['name'] = 'my-volume-attachment' - volume_attachment_prototype_model_json['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model_json[ + 'volume'] = volume_attachment_prototype_volume_model # Construct a model instance of VolumeAttachmentPrototype by calling from_dict on the json representation - volume_attachment_prototype_model = VolumeAttachmentPrototype.from_dict(volume_attachment_prototype_model_json) + volume_attachment_prototype_model = VolumeAttachmentPrototype.from_dict( + volume_attachment_prototype_model_json) assert volume_attachment_prototype_model != False # Construct a model instance of VolumeAttachmentPrototype by calling from_dict on the json representation - volume_attachment_prototype_model_dict = VolumeAttachmentPrototype.from_dict(volume_attachment_prototype_model_json).__dict__ - volume_attachment_prototype_model2 = VolumeAttachmentPrototype(**volume_attachment_prototype_model_dict) + volume_attachment_prototype_model_dict = VolumeAttachmentPrototype.from_dict( + volume_attachment_prototype_model_json).__dict__ + volume_attachment_prototype_model2 = VolumeAttachmentPrototype( + **volume_attachment_prototype_model_dict) # Verify the model instances are equivalent assert volume_attachment_prototype_model == volume_attachment_prototype_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_model_json2 = volume_attachment_prototype_model.to_dict() + volume_attachment_prototype_model_json2 = volume_attachment_prototype_model.to_dict( + ) assert volume_attachment_prototype_model_json2 == volume_attachment_prototype_model_json @@ -73979,7 +85208,8 @@ class TestModel_VolumeAttachmentPrototypeInstanceByImageContext: Test Class for VolumeAttachmentPrototypeInstanceByImageContext """ - def test_volume_attachment_prototype_instance_by_image_context_serialization(self): + def test_volume_attachment_prototype_instance_by_image_context_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeInstanceByImageContext """ @@ -73987,7 +85217,8 @@ def test_volume_attachment_prototype_instance_by_image_context_serialization(sel # Construct dict forms of any model objects needed in order to build this model. encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -73995,34 +85226,46 @@ def test_volume_attachment_prototype_instance_by_image_context_serialization(sel resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] # Construct a json representation of a VolumeAttachmentPrototypeInstanceByImageContext model volume_attachment_prototype_instance_by_image_context_model_json = {} - volume_attachment_prototype_instance_by_image_context_model_json['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model_json['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model_json['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model_json[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model_json[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model_json[ + 'volume'] = volume_prototype_instance_by_image_context_model # Construct a model instance of VolumeAttachmentPrototypeInstanceByImageContext by calling from_dict on the json representation - volume_attachment_prototype_instance_by_image_context_model = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(volume_attachment_prototype_instance_by_image_context_model_json) + volume_attachment_prototype_instance_by_image_context_model = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + volume_attachment_prototype_instance_by_image_context_model_json) assert volume_attachment_prototype_instance_by_image_context_model != False # Construct a model instance of VolumeAttachmentPrototypeInstanceByImageContext by calling from_dict on the json representation - volume_attachment_prototype_instance_by_image_context_model_dict = VolumeAttachmentPrototypeInstanceByImageContext.from_dict(volume_attachment_prototype_instance_by_image_context_model_json).__dict__ - volume_attachment_prototype_instance_by_image_context_model2 = VolumeAttachmentPrototypeInstanceByImageContext(**volume_attachment_prototype_instance_by_image_context_model_dict) + volume_attachment_prototype_instance_by_image_context_model_dict = VolumeAttachmentPrototypeInstanceByImageContext.from_dict( + volume_attachment_prototype_instance_by_image_context_model_json + ).__dict__ + volume_attachment_prototype_instance_by_image_context_model2 = VolumeAttachmentPrototypeInstanceByImageContext( + **volume_attachment_prototype_instance_by_image_context_model_dict) # Verify the model instances are equivalent assert volume_attachment_prototype_instance_by_image_context_model == volume_attachment_prototype_instance_by_image_context_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_instance_by_image_context_model_json2 = volume_attachment_prototype_instance_by_image_context_model.to_dict() + volume_attachment_prototype_instance_by_image_context_model_json2 = volume_attachment_prototype_instance_by_image_context_model.to_dict( + ) assert volume_attachment_prototype_instance_by_image_context_model_json2 == volume_attachment_prototype_instance_by_image_context_model_json @@ -74031,7 +85274,8 @@ class TestModel_VolumeAttachmentPrototypeInstanceBySourceSnapshotContext: Test Class for VolumeAttachmentPrototypeInstanceBySourceSnapshotContext """ - def test_volume_attachment_prototype_instance_by_source_snapshot_context_serialization(self): + def test_volume_attachment_prototype_instance_by_source_snapshot_context_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeInstanceBySourceSnapshotContext """ @@ -74039,7 +85283,8 @@ def test_volume_attachment_prototype_instance_by_source_snapshot_context_seriali # Construct dict forms of any model objects needed in order to build this model. encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -74050,35 +85295,55 @@ def test_volume_attachment_prototype_instance_by_source_snapshot_context_seriali snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' - volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext - volume_prototype_instance_by_source_snapshot_context_model['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = [] + volume_prototype_instance_by_source_snapshot_context_model = { + } # VolumePrototypeInstanceBySourceSnapshotContext + volume_prototype_instance_by_source_snapshot_context_model[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'user_tags'] = [] # Construct a json representation of a VolumeAttachmentPrototypeInstanceBySourceSnapshotContext model volume_attachment_prototype_instance_by_source_snapshot_context_model_json = {} - volume_attachment_prototype_instance_by_source_snapshot_context_model_json['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_source_snapshot_context_model_json['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_source_snapshot_context_model_json['volume'] = volume_prototype_instance_by_source_snapshot_context_model + volume_attachment_prototype_instance_by_source_snapshot_context_model_json[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_source_snapshot_context_model_json[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_source_snapshot_context_model_json[ + 'volume'] = volume_prototype_instance_by_source_snapshot_context_model # Construct a model instance of VolumeAttachmentPrototypeInstanceBySourceSnapshotContext by calling from_dict on the json representation - volume_attachment_prototype_instance_by_source_snapshot_context_model = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(volume_attachment_prototype_instance_by_source_snapshot_context_model_json) + volume_attachment_prototype_instance_by_source_snapshot_context_model = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + volume_attachment_prototype_instance_by_source_snapshot_context_model_json + ) assert volume_attachment_prototype_instance_by_source_snapshot_context_model != False # Construct a model instance of VolumeAttachmentPrototypeInstanceBySourceSnapshotContext by calling from_dict on the json representation - volume_attachment_prototype_instance_by_source_snapshot_context_model_dict = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(volume_attachment_prototype_instance_by_source_snapshot_context_model_json).__dict__ - volume_attachment_prototype_instance_by_source_snapshot_context_model2 = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext(**volume_attachment_prototype_instance_by_source_snapshot_context_model_dict) + volume_attachment_prototype_instance_by_source_snapshot_context_model_dict = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict( + volume_attachment_prototype_instance_by_source_snapshot_context_model_json + ).__dict__ + volume_attachment_prototype_instance_by_source_snapshot_context_model2 = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext( + ** + volume_attachment_prototype_instance_by_source_snapshot_context_model_dict + ) # Verify the model instances are equivalent assert volume_attachment_prototype_instance_by_source_snapshot_context_model == volume_attachment_prototype_instance_by_source_snapshot_context_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_instance_by_source_snapshot_context_model_json2 = volume_attachment_prototype_instance_by_source_snapshot_context_model.to_dict() + volume_attachment_prototype_instance_by_source_snapshot_context_model_json2 = volume_attachment_prototype_instance_by_source_snapshot_context_model.to_dict( + ) assert volume_attachment_prototype_instance_by_source_snapshot_context_model_json2 == volume_attachment_prototype_instance_by_source_snapshot_context_model_json @@ -74087,7 +85352,8 @@ class TestModel_VolumeAttachmentPrototypeInstanceByVolumeContext: Test Class for VolumeAttachmentPrototypeInstanceByVolumeContext """ - def test_volume_attachment_prototype_instance_by_volume_context_serialization(self): + def test_volume_attachment_prototype_instance_by_volume_context_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeInstanceByVolumeContext """ @@ -74095,27 +85361,36 @@ def test_volume_attachment_prototype_instance_by_volume_context_serialization(se # Construct dict forms of any model objects needed in order to build this model. volume_identity_model = {} # VolumeIdentityById - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a json representation of a VolumeAttachmentPrototypeInstanceByVolumeContext model volume_attachment_prototype_instance_by_volume_context_model_json = {} - volume_attachment_prototype_instance_by_volume_context_model_json['delete_volume_on_instance_delete'] = False - volume_attachment_prototype_instance_by_volume_context_model_json['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_volume_context_model_json['volume'] = volume_identity_model + volume_attachment_prototype_instance_by_volume_context_model_json[ + 'delete_volume_on_instance_delete'] = False + volume_attachment_prototype_instance_by_volume_context_model_json[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_volume_context_model_json[ + 'volume'] = volume_identity_model # Construct a model instance of VolumeAttachmentPrototypeInstanceByVolumeContext by calling from_dict on the json representation - volume_attachment_prototype_instance_by_volume_context_model = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict(volume_attachment_prototype_instance_by_volume_context_model_json) + volume_attachment_prototype_instance_by_volume_context_model = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict( + volume_attachment_prototype_instance_by_volume_context_model_json) assert volume_attachment_prototype_instance_by_volume_context_model != False # Construct a model instance of VolumeAttachmentPrototypeInstanceByVolumeContext by calling from_dict on the json representation - volume_attachment_prototype_instance_by_volume_context_model_dict = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict(volume_attachment_prototype_instance_by_volume_context_model_json).__dict__ - volume_attachment_prototype_instance_by_volume_context_model2 = VolumeAttachmentPrototypeInstanceByVolumeContext(**volume_attachment_prototype_instance_by_volume_context_model_dict) + volume_attachment_prototype_instance_by_volume_context_model_dict = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict( + volume_attachment_prototype_instance_by_volume_context_model_json + ).__dict__ + volume_attachment_prototype_instance_by_volume_context_model2 = VolumeAttachmentPrototypeInstanceByVolumeContext( + **volume_attachment_prototype_instance_by_volume_context_model_dict) # Verify the model instances are equivalent assert volume_attachment_prototype_instance_by_volume_context_model == volume_attachment_prototype_instance_by_volume_context_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_instance_by_volume_context_model_json2 = volume_attachment_prototype_instance_by_volume_context_model.to_dict() + volume_attachment_prototype_instance_by_volume_context_model_json2 = volume_attachment_prototype_instance_by_volume_context_model.to_dict( + ) assert volume_attachment_prototype_instance_by_volume_context_model_json2 == volume_attachment_prototype_instance_by_volume_context_model_json @@ -74131,45 +85406,66 @@ def test_volume_attachment_reference_instance_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted - volume_attachment_reference_instance_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_instance_context_deleted_model = { + } # VolumeAttachmentReferenceInstanceContextDeleted + volume_attachment_reference_instance_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a-w8mw8' - - volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted - volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext - volume_reference_volume_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model - volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_device_model[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a-w8mw8' + + volume_reference_volume_attachment_context_deleted_model = { + } # VolumeReferenceVolumeAttachmentContextDeleted + volume_reference_volume_attachment_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + volume_reference_volume_attachment_context_model = { + } # VolumeReferenceVolumeAttachmentContext + volume_reference_volume_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model[ + 'deleted'] = volume_reference_volume_attachment_context_deleted_model + volume_reference_volume_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_volume_attachment_context_model['name'] = 'my-volume' - volume_reference_volume_attachment_context_model['resource_type'] = 'volume' + volume_reference_volume_attachment_context_model[ + 'resource_type'] = 'volume' # Construct a json representation of a VolumeAttachmentReferenceInstanceContext model volume_attachment_reference_instance_context_model_json = {} - volume_attachment_reference_instance_context_model_json['deleted'] = volume_attachment_reference_instance_context_deleted_model - volume_attachment_reference_instance_context_model_json['device'] = volume_attachment_device_model - volume_attachment_reference_instance_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_instance_context_model_json['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_instance_context_model_json['name'] = 'my-volume-attachment' - volume_attachment_reference_instance_context_model_json['volume'] = volume_reference_volume_attachment_context_model + volume_attachment_reference_instance_context_model_json[ + 'deleted'] = volume_attachment_reference_instance_context_deleted_model + volume_attachment_reference_instance_context_model_json[ + 'device'] = volume_attachment_device_model + volume_attachment_reference_instance_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_instance_context_model_json[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_instance_context_model_json[ + 'name'] = 'my-volume-attachment' + volume_attachment_reference_instance_context_model_json[ + 'volume'] = volume_reference_volume_attachment_context_model # Construct a model instance of VolumeAttachmentReferenceInstanceContext by calling from_dict on the json representation - volume_attachment_reference_instance_context_model = VolumeAttachmentReferenceInstanceContext.from_dict(volume_attachment_reference_instance_context_model_json) + volume_attachment_reference_instance_context_model = VolumeAttachmentReferenceInstanceContext.from_dict( + volume_attachment_reference_instance_context_model_json) assert volume_attachment_reference_instance_context_model != False # Construct a model instance of VolumeAttachmentReferenceInstanceContext by calling from_dict on the json representation - volume_attachment_reference_instance_context_model_dict = VolumeAttachmentReferenceInstanceContext.from_dict(volume_attachment_reference_instance_context_model_json).__dict__ - volume_attachment_reference_instance_context_model2 = VolumeAttachmentReferenceInstanceContext(**volume_attachment_reference_instance_context_model_dict) + volume_attachment_reference_instance_context_model_dict = VolumeAttachmentReferenceInstanceContext.from_dict( + volume_attachment_reference_instance_context_model_json).__dict__ + volume_attachment_reference_instance_context_model2 = VolumeAttachmentReferenceInstanceContext( + **volume_attachment_reference_instance_context_model_dict) # Verify the model instances are equivalent assert volume_attachment_reference_instance_context_model == volume_attachment_reference_instance_context_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_reference_instance_context_model_json2 = volume_attachment_reference_instance_context_model.to_dict() + volume_attachment_reference_instance_context_model_json2 = volume_attachment_reference_instance_context_model.to_dict( + ) assert volume_attachment_reference_instance_context_model_json2 == volume_attachment_reference_instance_context_model_json @@ -74178,28 +85474,35 @@ class TestModel_VolumeAttachmentReferenceInstanceContextDeleted: Test Class for VolumeAttachmentReferenceInstanceContextDeleted """ - def test_volume_attachment_reference_instance_context_deleted_serialization(self): + def test_volume_attachment_reference_instance_context_deleted_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentReferenceInstanceContextDeleted """ # Construct a json representation of a VolumeAttachmentReferenceInstanceContextDeleted model volume_attachment_reference_instance_context_deleted_model_json = {} - volume_attachment_reference_instance_context_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_instance_context_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VolumeAttachmentReferenceInstanceContextDeleted by calling from_dict on the json representation - volume_attachment_reference_instance_context_deleted_model = VolumeAttachmentReferenceInstanceContextDeleted.from_dict(volume_attachment_reference_instance_context_deleted_model_json) + volume_attachment_reference_instance_context_deleted_model = VolumeAttachmentReferenceInstanceContextDeleted.from_dict( + volume_attachment_reference_instance_context_deleted_model_json) assert volume_attachment_reference_instance_context_deleted_model != False # Construct a model instance of VolumeAttachmentReferenceInstanceContextDeleted by calling from_dict on the json representation - volume_attachment_reference_instance_context_deleted_model_dict = VolumeAttachmentReferenceInstanceContextDeleted.from_dict(volume_attachment_reference_instance_context_deleted_model_json).__dict__ - volume_attachment_reference_instance_context_deleted_model2 = VolumeAttachmentReferenceInstanceContextDeleted(**volume_attachment_reference_instance_context_deleted_model_dict) + volume_attachment_reference_instance_context_deleted_model_dict = VolumeAttachmentReferenceInstanceContextDeleted.from_dict( + volume_attachment_reference_instance_context_deleted_model_json + ).__dict__ + volume_attachment_reference_instance_context_deleted_model2 = VolumeAttachmentReferenceInstanceContextDeleted( + **volume_attachment_reference_instance_context_deleted_model_dict) # Verify the model instances are equivalent assert volume_attachment_reference_instance_context_deleted_model == volume_attachment_reference_instance_context_deleted_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_reference_instance_context_deleted_model_json2 = volume_attachment_reference_instance_context_deleted_model.to_dict() + volume_attachment_reference_instance_context_deleted_model_json2 = volume_attachment_reference_instance_context_deleted_model.to_dict( + ) assert volume_attachment_reference_instance_context_deleted_model_json2 == volume_attachment_reference_instance_context_deleted_model_json @@ -74215,46 +85518,64 @@ def test_volume_attachment_reference_volume_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - volume_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted - volume_attachment_reference_volume_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_volume_context_deleted_model = { + } # VolumeAttachmentReferenceVolumeContextDeleted + volume_attachment_reference_volume_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' + volume_attachment_device_model[ + 'id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['deleted'] = instance_reference_deleted_model - instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['name'] = 'my-instance' # Construct a json representation of a VolumeAttachmentReferenceVolumeContext model volume_attachment_reference_volume_context_model_json = {} - volume_attachment_reference_volume_context_model_json['delete_volume_on_instance_delete'] = True - volume_attachment_reference_volume_context_model_json['deleted'] = volume_attachment_reference_volume_context_deleted_model - volume_attachment_reference_volume_context_model_json['device'] = volume_attachment_device_model - volume_attachment_reference_volume_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_volume_context_model_json['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_volume_context_model_json['instance'] = instance_reference_model - volume_attachment_reference_volume_context_model_json['name'] = 'my-volume-attachment' + volume_attachment_reference_volume_context_model_json[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_reference_volume_context_model_json[ + 'deleted'] = volume_attachment_reference_volume_context_deleted_model + volume_attachment_reference_volume_context_model_json[ + 'device'] = volume_attachment_device_model + volume_attachment_reference_volume_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_volume_context_model_json[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_volume_context_model_json[ + 'instance'] = instance_reference_model + volume_attachment_reference_volume_context_model_json[ + 'name'] = 'my-volume-attachment' volume_attachment_reference_volume_context_model_json['type'] = 'boot' # Construct a model instance of VolumeAttachmentReferenceVolumeContext by calling from_dict on the json representation - volume_attachment_reference_volume_context_model = VolumeAttachmentReferenceVolumeContext.from_dict(volume_attachment_reference_volume_context_model_json) + volume_attachment_reference_volume_context_model = VolumeAttachmentReferenceVolumeContext.from_dict( + volume_attachment_reference_volume_context_model_json) assert volume_attachment_reference_volume_context_model != False # Construct a model instance of VolumeAttachmentReferenceVolumeContext by calling from_dict on the json representation - volume_attachment_reference_volume_context_model_dict = VolumeAttachmentReferenceVolumeContext.from_dict(volume_attachment_reference_volume_context_model_json).__dict__ - volume_attachment_reference_volume_context_model2 = VolumeAttachmentReferenceVolumeContext(**volume_attachment_reference_volume_context_model_dict) + volume_attachment_reference_volume_context_model_dict = VolumeAttachmentReferenceVolumeContext.from_dict( + volume_attachment_reference_volume_context_model_json).__dict__ + volume_attachment_reference_volume_context_model2 = VolumeAttachmentReferenceVolumeContext( + **volume_attachment_reference_volume_context_model_dict) # Verify the model instances are equivalent assert volume_attachment_reference_volume_context_model == volume_attachment_reference_volume_context_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_reference_volume_context_model_json2 = volume_attachment_reference_volume_context_model.to_dict() + volume_attachment_reference_volume_context_model_json2 = volume_attachment_reference_volume_context_model.to_dict( + ) assert volume_attachment_reference_volume_context_model_json2 == volume_attachment_reference_volume_context_model_json @@ -74263,31 +85584,94 @@ class TestModel_VolumeAttachmentReferenceVolumeContextDeleted: Test Class for VolumeAttachmentReferenceVolumeContextDeleted """ - def test_volume_attachment_reference_volume_context_deleted_serialization(self): + def test_volume_attachment_reference_volume_context_deleted_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentReferenceVolumeContextDeleted """ # Construct a json representation of a VolumeAttachmentReferenceVolumeContextDeleted model volume_attachment_reference_volume_context_deleted_model_json = {} - volume_attachment_reference_volume_context_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_volume_context_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VolumeAttachmentReferenceVolumeContextDeleted by calling from_dict on the json representation - volume_attachment_reference_volume_context_deleted_model = VolumeAttachmentReferenceVolumeContextDeleted.from_dict(volume_attachment_reference_volume_context_deleted_model_json) + volume_attachment_reference_volume_context_deleted_model = VolumeAttachmentReferenceVolumeContextDeleted.from_dict( + volume_attachment_reference_volume_context_deleted_model_json) assert volume_attachment_reference_volume_context_deleted_model != False # Construct a model instance of VolumeAttachmentReferenceVolumeContextDeleted by calling from_dict on the json representation - volume_attachment_reference_volume_context_deleted_model_dict = VolumeAttachmentReferenceVolumeContextDeleted.from_dict(volume_attachment_reference_volume_context_deleted_model_json).__dict__ - volume_attachment_reference_volume_context_deleted_model2 = VolumeAttachmentReferenceVolumeContextDeleted(**volume_attachment_reference_volume_context_deleted_model_dict) + volume_attachment_reference_volume_context_deleted_model_dict = VolumeAttachmentReferenceVolumeContextDeleted.from_dict( + volume_attachment_reference_volume_context_deleted_model_json + ).__dict__ + volume_attachment_reference_volume_context_deleted_model2 = VolumeAttachmentReferenceVolumeContextDeleted( + **volume_attachment_reference_volume_context_deleted_model_dict) # Verify the model instances are equivalent assert volume_attachment_reference_volume_context_deleted_model == volume_attachment_reference_volume_context_deleted_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_reference_volume_context_deleted_model_json2 = volume_attachment_reference_volume_context_deleted_model.to_dict() + volume_attachment_reference_volume_context_deleted_model_json2 = volume_attachment_reference_volume_context_deleted_model.to_dict( + ) assert volume_attachment_reference_volume_context_deleted_model_json2 == volume_attachment_reference_volume_context_deleted_model_json +class TestModel_VolumeCatalogOffering: + """ + Test Class for VolumeCatalogOffering + """ + + def test_volume_catalog_offering_serialization(self): + """ + Test serialization/deserialization for VolumeCatalogOffering + """ + + # Construct dict forms of any model objects needed in order to build this model. + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + + # Construct a json representation of a VolumeCatalogOffering model + volume_catalog_offering_model_json = {} + volume_catalog_offering_model_json[ + 'plan'] = catalog_offering_version_plan_reference_model + volume_catalog_offering_model_json[ + 'version'] = catalog_offering_version_reference_model + + # Construct a model instance of VolumeCatalogOffering by calling from_dict on the json representation + volume_catalog_offering_model = VolumeCatalogOffering.from_dict( + volume_catalog_offering_model_json) + assert volume_catalog_offering_model != False + + # Construct a model instance of VolumeCatalogOffering by calling from_dict on the json representation + volume_catalog_offering_model_dict = VolumeCatalogOffering.from_dict( + volume_catalog_offering_model_json).__dict__ + volume_catalog_offering_model2 = VolumeCatalogOffering( + **volume_catalog_offering_model_dict) + + # Verify the model instances are equivalent + assert volume_catalog_offering_model == volume_catalog_offering_model2 + + # Convert model instance back to dict and verify no loss of data + volume_catalog_offering_model_json2 = volume_catalog_offering_model.to_dict( + ) + assert volume_catalog_offering_model_json2 == volume_catalog_offering_model_json + + class TestModel_VolumeCollection: """ Test Class for VolumeCollection @@ -74301,47 +85685,83 @@ def test_volume_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. volume_collection_first_model = {} # VolumeCollectionFirst - volume_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20' + volume_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20' volume_collection_next_model = {} # VolumeCollectionNext - volume_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + volume_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + + catalog_offering_version_plan_reference_deleted_model = { + } # CatalogOfferingVersionPlanReferenceDeleted + catalog_offering_version_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + catalog_offering_version_plan_reference_model = { + } # CatalogOfferingVersionPlanReference + catalog_offering_version_plan_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + catalog_offering_version_plan_reference_model[ + 'deleted'] = catalog_offering_version_plan_reference_deleted_model + + catalog_offering_version_reference_model = { + } # CatalogOfferingVersionReference + catalog_offering_version_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + + volume_catalog_offering_model = {} # VolumeCatalogOffering + volume_catalog_offering_model[ + 'plan'] = catalog_offering_version_plan_reference_model + volume_catalog_offering_model[ + 'version'] = catalog_offering_version_reference_model encryption_key_reference_model = {} # EncryptionKeyReference - encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_health_reason_model = {} # VolumeHealthReason volume_health_reason_model['code'] = 'initializing_from_snapshot' - volume_health_reason_model['message'] = 'Performance will be degraded while this volume is being initialized from its snapshot' - volume_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf' + volume_health_reason_model[ + 'message'] = 'Performance will be degraded while this volume is being initialized from its snapshot' + volume_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf' operating_system_model = {} # OperatingSystem + operating_system_model['allow_user_image_creation'] = True operating_system_model['architecture'] = 'amd64' operating_system_model['dedicated_host_only'] = False operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64' operating_system_model['family'] = 'Ubuntu Server' - operating_system_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' operating_system_model['name'] = 'ubuntu-16-amd64' + operating_system_model['user_data_format'] = 'cloud_init' operating_system_model['vendor'] = 'Canonical' operating_system_model['version'] = '16.04 LTS' volume_profile_reference_model = {} # VolumeProfileReference - volume_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' + volume_profile_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' volume_profile_reference_model['name'] = 'general-purpose' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' image_reference_deleted_model = {} # ImageReferenceDeleted - image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + image_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' image_remote_model = {} # ImageRemote @@ -74349,25 +85769,32 @@ def test_volume_collection_serialization(self): image_remote_model['region'] = region_reference_model image_reference_model = {} # ImageReference - image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['deleted'] = image_reference_deleted_model - image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' - image_reference_model['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_reference_model[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' image_reference_model['name'] = 'my-image' image_reference_model['remote'] = image_remote_model image_reference_model['resource_type'] = 'image' snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted - snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + snapshot_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' snapshot_remote_model = {} # SnapshotRemote snapshot_remote_model['region'] = region_reference_model snapshot_reference_model = {} # SnapshotReference - snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['deleted'] = snapshot_reference_deleted_model - snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - snapshot_reference_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_reference_model[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model['name'] = 'my-snapshot' snapshot_reference_model['remote'] = snapshot_remote_model snapshot_reference_model['resource_type'] = 'snapshot' @@ -74375,36 +85802,53 @@ def test_volume_collection_serialization(self): volume_status_reason_model = {} # VolumeStatusReason volume_status_reason_model['code'] = 'encryption_key_deleted' volume_status_reason_model['message'] = 'testString' - volume_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + volume_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' - volume_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted - volume_attachment_reference_volume_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_attachment_reference_volume_context_deleted_model = { + } # VolumeAttachmentReferenceVolumeContextDeleted + volume_attachment_reference_volume_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' volume_attachment_device_model = {} # VolumeAttachmentDevice - volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' + volume_attachment_device_model[ + 'id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68' instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['deleted'] = instance_reference_deleted_model - instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - instance_reference_model['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + instance_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + instance_reference_model[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' instance_reference_model['name'] = 'my-instance' - volume_attachment_reference_volume_context_model = {} # VolumeAttachmentReferenceVolumeContext - volume_attachment_reference_volume_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_reference_volume_context_model['deleted'] = volume_attachment_reference_volume_context_deleted_model - volume_attachment_reference_volume_context_model['device'] = volume_attachment_device_model - volume_attachment_reference_volume_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_volume_context_model['id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - volume_attachment_reference_volume_context_model['instance'] = instance_reference_model - volume_attachment_reference_volume_context_model['name'] = 'my-volume-attachment' + volume_attachment_reference_volume_context_model = { + } # VolumeAttachmentReferenceVolumeContext + volume_attachment_reference_volume_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_reference_volume_context_model[ + 'deleted'] = volume_attachment_reference_volume_context_deleted_model + volume_attachment_reference_volume_context_model[ + 'device'] = volume_attachment_device_model + volume_attachment_reference_volume_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46f2-b1f1-bc152b2e391a/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_volume_context_model[ + 'id'] = '0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' + volume_attachment_reference_volume_context_model[ + 'instance'] = instance_reference_model + volume_attachment_reference_volume_context_model[ + 'name'] = 'my-volume-attachment' volume_attachment_reference_volume_context_model['type'] = 'boot' zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' volume_model = {} # Volume @@ -74413,13 +85857,16 @@ def test_volume_collection_serialization(self): volume_model['bandwidth'] = 1000 volume_model['busy'] = True volume_model['capacity'] = 1000 + volume_model['catalog_offering'] = volume_catalog_offering_model volume_model['created_at'] = '2019-01-01T12:00:00Z' - volume_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_model['encryption'] = 'provider_managed' volume_model['encryption_key'] = encryption_key_reference_model volume_model['health_reasons'] = [volume_health_reason_model] volume_model['health_state'] = 'ok' - volume_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_model['iops'] = 10000 volume_model['name'] = 'my-volume' @@ -74432,7 +85879,9 @@ def test_volume_collection_serialization(self): volume_model['status'] = 'available' volume_model['status_reasons'] = [volume_status_reason_model] volume_model['user_tags'] = ['testString'] - volume_model['volume_attachments'] = [volume_attachment_reference_volume_context_model] + volume_model['volume_attachments'] = [ + volume_attachment_reference_volume_context_model + ] volume_model['zone'] = zone_reference_model # Construct a json representation of a VolumeCollection model @@ -74444,12 +85893,15 @@ def test_volume_collection_serialization(self): volume_collection_model_json['volumes'] = [volume_model] # Construct a model instance of VolumeCollection by calling from_dict on the json representation - volume_collection_model = VolumeCollection.from_dict(volume_collection_model_json) + volume_collection_model = VolumeCollection.from_dict( + volume_collection_model_json) assert volume_collection_model != False # Construct a model instance of VolumeCollection by calling from_dict on the json representation - volume_collection_model_dict = VolumeCollection.from_dict(volume_collection_model_json).__dict__ - volume_collection_model2 = VolumeCollection(**volume_collection_model_dict) + volume_collection_model_dict = VolumeCollection.from_dict( + volume_collection_model_json).__dict__ + volume_collection_model2 = VolumeCollection( + **volume_collection_model_dict) # Verify the model instances are equivalent assert volume_collection_model == volume_collection_model2 @@ -74471,21 +85923,26 @@ def test_volume_collection_first_serialization(self): # Construct a json representation of a VolumeCollectionFirst model volume_collection_first_model_json = {} - volume_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20' + volume_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20' # Construct a model instance of VolumeCollectionFirst by calling from_dict on the json representation - volume_collection_first_model = VolumeCollectionFirst.from_dict(volume_collection_first_model_json) + volume_collection_first_model = VolumeCollectionFirst.from_dict( + volume_collection_first_model_json) assert volume_collection_first_model != False # Construct a model instance of VolumeCollectionFirst by calling from_dict on the json representation - volume_collection_first_model_dict = VolumeCollectionFirst.from_dict(volume_collection_first_model_json).__dict__ - volume_collection_first_model2 = VolumeCollectionFirst(**volume_collection_first_model_dict) + volume_collection_first_model_dict = VolumeCollectionFirst.from_dict( + volume_collection_first_model_json).__dict__ + volume_collection_first_model2 = VolumeCollectionFirst( + **volume_collection_first_model_dict) # Verify the model instances are equivalent assert volume_collection_first_model == volume_collection_first_model2 # Convert model instance back to dict and verify no loss of data - volume_collection_first_model_json2 = volume_collection_first_model.to_dict() + volume_collection_first_model_json2 = volume_collection_first_model.to_dict( + ) assert volume_collection_first_model_json2 == volume_collection_first_model_json @@ -74501,21 +85958,26 @@ def test_volume_collection_next_serialization(self): # Construct a json representation of a VolumeCollectionNext model volume_collection_next_model_json = {} - volume_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + volume_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of VolumeCollectionNext by calling from_dict on the json representation - volume_collection_next_model = VolumeCollectionNext.from_dict(volume_collection_next_model_json) + volume_collection_next_model = VolumeCollectionNext.from_dict( + volume_collection_next_model_json) assert volume_collection_next_model != False # Construct a model instance of VolumeCollectionNext by calling from_dict on the json representation - volume_collection_next_model_dict = VolumeCollectionNext.from_dict(volume_collection_next_model_json).__dict__ - volume_collection_next_model2 = VolumeCollectionNext(**volume_collection_next_model_dict) + volume_collection_next_model_dict = VolumeCollectionNext.from_dict( + volume_collection_next_model_json).__dict__ + volume_collection_next_model2 = VolumeCollectionNext( + **volume_collection_next_model_dict) # Verify the model instances are equivalent assert volume_collection_next_model == volume_collection_next_model2 # Convert model instance back to dict and verify no loss of data - volume_collection_next_model_json2 = volume_collection_next_model.to_dict() + volume_collection_next_model_json2 = volume_collection_next_model.to_dict( + ) assert volume_collection_next_model_json2 == volume_collection_next_model_json @@ -74532,16 +85994,21 @@ def test_volume_health_reason_serialization(self): # Construct a json representation of a VolumeHealthReason model volume_health_reason_model_json = {} volume_health_reason_model_json['code'] = 'initializing_from_snapshot' - volume_health_reason_model_json['message'] = 'Performance will be degraded while this volume is being initialized from its snapshot' - volume_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf' + volume_health_reason_model_json[ + 'message'] = 'Performance will be degraded while this volume is being initialized from its snapshot' + volume_health_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-troubleshooting&interface=ui#snapshot_ts_degraded_perf' # Construct a model instance of VolumeHealthReason by calling from_dict on the json representation - volume_health_reason_model = VolumeHealthReason.from_dict(volume_health_reason_model_json) + volume_health_reason_model = VolumeHealthReason.from_dict( + volume_health_reason_model_json) assert volume_health_reason_model != False # Construct a model instance of VolumeHealthReason by calling from_dict on the json representation - volume_health_reason_model_dict = VolumeHealthReason.from_dict(volume_health_reason_model_json).__dict__ - volume_health_reason_model2 = VolumeHealthReason(**volume_health_reason_model_dict) + volume_health_reason_model_dict = VolumeHealthReason.from_dict( + volume_health_reason_model_json).__dict__ + volume_health_reason_model2 = VolumeHealthReason( + **volume_health_reason_model_dict) # Verify the model instances are equivalent assert volume_health_reason_model == volume_health_reason_model2 @@ -74579,7 +86046,8 @@ def test_volume_patch_serialization(self): assert volume_patch_model != False # Construct a model instance of VolumePatch by calling from_dict on the json representation - volume_patch_model_dict = VolumePatch.from_dict(volume_patch_model_json).__dict__ + volume_patch_model_dict = VolumePatch.from_dict( + volume_patch_model_json).__dict__ volume_patch_model2 = VolumePatch(**volume_patch_model_dict) # Verify the model instances are equivalent @@ -74603,15 +86071,18 @@ def test_volume_profile_serialization(self): # Construct a json representation of a VolumeProfile model volume_profile_model_json = {} volume_profile_model_json['family'] = 'tiered' - volume_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' + volume_profile_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' volume_profile_model_json['name'] = 'general-purpose' # Construct a model instance of VolumeProfile by calling from_dict on the json representation - volume_profile_model = VolumeProfile.from_dict(volume_profile_model_json) + volume_profile_model = VolumeProfile.from_dict( + volume_profile_model_json) assert volume_profile_model != False # Construct a model instance of VolumeProfile by calling from_dict on the json representation - volume_profile_model_dict = VolumeProfile.from_dict(volume_profile_model_json).__dict__ + volume_profile_model_dict = VolumeProfile.from_dict( + volume_profile_model_json).__dict__ volume_profile_model2 = VolumeProfile(**volume_profile_model_dict) # Verify the model instances are equivalent @@ -74634,38 +86105,50 @@ def test_volume_profile_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - volume_profile_collection_first_model = {} # VolumeProfileCollectionFirst - volume_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20' + volume_profile_collection_first_model = { + } # VolumeProfileCollectionFirst + volume_profile_collection_first_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20' volume_profile_collection_next_model = {} # VolumeProfileCollectionNext - volume_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + volume_profile_collection_next_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' volume_profile_model = {} # VolumeProfile volume_profile_model['family'] = 'tiered' - volume_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' + volume_profile_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' volume_profile_model['name'] = 'general-purpose' # Construct a json representation of a VolumeProfileCollection model volume_profile_collection_model_json = {} - volume_profile_collection_model_json['first'] = volume_profile_collection_first_model + volume_profile_collection_model_json[ + 'first'] = volume_profile_collection_first_model volume_profile_collection_model_json['limit'] = 20 - volume_profile_collection_model_json['next'] = volume_profile_collection_next_model - volume_profile_collection_model_json['profiles'] = [volume_profile_model] + volume_profile_collection_model_json[ + 'next'] = volume_profile_collection_next_model + volume_profile_collection_model_json['profiles'] = [ + volume_profile_model + ] volume_profile_collection_model_json['total_count'] = 132 # Construct a model instance of VolumeProfileCollection by calling from_dict on the json representation - volume_profile_collection_model = VolumeProfileCollection.from_dict(volume_profile_collection_model_json) + volume_profile_collection_model = VolumeProfileCollection.from_dict( + volume_profile_collection_model_json) assert volume_profile_collection_model != False # Construct a model instance of VolumeProfileCollection by calling from_dict on the json representation - volume_profile_collection_model_dict = VolumeProfileCollection.from_dict(volume_profile_collection_model_json).__dict__ - volume_profile_collection_model2 = VolumeProfileCollection(**volume_profile_collection_model_dict) + volume_profile_collection_model_dict = VolumeProfileCollection.from_dict( + volume_profile_collection_model_json).__dict__ + volume_profile_collection_model2 = VolumeProfileCollection( + **volume_profile_collection_model_dict) # Verify the model instances are equivalent assert volume_profile_collection_model == volume_profile_collection_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_collection_model_json2 = volume_profile_collection_model.to_dict() + volume_profile_collection_model_json2 = volume_profile_collection_model.to_dict( + ) assert volume_profile_collection_model_json2 == volume_profile_collection_model_json @@ -74681,21 +86164,26 @@ def test_volume_profile_collection_first_serialization(self): # Construct a json representation of a VolumeProfileCollectionFirst model volume_profile_collection_first_model_json = {} - volume_profile_collection_first_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20' + volume_profile_collection_first_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20' # Construct a model instance of VolumeProfileCollectionFirst by calling from_dict on the json representation - volume_profile_collection_first_model = VolumeProfileCollectionFirst.from_dict(volume_profile_collection_first_model_json) + volume_profile_collection_first_model = VolumeProfileCollectionFirst.from_dict( + volume_profile_collection_first_model_json) assert volume_profile_collection_first_model != False # Construct a model instance of VolumeProfileCollectionFirst by calling from_dict on the json representation - volume_profile_collection_first_model_dict = VolumeProfileCollectionFirst.from_dict(volume_profile_collection_first_model_json).__dict__ - volume_profile_collection_first_model2 = VolumeProfileCollectionFirst(**volume_profile_collection_first_model_dict) + volume_profile_collection_first_model_dict = VolumeProfileCollectionFirst.from_dict( + volume_profile_collection_first_model_json).__dict__ + volume_profile_collection_first_model2 = VolumeProfileCollectionFirst( + **volume_profile_collection_first_model_dict) # Verify the model instances are equivalent assert volume_profile_collection_first_model == volume_profile_collection_first_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_collection_first_model_json2 = volume_profile_collection_first_model.to_dict() + volume_profile_collection_first_model_json2 = volume_profile_collection_first_model.to_dict( + ) assert volume_profile_collection_first_model_json2 == volume_profile_collection_first_model_json @@ -74711,21 +86199,26 @@ def test_volume_profile_collection_next_serialization(self): # Construct a json representation of a VolumeProfileCollectionNext model volume_profile_collection_next_model_json = {} - volume_profile_collection_next_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' + volume_profile_collection_next_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20' # Construct a model instance of VolumeProfileCollectionNext by calling from_dict on the json representation - volume_profile_collection_next_model = VolumeProfileCollectionNext.from_dict(volume_profile_collection_next_model_json) + volume_profile_collection_next_model = VolumeProfileCollectionNext.from_dict( + volume_profile_collection_next_model_json) assert volume_profile_collection_next_model != False # Construct a model instance of VolumeProfileCollectionNext by calling from_dict on the json representation - volume_profile_collection_next_model_dict = VolumeProfileCollectionNext.from_dict(volume_profile_collection_next_model_json).__dict__ - volume_profile_collection_next_model2 = VolumeProfileCollectionNext(**volume_profile_collection_next_model_dict) + volume_profile_collection_next_model_dict = VolumeProfileCollectionNext.from_dict( + volume_profile_collection_next_model_json).__dict__ + volume_profile_collection_next_model2 = VolumeProfileCollectionNext( + **volume_profile_collection_next_model_dict) # Verify the model instances are equivalent assert volume_profile_collection_next_model == volume_profile_collection_next_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_collection_next_model_json2 = volume_profile_collection_next_model.to_dict() + volume_profile_collection_next_model_json2 = volume_profile_collection_next_model.to_dict( + ) assert volume_profile_collection_next_model_json2 == volume_profile_collection_next_model_json @@ -74741,22 +86234,27 @@ def test_volume_profile_reference_serialization(self): # Construct a json representation of a VolumeProfileReference model volume_profile_reference_model_json = {} - volume_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' + volume_profile_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' volume_profile_reference_model_json['name'] = 'general-purpose' # Construct a model instance of VolumeProfileReference by calling from_dict on the json representation - volume_profile_reference_model = VolumeProfileReference.from_dict(volume_profile_reference_model_json) + volume_profile_reference_model = VolumeProfileReference.from_dict( + volume_profile_reference_model_json) assert volume_profile_reference_model != False # Construct a model instance of VolumeProfileReference by calling from_dict on the json representation - volume_profile_reference_model_dict = VolumeProfileReference.from_dict(volume_profile_reference_model_json).__dict__ - volume_profile_reference_model2 = VolumeProfileReference(**volume_profile_reference_model_dict) + volume_profile_reference_model_dict = VolumeProfileReference.from_dict( + volume_profile_reference_model_json).__dict__ + volume_profile_reference_model2 = VolumeProfileReference( + **volume_profile_reference_model_dict) # Verify the model instances are equivalent assert volume_profile_reference_model == volume_profile_reference_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_reference_model_json2 = volume_profile_reference_model.to_dict() + volume_profile_reference_model_json2 = volume_profile_reference_model.to_dict( + ) assert volume_profile_reference_model_json2 == volume_profile_reference_model_json @@ -74773,7 +86271,8 @@ def test_volume_prototype_instance_by_image_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -74784,26 +86283,34 @@ def test_volume_prototype_instance_by_image_context_serialization(self): # Construct a json representation of a VolumePrototypeInstanceByImageContext model volume_prototype_instance_by_image_context_model_json = {} volume_prototype_instance_by_image_context_model_json['capacity'] = 100 - volume_prototype_instance_by_image_context_model_json['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model_json[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model_json['iops'] = 10000 - volume_prototype_instance_by_image_context_model_json['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model_json['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model_json['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model_json[ + 'name'] = 'my-volume' + volume_prototype_instance_by_image_context_model_json[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model_json[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model_json['user_tags'] = [] # Construct a model instance of VolumePrototypeInstanceByImageContext by calling from_dict on the json representation - volume_prototype_instance_by_image_context_model = VolumePrototypeInstanceByImageContext.from_dict(volume_prototype_instance_by_image_context_model_json) + volume_prototype_instance_by_image_context_model = VolumePrototypeInstanceByImageContext.from_dict( + volume_prototype_instance_by_image_context_model_json) assert volume_prototype_instance_by_image_context_model != False # Construct a model instance of VolumePrototypeInstanceByImageContext by calling from_dict on the json representation - volume_prototype_instance_by_image_context_model_dict = VolumePrototypeInstanceByImageContext.from_dict(volume_prototype_instance_by_image_context_model_json).__dict__ - volume_prototype_instance_by_image_context_model2 = VolumePrototypeInstanceByImageContext(**volume_prototype_instance_by_image_context_model_dict) + volume_prototype_instance_by_image_context_model_dict = VolumePrototypeInstanceByImageContext.from_dict( + volume_prototype_instance_by_image_context_model_json).__dict__ + volume_prototype_instance_by_image_context_model2 = VolumePrototypeInstanceByImageContext( + **volume_prototype_instance_by_image_context_model_dict) # Verify the model instances are equivalent assert volume_prototype_instance_by_image_context_model == volume_prototype_instance_by_image_context_model2 # Convert model instance back to dict and verify no loss of data - volume_prototype_instance_by_image_context_model_json2 = volume_prototype_instance_by_image_context_model.to_dict() + volume_prototype_instance_by_image_context_model_json2 = volume_prototype_instance_by_image_context_model.to_dict( + ) assert volume_prototype_instance_by_image_context_model_json2 == volume_prototype_instance_by_image_context_model_json @@ -74812,7 +86319,8 @@ class TestModel_VolumePrototypeInstanceBySourceSnapshotContext: Test Class for VolumePrototypeInstanceBySourceSnapshotContext """ - def test_volume_prototype_instance_by_source_snapshot_context_serialization(self): + def test_volume_prototype_instance_by_source_snapshot_context_serialization( + self): """ Test serialization/deserialization for VolumePrototypeInstanceBySourceSnapshotContext """ @@ -74820,7 +86328,8 @@ def test_volume_prototype_instance_by_source_snapshot_context_serialization(self # Construct dict forms of any model objects needed in order to build this model. encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -74833,28 +86342,41 @@ def test_volume_prototype_instance_by_source_snapshot_context_serialization(self # Construct a json representation of a VolumePrototypeInstanceBySourceSnapshotContext model volume_prototype_instance_by_source_snapshot_context_model_json = {} - volume_prototype_instance_by_source_snapshot_context_model_json['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model_json['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model_json['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model_json['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model_json['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model_json['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model_json['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model_json['user_tags'] = [] + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model_json[ + 'user_tags'] = [] # Construct a model instance of VolumePrototypeInstanceBySourceSnapshotContext by calling from_dict on the json representation - volume_prototype_instance_by_source_snapshot_context_model = VolumePrototypeInstanceBySourceSnapshotContext.from_dict(volume_prototype_instance_by_source_snapshot_context_model_json) + volume_prototype_instance_by_source_snapshot_context_model = VolumePrototypeInstanceBySourceSnapshotContext.from_dict( + volume_prototype_instance_by_source_snapshot_context_model_json) assert volume_prototype_instance_by_source_snapshot_context_model != False # Construct a model instance of VolumePrototypeInstanceBySourceSnapshotContext by calling from_dict on the json representation - volume_prototype_instance_by_source_snapshot_context_model_dict = VolumePrototypeInstanceBySourceSnapshotContext.from_dict(volume_prototype_instance_by_source_snapshot_context_model_json).__dict__ - volume_prototype_instance_by_source_snapshot_context_model2 = VolumePrototypeInstanceBySourceSnapshotContext(**volume_prototype_instance_by_source_snapshot_context_model_dict) + volume_prototype_instance_by_source_snapshot_context_model_dict = VolumePrototypeInstanceBySourceSnapshotContext.from_dict( + volume_prototype_instance_by_source_snapshot_context_model_json + ).__dict__ + volume_prototype_instance_by_source_snapshot_context_model2 = VolumePrototypeInstanceBySourceSnapshotContext( + **volume_prototype_instance_by_source_snapshot_context_model_dict) # Verify the model instances are equivalent assert volume_prototype_instance_by_source_snapshot_context_model == volume_prototype_instance_by_source_snapshot_context_model2 # Convert model instance back to dict and verify no loss of data - volume_prototype_instance_by_source_snapshot_context_model_json2 = volume_prototype_instance_by_source_snapshot_context_model.to_dict() + volume_prototype_instance_by_source_snapshot_context_model_json2 = volume_prototype_instance_by_source_snapshot_context_model.to_dict( + ) assert volume_prototype_instance_by_source_snapshot_context_model_json2 == volume_prototype_instance_by_source_snapshot_context_model_json @@ -74871,10 +86393,12 @@ def test_volume_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' volume_remote_model = {} # VolumeRemote @@ -74882,20 +86406,25 @@ def test_volume_reference_serialization(self): # Construct a json representation of a VolumeReference model volume_reference_model_json = {} - volume_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model_json['deleted'] = volume_reference_deleted_model - volume_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_model_json['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_model_json[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_reference_model_json['name'] = 'my-volume' volume_reference_model_json['remote'] = volume_remote_model volume_reference_model_json['resource_type'] = 'volume' # Construct a model instance of VolumeReference by calling from_dict on the json representation - volume_reference_model = VolumeReference.from_dict(volume_reference_model_json) + volume_reference_model = VolumeReference.from_dict( + volume_reference_model_json) assert volume_reference_model != False # Construct a model instance of VolumeReference by calling from_dict on the json representation - volume_reference_model_dict = VolumeReference.from_dict(volume_reference_model_json).__dict__ + volume_reference_model_dict = VolumeReference.from_dict( + volume_reference_model_json).__dict__ volume_reference_model2 = VolumeReference(**volume_reference_model_dict) # Verify the model instances are equivalent @@ -74918,21 +86447,26 @@ def test_volume_reference_deleted_serialization(self): # Construct a json representation of a VolumeReferenceDeleted model volume_reference_deleted_model_json = {} - volume_reference_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VolumeReferenceDeleted by calling from_dict on the json representation - volume_reference_deleted_model = VolumeReferenceDeleted.from_dict(volume_reference_deleted_model_json) + volume_reference_deleted_model = VolumeReferenceDeleted.from_dict( + volume_reference_deleted_model_json) assert volume_reference_deleted_model != False # Construct a model instance of VolumeReferenceDeleted by calling from_dict on the json representation - volume_reference_deleted_model_dict = VolumeReferenceDeleted.from_dict(volume_reference_deleted_model_json).__dict__ - volume_reference_deleted_model2 = VolumeReferenceDeleted(**volume_reference_deleted_model_dict) + volume_reference_deleted_model_dict = VolumeReferenceDeleted.from_dict( + volume_reference_deleted_model_json).__dict__ + volume_reference_deleted_model2 = VolumeReferenceDeleted( + **volume_reference_deleted_model_dict) # Verify the model instances are equivalent assert volume_reference_deleted_model == volume_reference_deleted_model2 # Convert model instance back to dict and verify no loss of data - volume_reference_deleted_model_json2 = volume_reference_deleted_model.to_dict() + volume_reference_deleted_model_json2 = volume_reference_deleted_model.to_dict( + ) assert volume_reference_deleted_model_json2 == volume_reference_deleted_model_json @@ -74948,31 +86482,43 @@ def test_volume_reference_volume_attachment_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted - volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_volume_attachment_context_deleted_model = { + } # VolumeReferenceVolumeAttachmentContextDeleted + volume_reference_volume_attachment_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a VolumeReferenceVolumeAttachmentContext model volume_reference_volume_attachment_context_model_json = {} - volume_reference_volume_attachment_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model_json['deleted'] = volume_reference_volume_attachment_context_deleted_model - volume_reference_volume_attachment_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model_json['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - volume_reference_volume_attachment_context_model_json['name'] = 'my-volume' - volume_reference_volume_attachment_context_model_json['resource_type'] = 'volume' + volume_reference_volume_attachment_context_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model_json[ + 'deleted'] = volume_reference_volume_attachment_context_deleted_model + volume_reference_volume_attachment_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model_json[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_reference_volume_attachment_context_model_json[ + 'name'] = 'my-volume' + volume_reference_volume_attachment_context_model_json[ + 'resource_type'] = 'volume' # Construct a model instance of VolumeReferenceVolumeAttachmentContext by calling from_dict on the json representation - volume_reference_volume_attachment_context_model = VolumeReferenceVolumeAttachmentContext.from_dict(volume_reference_volume_attachment_context_model_json) + volume_reference_volume_attachment_context_model = VolumeReferenceVolumeAttachmentContext.from_dict( + volume_reference_volume_attachment_context_model_json) assert volume_reference_volume_attachment_context_model != False # Construct a model instance of VolumeReferenceVolumeAttachmentContext by calling from_dict on the json representation - volume_reference_volume_attachment_context_model_dict = VolumeReferenceVolumeAttachmentContext.from_dict(volume_reference_volume_attachment_context_model_json).__dict__ - volume_reference_volume_attachment_context_model2 = VolumeReferenceVolumeAttachmentContext(**volume_reference_volume_attachment_context_model_dict) + volume_reference_volume_attachment_context_model_dict = VolumeReferenceVolumeAttachmentContext.from_dict( + volume_reference_volume_attachment_context_model_json).__dict__ + volume_reference_volume_attachment_context_model2 = VolumeReferenceVolumeAttachmentContext( + **volume_reference_volume_attachment_context_model_dict) # Verify the model instances are equivalent assert volume_reference_volume_attachment_context_model == volume_reference_volume_attachment_context_model2 # Convert model instance back to dict and verify no loss of data - volume_reference_volume_attachment_context_model_json2 = volume_reference_volume_attachment_context_model.to_dict() + volume_reference_volume_attachment_context_model_json2 = volume_reference_volume_attachment_context_model.to_dict( + ) assert volume_reference_volume_attachment_context_model_json2 == volume_reference_volume_attachment_context_model_json @@ -74981,28 +86527,35 @@ class TestModel_VolumeReferenceVolumeAttachmentContextDeleted: Test Class for VolumeReferenceVolumeAttachmentContextDeleted """ - def test_volume_reference_volume_attachment_context_deleted_serialization(self): + def test_volume_reference_volume_attachment_context_deleted_serialization( + self): """ Test serialization/deserialization for VolumeReferenceVolumeAttachmentContextDeleted """ # Construct a json representation of a VolumeReferenceVolumeAttachmentContextDeleted model volume_reference_volume_attachment_context_deleted_model_json = {} - volume_reference_volume_attachment_context_deleted_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_volume_attachment_context_deleted_model_json[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a model instance of VolumeReferenceVolumeAttachmentContextDeleted by calling from_dict on the json representation - volume_reference_volume_attachment_context_deleted_model = VolumeReferenceVolumeAttachmentContextDeleted.from_dict(volume_reference_volume_attachment_context_deleted_model_json) + volume_reference_volume_attachment_context_deleted_model = VolumeReferenceVolumeAttachmentContextDeleted.from_dict( + volume_reference_volume_attachment_context_deleted_model_json) assert volume_reference_volume_attachment_context_deleted_model != False # Construct a model instance of VolumeReferenceVolumeAttachmentContextDeleted by calling from_dict on the json representation - volume_reference_volume_attachment_context_deleted_model_dict = VolumeReferenceVolumeAttachmentContextDeleted.from_dict(volume_reference_volume_attachment_context_deleted_model_json).__dict__ - volume_reference_volume_attachment_context_deleted_model2 = VolumeReferenceVolumeAttachmentContextDeleted(**volume_reference_volume_attachment_context_deleted_model_dict) + volume_reference_volume_attachment_context_deleted_model_dict = VolumeReferenceVolumeAttachmentContextDeleted.from_dict( + volume_reference_volume_attachment_context_deleted_model_json + ).__dict__ + volume_reference_volume_attachment_context_deleted_model2 = VolumeReferenceVolumeAttachmentContextDeleted( + **volume_reference_volume_attachment_context_deleted_model_dict) # Verify the model instances are equivalent assert volume_reference_volume_attachment_context_deleted_model == volume_reference_volume_attachment_context_deleted_model2 # Convert model instance back to dict and verify no loss of data - volume_reference_volume_attachment_context_deleted_model_json2 = volume_reference_volume_attachment_context_deleted_model.to_dict() + volume_reference_volume_attachment_context_deleted_model_json2 = volume_reference_volume_attachment_context_deleted_model.to_dict( + ) assert volume_reference_volume_attachment_context_deleted_model_json2 == volume_reference_volume_attachment_context_deleted_model_json @@ -75019,7 +86572,8 @@ def test_volume_remote_serialization(self): # Construct dict forms of any model objects needed in order to build this model. region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a VolumeRemote model @@ -75031,7 +86585,8 @@ def test_volume_remote_serialization(self): assert volume_remote_model != False # Construct a model instance of VolumeRemote by calling from_dict on the json representation - volume_remote_model_dict = VolumeRemote.from_dict(volume_remote_model_json).__dict__ + volume_remote_model_dict = VolumeRemote.from_dict( + volume_remote_model_json).__dict__ volume_remote_model2 = VolumeRemote(**volume_remote_model_dict) # Verify the model instances are equivalent @@ -75056,15 +86611,19 @@ def test_volume_status_reason_serialization(self): volume_status_reason_model_json = {} volume_status_reason_model_json['code'] = 'encryption_key_deleted' volume_status_reason_model_json['message'] = 'testString' - volume_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + volume_status_reason_model_json[ + 'more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' # Construct a model instance of VolumeStatusReason by calling from_dict on the json representation - volume_status_reason_model = VolumeStatusReason.from_dict(volume_status_reason_model_json) + volume_status_reason_model = VolumeStatusReason.from_dict( + volume_status_reason_model_json) assert volume_status_reason_model != False # Construct a model instance of VolumeStatusReason by calling from_dict on the json representation - volume_status_reason_model_dict = VolumeStatusReason.from_dict(volume_status_reason_model_json).__dict__ - volume_status_reason_model2 = VolumeStatusReason(**volume_status_reason_model_dict) + volume_status_reason_model_dict = VolumeStatusReason.from_dict( + volume_status_reason_model_json).__dict__ + volume_status_reason_model2 = VolumeStatusReason( + **volume_status_reason_model_dict) # Verify the model instances are equivalent assert volume_status_reason_model == volume_status_reason_model2 @@ -75087,12 +86646,14 @@ def test_zone_serialization(self): # Construct dict forms of any model objects needed in order to build this model. region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' # Construct a json representation of a Zone model zone_model_json = {} - zone_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_model_json['name'] = 'us-south-1' zone_model_json['region'] = region_reference_model zone_model_json['status'] = 'available' @@ -75126,11 +86687,13 @@ def test_zone_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' zone_model = {} # Zone - zone_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_model['name'] = 'us-south-1' zone_model['region'] = region_reference_model zone_model['status'] = 'available' @@ -75140,11 +86703,13 @@ def test_zone_collection_serialization(self): zone_collection_model_json['zones'] = [zone_model] # Construct a model instance of ZoneCollection by calling from_dict on the json representation - zone_collection_model = ZoneCollection.from_dict(zone_collection_model_json) + zone_collection_model = ZoneCollection.from_dict( + zone_collection_model_json) assert zone_collection_model != False # Construct a model instance of ZoneCollection by calling from_dict on the json representation - zone_collection_model_dict = ZoneCollection.from_dict(zone_collection_model_json).__dict__ + zone_collection_model_dict = ZoneCollection.from_dict( + zone_collection_model_json).__dict__ zone_collection_model2 = ZoneCollection(**zone_collection_model_dict) # Verify the model instances are equivalent @@ -75167,15 +86732,18 @@ def test_zone_reference_serialization(self): # Construct a json representation of a ZoneReference model zone_reference_model_json = {} - zone_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model_json['name'] = 'us-south-1' # Construct a model instance of ZoneReference by calling from_dict on the json representation - zone_reference_model = ZoneReference.from_dict(zone_reference_model_json) + zone_reference_model = ZoneReference.from_dict( + zone_reference_model_json) assert zone_reference_model != False # Construct a model instance of ZoneReference by calling from_dict on the json representation - zone_reference_model_dict = ZoneReference.from_dict(zone_reference_model_json).__dict__ + zone_reference_model_dict = ZoneReference.from_dict( + zone_reference_model_json).__dict__ zone_reference_model2 = ZoneReference(**zone_reference_model_dict) # Verify the model instances are equivalent @@ -75199,29 +86767,39 @@ def test_backup_policy_job_source_instance_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a BackupPolicyJobSourceInstanceReference model backup_policy_job_source_instance_reference_model_json = {} - backup_policy_job_source_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - backup_policy_job_source_instance_reference_model_json['deleted'] = instance_reference_deleted_model - backup_policy_job_source_instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - backup_policy_job_source_instance_reference_model_json['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - backup_policy_job_source_instance_reference_model_json['name'] = 'my-instance' + backup_policy_job_source_instance_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + backup_policy_job_source_instance_reference_model_json[ + 'deleted'] = instance_reference_deleted_model + backup_policy_job_source_instance_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + backup_policy_job_source_instance_reference_model_json[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + backup_policy_job_source_instance_reference_model_json[ + 'name'] = 'my-instance' # Construct a model instance of BackupPolicyJobSourceInstanceReference by calling from_dict on the json representation - backup_policy_job_source_instance_reference_model = BackupPolicyJobSourceInstanceReference.from_dict(backup_policy_job_source_instance_reference_model_json) + backup_policy_job_source_instance_reference_model = BackupPolicyJobSourceInstanceReference.from_dict( + backup_policy_job_source_instance_reference_model_json) assert backup_policy_job_source_instance_reference_model != False # Construct a model instance of BackupPolicyJobSourceInstanceReference by calling from_dict on the json representation - backup_policy_job_source_instance_reference_model_dict = BackupPolicyJobSourceInstanceReference.from_dict(backup_policy_job_source_instance_reference_model_json).__dict__ - backup_policy_job_source_instance_reference_model2 = BackupPolicyJobSourceInstanceReference(**backup_policy_job_source_instance_reference_model_dict) + backup_policy_job_source_instance_reference_model_dict = BackupPolicyJobSourceInstanceReference.from_dict( + backup_policy_job_source_instance_reference_model_json).__dict__ + backup_policy_job_source_instance_reference_model2 = BackupPolicyJobSourceInstanceReference( + **backup_policy_job_source_instance_reference_model_dict) # Verify the model instances are equivalent assert backup_policy_job_source_instance_reference_model == backup_policy_job_source_instance_reference_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_job_source_instance_reference_model_json2 = backup_policy_job_source_instance_reference_model.to_dict() + backup_policy_job_source_instance_reference_model_json2 = backup_policy_job_source_instance_reference_model.to_dict( + ) assert backup_policy_job_source_instance_reference_model_json2 == backup_policy_job_source_instance_reference_model_json @@ -75238,10 +86816,12 @@ def test_backup_policy_job_source_volume_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. volume_reference_deleted_model = {} # VolumeReferenceDeleted - volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + volume_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' volume_remote_model = {} # VolumeRemote @@ -75249,27 +86829,38 @@ def test_backup_policy_job_source_volume_reference_serialization(self): # Construct a json representation of a BackupPolicyJobSourceVolumeReference model backup_policy_job_source_volume_reference_model_json = {} - backup_policy_job_source_volume_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - backup_policy_job_source_volume_reference_model_json['deleted'] = volume_reference_deleted_model - backup_policy_job_source_volume_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - backup_policy_job_source_volume_reference_model_json['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - backup_policy_job_source_volume_reference_model_json['name'] = 'my-volume' - backup_policy_job_source_volume_reference_model_json['remote'] = volume_remote_model - backup_policy_job_source_volume_reference_model_json['resource_type'] = 'volume' + backup_policy_job_source_volume_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_volume_reference_model_json[ + 'deleted'] = volume_reference_deleted_model + backup_policy_job_source_volume_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_volume_reference_model_json[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + backup_policy_job_source_volume_reference_model_json[ + 'name'] = 'my-volume' + backup_policy_job_source_volume_reference_model_json[ + 'remote'] = volume_remote_model + backup_policy_job_source_volume_reference_model_json[ + 'resource_type'] = 'volume' # Construct a model instance of BackupPolicyJobSourceVolumeReference by calling from_dict on the json representation - backup_policy_job_source_volume_reference_model = BackupPolicyJobSourceVolumeReference.from_dict(backup_policy_job_source_volume_reference_model_json) + backup_policy_job_source_volume_reference_model = BackupPolicyJobSourceVolumeReference.from_dict( + backup_policy_job_source_volume_reference_model_json) assert backup_policy_job_source_volume_reference_model != False # Construct a model instance of BackupPolicyJobSourceVolumeReference by calling from_dict on the json representation - backup_policy_job_source_volume_reference_model_dict = BackupPolicyJobSourceVolumeReference.from_dict(backup_policy_job_source_volume_reference_model_json).__dict__ - backup_policy_job_source_volume_reference_model2 = BackupPolicyJobSourceVolumeReference(**backup_policy_job_source_volume_reference_model_dict) + backup_policy_job_source_volume_reference_model_dict = BackupPolicyJobSourceVolumeReference.from_dict( + backup_policy_job_source_volume_reference_model_json).__dict__ + backup_policy_job_source_volume_reference_model2 = BackupPolicyJobSourceVolumeReference( + **backup_policy_job_source_volume_reference_model_dict) # Verify the model instances are equivalent assert backup_policy_job_source_volume_reference_model == backup_policy_job_source_volume_reference_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_job_source_volume_reference_model_json2 = backup_policy_job_source_volume_reference_model.to_dict() + backup_policy_job_source_volume_reference_model_json2 = backup_policy_job_source_volume_reference_model.to_dict( + ) assert backup_policy_job_source_volume_reference_model_json2 == backup_policy_job_source_volume_reference_model_json @@ -75286,70 +86877,105 @@ def test_backup_policy_match_resource_type_instance_serialization(self): # Construct dict forms of any model objects needed in order to build this model. backup_policy_health_reason_model = {} # BackupPolicyHealthReason - backup_policy_health_reason_model['code'] = 'missing_service_authorization_policies' - backup_policy_health_reason_model['message'] = 'One or more accounts are missing service authorization policies' - backup_policy_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' - - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_health_reason_model[ + 'code'] = 'missing_service_authorization_policies' + backup_policy_health_reason_model[ + 'message'] = 'One or more accounts are missing service authorization policies' + backup_policy_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' + + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' backup_policy_scope_model = {} # BackupPolicyScopeEnterpriseReference - backup_policy_scope_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_model[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' backup_policy_scope_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' backup_policy_scope_model['resource_type'] = 'enterprise' # Construct a json representation of a BackupPolicyMatchResourceTypeInstance model backup_policy_match_resource_type_instance_model_json = {} - backup_policy_match_resource_type_instance_model_json['created_at'] = '2019-01-01T12:00:00Z' - backup_policy_match_resource_type_instance_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6' - backup_policy_match_resource_type_instance_model_json['health_reasons'] = [backup_policy_health_reason_model] - backup_policy_match_resource_type_instance_model_json['health_state'] = 'ok' - backup_policy_match_resource_type_instance_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6' - backup_policy_match_resource_type_instance_model_json['id'] = 'r134-076191ba-49c2-4763-94fd-c70de73ee2e6' - backup_policy_match_resource_type_instance_model_json['last_job_completed_at'] = '2019-01-01T12:00:00Z' - backup_policy_match_resource_type_instance_model_json['lifecycle_state'] = 'stable' - backup_policy_match_resource_type_instance_model_json['match_user_tags'] = ['my-daily-backup-policy'] - backup_policy_match_resource_type_instance_model_json['name'] = 'my-backup-policy' - backup_policy_match_resource_type_instance_model_json['plans'] = [backup_policy_plan_reference_model] - backup_policy_match_resource_type_instance_model_json['resource_group'] = resource_group_reference_model - backup_policy_match_resource_type_instance_model_json['resource_type'] = 'backup_policy' - backup_policy_match_resource_type_instance_model_json['scope'] = backup_policy_scope_model - backup_policy_match_resource_type_instance_model_json['included_content'] = ['data_volumes'] - backup_policy_match_resource_type_instance_model_json['match_resource_type'] = 'instance' + backup_policy_match_resource_type_instance_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + backup_policy_match_resource_type_instance_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_instance_model_json[ + 'health_reasons'] = [backup_policy_health_reason_model] + backup_policy_match_resource_type_instance_model_json[ + 'health_state'] = 'ok' + backup_policy_match_resource_type_instance_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_instance_model_json[ + 'id'] = 'r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_instance_model_json[ + 'last_job_completed_at'] = '2019-01-01T12:00:00Z' + backup_policy_match_resource_type_instance_model_json[ + 'lifecycle_state'] = 'stable' + backup_policy_match_resource_type_instance_model_json[ + 'match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_match_resource_type_instance_model_json[ + 'name'] = 'my-backup-policy' + backup_policy_match_resource_type_instance_model_json['plans'] = [ + backup_policy_plan_reference_model + ] + backup_policy_match_resource_type_instance_model_json[ + 'resource_group'] = resource_group_reference_model + backup_policy_match_resource_type_instance_model_json[ + 'resource_type'] = 'backup_policy' + backup_policy_match_resource_type_instance_model_json[ + 'scope'] = backup_policy_scope_model + backup_policy_match_resource_type_instance_model_json[ + 'included_content'] = ['data_volumes'] + backup_policy_match_resource_type_instance_model_json[ + 'match_resource_type'] = 'instance' # Construct a model instance of BackupPolicyMatchResourceTypeInstance by calling from_dict on the json representation - backup_policy_match_resource_type_instance_model = BackupPolicyMatchResourceTypeInstance.from_dict(backup_policy_match_resource_type_instance_model_json) + backup_policy_match_resource_type_instance_model = BackupPolicyMatchResourceTypeInstance.from_dict( + backup_policy_match_resource_type_instance_model_json) assert backup_policy_match_resource_type_instance_model != False # Construct a model instance of BackupPolicyMatchResourceTypeInstance by calling from_dict on the json representation - backup_policy_match_resource_type_instance_model_dict = BackupPolicyMatchResourceTypeInstance.from_dict(backup_policy_match_resource_type_instance_model_json).__dict__ - backup_policy_match_resource_type_instance_model2 = BackupPolicyMatchResourceTypeInstance(**backup_policy_match_resource_type_instance_model_dict) + backup_policy_match_resource_type_instance_model_dict = BackupPolicyMatchResourceTypeInstance.from_dict( + backup_policy_match_resource_type_instance_model_json).__dict__ + backup_policy_match_resource_type_instance_model2 = BackupPolicyMatchResourceTypeInstance( + **backup_policy_match_resource_type_instance_model_dict) # Verify the model instances are equivalent assert backup_policy_match_resource_type_instance_model == backup_policy_match_resource_type_instance_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_match_resource_type_instance_model_json2 = backup_policy_match_resource_type_instance_model.to_dict() + backup_policy_match_resource_type_instance_model_json2 = backup_policy_match_resource_type_instance_model.to_dict( + ) assert backup_policy_match_resource_type_instance_model_json2 == backup_policy_match_resource_type_instance_model_json @@ -75366,69 +86992,103 @@ def test_backup_policy_match_resource_type_volume_serialization(self): # Construct dict forms of any model objects needed in order to build this model. backup_policy_health_reason_model = {} # BackupPolicyHealthReason - backup_policy_health_reason_model['code'] = 'missing_service_authorization_policies' - backup_policy_health_reason_model['message'] = 'One or more accounts are missing service authorization policies' - backup_policy_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' - - backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted - backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + backup_policy_health_reason_model[ + 'code'] = 'missing_service_authorization_policies' + backup_policy_health_reason_model[ + 'message'] = 'One or more accounts are missing service authorization policies' + backup_policy_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' + + backup_policy_plan_reference_deleted_model = { + } # BackupPolicyPlanReferenceDeleted + backup_policy_plan_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' backup_policy_plan_remote_model = {} # BackupPolicyPlanRemote backup_policy_plan_remote_model['region'] = region_reference_model backup_policy_plan_reference_model = {} # BackupPolicyPlanReference - backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model - backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' - backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'deleted'] = backup_policy_plan_reference_deleted_model + backup_policy_plan_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model[ + 'id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_reference_model['name'] = 'my-policy-plan' - backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model - backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' + backup_policy_plan_reference_model[ + 'remote'] = backup_policy_plan_remote_model + backup_policy_plan_reference_model[ + 'resource_type'] = 'backup_policy_plan' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' backup_policy_scope_model = {} # BackupPolicyScopeEnterpriseReference - backup_policy_scope_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_model[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' backup_policy_scope_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' backup_policy_scope_model['resource_type'] = 'enterprise' # Construct a json representation of a BackupPolicyMatchResourceTypeVolume model backup_policy_match_resource_type_volume_model_json = {} - backup_policy_match_resource_type_volume_model_json['created_at'] = '2019-01-01T12:00:00Z' - backup_policy_match_resource_type_volume_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6' - backup_policy_match_resource_type_volume_model_json['health_reasons'] = [backup_policy_health_reason_model] - backup_policy_match_resource_type_volume_model_json['health_state'] = 'ok' - backup_policy_match_resource_type_volume_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6' - backup_policy_match_resource_type_volume_model_json['id'] = 'r134-076191ba-49c2-4763-94fd-c70de73ee2e6' - backup_policy_match_resource_type_volume_model_json['last_job_completed_at'] = '2019-01-01T12:00:00Z' - backup_policy_match_resource_type_volume_model_json['lifecycle_state'] = 'stable' - backup_policy_match_resource_type_volume_model_json['match_user_tags'] = ['my-daily-backup-policy'] - backup_policy_match_resource_type_volume_model_json['name'] = 'my-backup-policy' - backup_policy_match_resource_type_volume_model_json['plans'] = [backup_policy_plan_reference_model] - backup_policy_match_resource_type_volume_model_json['resource_group'] = resource_group_reference_model - backup_policy_match_resource_type_volume_model_json['resource_type'] = 'backup_policy' - backup_policy_match_resource_type_volume_model_json['scope'] = backup_policy_scope_model - backup_policy_match_resource_type_volume_model_json['match_resource_type'] = 'volume' + backup_policy_match_resource_type_volume_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + backup_policy_match_resource_type_volume_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_volume_model_json[ + 'health_reasons'] = [backup_policy_health_reason_model] + backup_policy_match_resource_type_volume_model_json[ + 'health_state'] = 'ok' + backup_policy_match_resource_type_volume_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_volume_model_json[ + 'id'] = 'r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_volume_model_json[ + 'last_job_completed_at'] = '2019-01-01T12:00:00Z' + backup_policy_match_resource_type_volume_model_json[ + 'lifecycle_state'] = 'stable' + backup_policy_match_resource_type_volume_model_json[ + 'match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_match_resource_type_volume_model_json[ + 'name'] = 'my-backup-policy' + backup_policy_match_resource_type_volume_model_json['plans'] = [ + backup_policy_plan_reference_model + ] + backup_policy_match_resource_type_volume_model_json[ + 'resource_group'] = resource_group_reference_model + backup_policy_match_resource_type_volume_model_json[ + 'resource_type'] = 'backup_policy' + backup_policy_match_resource_type_volume_model_json[ + 'scope'] = backup_policy_scope_model + backup_policy_match_resource_type_volume_model_json[ + 'match_resource_type'] = 'volume' # Construct a model instance of BackupPolicyMatchResourceTypeVolume by calling from_dict on the json representation - backup_policy_match_resource_type_volume_model = BackupPolicyMatchResourceTypeVolume.from_dict(backup_policy_match_resource_type_volume_model_json) + backup_policy_match_resource_type_volume_model = BackupPolicyMatchResourceTypeVolume.from_dict( + backup_policy_match_resource_type_volume_model_json) assert backup_policy_match_resource_type_volume_model != False # Construct a model instance of BackupPolicyMatchResourceTypeVolume by calling from_dict on the json representation - backup_policy_match_resource_type_volume_model_dict = BackupPolicyMatchResourceTypeVolume.from_dict(backup_policy_match_resource_type_volume_model_json).__dict__ - backup_policy_match_resource_type_volume_model2 = BackupPolicyMatchResourceTypeVolume(**backup_policy_match_resource_type_volume_model_dict) + backup_policy_match_resource_type_volume_model_dict = BackupPolicyMatchResourceTypeVolume.from_dict( + backup_policy_match_resource_type_volume_model_json).__dict__ + backup_policy_match_resource_type_volume_model2 = BackupPolicyMatchResourceTypeVolume( + **backup_policy_match_resource_type_volume_model_dict) # Verify the model instances are equivalent assert backup_policy_match_resource_type_volume_model == backup_policy_match_resource_type_volume_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_match_resource_type_volume_model_json2 = backup_policy_match_resource_type_volume_model.to_dict() + backup_policy_match_resource_type_volume_model_json2 = backup_policy_match_resource_type_volume_model.to_dict( + ) assert backup_policy_match_resource_type_volume_model_json2 == backup_policy_match_resource_type_volume_model_json @@ -75437,7 +87097,8 @@ class TestModel_BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstanceProtot Test Class for BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype """ - def test_backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_serialization(self): + def test_backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_serialization( + self): """ Test serialization/deserialization for BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype """ @@ -75447,64 +87108,97 @@ def test_backup_policy_prototype_backup_policy_match_resource_type_instance_prot zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - backup_policy_plan_clone_policy_prototype_model = {} # BackupPolicyPlanClonePolicyPrototype + backup_policy_plan_clone_policy_prototype_model = { + } # BackupPolicyPlanClonePolicyPrototype backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model['zones'] = [ + zone_identity_model + ] - backup_policy_plan_deletion_trigger_prototype_model = {} # BackupPolicyPlanDeletionTriggerPrototype + backup_policy_plan_deletion_trigger_prototype_model = { + } # BackupPolicyPlanDeletionTriggerPrototype backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model[ + 'delete_over_count'] = 20 encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_identity_model = {} # RegionIdentityByName region_identity_model['name'] = 'us-south' - backup_policy_plan_remote_region_policy_prototype_model = {} # BackupPolicyPlanRemoteRegionPolicyPrototype - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model = { + } # BackupPolicyPlanRemoteRegionPolicyPrototype + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model backup_policy_plan_prototype_model = {} # BackupPolicyPlanPrototype backup_policy_plan_prototype_model['active'] = True - backup_policy_plan_prototype_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_prototype_model['clone_policy'] = backup_policy_plan_clone_policy_prototype_model + backup_policy_plan_prototype_model['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_prototype_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_prototype_model backup_policy_plan_prototype_model['copy_user_tags'] = True backup_policy_plan_prototype_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_prototype_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model + backup_policy_plan_prototype_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model backup_policy_plan_prototype_model['name'] = 'my-policy-plan' - backup_policy_plan_prototype_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_prototype_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - backup_policy_scope_prototype_model = {} # BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN - backup_policy_scope_prototype_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_prototype_model = { + } # BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN + backup_policy_scope_prototype_model[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' # Construct a json representation of a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype model backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json = {} - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json['match_user_tags'] = ['my-daily-backup-policy'] - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json['name'] = 'my-backup-policy' - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json['plans'] = [backup_policy_plan_prototype_model] - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json['resource_group'] = resource_group_identity_model - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json['scope'] = backup_policy_scope_prototype_model - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json['included_content'] = ['boot_volume', 'data_volumes'] - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json['match_resource_type'] = 'instance' + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json[ + 'match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json[ + 'name'] = 'my-backup-policy' + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json[ + 'plans'] = [backup_policy_plan_prototype_model] + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json[ + 'resource_group'] = resource_group_identity_model + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json[ + 'scope'] = backup_policy_scope_prototype_model + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json[ + 'included_content'] = ['boot_volume', 'data_volumes'] + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json[ + 'match_resource_type'] = 'instance' # Construct a model instance of BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype by calling from_dict on the json representation - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model = BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.from_dict(backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json) + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model = BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.from_dict( + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json + ) assert backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model != False # Construct a model instance of BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype by calling from_dict on the json representation - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_dict = BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.from_dict(backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json).__dict__ - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model2 = BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype(**backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_dict) + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_dict = BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype.from_dict( + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json + ).__dict__ + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model2 = BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype( + ** + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_dict + ) # Verify the model instances are equivalent assert backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model == backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json2 = backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model.to_dict() + backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json2 = backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model.to_dict( + ) assert backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json2 == backup_policy_prototype_backup_policy_match_resource_type_instance_prototype_model_json @@ -75513,7 +87207,8 @@ class TestModel_BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototyp Test Class for BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype """ - def test_backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_serialization(self): + def test_backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_serialization( + self): """ Test serialization/deserialization for BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype """ @@ -75523,63 +87218,95 @@ def test_backup_policy_prototype_backup_policy_match_resource_type_volume_protot zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - backup_policy_plan_clone_policy_prototype_model = {} # BackupPolicyPlanClonePolicyPrototype + backup_policy_plan_clone_policy_prototype_model = { + } # BackupPolicyPlanClonePolicyPrototype backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 5 - backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model] + backup_policy_plan_clone_policy_prototype_model['zones'] = [ + zone_identity_model + ] - backup_policy_plan_deletion_trigger_prototype_model = {} # BackupPolicyPlanDeletionTriggerPrototype + backup_policy_plan_deletion_trigger_prototype_model = { + } # BackupPolicyPlanDeletionTriggerPrototype backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20 - backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20 + backup_policy_plan_deletion_trigger_prototype_model[ + 'delete_over_count'] = 20 encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' region_identity_model = {} # RegionIdentityByName region_identity_model['name'] = 'us-south' - backup_policy_plan_remote_region_policy_prototype_model = {} # BackupPolicyPlanRemoteRegionPolicyPrototype - backup_policy_plan_remote_region_policy_prototype_model['delete_over_count'] = 5 - backup_policy_plan_remote_region_policy_prototype_model['encryption_key'] = encryption_key_identity_model - backup_policy_plan_remote_region_policy_prototype_model['region'] = region_identity_model + backup_policy_plan_remote_region_policy_prototype_model = { + } # BackupPolicyPlanRemoteRegionPolicyPrototype + backup_policy_plan_remote_region_policy_prototype_model[ + 'delete_over_count'] = 5 + backup_policy_plan_remote_region_policy_prototype_model[ + 'encryption_key'] = encryption_key_identity_model + backup_policy_plan_remote_region_policy_prototype_model[ + 'region'] = region_identity_model backup_policy_plan_prototype_model = {} # BackupPolicyPlanPrototype backup_policy_plan_prototype_model['active'] = True - backup_policy_plan_prototype_model['attach_user_tags'] = ['my-daily-backup-plan'] - backup_policy_plan_prototype_model['clone_policy'] = backup_policy_plan_clone_policy_prototype_model + backup_policy_plan_prototype_model['attach_user_tags'] = [ + 'my-daily-backup-plan' + ] + backup_policy_plan_prototype_model[ + 'clone_policy'] = backup_policy_plan_clone_policy_prototype_model backup_policy_plan_prototype_model['copy_user_tags'] = True backup_policy_plan_prototype_model['cron_spec'] = '30 */2 * * 1-5' - backup_policy_plan_prototype_model['deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model + backup_policy_plan_prototype_model[ + 'deletion_trigger'] = backup_policy_plan_deletion_trigger_prototype_model backup_policy_plan_prototype_model['name'] = 'my-policy-plan' - backup_policy_plan_prototype_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_prototype_model] + backup_policy_plan_prototype_model['remote_region_policies'] = [ + backup_policy_plan_remote_region_policy_prototype_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - backup_policy_scope_prototype_model = {} # BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN - backup_policy_scope_prototype_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_prototype_model = { + } # BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN + backup_policy_scope_prototype_model[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' # Construct a json representation of a BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype model backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json = {} - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json['match_user_tags'] = ['my-daily-backup-policy'] - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json['name'] = 'my-backup-policy' - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json['plans'] = [backup_policy_plan_prototype_model] - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json['resource_group'] = resource_group_identity_model - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json['scope'] = backup_policy_scope_prototype_model - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json['match_resource_type'] = 'volume' + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json[ + 'match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json[ + 'name'] = 'my-backup-policy' + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json[ + 'plans'] = [backup_policy_plan_prototype_model] + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json[ + 'resource_group'] = resource_group_identity_model + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json[ + 'scope'] = backup_policy_scope_prototype_model + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json[ + 'match_resource_type'] = 'volume' # Construct a model instance of BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype by calling from_dict on the json representation - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model = BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.from_dict(backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json) + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model = BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.from_dict( + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json + ) assert backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model != False # Construct a model instance of BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype by calling from_dict on the json representation - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_dict = BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.from_dict(backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json).__dict__ - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model2 = BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype(**backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_dict) + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_dict = BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype.from_dict( + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json + ).__dict__ + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model2 = BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype( + ** + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_dict + ) # Verify the model instances are equivalent assert backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model == backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json2 = backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model.to_dict() + backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json2 = backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model.to_dict( + ) assert backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json2 == backup_policy_prototype_backup_policy_match_resource_type_volume_prototype_model_json @@ -75595,22 +87322,28 @@ def test_backup_policy_scope_account_reference_serialization(self): # Construct a json representation of a BackupPolicyScopeAccountReference model backup_policy_scope_account_reference_model_json = {} - backup_policy_scope_account_reference_model_json['id'] = 'bb1b52262f7441a586f49068482f1e60' - backup_policy_scope_account_reference_model_json['resource_type'] = 'account' + backup_policy_scope_account_reference_model_json[ + 'id'] = 'bb1b52262f7441a586f49068482f1e60' + backup_policy_scope_account_reference_model_json[ + 'resource_type'] = 'account' # Construct a model instance of BackupPolicyScopeAccountReference by calling from_dict on the json representation - backup_policy_scope_account_reference_model = BackupPolicyScopeAccountReference.from_dict(backup_policy_scope_account_reference_model_json) + backup_policy_scope_account_reference_model = BackupPolicyScopeAccountReference.from_dict( + backup_policy_scope_account_reference_model_json) assert backup_policy_scope_account_reference_model != False # Construct a model instance of BackupPolicyScopeAccountReference by calling from_dict on the json representation - backup_policy_scope_account_reference_model_dict = BackupPolicyScopeAccountReference.from_dict(backup_policy_scope_account_reference_model_json).__dict__ - backup_policy_scope_account_reference_model2 = BackupPolicyScopeAccountReference(**backup_policy_scope_account_reference_model_dict) + backup_policy_scope_account_reference_model_dict = BackupPolicyScopeAccountReference.from_dict( + backup_policy_scope_account_reference_model_json).__dict__ + backup_policy_scope_account_reference_model2 = BackupPolicyScopeAccountReference( + **backup_policy_scope_account_reference_model_dict) # Verify the model instances are equivalent assert backup_policy_scope_account_reference_model == backup_policy_scope_account_reference_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_scope_account_reference_model_json2 = backup_policy_scope_account_reference_model.to_dict() + backup_policy_scope_account_reference_model_json2 = backup_policy_scope_account_reference_model.to_dict( + ) assert backup_policy_scope_account_reference_model_json2 == backup_policy_scope_account_reference_model_json @@ -75626,23 +87359,30 @@ def test_backup_policy_scope_enterprise_reference_serialization(self): # Construct a json representation of a BackupPolicyScopeEnterpriseReference model backup_policy_scope_enterprise_reference_model_json = {} - backup_policy_scope_enterprise_reference_model_json['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' - backup_policy_scope_enterprise_reference_model_json['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - backup_policy_scope_enterprise_reference_model_json['resource_type'] = 'enterprise' + backup_policy_scope_enterprise_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_enterprise_reference_model_json[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + backup_policy_scope_enterprise_reference_model_json[ + 'resource_type'] = 'enterprise' # Construct a model instance of BackupPolicyScopeEnterpriseReference by calling from_dict on the json representation - backup_policy_scope_enterprise_reference_model = BackupPolicyScopeEnterpriseReference.from_dict(backup_policy_scope_enterprise_reference_model_json) + backup_policy_scope_enterprise_reference_model = BackupPolicyScopeEnterpriseReference.from_dict( + backup_policy_scope_enterprise_reference_model_json) assert backup_policy_scope_enterprise_reference_model != False # Construct a model instance of BackupPolicyScopeEnterpriseReference by calling from_dict on the json representation - backup_policy_scope_enterprise_reference_model_dict = BackupPolicyScopeEnterpriseReference.from_dict(backup_policy_scope_enterprise_reference_model_json).__dict__ - backup_policy_scope_enterprise_reference_model2 = BackupPolicyScopeEnterpriseReference(**backup_policy_scope_enterprise_reference_model_dict) + backup_policy_scope_enterprise_reference_model_dict = BackupPolicyScopeEnterpriseReference.from_dict( + backup_policy_scope_enterprise_reference_model_json).__dict__ + backup_policy_scope_enterprise_reference_model2 = BackupPolicyScopeEnterpriseReference( + **backup_policy_scope_enterprise_reference_model_dict) # Verify the model instances are equivalent assert backup_policy_scope_enterprise_reference_model == backup_policy_scope_enterprise_reference_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_scope_enterprise_reference_model_json2 = backup_policy_scope_enterprise_reference_model.to_dict() + backup_policy_scope_enterprise_reference_model_json2 = backup_policy_scope_enterprise_reference_model.to_dict( + ) assert backup_policy_scope_enterprise_reference_model_json2 == backup_policy_scope_enterprise_reference_model_json @@ -75651,37 +87391,53 @@ class TestModel_BareMetalServerBootTargetBareMetalServerDiskReference: Test Class for BareMetalServerBootTargetBareMetalServerDiskReference """ - def test_bare_metal_server_boot_target_bare_metal_server_disk_reference_serialization(self): + def test_bare_metal_server_boot_target_bare_metal_server_disk_reference_serialization( + self): """ Test serialization/deserialization for BareMetalServerBootTargetBareMetalServerDiskReference """ # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted - bare_metal_server_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_disk_reference_deleted_model = { + } # BareMetalServerDiskReferenceDeleted + bare_metal_server_disk_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a BareMetalServerBootTargetBareMetalServerDiskReference model bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json = {} - bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json['deleted'] = bare_metal_server_disk_reference_deleted_model - bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json['name'] = 'my-bare-metal-server-disk' - bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json['resource_type'] = 'bare_metal_server_disk' + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json[ + 'deleted'] = bare_metal_server_disk_reference_deleted_model + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json[ + 'name'] = 'my-bare-metal-server-disk' + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json[ + 'resource_type'] = 'bare_metal_server_disk' # Construct a model instance of BareMetalServerBootTargetBareMetalServerDiskReference by calling from_dict on the json representation - bare_metal_server_boot_target_bare_metal_server_disk_reference_model = BareMetalServerBootTargetBareMetalServerDiskReference.from_dict(bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json) + bare_metal_server_boot_target_bare_metal_server_disk_reference_model = BareMetalServerBootTargetBareMetalServerDiskReference.from_dict( + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json + ) assert bare_metal_server_boot_target_bare_metal_server_disk_reference_model != False # Construct a model instance of BareMetalServerBootTargetBareMetalServerDiskReference by calling from_dict on the json representation - bare_metal_server_boot_target_bare_metal_server_disk_reference_model_dict = BareMetalServerBootTargetBareMetalServerDiskReference.from_dict(bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json).__dict__ - bare_metal_server_boot_target_bare_metal_server_disk_reference_model2 = BareMetalServerBootTargetBareMetalServerDiskReference(**bare_metal_server_boot_target_bare_metal_server_disk_reference_model_dict) + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_dict = BareMetalServerBootTargetBareMetalServerDiskReference.from_dict( + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json + ).__dict__ + bare_metal_server_boot_target_bare_metal_server_disk_reference_model2 = BareMetalServerBootTargetBareMetalServerDiskReference( + ** + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_boot_target_bare_metal_server_disk_reference_model == bare_metal_server_boot_target_bare_metal_server_disk_reference_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json2 = bare_metal_server_boot_target_bare_metal_server_disk_reference_model.to_dict() + bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json2 = bare_metal_server_boot_target_bare_metal_server_disk_reference_model.to_dict( + ) assert bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json2 == bare_metal_server_boot_target_bare_metal_server_disk_reference_model_json @@ -75690,7 +87446,8 @@ class TestModel_BareMetalServerInitializationUserAccountBareMetalServerInitializ Test Class for BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount """ - def test_bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_serialization(self): + def test_bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_serialization( + self): """ Test serialization/deserialization for BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount """ @@ -75698,36 +87455,52 @@ def test_bare_metal_server_initialization_user_account_bare_metal_server_initial # Construct dict forms of any model objects needed in order to build this model. key_reference_deleted_model = {} # KeyReferenceDeleted - key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + key_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' key_reference_model = {} # KeyReference - key_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model['deleted'] = key_reference_deleted_model - key_reference_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' - key_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_reference_model[ + 'fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' + key_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' key_reference_model['name'] = 'my-key' # Construct a json representation of a BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount model bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json = {} - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json['encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json['encryption_key'] = key_reference_model - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json['resource_type'] = 'host_user_account' - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json['username'] = 'Administrator' + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json[ + 'encrypted_password'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json[ + 'encryption_key'] = key_reference_model + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json[ + 'resource_type'] = 'host_user_account' + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json[ + 'username'] = 'Administrator' # Construct a model instance of BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount by calling from_dict on the json representation - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model = BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.from_dict(bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json) + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model = BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.from_dict( + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json + ) assert bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model != False # Construct a model instance of BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount by calling from_dict on the json representation - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_dict = BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.from_dict(bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json).__dict__ - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model2 = BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount(**bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_dict) + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_dict = BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.from_dict( + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json + ).__dict__ + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model2 = BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount( + ** + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model == bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json2 = bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model.to_dict() + bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json2 = bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model.to_dict( + ) assert bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json2 == bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model_json @@ -75744,63 +87517,94 @@ def test_bare_metal_server_network_attachment_by_pci_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - virtual_network_interface_reference_attachment_context_model = {} # VirtualNetworkInterfaceReferenceAttachmentContext - virtual_network_interface_reference_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model['resource_type'] = 'virtual_network_interface' + virtual_network_interface_reference_attachment_context_model = { + } # VirtualNetworkInterfaceReferenceAttachmentContext + virtual_network_interface_reference_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model[ + 'resource_type'] = 'virtual_network_interface' # Construct a json representation of a BareMetalServerNetworkAttachmentByPCI model bare_metal_server_network_attachment_by_pci_model_json = {} - bare_metal_server_network_attachment_by_pci_model_json['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_network_attachment_by_pci_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_by_pci_model_json['id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_by_pci_model_json['lifecycle_state'] = 'stable' - bare_metal_server_network_attachment_by_pci_model_json['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_by_pci_model_json['port_speed'] = 1000 - bare_metal_server_network_attachment_by_pci_model_json['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_attachment_by_pci_model_json['resource_type'] = 'bare_metal_server_network_attachment' - bare_metal_server_network_attachment_by_pci_model_json['subnet'] = subnet_reference_model - bare_metal_server_network_attachment_by_pci_model_json['type'] = 'primary' - bare_metal_server_network_attachment_by_pci_model_json['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model - bare_metal_server_network_attachment_by_pci_model_json['allowed_vlans'] = [4] - bare_metal_server_network_attachment_by_pci_model_json['interface_type'] = 'pci' + bare_metal_server_network_attachment_by_pci_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + bare_metal_server_network_attachment_by_pci_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_by_pci_model_json[ + 'id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_by_pci_model_json[ + 'lifecycle_state'] = 'stable' + bare_metal_server_network_attachment_by_pci_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_by_pci_model_json[ + 'port_speed'] = 1000 + bare_metal_server_network_attachment_by_pci_model_json[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_attachment_by_pci_model_json[ + 'resource_type'] = 'bare_metal_server_network_attachment' + bare_metal_server_network_attachment_by_pci_model_json[ + 'subnet'] = subnet_reference_model + bare_metal_server_network_attachment_by_pci_model_json[ + 'type'] = 'primary' + bare_metal_server_network_attachment_by_pci_model_json[ + 'virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model + bare_metal_server_network_attachment_by_pci_model_json[ + 'allowed_vlans'] = [4] + bare_metal_server_network_attachment_by_pci_model_json[ + 'interface_type'] = 'pci' # Construct a model instance of BareMetalServerNetworkAttachmentByPCI by calling from_dict on the json representation - bare_metal_server_network_attachment_by_pci_model = BareMetalServerNetworkAttachmentByPCI.from_dict(bare_metal_server_network_attachment_by_pci_model_json) + bare_metal_server_network_attachment_by_pci_model = BareMetalServerNetworkAttachmentByPCI.from_dict( + bare_metal_server_network_attachment_by_pci_model_json) assert bare_metal_server_network_attachment_by_pci_model != False # Construct a model instance of BareMetalServerNetworkAttachmentByPCI by calling from_dict on the json representation - bare_metal_server_network_attachment_by_pci_model_dict = BareMetalServerNetworkAttachmentByPCI.from_dict(bare_metal_server_network_attachment_by_pci_model_json).__dict__ - bare_metal_server_network_attachment_by_pci_model2 = BareMetalServerNetworkAttachmentByPCI(**bare_metal_server_network_attachment_by_pci_model_dict) + bare_metal_server_network_attachment_by_pci_model_dict = BareMetalServerNetworkAttachmentByPCI.from_dict( + bare_metal_server_network_attachment_by_pci_model_json).__dict__ + bare_metal_server_network_attachment_by_pci_model2 = BareMetalServerNetworkAttachmentByPCI( + **bare_metal_server_network_attachment_by_pci_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_by_pci_model == bare_metal_server_network_attachment_by_pci_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_by_pci_model_json2 = bare_metal_server_network_attachment_by_pci_model.to_dict() + bare_metal_server_network_attachment_by_pci_model_json2 = bare_metal_server_network_attachment_by_pci_model.to_dict( + ) assert bare_metal_server_network_attachment_by_pci_model_json2 == bare_metal_server_network_attachment_by_pci_model_json @@ -75817,64 +87621,95 @@ def test_bare_metal_server_network_attachment_by_vlan_serialization(self): # Construct dict forms of any model objects needed in order to build this model. reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' - virtual_network_interface_reference_attachment_context_model = {} # VirtualNetworkInterfaceReferenceAttachmentContext - virtual_network_interface_reference_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - virtual_network_interface_reference_attachment_context_model['name'] = 'my-virtual-network-interface' - virtual_network_interface_reference_attachment_context_model['resource_type'] = 'virtual_network_interface' + virtual_network_interface_reference_attachment_context_model = { + } # VirtualNetworkInterfaceReferenceAttachmentContext + virtual_network_interface_reference_attachment_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + virtual_network_interface_reference_attachment_context_model[ + 'name'] = 'my-virtual-network-interface' + virtual_network_interface_reference_attachment_context_model[ + 'resource_type'] = 'virtual_network_interface' # Construct a json representation of a BareMetalServerNetworkAttachmentByVLAN model bare_metal_server_network_attachment_by_vlan_model_json = {} - bare_metal_server_network_attachment_by_vlan_model_json['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_network_attachment_by_vlan_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_by_vlan_model_json['id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - bare_metal_server_network_attachment_by_vlan_model_json['lifecycle_state'] = 'stable' - bare_metal_server_network_attachment_by_vlan_model_json['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_by_vlan_model_json['port_speed'] = 1000 - bare_metal_server_network_attachment_by_vlan_model_json['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_attachment_by_vlan_model_json['resource_type'] = 'bare_metal_server_network_attachment' - bare_metal_server_network_attachment_by_vlan_model_json['subnet'] = subnet_reference_model - bare_metal_server_network_attachment_by_vlan_model_json['type'] = 'primary' - bare_metal_server_network_attachment_by_vlan_model_json['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model - bare_metal_server_network_attachment_by_vlan_model_json['allow_to_float'] = False - bare_metal_server_network_attachment_by_vlan_model_json['interface_type'] = 'vlan' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'lifecycle_state'] = 'stable' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'port_speed'] = 1000 + bare_metal_server_network_attachment_by_vlan_model_json[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_attachment_by_vlan_model_json[ + 'resource_type'] = 'bare_metal_server_network_attachment' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'subnet'] = subnet_reference_model + bare_metal_server_network_attachment_by_vlan_model_json[ + 'type'] = 'primary' + bare_metal_server_network_attachment_by_vlan_model_json[ + 'virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model + bare_metal_server_network_attachment_by_vlan_model_json[ + 'allow_to_float'] = False + bare_metal_server_network_attachment_by_vlan_model_json[ + 'interface_type'] = 'vlan' bare_metal_server_network_attachment_by_vlan_model_json['vlan'] = 4 # Construct a model instance of BareMetalServerNetworkAttachmentByVLAN by calling from_dict on the json representation - bare_metal_server_network_attachment_by_vlan_model = BareMetalServerNetworkAttachmentByVLAN.from_dict(bare_metal_server_network_attachment_by_vlan_model_json) + bare_metal_server_network_attachment_by_vlan_model = BareMetalServerNetworkAttachmentByVLAN.from_dict( + bare_metal_server_network_attachment_by_vlan_model_json) assert bare_metal_server_network_attachment_by_vlan_model != False # Construct a model instance of BareMetalServerNetworkAttachmentByVLAN by calling from_dict on the json representation - bare_metal_server_network_attachment_by_vlan_model_dict = BareMetalServerNetworkAttachmentByVLAN.from_dict(bare_metal_server_network_attachment_by_vlan_model_json).__dict__ - bare_metal_server_network_attachment_by_vlan_model2 = BareMetalServerNetworkAttachmentByVLAN(**bare_metal_server_network_attachment_by_vlan_model_dict) + bare_metal_server_network_attachment_by_vlan_model_dict = BareMetalServerNetworkAttachmentByVLAN.from_dict( + bare_metal_server_network_attachment_by_vlan_model_json).__dict__ + bare_metal_server_network_attachment_by_vlan_model2 = BareMetalServerNetworkAttachmentByVLAN( + **bare_metal_server_network_attachment_by_vlan_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_by_vlan_model == bare_metal_server_network_attachment_by_vlan_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_by_vlan_model_json2 = bare_metal_server_network_attachment_by_vlan_model.to_dict() + bare_metal_server_network_attachment_by_vlan_model_json2 = bare_metal_server_network_attachment_by_vlan_model.to_dict( + ) assert bare_metal_server_network_attachment_by_vlan_model_json2 == bare_metal_server_network_attachment_by_vlan_model_json @@ -75883,57 +87718,84 @@ class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface Test Class for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext """ - def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_serialization(self): + def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + subnet_identity_model[ + 'id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' # Construct a json representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext model bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json[ + 'subnet'] = subnet_identity_model # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model != False # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json).__dict__ - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext(**bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_dict) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json + ).__dict__ + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext( + ** + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model.to_dict() + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model.to_dict( + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json2 == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model_json @@ -75942,63 +87804,94 @@ class TestModel_BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkA Test Class for BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype """ - def test_bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_serialization(self): + def test_bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model = { + } # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a json representation of a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype model bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json = {} - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json['allowed_vlans'] = [] - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json['interface_type'] = 'pci' + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json[ + 'allowed_vlans'] = [] + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json[ + 'interface_type'] = 'pci' # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.from_dict(bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json) + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.from_dict( + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json + ) assert bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model != False # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_dict = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.from_dict(bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json).__dict__ - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model2 = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype(**bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_dict) + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_dict = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype.from_dict( + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json + ).__dict__ + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model2 = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype( + ** + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model == bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json2 = bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model.to_dict() + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json2 = bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model.to_dict( + ) assert bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json2 == bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model_json @@ -76007,64 +87900,96 @@ class TestModel_BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkA Test Class for BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype """ - def test_bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_serialization(self): + def test_bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model = { + } # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a json representation of a BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype model bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json = {} - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json['allow_to_float'] = False - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json['interface_type'] = 'vlan' - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json['vlan'] = 4 + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json[ + 'allow_to_float'] = False + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json[ + 'interface_type'] = 'vlan' + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json[ + 'vlan'] = 4 # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.from_dict(bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json) + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.from_dict( + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json + ) assert bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model != False # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_dict = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.from_dict(bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json).__dict__ - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model2 = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype(**bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_dict) + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_dict = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype.from_dict( + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json + ).__dict__ + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model2 = BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype( + ** + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model == bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json2 = bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model.to_dict() + bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json2 = bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model.to_dict( + ) assert bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json2 == bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model_json @@ -76073,7 +87998,8 @@ class TestModel_BareMetalServerNetworkInterfaceByHiperSocket: Test Class for BareMetalServerNetworkInterfaceByHiperSocket """ - def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self): + def test_bare_metal_server_network_interface_by_hiper_socket_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfaceByHiperSocket """ @@ -76081,80 +88007,120 @@ def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self) # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' floating_ip_reference_model = {} # FloatingIPReference floating_ip_reference_model['address'] = '203.0.113.1' - floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a BareMetalServerNetworkInterfaceByHiperSocket model bare_metal_server_network_interface_by_hiper_socket_model_json = {} - bare_metal_server_network_interface_by_hiper_socket_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_interface_by_hiper_socket_model_json['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_network_interface_by_hiper_socket_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_by_hiper_socket_model_json['floating_ips'] = [floating_ip_reference_model] - bare_metal_server_network_interface_by_hiper_socket_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_by_hiper_socket_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_by_hiper_socket_model_json['mac_address'] = '02:00:04:00:C4:6A' - bare_metal_server_network_interface_by_hiper_socket_model_json['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_by_hiper_socket_model_json['port_speed'] = 1000 - bare_metal_server_network_interface_by_hiper_socket_model_json['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_interface_by_hiper_socket_model_json['resource_type'] = 'network_interface' - bare_metal_server_network_interface_by_hiper_socket_model_json['security_groups'] = [security_group_reference_model] - bare_metal_server_network_interface_by_hiper_socket_model_json['status'] = 'available' - bare_metal_server_network_interface_by_hiper_socket_model_json['subnet'] = subnet_reference_model - bare_metal_server_network_interface_by_hiper_socket_model_json['type'] = 'primary' - bare_metal_server_network_interface_by_hiper_socket_model_json['interface_type'] = 'hipersocket' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'floating_ips'] = [floating_ip_reference_model] + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'mac_address'] = '02:00:04:00:C4:6A' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'port_speed'] = 1000 + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'resource_type'] = 'network_interface' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'security_groups'] = [security_group_reference_model] + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'status'] = 'available' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'subnet'] = subnet_reference_model + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'type'] = 'primary' + bare_metal_server_network_interface_by_hiper_socket_model_json[ + 'interface_type'] = 'hipersocket' # Construct a model instance of BareMetalServerNetworkInterfaceByHiperSocket by calling from_dict on the json representation - bare_metal_server_network_interface_by_hiper_socket_model = BareMetalServerNetworkInterfaceByHiperSocket.from_dict(bare_metal_server_network_interface_by_hiper_socket_model_json) + bare_metal_server_network_interface_by_hiper_socket_model = BareMetalServerNetworkInterfaceByHiperSocket.from_dict( + bare_metal_server_network_interface_by_hiper_socket_model_json) assert bare_metal_server_network_interface_by_hiper_socket_model != False # Construct a model instance of BareMetalServerNetworkInterfaceByHiperSocket by calling from_dict on the json representation - bare_metal_server_network_interface_by_hiper_socket_model_dict = BareMetalServerNetworkInterfaceByHiperSocket.from_dict(bare_metal_server_network_interface_by_hiper_socket_model_json).__dict__ - bare_metal_server_network_interface_by_hiper_socket_model2 = BareMetalServerNetworkInterfaceByHiperSocket(**bare_metal_server_network_interface_by_hiper_socket_model_dict) + bare_metal_server_network_interface_by_hiper_socket_model_dict = BareMetalServerNetworkInterfaceByHiperSocket.from_dict( + bare_metal_server_network_interface_by_hiper_socket_model_json + ).__dict__ + bare_metal_server_network_interface_by_hiper_socket_model2 = BareMetalServerNetworkInterfaceByHiperSocket( + **bare_metal_server_network_interface_by_hiper_socket_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_by_hiper_socket_model == bare_metal_server_network_interface_by_hiper_socket_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_by_hiper_socket_model_json2 = bare_metal_server_network_interface_by_hiper_socket_model.to_dict() + bare_metal_server_network_interface_by_hiper_socket_model_json2 = bare_metal_server_network_interface_by_hiper_socket_model.to_dict( + ) assert bare_metal_server_network_interface_by_hiper_socket_model_json2 == bare_metal_server_network_interface_by_hiper_socket_model_json @@ -76171,81 +88137,121 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' floating_ip_reference_model = {} # FloatingIPReference floating_ip_reference_model['address'] = '203.0.113.1' - floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a BareMetalServerNetworkInterfaceByPCI model bare_metal_server_network_interface_by_pci_model_json = {} - bare_metal_server_network_interface_by_pci_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_interface_by_pci_model_json['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_network_interface_by_pci_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_by_pci_model_json['floating_ips'] = [floating_ip_reference_model] - bare_metal_server_network_interface_by_pci_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_by_pci_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_by_pci_model_json['mac_address'] = '02:00:04:00:C4:6A' - bare_metal_server_network_interface_by_pci_model_json['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_by_pci_model_json['port_speed'] = 1000 - bare_metal_server_network_interface_by_pci_model_json['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_interface_by_pci_model_json['resource_type'] = 'network_interface' - bare_metal_server_network_interface_by_pci_model_json['security_groups'] = [security_group_reference_model] - bare_metal_server_network_interface_by_pci_model_json['status'] = 'available' - bare_metal_server_network_interface_by_pci_model_json['subnet'] = subnet_reference_model - bare_metal_server_network_interface_by_pci_model_json['type'] = 'primary' - bare_metal_server_network_interface_by_pci_model_json['allowed_vlans'] = [4] - bare_metal_server_network_interface_by_pci_model_json['interface_type'] = 'pci' + bare_metal_server_network_interface_by_pci_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_by_pci_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + bare_metal_server_network_interface_by_pci_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_by_pci_model_json[ + 'floating_ips'] = [floating_ip_reference_model] + bare_metal_server_network_interface_by_pci_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_by_pci_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_by_pci_model_json[ + 'mac_address'] = '02:00:04:00:C4:6A' + bare_metal_server_network_interface_by_pci_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_by_pci_model_json[ + 'port_speed'] = 1000 + bare_metal_server_network_interface_by_pci_model_json[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_interface_by_pci_model_json[ + 'resource_type'] = 'network_interface' + bare_metal_server_network_interface_by_pci_model_json[ + 'security_groups'] = [security_group_reference_model] + bare_metal_server_network_interface_by_pci_model_json[ + 'status'] = 'available' + bare_metal_server_network_interface_by_pci_model_json[ + 'subnet'] = subnet_reference_model + bare_metal_server_network_interface_by_pci_model_json[ + 'type'] = 'primary' + bare_metal_server_network_interface_by_pci_model_json[ + 'allowed_vlans'] = [4] + bare_metal_server_network_interface_by_pci_model_json[ + 'interface_type'] = 'pci' # Construct a model instance of BareMetalServerNetworkInterfaceByPCI by calling from_dict on the json representation - bare_metal_server_network_interface_by_pci_model = BareMetalServerNetworkInterfaceByPCI.from_dict(bare_metal_server_network_interface_by_pci_model_json) + bare_metal_server_network_interface_by_pci_model = BareMetalServerNetworkInterfaceByPCI.from_dict( + bare_metal_server_network_interface_by_pci_model_json) assert bare_metal_server_network_interface_by_pci_model != False # Construct a model instance of BareMetalServerNetworkInterfaceByPCI by calling from_dict on the json representation - bare_metal_server_network_interface_by_pci_model_dict = BareMetalServerNetworkInterfaceByPCI.from_dict(bare_metal_server_network_interface_by_pci_model_json).__dict__ - bare_metal_server_network_interface_by_pci_model2 = BareMetalServerNetworkInterfaceByPCI(**bare_metal_server_network_interface_by_pci_model_dict) + bare_metal_server_network_interface_by_pci_model_dict = BareMetalServerNetworkInterfaceByPCI.from_dict( + bare_metal_server_network_interface_by_pci_model_json).__dict__ + bare_metal_server_network_interface_by_pci_model2 = BareMetalServerNetworkInterfaceByPCI( + **bare_metal_server_network_interface_by_pci_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_by_pci_model == bare_metal_server_network_interface_by_pci_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_by_pci_model_json2 = bare_metal_server_network_interface_by_pci_model.to_dict() + bare_metal_server_network_interface_by_pci_model_json2 = bare_metal_server_network_interface_by_pci_model.to_dict( + ) assert bare_metal_server_network_interface_by_pci_model_json2 == bare_metal_server_network_interface_by_pci_model_json @@ -76262,82 +88268,122 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self): # Construct dict forms of any model objects needed in order to build this model. floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted - floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + floating_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' floating_ip_reference_model = {} # FloatingIPReference floating_ip_reference_model['address'] = '203.0.113.1' - floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model - floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' - floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'deleted'] = floating_ip_reference_deleted_model + floating_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + floating_ip_reference_model[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_reference_model = {} # SecurityGroupReference - security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['deleted'] = security_group_reference_deleted_model - security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_reference_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'deleted'] = security_group_reference_deleted_model + security_group_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_reference_model[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['name'] = 'my-security-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a BareMetalServerNetworkInterfaceByVLAN model bare_metal_server_network_interface_by_vlan_model_json = {} - bare_metal_server_network_interface_by_vlan_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_interface_by_vlan_model_json['created_at'] = '2019-01-01T12:00:00Z' - bare_metal_server_network_interface_by_vlan_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_by_vlan_model_json['floating_ips'] = [floating_ip_reference_model] - bare_metal_server_network_interface_by_vlan_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_by_vlan_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - bare_metal_server_network_interface_by_vlan_model_json['mac_address'] = '02:00:04:00:C4:6A' - bare_metal_server_network_interface_by_vlan_model_json['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_by_vlan_model_json['port_speed'] = 1000 - bare_metal_server_network_interface_by_vlan_model_json['primary_ip'] = reserved_ip_reference_model - bare_metal_server_network_interface_by_vlan_model_json['resource_type'] = 'network_interface' - bare_metal_server_network_interface_by_vlan_model_json['security_groups'] = [security_group_reference_model] - bare_metal_server_network_interface_by_vlan_model_json['status'] = 'available' - bare_metal_server_network_interface_by_vlan_model_json['subnet'] = subnet_reference_model - bare_metal_server_network_interface_by_vlan_model_json['type'] = 'primary' - bare_metal_server_network_interface_by_vlan_model_json['allow_interface_to_float'] = False - bare_metal_server_network_interface_by_vlan_model_json['interface_type'] = 'vlan' + bare_metal_server_network_interface_by_vlan_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_by_vlan_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + bare_metal_server_network_interface_by_vlan_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_by_vlan_model_json[ + 'floating_ips'] = [floating_ip_reference_model] + bare_metal_server_network_interface_by_vlan_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_by_vlan_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + bare_metal_server_network_interface_by_vlan_model_json[ + 'mac_address'] = '02:00:04:00:C4:6A' + bare_metal_server_network_interface_by_vlan_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_by_vlan_model_json[ + 'port_speed'] = 1000 + bare_metal_server_network_interface_by_vlan_model_json[ + 'primary_ip'] = reserved_ip_reference_model + bare_metal_server_network_interface_by_vlan_model_json[ + 'resource_type'] = 'network_interface' + bare_metal_server_network_interface_by_vlan_model_json[ + 'security_groups'] = [security_group_reference_model] + bare_metal_server_network_interface_by_vlan_model_json[ + 'status'] = 'available' + bare_metal_server_network_interface_by_vlan_model_json[ + 'subnet'] = subnet_reference_model + bare_metal_server_network_interface_by_vlan_model_json[ + 'type'] = 'primary' + bare_metal_server_network_interface_by_vlan_model_json[ + 'allow_interface_to_float'] = False + bare_metal_server_network_interface_by_vlan_model_json[ + 'interface_type'] = 'vlan' bare_metal_server_network_interface_by_vlan_model_json['vlan'] = 4 # Construct a model instance of BareMetalServerNetworkInterfaceByVLAN by calling from_dict on the json representation - bare_metal_server_network_interface_by_vlan_model = BareMetalServerNetworkInterfaceByVLAN.from_dict(bare_metal_server_network_interface_by_vlan_model_json) + bare_metal_server_network_interface_by_vlan_model = BareMetalServerNetworkInterfaceByVLAN.from_dict( + bare_metal_server_network_interface_by_vlan_model_json) assert bare_metal_server_network_interface_by_vlan_model != False # Construct a model instance of BareMetalServerNetworkInterfaceByVLAN by calling from_dict on the json representation - bare_metal_server_network_interface_by_vlan_model_dict = BareMetalServerNetworkInterfaceByVLAN.from_dict(bare_metal_server_network_interface_by_vlan_model_json).__dict__ - bare_metal_server_network_interface_by_vlan_model2 = BareMetalServerNetworkInterfaceByVLAN(**bare_metal_server_network_interface_by_vlan_model_dict) + bare_metal_server_network_interface_by_vlan_model_dict = BareMetalServerNetworkInterfaceByVLAN.from_dict( + bare_metal_server_network_interface_by_vlan_model_json).__dict__ + bare_metal_server_network_interface_by_vlan_model2 = BareMetalServerNetworkInterfaceByVLAN( + **bare_metal_server_network_interface_by_vlan_model_dict) # Verify the model instances are equivalent assert bare_metal_server_network_interface_by_vlan_model == bare_metal_server_network_interface_by_vlan_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_by_vlan_model_json2 = bare_metal_server_network_interface_by_vlan_model.to_dict() + bare_metal_server_network_interface_by_vlan_model_json2 = bare_metal_server_network_interface_by_vlan_model.to_dict( + ) assert bare_metal_server_network_interface_by_vlan_model_json2 == bare_metal_server_network_interface_by_vlan_model_json @@ -76346,47 +88392,65 @@ class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkIn Test Class for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype """ - def test_bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_serialization(self): + def test_bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype model bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json = {} - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json['security_groups'] = [security_group_identity_model] - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json['subnet'] = subnet_identity_model - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json['interface_type'] = 'hipersocket' + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json[ + 'subnet'] = subnet_identity_model + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json[ + 'interface_type'] = 'hipersocket' # Construct a model instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype by calling from_dict on the json representation - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.from_dict(bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json) + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.from_dict( + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json + ) assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model != False # Construct a model instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype by calling from_dict on the json representation - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_dict = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.from_dict(bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json).__dict__ - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model2 = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype(**bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_dict) + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_dict = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.from_dict( + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json + ).__dict__ + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model2 = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype( + ** + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model == bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json2 = bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model.to_dict() + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json2 = bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model.to_dict( + ) assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json2 == bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model_json @@ -76395,48 +88459,67 @@ class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkIn Test Class for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype """ - def test_bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_serialization(self): + def test_bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype model bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json = {} - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['security_groups'] = [security_group_identity_model] - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['subnet'] = subnet_identity_model - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['allowed_vlans'] = [] - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json['interface_type'] = 'pci' + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'subnet'] = subnet_identity_model + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'allowed_vlans'] = [] + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json[ + 'interface_type'] = 'pci' # Construct a model instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype by calling from_dict on the json representation - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.from_dict(bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json) + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.from_dict( + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json + ) assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model != False # Construct a model instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype by calling from_dict on the json representation - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_dict = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.from_dict(bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json).__dict__ - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model2 = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype(**bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_dict) + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_dict = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.from_dict( + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json + ).__dict__ + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model2 = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype( + ** + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model == bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json2 = bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model.to_dict() + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json2 = bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model.to_dict( + ) assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json2 == bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model_json @@ -76445,49 +88528,69 @@ class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkIn Test Class for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype """ - def test_bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_serialization(self): + def test_bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype model bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json = {} - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['allow_ip_spoofing'] = True - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['security_groups'] = [security_group_identity_model] - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['subnet'] = subnet_identity_model - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['allow_interface_to_float'] = False - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['interface_type'] = 'vlan' - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json['vlan'] = 4 + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'subnet'] = subnet_identity_model + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'allow_interface_to_float'] = False + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'interface_type'] = 'vlan' + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json[ + 'vlan'] = 4 # Construct a model instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype by calling from_dict on the json representation - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.from_dict(bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json) + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.from_dict( + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json + ) assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model != False # Construct a model instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype by calling from_dict on the json representation - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_dict = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.from_dict(bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json).__dict__ - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model2 = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype(**bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_dict) + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_dict = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.from_dict( + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json + ).__dict__ + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model2 = BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype( + ** + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model == bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json2 = bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model.to_dict() + bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json2 = bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model.to_dict( + ) assert bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json2 == bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model_json @@ -76496,63 +88599,94 @@ class TestModel_BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerP Test Class for BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype """ - def test_bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_serialization(self): + def test_bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_serialization( + self): """ Test serialization/deserialization for BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model = { + } # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model # Construct a json representation of a BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype model bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json = {} - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json['allowed_vlans'] = [] - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json['interface_type'] = 'pci' + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json[ + 'allowed_vlans'] = [] + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json[ + 'interface_type'] = 'pci' # Construct a model instance of BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype by calling from_dict on the json representation - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model = BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.from_dict(bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json) + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model = BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.from_dict( + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json + ) assert bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model != False # Construct a model instance of BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype by calling from_dict on the json representation - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_dict = BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.from_dict(bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json).__dict__ - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model2 = BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype(**bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_dict) + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_dict = BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype.from_dict( + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json + ).__dict__ + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model2 = BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype( + ** + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model == bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json2 = bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model.to_dict() + bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json2 = bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model.to_dict( + ) assert bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json2 == bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model_json @@ -76568,21 +88702,26 @@ def test_bare_metal_server_profile_bandwidth_dependent_serialization(self): # Construct a json representation of a BareMetalServerProfileBandwidthDependent model bare_metal_server_profile_bandwidth_dependent_model_json = {} - bare_metal_server_profile_bandwidth_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_bandwidth_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileBandwidthDependent by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_dependent_model = BareMetalServerProfileBandwidthDependent.from_dict(bare_metal_server_profile_bandwidth_dependent_model_json) + bare_metal_server_profile_bandwidth_dependent_model = BareMetalServerProfileBandwidthDependent.from_dict( + bare_metal_server_profile_bandwidth_dependent_model_json) assert bare_metal_server_profile_bandwidth_dependent_model != False # Construct a model instance of BareMetalServerProfileBandwidthDependent by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_dependent_model_dict = BareMetalServerProfileBandwidthDependent.from_dict(bare_metal_server_profile_bandwidth_dependent_model_json).__dict__ - bare_metal_server_profile_bandwidth_dependent_model2 = BareMetalServerProfileBandwidthDependent(**bare_metal_server_profile_bandwidth_dependent_model_dict) + bare_metal_server_profile_bandwidth_dependent_model_dict = BareMetalServerProfileBandwidthDependent.from_dict( + bare_metal_server_profile_bandwidth_dependent_model_json).__dict__ + bare_metal_server_profile_bandwidth_dependent_model2 = BareMetalServerProfileBandwidthDependent( + **bare_metal_server_profile_bandwidth_dependent_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_bandwidth_dependent_model == bare_metal_server_profile_bandwidth_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_bandwidth_dependent_model_json2 = bare_metal_server_profile_bandwidth_dependent_model.to_dict() + bare_metal_server_profile_bandwidth_dependent_model_json2 = bare_metal_server_profile_bandwidth_dependent_model.to_dict( + ) assert bare_metal_server_profile_bandwidth_dependent_model_json2 == bare_metal_server_profile_bandwidth_dependent_model_json @@ -76600,21 +88739,27 @@ def test_bare_metal_server_profile_bandwidth_enum_serialization(self): bare_metal_server_profile_bandwidth_enum_model_json = {} bare_metal_server_profile_bandwidth_enum_model_json['default'] = 38 bare_metal_server_profile_bandwidth_enum_model_json['type'] = 'enum' - bare_metal_server_profile_bandwidth_enum_model_json['values'] = [16000, 32000, 48000] + bare_metal_server_profile_bandwidth_enum_model_json['values'] = [ + 16000, 32000, 48000 + ] # Construct a model instance of BareMetalServerProfileBandwidthEnum by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_enum_model = BareMetalServerProfileBandwidthEnum.from_dict(bare_metal_server_profile_bandwidth_enum_model_json) + bare_metal_server_profile_bandwidth_enum_model = BareMetalServerProfileBandwidthEnum.from_dict( + bare_metal_server_profile_bandwidth_enum_model_json) assert bare_metal_server_profile_bandwidth_enum_model != False # Construct a model instance of BareMetalServerProfileBandwidthEnum by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_enum_model_dict = BareMetalServerProfileBandwidthEnum.from_dict(bare_metal_server_profile_bandwidth_enum_model_json).__dict__ - bare_metal_server_profile_bandwidth_enum_model2 = BareMetalServerProfileBandwidthEnum(**bare_metal_server_profile_bandwidth_enum_model_dict) + bare_metal_server_profile_bandwidth_enum_model_dict = BareMetalServerProfileBandwidthEnum.from_dict( + bare_metal_server_profile_bandwidth_enum_model_json).__dict__ + bare_metal_server_profile_bandwidth_enum_model2 = BareMetalServerProfileBandwidthEnum( + **bare_metal_server_profile_bandwidth_enum_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_bandwidth_enum_model == bare_metal_server_profile_bandwidth_enum_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_bandwidth_enum_model_json2 = bare_metal_server_profile_bandwidth_enum_model.to_dict() + bare_metal_server_profile_bandwidth_enum_model_json2 = bare_metal_server_profile_bandwidth_enum_model.to_dict( + ) assert bare_metal_server_profile_bandwidth_enum_model_json2 == bare_metal_server_profile_bandwidth_enum_model_json @@ -76634,18 +88779,22 @@ def test_bare_metal_server_profile_bandwidth_fixed_serialization(self): bare_metal_server_profile_bandwidth_fixed_model_json['value'] = 20000 # Construct a model instance of BareMetalServerProfileBandwidthFixed by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_fixed_model = BareMetalServerProfileBandwidthFixed.from_dict(bare_metal_server_profile_bandwidth_fixed_model_json) + bare_metal_server_profile_bandwidth_fixed_model = BareMetalServerProfileBandwidthFixed.from_dict( + bare_metal_server_profile_bandwidth_fixed_model_json) assert bare_metal_server_profile_bandwidth_fixed_model != False # Construct a model instance of BareMetalServerProfileBandwidthFixed by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_fixed_model_dict = BareMetalServerProfileBandwidthFixed.from_dict(bare_metal_server_profile_bandwidth_fixed_model_json).__dict__ - bare_metal_server_profile_bandwidth_fixed_model2 = BareMetalServerProfileBandwidthFixed(**bare_metal_server_profile_bandwidth_fixed_model_dict) + bare_metal_server_profile_bandwidth_fixed_model_dict = BareMetalServerProfileBandwidthFixed.from_dict( + bare_metal_server_profile_bandwidth_fixed_model_json).__dict__ + bare_metal_server_profile_bandwidth_fixed_model2 = BareMetalServerProfileBandwidthFixed( + **bare_metal_server_profile_bandwidth_fixed_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_bandwidth_fixed_model == bare_metal_server_profile_bandwidth_fixed_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_bandwidth_fixed_model_json2 = bare_metal_server_profile_bandwidth_fixed_model.to_dict() + bare_metal_server_profile_bandwidth_fixed_model_json2 = bare_metal_server_profile_bandwidth_fixed_model.to_dict( + ) assert bare_metal_server_profile_bandwidth_fixed_model_json2 == bare_metal_server_profile_bandwidth_fixed_model_json @@ -76668,18 +88817,22 @@ def test_bare_metal_server_profile_bandwidth_range_serialization(self): bare_metal_server_profile_bandwidth_range_model_json['type'] = 'range' # Construct a model instance of BareMetalServerProfileBandwidthRange by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_range_model = BareMetalServerProfileBandwidthRange.from_dict(bare_metal_server_profile_bandwidth_range_model_json) + bare_metal_server_profile_bandwidth_range_model = BareMetalServerProfileBandwidthRange.from_dict( + bare_metal_server_profile_bandwidth_range_model_json) assert bare_metal_server_profile_bandwidth_range_model != False # Construct a model instance of BareMetalServerProfileBandwidthRange by calling from_dict on the json representation - bare_metal_server_profile_bandwidth_range_model_dict = BareMetalServerProfileBandwidthRange.from_dict(bare_metal_server_profile_bandwidth_range_model_json).__dict__ - bare_metal_server_profile_bandwidth_range_model2 = BareMetalServerProfileBandwidthRange(**bare_metal_server_profile_bandwidth_range_model_dict) + bare_metal_server_profile_bandwidth_range_model_dict = BareMetalServerProfileBandwidthRange.from_dict( + bare_metal_server_profile_bandwidth_range_model_json).__dict__ + bare_metal_server_profile_bandwidth_range_model2 = BareMetalServerProfileBandwidthRange( + **bare_metal_server_profile_bandwidth_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_bandwidth_range_model == bare_metal_server_profile_bandwidth_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_bandwidth_range_model_json2 = bare_metal_server_profile_bandwidth_range_model.to_dict() + bare_metal_server_profile_bandwidth_range_model_json2 = bare_metal_server_profile_bandwidth_range_model.to_dict( + ) assert bare_metal_server_profile_bandwidth_range_model_json2 == bare_metal_server_profile_bandwidth_range_model_json @@ -76688,28 +88841,35 @@ class TestModel_BareMetalServerProfileCPUCoreCountDependent: Test Class for BareMetalServerProfileCPUCoreCountDependent """ - def test_bare_metal_server_profile_cpu_core_count_dependent_serialization(self): + def test_bare_metal_server_profile_cpu_core_count_dependent_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileCPUCoreCountDependent """ # Construct a json representation of a BareMetalServerProfileCPUCoreCountDependent model bare_metal_server_profile_cpu_core_count_dependent_model_json = {} - bare_metal_server_profile_cpu_core_count_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_cpu_core_count_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileCPUCoreCountDependent by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_dependent_model = BareMetalServerProfileCPUCoreCountDependent.from_dict(bare_metal_server_profile_cpu_core_count_dependent_model_json) + bare_metal_server_profile_cpu_core_count_dependent_model = BareMetalServerProfileCPUCoreCountDependent.from_dict( + bare_metal_server_profile_cpu_core_count_dependent_model_json) assert bare_metal_server_profile_cpu_core_count_dependent_model != False # Construct a model instance of BareMetalServerProfileCPUCoreCountDependent by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_dependent_model_dict = BareMetalServerProfileCPUCoreCountDependent.from_dict(bare_metal_server_profile_cpu_core_count_dependent_model_json).__dict__ - bare_metal_server_profile_cpu_core_count_dependent_model2 = BareMetalServerProfileCPUCoreCountDependent(**bare_metal_server_profile_cpu_core_count_dependent_model_dict) + bare_metal_server_profile_cpu_core_count_dependent_model_dict = BareMetalServerProfileCPUCoreCountDependent.from_dict( + bare_metal_server_profile_cpu_core_count_dependent_model_json + ).__dict__ + bare_metal_server_profile_cpu_core_count_dependent_model2 = BareMetalServerProfileCPUCoreCountDependent( + **bare_metal_server_profile_cpu_core_count_dependent_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_core_count_dependent_model == bare_metal_server_profile_cpu_core_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_core_count_dependent_model_json2 = bare_metal_server_profile_cpu_core_count_dependent_model.to_dict() + bare_metal_server_profile_cpu_core_count_dependent_model_json2 = bare_metal_server_profile_cpu_core_count_dependent_model.to_dict( + ) assert bare_metal_server_profile_cpu_core_count_dependent_model_json2 == bare_metal_server_profile_cpu_core_count_dependent_model_json @@ -76726,22 +88886,29 @@ def test_bare_metal_server_profile_cpu_core_count_enum_serialization(self): # Construct a json representation of a BareMetalServerProfileCPUCoreCountEnum model bare_metal_server_profile_cpu_core_count_enum_model_json = {} bare_metal_server_profile_cpu_core_count_enum_model_json['default'] = 38 - bare_metal_server_profile_cpu_core_count_enum_model_json['type'] = 'enum' - bare_metal_server_profile_cpu_core_count_enum_model_json['values'] = [40, 60, 80] + bare_metal_server_profile_cpu_core_count_enum_model_json[ + 'type'] = 'enum' + bare_metal_server_profile_cpu_core_count_enum_model_json['values'] = [ + 40, 60, 80 + ] # Construct a model instance of BareMetalServerProfileCPUCoreCountEnum by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_enum_model = BareMetalServerProfileCPUCoreCountEnum.from_dict(bare_metal_server_profile_cpu_core_count_enum_model_json) + bare_metal_server_profile_cpu_core_count_enum_model = BareMetalServerProfileCPUCoreCountEnum.from_dict( + bare_metal_server_profile_cpu_core_count_enum_model_json) assert bare_metal_server_profile_cpu_core_count_enum_model != False # Construct a model instance of BareMetalServerProfileCPUCoreCountEnum by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_enum_model_dict = BareMetalServerProfileCPUCoreCountEnum.from_dict(bare_metal_server_profile_cpu_core_count_enum_model_json).__dict__ - bare_metal_server_profile_cpu_core_count_enum_model2 = BareMetalServerProfileCPUCoreCountEnum(**bare_metal_server_profile_cpu_core_count_enum_model_dict) + bare_metal_server_profile_cpu_core_count_enum_model_dict = BareMetalServerProfileCPUCoreCountEnum.from_dict( + bare_metal_server_profile_cpu_core_count_enum_model_json).__dict__ + bare_metal_server_profile_cpu_core_count_enum_model2 = BareMetalServerProfileCPUCoreCountEnum( + **bare_metal_server_profile_cpu_core_count_enum_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_core_count_enum_model == bare_metal_server_profile_cpu_core_count_enum_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_core_count_enum_model_json2 = bare_metal_server_profile_cpu_core_count_enum_model.to_dict() + bare_metal_server_profile_cpu_core_count_enum_model_json2 = bare_metal_server_profile_cpu_core_count_enum_model.to_dict( + ) assert bare_metal_server_profile_cpu_core_count_enum_model_json2 == bare_metal_server_profile_cpu_core_count_enum_model_json @@ -76757,22 +88924,27 @@ def test_bare_metal_server_profile_cpu_core_count_fixed_serialization(self): # Construct a json representation of a BareMetalServerProfileCPUCoreCountFixed model bare_metal_server_profile_cpu_core_count_fixed_model_json = {} - bare_metal_server_profile_cpu_core_count_fixed_model_json['type'] = 'fixed' + bare_metal_server_profile_cpu_core_count_fixed_model_json[ + 'type'] = 'fixed' bare_metal_server_profile_cpu_core_count_fixed_model_json['value'] = 80 # Construct a model instance of BareMetalServerProfileCPUCoreCountFixed by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_fixed_model = BareMetalServerProfileCPUCoreCountFixed.from_dict(bare_metal_server_profile_cpu_core_count_fixed_model_json) + bare_metal_server_profile_cpu_core_count_fixed_model = BareMetalServerProfileCPUCoreCountFixed.from_dict( + bare_metal_server_profile_cpu_core_count_fixed_model_json) assert bare_metal_server_profile_cpu_core_count_fixed_model != False # Construct a model instance of BareMetalServerProfileCPUCoreCountFixed by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_fixed_model_dict = BareMetalServerProfileCPUCoreCountFixed.from_dict(bare_metal_server_profile_cpu_core_count_fixed_model_json).__dict__ - bare_metal_server_profile_cpu_core_count_fixed_model2 = BareMetalServerProfileCPUCoreCountFixed(**bare_metal_server_profile_cpu_core_count_fixed_model_dict) + bare_metal_server_profile_cpu_core_count_fixed_model_dict = BareMetalServerProfileCPUCoreCountFixed.from_dict( + bare_metal_server_profile_cpu_core_count_fixed_model_json).__dict__ + bare_metal_server_profile_cpu_core_count_fixed_model2 = BareMetalServerProfileCPUCoreCountFixed( + **bare_metal_server_profile_cpu_core_count_fixed_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_core_count_fixed_model == bare_metal_server_profile_cpu_core_count_fixed_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_core_count_fixed_model_json2 = bare_metal_server_profile_cpu_core_count_fixed_model.to_dict() + bare_metal_server_profile_cpu_core_count_fixed_model_json2 = bare_metal_server_profile_cpu_core_count_fixed_model.to_dict( + ) assert bare_metal_server_profile_cpu_core_count_fixed_model_json2 == bare_metal_server_profile_cpu_core_count_fixed_model_json @@ -76788,25 +88960,31 @@ def test_bare_metal_server_profile_cpu_core_count_range_serialization(self): # Construct a json representation of a BareMetalServerProfileCPUCoreCountRange model bare_metal_server_profile_cpu_core_count_range_model_json = {} - bare_metal_server_profile_cpu_core_count_range_model_json['default'] = 80 + bare_metal_server_profile_cpu_core_count_range_model_json[ + 'default'] = 80 bare_metal_server_profile_cpu_core_count_range_model_json['max'] = 80 bare_metal_server_profile_cpu_core_count_range_model_json['min'] = 40 bare_metal_server_profile_cpu_core_count_range_model_json['step'] = 4 - bare_metal_server_profile_cpu_core_count_range_model_json['type'] = 'range' + bare_metal_server_profile_cpu_core_count_range_model_json[ + 'type'] = 'range' # Construct a model instance of BareMetalServerProfileCPUCoreCountRange by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_range_model = BareMetalServerProfileCPUCoreCountRange.from_dict(bare_metal_server_profile_cpu_core_count_range_model_json) + bare_metal_server_profile_cpu_core_count_range_model = BareMetalServerProfileCPUCoreCountRange.from_dict( + bare_metal_server_profile_cpu_core_count_range_model_json) assert bare_metal_server_profile_cpu_core_count_range_model != False # Construct a model instance of BareMetalServerProfileCPUCoreCountRange by calling from_dict on the json representation - bare_metal_server_profile_cpu_core_count_range_model_dict = BareMetalServerProfileCPUCoreCountRange.from_dict(bare_metal_server_profile_cpu_core_count_range_model_json).__dict__ - bare_metal_server_profile_cpu_core_count_range_model2 = BareMetalServerProfileCPUCoreCountRange(**bare_metal_server_profile_cpu_core_count_range_model_dict) + bare_metal_server_profile_cpu_core_count_range_model_dict = BareMetalServerProfileCPUCoreCountRange.from_dict( + bare_metal_server_profile_cpu_core_count_range_model_json).__dict__ + bare_metal_server_profile_cpu_core_count_range_model2 = BareMetalServerProfileCPUCoreCountRange( + **bare_metal_server_profile_cpu_core_count_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_core_count_range_model == bare_metal_server_profile_cpu_core_count_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_core_count_range_model_json2 = bare_metal_server_profile_cpu_core_count_range_model.to_dict() + bare_metal_server_profile_cpu_core_count_range_model_json2 = bare_metal_server_profile_cpu_core_count_range_model.to_dict( + ) assert bare_metal_server_profile_cpu_core_count_range_model_json2 == bare_metal_server_profile_cpu_core_count_range_model_json @@ -76815,28 +88993,35 @@ class TestModel_BareMetalServerProfileCPUSocketCountDependent: Test Class for BareMetalServerProfileCPUSocketCountDependent """ - def test_bare_metal_server_profile_cpu_socket_count_dependent_serialization(self): + def test_bare_metal_server_profile_cpu_socket_count_dependent_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileCPUSocketCountDependent """ # Construct a json representation of a BareMetalServerProfileCPUSocketCountDependent model bare_metal_server_profile_cpu_socket_count_dependent_model_json = {} - bare_metal_server_profile_cpu_socket_count_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_cpu_socket_count_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileCPUSocketCountDependent by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_dependent_model = BareMetalServerProfileCPUSocketCountDependent.from_dict(bare_metal_server_profile_cpu_socket_count_dependent_model_json) + bare_metal_server_profile_cpu_socket_count_dependent_model = BareMetalServerProfileCPUSocketCountDependent.from_dict( + bare_metal_server_profile_cpu_socket_count_dependent_model_json) assert bare_metal_server_profile_cpu_socket_count_dependent_model != False # Construct a model instance of BareMetalServerProfileCPUSocketCountDependent by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_dependent_model_dict = BareMetalServerProfileCPUSocketCountDependent.from_dict(bare_metal_server_profile_cpu_socket_count_dependent_model_json).__dict__ - bare_metal_server_profile_cpu_socket_count_dependent_model2 = BareMetalServerProfileCPUSocketCountDependent(**bare_metal_server_profile_cpu_socket_count_dependent_model_dict) + bare_metal_server_profile_cpu_socket_count_dependent_model_dict = BareMetalServerProfileCPUSocketCountDependent.from_dict( + bare_metal_server_profile_cpu_socket_count_dependent_model_json + ).__dict__ + bare_metal_server_profile_cpu_socket_count_dependent_model2 = BareMetalServerProfileCPUSocketCountDependent( + **bare_metal_server_profile_cpu_socket_count_dependent_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_socket_count_dependent_model == bare_metal_server_profile_cpu_socket_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_socket_count_dependent_model_json2 = bare_metal_server_profile_cpu_socket_count_dependent_model.to_dict() + bare_metal_server_profile_cpu_socket_count_dependent_model_json2 = bare_metal_server_profile_cpu_socket_count_dependent_model.to_dict( + ) assert bare_metal_server_profile_cpu_socket_count_dependent_model_json2 == bare_metal_server_profile_cpu_socket_count_dependent_model_json @@ -76845,30 +89030,39 @@ class TestModel_BareMetalServerProfileCPUSocketCountEnum: Test Class for BareMetalServerProfileCPUSocketCountEnum """ - def test_bare_metal_server_profile_cpu_socket_count_enum_serialization(self): + def test_bare_metal_server_profile_cpu_socket_count_enum_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileCPUSocketCountEnum """ # Construct a json representation of a BareMetalServerProfileCPUSocketCountEnum model bare_metal_server_profile_cpu_socket_count_enum_model_json = {} - bare_metal_server_profile_cpu_socket_count_enum_model_json['default'] = 38 - bare_metal_server_profile_cpu_socket_count_enum_model_json['type'] = 'enum' - bare_metal_server_profile_cpu_socket_count_enum_model_json['values'] = [1, 2, 3, 4] + bare_metal_server_profile_cpu_socket_count_enum_model_json[ + 'default'] = 38 + bare_metal_server_profile_cpu_socket_count_enum_model_json[ + 'type'] = 'enum' + bare_metal_server_profile_cpu_socket_count_enum_model_json['values'] = [ + 1, 2, 3, 4 + ] # Construct a model instance of BareMetalServerProfileCPUSocketCountEnum by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_enum_model = BareMetalServerProfileCPUSocketCountEnum.from_dict(bare_metal_server_profile_cpu_socket_count_enum_model_json) + bare_metal_server_profile_cpu_socket_count_enum_model = BareMetalServerProfileCPUSocketCountEnum.from_dict( + bare_metal_server_profile_cpu_socket_count_enum_model_json) assert bare_metal_server_profile_cpu_socket_count_enum_model != False # Construct a model instance of BareMetalServerProfileCPUSocketCountEnum by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_enum_model_dict = BareMetalServerProfileCPUSocketCountEnum.from_dict(bare_metal_server_profile_cpu_socket_count_enum_model_json).__dict__ - bare_metal_server_profile_cpu_socket_count_enum_model2 = BareMetalServerProfileCPUSocketCountEnum(**bare_metal_server_profile_cpu_socket_count_enum_model_dict) + bare_metal_server_profile_cpu_socket_count_enum_model_dict = BareMetalServerProfileCPUSocketCountEnum.from_dict( + bare_metal_server_profile_cpu_socket_count_enum_model_json).__dict__ + bare_metal_server_profile_cpu_socket_count_enum_model2 = BareMetalServerProfileCPUSocketCountEnum( + **bare_metal_server_profile_cpu_socket_count_enum_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_socket_count_enum_model == bare_metal_server_profile_cpu_socket_count_enum_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_socket_count_enum_model_json2 = bare_metal_server_profile_cpu_socket_count_enum_model.to_dict() + bare_metal_server_profile_cpu_socket_count_enum_model_json2 = bare_metal_server_profile_cpu_socket_count_enum_model.to_dict( + ) assert bare_metal_server_profile_cpu_socket_count_enum_model_json2 == bare_metal_server_profile_cpu_socket_count_enum_model_json @@ -76877,29 +89071,36 @@ class TestModel_BareMetalServerProfileCPUSocketCountFixed: Test Class for BareMetalServerProfileCPUSocketCountFixed """ - def test_bare_metal_server_profile_cpu_socket_count_fixed_serialization(self): + def test_bare_metal_server_profile_cpu_socket_count_fixed_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileCPUSocketCountFixed """ # Construct a json representation of a BareMetalServerProfileCPUSocketCountFixed model bare_metal_server_profile_cpu_socket_count_fixed_model_json = {} - bare_metal_server_profile_cpu_socket_count_fixed_model_json['type'] = 'fixed' + bare_metal_server_profile_cpu_socket_count_fixed_model_json[ + 'type'] = 'fixed' bare_metal_server_profile_cpu_socket_count_fixed_model_json['value'] = 4 # Construct a model instance of BareMetalServerProfileCPUSocketCountFixed by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_fixed_model = BareMetalServerProfileCPUSocketCountFixed.from_dict(bare_metal_server_profile_cpu_socket_count_fixed_model_json) + bare_metal_server_profile_cpu_socket_count_fixed_model = BareMetalServerProfileCPUSocketCountFixed.from_dict( + bare_metal_server_profile_cpu_socket_count_fixed_model_json) assert bare_metal_server_profile_cpu_socket_count_fixed_model != False # Construct a model instance of BareMetalServerProfileCPUSocketCountFixed by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_fixed_model_dict = BareMetalServerProfileCPUSocketCountFixed.from_dict(bare_metal_server_profile_cpu_socket_count_fixed_model_json).__dict__ - bare_metal_server_profile_cpu_socket_count_fixed_model2 = BareMetalServerProfileCPUSocketCountFixed(**bare_metal_server_profile_cpu_socket_count_fixed_model_dict) + bare_metal_server_profile_cpu_socket_count_fixed_model_dict = BareMetalServerProfileCPUSocketCountFixed.from_dict( + bare_metal_server_profile_cpu_socket_count_fixed_model_json + ).__dict__ + bare_metal_server_profile_cpu_socket_count_fixed_model2 = BareMetalServerProfileCPUSocketCountFixed( + **bare_metal_server_profile_cpu_socket_count_fixed_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_socket_count_fixed_model == bare_metal_server_profile_cpu_socket_count_fixed_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_socket_count_fixed_model_json2 = bare_metal_server_profile_cpu_socket_count_fixed_model.to_dict() + bare_metal_server_profile_cpu_socket_count_fixed_model_json2 = bare_metal_server_profile_cpu_socket_count_fixed_model.to_dict( + ) assert bare_metal_server_profile_cpu_socket_count_fixed_model_json2 == bare_metal_server_profile_cpu_socket_count_fixed_model_json @@ -76908,32 +89109,40 @@ class TestModel_BareMetalServerProfileCPUSocketCountRange: Test Class for BareMetalServerProfileCPUSocketCountRange """ - def test_bare_metal_server_profile_cpu_socket_count_range_serialization(self): + def test_bare_metal_server_profile_cpu_socket_count_range_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileCPUSocketCountRange """ # Construct a json representation of a BareMetalServerProfileCPUSocketCountRange model bare_metal_server_profile_cpu_socket_count_range_model_json = {} - bare_metal_server_profile_cpu_socket_count_range_model_json['default'] = 4 + bare_metal_server_profile_cpu_socket_count_range_model_json[ + 'default'] = 4 bare_metal_server_profile_cpu_socket_count_range_model_json['max'] = 8 bare_metal_server_profile_cpu_socket_count_range_model_json['min'] = 1 bare_metal_server_profile_cpu_socket_count_range_model_json['step'] = 1 - bare_metal_server_profile_cpu_socket_count_range_model_json['type'] = 'range' + bare_metal_server_profile_cpu_socket_count_range_model_json[ + 'type'] = 'range' # Construct a model instance of BareMetalServerProfileCPUSocketCountRange by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_range_model = BareMetalServerProfileCPUSocketCountRange.from_dict(bare_metal_server_profile_cpu_socket_count_range_model_json) + bare_metal_server_profile_cpu_socket_count_range_model = BareMetalServerProfileCPUSocketCountRange.from_dict( + bare_metal_server_profile_cpu_socket_count_range_model_json) assert bare_metal_server_profile_cpu_socket_count_range_model != False # Construct a model instance of BareMetalServerProfileCPUSocketCountRange by calling from_dict on the json representation - bare_metal_server_profile_cpu_socket_count_range_model_dict = BareMetalServerProfileCPUSocketCountRange.from_dict(bare_metal_server_profile_cpu_socket_count_range_model_json).__dict__ - bare_metal_server_profile_cpu_socket_count_range_model2 = BareMetalServerProfileCPUSocketCountRange(**bare_metal_server_profile_cpu_socket_count_range_model_dict) + bare_metal_server_profile_cpu_socket_count_range_model_dict = BareMetalServerProfileCPUSocketCountRange.from_dict( + bare_metal_server_profile_cpu_socket_count_range_model_json + ).__dict__ + bare_metal_server_profile_cpu_socket_count_range_model2 = BareMetalServerProfileCPUSocketCountRange( + **bare_metal_server_profile_cpu_socket_count_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_cpu_socket_count_range_model == bare_metal_server_profile_cpu_socket_count_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_cpu_socket_count_range_model_json2 = bare_metal_server_profile_cpu_socket_count_range_model.to_dict() + bare_metal_server_profile_cpu_socket_count_range_model_json2 = bare_metal_server_profile_cpu_socket_count_range_model.to_dict( + ) assert bare_metal_server_profile_cpu_socket_count_range_model_json2 == bare_metal_server_profile_cpu_socket_count_range_model_json @@ -76942,28 +89151,35 @@ class TestModel_BareMetalServerProfileDiskQuantityDependent: Test Class for BareMetalServerProfileDiskQuantityDependent """ - def test_bare_metal_server_profile_disk_quantity_dependent_serialization(self): + def test_bare_metal_server_profile_disk_quantity_dependent_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileDiskQuantityDependent """ # Construct a json representation of a BareMetalServerProfileDiskQuantityDependent model bare_metal_server_profile_disk_quantity_dependent_model_json = {} - bare_metal_server_profile_disk_quantity_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_disk_quantity_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileDiskQuantityDependent by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_dependent_model = BareMetalServerProfileDiskQuantityDependent.from_dict(bare_metal_server_profile_disk_quantity_dependent_model_json) + bare_metal_server_profile_disk_quantity_dependent_model = BareMetalServerProfileDiskQuantityDependent.from_dict( + bare_metal_server_profile_disk_quantity_dependent_model_json) assert bare_metal_server_profile_disk_quantity_dependent_model != False # Construct a model instance of BareMetalServerProfileDiskQuantityDependent by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_dependent_model_dict = BareMetalServerProfileDiskQuantityDependent.from_dict(bare_metal_server_profile_disk_quantity_dependent_model_json).__dict__ - bare_metal_server_profile_disk_quantity_dependent_model2 = BareMetalServerProfileDiskQuantityDependent(**bare_metal_server_profile_disk_quantity_dependent_model_dict) + bare_metal_server_profile_disk_quantity_dependent_model_dict = BareMetalServerProfileDiskQuantityDependent.from_dict( + bare_metal_server_profile_disk_quantity_dependent_model_json + ).__dict__ + bare_metal_server_profile_disk_quantity_dependent_model2 = BareMetalServerProfileDiskQuantityDependent( + **bare_metal_server_profile_disk_quantity_dependent_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_quantity_dependent_model == bare_metal_server_profile_disk_quantity_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_quantity_dependent_model_json2 = bare_metal_server_profile_disk_quantity_dependent_model.to_dict() + bare_metal_server_profile_disk_quantity_dependent_model_json2 = bare_metal_server_profile_disk_quantity_dependent_model.to_dict( + ) assert bare_metal_server_profile_disk_quantity_dependent_model_json2 == bare_metal_server_profile_disk_quantity_dependent_model_json @@ -76981,21 +89197,27 @@ def test_bare_metal_server_profile_disk_quantity_enum_serialization(self): bare_metal_server_profile_disk_quantity_enum_model_json = {} bare_metal_server_profile_disk_quantity_enum_model_json['default'] = 38 bare_metal_server_profile_disk_quantity_enum_model_json['type'] = 'enum' - bare_metal_server_profile_disk_quantity_enum_model_json['values'] = [1, 2, 4, 8] + bare_metal_server_profile_disk_quantity_enum_model_json['values'] = [ + 1, 2, 4, 8 + ] # Construct a model instance of BareMetalServerProfileDiskQuantityEnum by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_enum_model = BareMetalServerProfileDiskQuantityEnum.from_dict(bare_metal_server_profile_disk_quantity_enum_model_json) + bare_metal_server_profile_disk_quantity_enum_model = BareMetalServerProfileDiskQuantityEnum.from_dict( + bare_metal_server_profile_disk_quantity_enum_model_json) assert bare_metal_server_profile_disk_quantity_enum_model != False # Construct a model instance of BareMetalServerProfileDiskQuantityEnum by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_enum_model_dict = BareMetalServerProfileDiskQuantityEnum.from_dict(bare_metal_server_profile_disk_quantity_enum_model_json).__dict__ - bare_metal_server_profile_disk_quantity_enum_model2 = BareMetalServerProfileDiskQuantityEnum(**bare_metal_server_profile_disk_quantity_enum_model_dict) + bare_metal_server_profile_disk_quantity_enum_model_dict = BareMetalServerProfileDiskQuantityEnum.from_dict( + bare_metal_server_profile_disk_quantity_enum_model_json).__dict__ + bare_metal_server_profile_disk_quantity_enum_model2 = BareMetalServerProfileDiskQuantityEnum( + **bare_metal_server_profile_disk_quantity_enum_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_quantity_enum_model == bare_metal_server_profile_disk_quantity_enum_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_quantity_enum_model_json2 = bare_metal_server_profile_disk_quantity_enum_model.to_dict() + bare_metal_server_profile_disk_quantity_enum_model_json2 = bare_metal_server_profile_disk_quantity_enum_model.to_dict( + ) assert bare_metal_server_profile_disk_quantity_enum_model_json2 == bare_metal_server_profile_disk_quantity_enum_model_json @@ -77011,22 +89233,27 @@ def test_bare_metal_server_profile_disk_quantity_fixed_serialization(self): # Construct a json representation of a BareMetalServerProfileDiskQuantityFixed model bare_metal_server_profile_disk_quantity_fixed_model_json = {} - bare_metal_server_profile_disk_quantity_fixed_model_json['type'] = 'fixed' + bare_metal_server_profile_disk_quantity_fixed_model_json[ + 'type'] = 'fixed' bare_metal_server_profile_disk_quantity_fixed_model_json['value'] = 4 # Construct a model instance of BareMetalServerProfileDiskQuantityFixed by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_fixed_model = BareMetalServerProfileDiskQuantityFixed.from_dict(bare_metal_server_profile_disk_quantity_fixed_model_json) + bare_metal_server_profile_disk_quantity_fixed_model = BareMetalServerProfileDiskQuantityFixed.from_dict( + bare_metal_server_profile_disk_quantity_fixed_model_json) assert bare_metal_server_profile_disk_quantity_fixed_model != False # Construct a model instance of BareMetalServerProfileDiskQuantityFixed by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_fixed_model_dict = BareMetalServerProfileDiskQuantityFixed.from_dict(bare_metal_server_profile_disk_quantity_fixed_model_json).__dict__ - bare_metal_server_profile_disk_quantity_fixed_model2 = BareMetalServerProfileDiskQuantityFixed(**bare_metal_server_profile_disk_quantity_fixed_model_dict) + bare_metal_server_profile_disk_quantity_fixed_model_dict = BareMetalServerProfileDiskQuantityFixed.from_dict( + bare_metal_server_profile_disk_quantity_fixed_model_json).__dict__ + bare_metal_server_profile_disk_quantity_fixed_model2 = BareMetalServerProfileDiskQuantityFixed( + **bare_metal_server_profile_disk_quantity_fixed_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_quantity_fixed_model == bare_metal_server_profile_disk_quantity_fixed_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_quantity_fixed_model_json2 = bare_metal_server_profile_disk_quantity_fixed_model.to_dict() + bare_metal_server_profile_disk_quantity_fixed_model_json2 = bare_metal_server_profile_disk_quantity_fixed_model.to_dict( + ) assert bare_metal_server_profile_disk_quantity_fixed_model_json2 == bare_metal_server_profile_disk_quantity_fixed_model_json @@ -77046,21 +89273,26 @@ def test_bare_metal_server_profile_disk_quantity_range_serialization(self): bare_metal_server_profile_disk_quantity_range_model_json['max'] = 4 bare_metal_server_profile_disk_quantity_range_model_json['min'] = 1 bare_metal_server_profile_disk_quantity_range_model_json['step'] = 1 - bare_metal_server_profile_disk_quantity_range_model_json['type'] = 'range' + bare_metal_server_profile_disk_quantity_range_model_json[ + 'type'] = 'range' # Construct a model instance of BareMetalServerProfileDiskQuantityRange by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_range_model = BareMetalServerProfileDiskQuantityRange.from_dict(bare_metal_server_profile_disk_quantity_range_model_json) + bare_metal_server_profile_disk_quantity_range_model = BareMetalServerProfileDiskQuantityRange.from_dict( + bare_metal_server_profile_disk_quantity_range_model_json) assert bare_metal_server_profile_disk_quantity_range_model != False # Construct a model instance of BareMetalServerProfileDiskQuantityRange by calling from_dict on the json representation - bare_metal_server_profile_disk_quantity_range_model_dict = BareMetalServerProfileDiskQuantityRange.from_dict(bare_metal_server_profile_disk_quantity_range_model_json).__dict__ - bare_metal_server_profile_disk_quantity_range_model2 = BareMetalServerProfileDiskQuantityRange(**bare_metal_server_profile_disk_quantity_range_model_dict) + bare_metal_server_profile_disk_quantity_range_model_dict = BareMetalServerProfileDiskQuantityRange.from_dict( + bare_metal_server_profile_disk_quantity_range_model_json).__dict__ + bare_metal_server_profile_disk_quantity_range_model2 = BareMetalServerProfileDiskQuantityRange( + **bare_metal_server_profile_disk_quantity_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_quantity_range_model == bare_metal_server_profile_disk_quantity_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_quantity_range_model_json2 = bare_metal_server_profile_disk_quantity_range_model.to_dict() + bare_metal_server_profile_disk_quantity_range_model_json2 = bare_metal_server_profile_disk_quantity_range_model.to_dict( + ) assert bare_metal_server_profile_disk_quantity_range_model_json2 == bare_metal_server_profile_disk_quantity_range_model_json @@ -77076,21 +89308,26 @@ def test_bare_metal_server_profile_disk_size_dependent_serialization(self): # Construct a json representation of a BareMetalServerProfileDiskSizeDependent model bare_metal_server_profile_disk_size_dependent_model_json = {} - bare_metal_server_profile_disk_size_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_disk_size_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileDiskSizeDependent by calling from_dict on the json representation - bare_metal_server_profile_disk_size_dependent_model = BareMetalServerProfileDiskSizeDependent.from_dict(bare_metal_server_profile_disk_size_dependent_model_json) + bare_metal_server_profile_disk_size_dependent_model = BareMetalServerProfileDiskSizeDependent.from_dict( + bare_metal_server_profile_disk_size_dependent_model_json) assert bare_metal_server_profile_disk_size_dependent_model != False # Construct a model instance of BareMetalServerProfileDiskSizeDependent by calling from_dict on the json representation - bare_metal_server_profile_disk_size_dependent_model_dict = BareMetalServerProfileDiskSizeDependent.from_dict(bare_metal_server_profile_disk_size_dependent_model_json).__dict__ - bare_metal_server_profile_disk_size_dependent_model2 = BareMetalServerProfileDiskSizeDependent(**bare_metal_server_profile_disk_size_dependent_model_dict) + bare_metal_server_profile_disk_size_dependent_model_dict = BareMetalServerProfileDiskSizeDependent.from_dict( + bare_metal_server_profile_disk_size_dependent_model_json).__dict__ + bare_metal_server_profile_disk_size_dependent_model2 = BareMetalServerProfileDiskSizeDependent( + **bare_metal_server_profile_disk_size_dependent_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_size_dependent_model == bare_metal_server_profile_disk_size_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_size_dependent_model_json2 = bare_metal_server_profile_disk_size_dependent_model.to_dict() + bare_metal_server_profile_disk_size_dependent_model_json2 = bare_metal_server_profile_disk_size_dependent_model.to_dict( + ) assert bare_metal_server_profile_disk_size_dependent_model_json2 == bare_metal_server_profile_disk_size_dependent_model_json @@ -77108,21 +89345,27 @@ def test_bare_metal_server_profile_disk_size_enum_serialization(self): bare_metal_server_profile_disk_size_enum_model_json = {} bare_metal_server_profile_disk_size_enum_model_json['default'] = 38 bare_metal_server_profile_disk_size_enum_model_json['type'] = 'enum' - bare_metal_server_profile_disk_size_enum_model_json['values'] = [1, 2, 4, 8] + bare_metal_server_profile_disk_size_enum_model_json['values'] = [ + 1, 2, 4, 8 + ] # Construct a model instance of BareMetalServerProfileDiskSizeEnum by calling from_dict on the json representation - bare_metal_server_profile_disk_size_enum_model = BareMetalServerProfileDiskSizeEnum.from_dict(bare_metal_server_profile_disk_size_enum_model_json) + bare_metal_server_profile_disk_size_enum_model = BareMetalServerProfileDiskSizeEnum.from_dict( + bare_metal_server_profile_disk_size_enum_model_json) assert bare_metal_server_profile_disk_size_enum_model != False # Construct a model instance of BareMetalServerProfileDiskSizeEnum by calling from_dict on the json representation - bare_metal_server_profile_disk_size_enum_model_dict = BareMetalServerProfileDiskSizeEnum.from_dict(bare_metal_server_profile_disk_size_enum_model_json).__dict__ - bare_metal_server_profile_disk_size_enum_model2 = BareMetalServerProfileDiskSizeEnum(**bare_metal_server_profile_disk_size_enum_model_dict) + bare_metal_server_profile_disk_size_enum_model_dict = BareMetalServerProfileDiskSizeEnum.from_dict( + bare_metal_server_profile_disk_size_enum_model_json).__dict__ + bare_metal_server_profile_disk_size_enum_model2 = BareMetalServerProfileDiskSizeEnum( + **bare_metal_server_profile_disk_size_enum_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_size_enum_model == bare_metal_server_profile_disk_size_enum_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_size_enum_model_json2 = bare_metal_server_profile_disk_size_enum_model.to_dict() + bare_metal_server_profile_disk_size_enum_model_json2 = bare_metal_server_profile_disk_size_enum_model.to_dict( + ) assert bare_metal_server_profile_disk_size_enum_model_json2 == bare_metal_server_profile_disk_size_enum_model_json @@ -77142,18 +89385,22 @@ def test_bare_metal_server_profile_disk_size_fixed_serialization(self): bare_metal_server_profile_disk_size_fixed_model_json['value'] = 100 # Construct a model instance of BareMetalServerProfileDiskSizeFixed by calling from_dict on the json representation - bare_metal_server_profile_disk_size_fixed_model = BareMetalServerProfileDiskSizeFixed.from_dict(bare_metal_server_profile_disk_size_fixed_model_json) + bare_metal_server_profile_disk_size_fixed_model = BareMetalServerProfileDiskSizeFixed.from_dict( + bare_metal_server_profile_disk_size_fixed_model_json) assert bare_metal_server_profile_disk_size_fixed_model != False # Construct a model instance of BareMetalServerProfileDiskSizeFixed by calling from_dict on the json representation - bare_metal_server_profile_disk_size_fixed_model_dict = BareMetalServerProfileDiskSizeFixed.from_dict(bare_metal_server_profile_disk_size_fixed_model_json).__dict__ - bare_metal_server_profile_disk_size_fixed_model2 = BareMetalServerProfileDiskSizeFixed(**bare_metal_server_profile_disk_size_fixed_model_dict) + bare_metal_server_profile_disk_size_fixed_model_dict = BareMetalServerProfileDiskSizeFixed.from_dict( + bare_metal_server_profile_disk_size_fixed_model_json).__dict__ + bare_metal_server_profile_disk_size_fixed_model2 = BareMetalServerProfileDiskSizeFixed( + **bare_metal_server_profile_disk_size_fixed_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_size_fixed_model == bare_metal_server_profile_disk_size_fixed_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_size_fixed_model_json2 = bare_metal_server_profile_disk_size_fixed_model.to_dict() + bare_metal_server_profile_disk_size_fixed_model_json2 = bare_metal_server_profile_disk_size_fixed_model.to_dict( + ) assert bare_metal_server_profile_disk_size_fixed_model_json2 == bare_metal_server_profile_disk_size_fixed_model_json @@ -77176,18 +89423,22 @@ def test_bare_metal_server_profile_disk_size_range_serialization(self): bare_metal_server_profile_disk_size_range_model_json['type'] = 'range' # Construct a model instance of BareMetalServerProfileDiskSizeRange by calling from_dict on the json representation - bare_metal_server_profile_disk_size_range_model = BareMetalServerProfileDiskSizeRange.from_dict(bare_metal_server_profile_disk_size_range_model_json) + bare_metal_server_profile_disk_size_range_model = BareMetalServerProfileDiskSizeRange.from_dict( + bare_metal_server_profile_disk_size_range_model_json) assert bare_metal_server_profile_disk_size_range_model != False # Construct a model instance of BareMetalServerProfileDiskSizeRange by calling from_dict on the json representation - bare_metal_server_profile_disk_size_range_model_dict = BareMetalServerProfileDiskSizeRange.from_dict(bare_metal_server_profile_disk_size_range_model_json).__dict__ - bare_metal_server_profile_disk_size_range_model2 = BareMetalServerProfileDiskSizeRange(**bare_metal_server_profile_disk_size_range_model_dict) + bare_metal_server_profile_disk_size_range_model_dict = BareMetalServerProfileDiskSizeRange.from_dict( + bare_metal_server_profile_disk_size_range_model_json).__dict__ + bare_metal_server_profile_disk_size_range_model2 = BareMetalServerProfileDiskSizeRange( + **bare_metal_server_profile_disk_size_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_disk_size_range_model == bare_metal_server_profile_disk_size_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_disk_size_range_model_json2 = bare_metal_server_profile_disk_size_range_model.to_dict() + bare_metal_server_profile_disk_size_range_model_json2 = bare_metal_server_profile_disk_size_range_model.to_dict( + ) assert bare_metal_server_profile_disk_size_range_model_json2 == bare_metal_server_profile_disk_size_range_model_json @@ -77203,21 +89454,26 @@ def test_bare_metal_server_profile_identity_by_href_serialization(self): # Construct a json representation of a BareMetalServerProfileIdentityByHref model bare_metal_server_profile_identity_by_href_model_json = {} - bare_metal_server_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' + bare_metal_server_profile_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' # Construct a model instance of BareMetalServerProfileIdentityByHref by calling from_dict on the json representation - bare_metal_server_profile_identity_by_href_model = BareMetalServerProfileIdentityByHref.from_dict(bare_metal_server_profile_identity_by_href_model_json) + bare_metal_server_profile_identity_by_href_model = BareMetalServerProfileIdentityByHref.from_dict( + bare_metal_server_profile_identity_by_href_model_json) assert bare_metal_server_profile_identity_by_href_model != False # Construct a model instance of BareMetalServerProfileIdentityByHref by calling from_dict on the json representation - bare_metal_server_profile_identity_by_href_model_dict = BareMetalServerProfileIdentityByHref.from_dict(bare_metal_server_profile_identity_by_href_model_json).__dict__ - bare_metal_server_profile_identity_by_href_model2 = BareMetalServerProfileIdentityByHref(**bare_metal_server_profile_identity_by_href_model_dict) + bare_metal_server_profile_identity_by_href_model_dict = BareMetalServerProfileIdentityByHref.from_dict( + bare_metal_server_profile_identity_by_href_model_json).__dict__ + bare_metal_server_profile_identity_by_href_model2 = BareMetalServerProfileIdentityByHref( + **bare_metal_server_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_identity_by_href_model == bare_metal_server_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_identity_by_href_model_json2 = bare_metal_server_profile_identity_by_href_model.to_dict() + bare_metal_server_profile_identity_by_href_model_json2 = bare_metal_server_profile_identity_by_href_model.to_dict( + ) assert bare_metal_server_profile_identity_by_href_model_json2 == bare_metal_server_profile_identity_by_href_model_json @@ -77233,21 +89489,26 @@ def test_bare_metal_server_profile_identity_by_name_serialization(self): # Construct a json representation of a BareMetalServerProfileIdentityByName model bare_metal_server_profile_identity_by_name_model_json = {} - bare_metal_server_profile_identity_by_name_model_json['name'] = 'bx2-metal-192x768' + bare_metal_server_profile_identity_by_name_model_json[ + 'name'] = 'bx2-metal-192x768' # Construct a model instance of BareMetalServerProfileIdentityByName by calling from_dict on the json representation - bare_metal_server_profile_identity_by_name_model = BareMetalServerProfileIdentityByName.from_dict(bare_metal_server_profile_identity_by_name_model_json) + bare_metal_server_profile_identity_by_name_model = BareMetalServerProfileIdentityByName.from_dict( + bare_metal_server_profile_identity_by_name_model_json) assert bare_metal_server_profile_identity_by_name_model != False # Construct a model instance of BareMetalServerProfileIdentityByName by calling from_dict on the json representation - bare_metal_server_profile_identity_by_name_model_dict = BareMetalServerProfileIdentityByName.from_dict(bare_metal_server_profile_identity_by_name_model_json).__dict__ - bare_metal_server_profile_identity_by_name_model2 = BareMetalServerProfileIdentityByName(**bare_metal_server_profile_identity_by_name_model_dict) + bare_metal_server_profile_identity_by_name_model_dict = BareMetalServerProfileIdentityByName.from_dict( + bare_metal_server_profile_identity_by_name_model_json).__dict__ + bare_metal_server_profile_identity_by_name_model2 = BareMetalServerProfileIdentityByName( + **bare_metal_server_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_identity_by_name_model == bare_metal_server_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_identity_by_name_model_json2 = bare_metal_server_profile_identity_by_name_model.to_dict() + bare_metal_server_profile_identity_by_name_model_json2 = bare_metal_server_profile_identity_by_name_model.to_dict( + ) assert bare_metal_server_profile_identity_by_name_model_json2 == bare_metal_server_profile_identity_by_name_model_json @@ -77263,21 +89524,26 @@ def test_bare_metal_server_profile_memory_dependent_serialization(self): # Construct a json representation of a BareMetalServerProfileMemoryDependent model bare_metal_server_profile_memory_dependent_model_json = {} - bare_metal_server_profile_memory_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_memory_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileMemoryDependent by calling from_dict on the json representation - bare_metal_server_profile_memory_dependent_model = BareMetalServerProfileMemoryDependent.from_dict(bare_metal_server_profile_memory_dependent_model_json) + bare_metal_server_profile_memory_dependent_model = BareMetalServerProfileMemoryDependent.from_dict( + bare_metal_server_profile_memory_dependent_model_json) assert bare_metal_server_profile_memory_dependent_model != False # Construct a model instance of BareMetalServerProfileMemoryDependent by calling from_dict on the json representation - bare_metal_server_profile_memory_dependent_model_dict = BareMetalServerProfileMemoryDependent.from_dict(bare_metal_server_profile_memory_dependent_model_json).__dict__ - bare_metal_server_profile_memory_dependent_model2 = BareMetalServerProfileMemoryDependent(**bare_metal_server_profile_memory_dependent_model_dict) + bare_metal_server_profile_memory_dependent_model_dict = BareMetalServerProfileMemoryDependent.from_dict( + bare_metal_server_profile_memory_dependent_model_json).__dict__ + bare_metal_server_profile_memory_dependent_model2 = BareMetalServerProfileMemoryDependent( + **bare_metal_server_profile_memory_dependent_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_memory_dependent_model == bare_metal_server_profile_memory_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_memory_dependent_model_json2 = bare_metal_server_profile_memory_dependent_model.to_dict() + bare_metal_server_profile_memory_dependent_model_json2 = bare_metal_server_profile_memory_dependent_model.to_dict( + ) assert bare_metal_server_profile_memory_dependent_model_json2 == bare_metal_server_profile_memory_dependent_model_json @@ -77298,18 +89564,22 @@ def test_bare_metal_server_profile_memory_enum_serialization(self): bare_metal_server_profile_memory_enum_model_json['values'] = [8, 16, 32] # Construct a model instance of BareMetalServerProfileMemoryEnum by calling from_dict on the json representation - bare_metal_server_profile_memory_enum_model = BareMetalServerProfileMemoryEnum.from_dict(bare_metal_server_profile_memory_enum_model_json) + bare_metal_server_profile_memory_enum_model = BareMetalServerProfileMemoryEnum.from_dict( + bare_metal_server_profile_memory_enum_model_json) assert bare_metal_server_profile_memory_enum_model != False # Construct a model instance of BareMetalServerProfileMemoryEnum by calling from_dict on the json representation - bare_metal_server_profile_memory_enum_model_dict = BareMetalServerProfileMemoryEnum.from_dict(bare_metal_server_profile_memory_enum_model_json).__dict__ - bare_metal_server_profile_memory_enum_model2 = BareMetalServerProfileMemoryEnum(**bare_metal_server_profile_memory_enum_model_dict) + bare_metal_server_profile_memory_enum_model_dict = BareMetalServerProfileMemoryEnum.from_dict( + bare_metal_server_profile_memory_enum_model_json).__dict__ + bare_metal_server_profile_memory_enum_model2 = BareMetalServerProfileMemoryEnum( + **bare_metal_server_profile_memory_enum_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_memory_enum_model == bare_metal_server_profile_memory_enum_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_memory_enum_model_json2 = bare_metal_server_profile_memory_enum_model.to_dict() + bare_metal_server_profile_memory_enum_model_json2 = bare_metal_server_profile_memory_enum_model.to_dict( + ) assert bare_metal_server_profile_memory_enum_model_json2 == bare_metal_server_profile_memory_enum_model_json @@ -77329,18 +89599,22 @@ def test_bare_metal_server_profile_memory_fixed_serialization(self): bare_metal_server_profile_memory_fixed_model_json['value'] = 16 # Construct a model instance of BareMetalServerProfileMemoryFixed by calling from_dict on the json representation - bare_metal_server_profile_memory_fixed_model = BareMetalServerProfileMemoryFixed.from_dict(bare_metal_server_profile_memory_fixed_model_json) + bare_metal_server_profile_memory_fixed_model = BareMetalServerProfileMemoryFixed.from_dict( + bare_metal_server_profile_memory_fixed_model_json) assert bare_metal_server_profile_memory_fixed_model != False # Construct a model instance of BareMetalServerProfileMemoryFixed by calling from_dict on the json representation - bare_metal_server_profile_memory_fixed_model_dict = BareMetalServerProfileMemoryFixed.from_dict(bare_metal_server_profile_memory_fixed_model_json).__dict__ - bare_metal_server_profile_memory_fixed_model2 = BareMetalServerProfileMemoryFixed(**bare_metal_server_profile_memory_fixed_model_dict) + bare_metal_server_profile_memory_fixed_model_dict = BareMetalServerProfileMemoryFixed.from_dict( + bare_metal_server_profile_memory_fixed_model_json).__dict__ + bare_metal_server_profile_memory_fixed_model2 = BareMetalServerProfileMemoryFixed( + **bare_metal_server_profile_memory_fixed_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_memory_fixed_model == bare_metal_server_profile_memory_fixed_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_memory_fixed_model_json2 = bare_metal_server_profile_memory_fixed_model.to_dict() + bare_metal_server_profile_memory_fixed_model_json2 = bare_metal_server_profile_memory_fixed_model.to_dict( + ) assert bare_metal_server_profile_memory_fixed_model_json2 == bare_metal_server_profile_memory_fixed_model_json @@ -77363,18 +89637,22 @@ def test_bare_metal_server_profile_memory_range_serialization(self): bare_metal_server_profile_memory_range_model_json['type'] = 'range' # Construct a model instance of BareMetalServerProfileMemoryRange by calling from_dict on the json representation - bare_metal_server_profile_memory_range_model = BareMetalServerProfileMemoryRange.from_dict(bare_metal_server_profile_memory_range_model_json) + bare_metal_server_profile_memory_range_model = BareMetalServerProfileMemoryRange.from_dict( + bare_metal_server_profile_memory_range_model_json) assert bare_metal_server_profile_memory_range_model != False # Construct a model instance of BareMetalServerProfileMemoryRange by calling from_dict on the json representation - bare_metal_server_profile_memory_range_model_dict = BareMetalServerProfileMemoryRange.from_dict(bare_metal_server_profile_memory_range_model_json).__dict__ - bare_metal_server_profile_memory_range_model2 = BareMetalServerProfileMemoryRange(**bare_metal_server_profile_memory_range_model_dict) + bare_metal_server_profile_memory_range_model_dict = BareMetalServerProfileMemoryRange.from_dict( + bare_metal_server_profile_memory_range_model_json).__dict__ + bare_metal_server_profile_memory_range_model2 = BareMetalServerProfileMemoryRange( + **bare_metal_server_profile_memory_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_memory_range_model == bare_metal_server_profile_memory_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_memory_range_model_json2 = bare_metal_server_profile_memory_range_model.to_dict() + bare_metal_server_profile_memory_range_model_json2 = bare_metal_server_profile_memory_range_model.to_dict( + ) assert bare_metal_server_profile_memory_range_model_json2 == bare_metal_server_profile_memory_range_model_json @@ -77383,28 +89661,38 @@ class TestModel_BareMetalServerProfileNetworkAttachmentCountDependent: Test Class for BareMetalServerProfileNetworkAttachmentCountDependent """ - def test_bare_metal_server_profile_network_attachment_count_dependent_serialization(self): + def test_bare_metal_server_profile_network_attachment_count_dependent_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileNetworkAttachmentCountDependent """ # Construct a json representation of a BareMetalServerProfileNetworkAttachmentCountDependent model bare_metal_server_profile_network_attachment_count_dependent_model_json = {} - bare_metal_server_profile_network_attachment_count_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_network_attachment_count_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileNetworkAttachmentCountDependent by calling from_dict on the json representation - bare_metal_server_profile_network_attachment_count_dependent_model = BareMetalServerProfileNetworkAttachmentCountDependent.from_dict(bare_metal_server_profile_network_attachment_count_dependent_model_json) + bare_metal_server_profile_network_attachment_count_dependent_model = BareMetalServerProfileNetworkAttachmentCountDependent.from_dict( + bare_metal_server_profile_network_attachment_count_dependent_model_json + ) assert bare_metal_server_profile_network_attachment_count_dependent_model != False # Construct a model instance of BareMetalServerProfileNetworkAttachmentCountDependent by calling from_dict on the json representation - bare_metal_server_profile_network_attachment_count_dependent_model_dict = BareMetalServerProfileNetworkAttachmentCountDependent.from_dict(bare_metal_server_profile_network_attachment_count_dependent_model_json).__dict__ - bare_metal_server_profile_network_attachment_count_dependent_model2 = BareMetalServerProfileNetworkAttachmentCountDependent(**bare_metal_server_profile_network_attachment_count_dependent_model_dict) + bare_metal_server_profile_network_attachment_count_dependent_model_dict = BareMetalServerProfileNetworkAttachmentCountDependent.from_dict( + bare_metal_server_profile_network_attachment_count_dependent_model_json + ).__dict__ + bare_metal_server_profile_network_attachment_count_dependent_model2 = BareMetalServerProfileNetworkAttachmentCountDependent( + ** + bare_metal_server_profile_network_attachment_count_dependent_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_profile_network_attachment_count_dependent_model == bare_metal_server_profile_network_attachment_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_network_attachment_count_dependent_model_json2 = bare_metal_server_profile_network_attachment_count_dependent_model.to_dict() + bare_metal_server_profile_network_attachment_count_dependent_model_json2 = bare_metal_server_profile_network_attachment_count_dependent_model.to_dict( + ) assert bare_metal_server_profile_network_attachment_count_dependent_model_json2 == bare_metal_server_profile_network_attachment_count_dependent_model_json @@ -77413,30 +89701,40 @@ class TestModel_BareMetalServerProfileNetworkAttachmentCountRange: Test Class for BareMetalServerProfileNetworkAttachmentCountRange """ - def test_bare_metal_server_profile_network_attachment_count_range_serialization(self): + def test_bare_metal_server_profile_network_attachment_count_range_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileNetworkAttachmentCountRange """ # Construct a json representation of a BareMetalServerProfileNetworkAttachmentCountRange model bare_metal_server_profile_network_attachment_count_range_model_json = {} - bare_metal_server_profile_network_attachment_count_range_model_json['max'] = 128 - bare_metal_server_profile_network_attachment_count_range_model_json['min'] = 1 - bare_metal_server_profile_network_attachment_count_range_model_json['type'] = 'range' + bare_metal_server_profile_network_attachment_count_range_model_json[ + 'max'] = 128 + bare_metal_server_profile_network_attachment_count_range_model_json[ + 'min'] = 1 + bare_metal_server_profile_network_attachment_count_range_model_json[ + 'type'] = 'range' # Construct a model instance of BareMetalServerProfileNetworkAttachmentCountRange by calling from_dict on the json representation - bare_metal_server_profile_network_attachment_count_range_model = BareMetalServerProfileNetworkAttachmentCountRange.from_dict(bare_metal_server_profile_network_attachment_count_range_model_json) + bare_metal_server_profile_network_attachment_count_range_model = BareMetalServerProfileNetworkAttachmentCountRange.from_dict( + bare_metal_server_profile_network_attachment_count_range_model_json) assert bare_metal_server_profile_network_attachment_count_range_model != False # Construct a model instance of BareMetalServerProfileNetworkAttachmentCountRange by calling from_dict on the json representation - bare_metal_server_profile_network_attachment_count_range_model_dict = BareMetalServerProfileNetworkAttachmentCountRange.from_dict(bare_metal_server_profile_network_attachment_count_range_model_json).__dict__ - bare_metal_server_profile_network_attachment_count_range_model2 = BareMetalServerProfileNetworkAttachmentCountRange(**bare_metal_server_profile_network_attachment_count_range_model_dict) + bare_metal_server_profile_network_attachment_count_range_model_dict = BareMetalServerProfileNetworkAttachmentCountRange.from_dict( + bare_metal_server_profile_network_attachment_count_range_model_json + ).__dict__ + bare_metal_server_profile_network_attachment_count_range_model2 = BareMetalServerProfileNetworkAttachmentCountRange( + ** + bare_metal_server_profile_network_attachment_count_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_network_attachment_count_range_model == bare_metal_server_profile_network_attachment_count_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_network_attachment_count_range_model_json2 = bare_metal_server_profile_network_attachment_count_range_model.to_dict() + bare_metal_server_profile_network_attachment_count_range_model_json2 = bare_metal_server_profile_network_attachment_count_range_model.to_dict( + ) assert bare_metal_server_profile_network_attachment_count_range_model_json2 == bare_metal_server_profile_network_attachment_count_range_model_json @@ -77445,28 +89743,38 @@ class TestModel_BareMetalServerProfileNetworkInterfaceCountDependent: Test Class for BareMetalServerProfileNetworkInterfaceCountDependent """ - def test_bare_metal_server_profile_network_interface_count_dependent_serialization(self): + def test_bare_metal_server_profile_network_interface_count_dependent_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileNetworkInterfaceCountDependent """ # Construct a json representation of a BareMetalServerProfileNetworkInterfaceCountDependent model bare_metal_server_profile_network_interface_count_dependent_model_json = {} - bare_metal_server_profile_network_interface_count_dependent_model_json['type'] = 'dependent' + bare_metal_server_profile_network_interface_count_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of BareMetalServerProfileNetworkInterfaceCountDependent by calling from_dict on the json representation - bare_metal_server_profile_network_interface_count_dependent_model = BareMetalServerProfileNetworkInterfaceCountDependent.from_dict(bare_metal_server_profile_network_interface_count_dependent_model_json) + bare_metal_server_profile_network_interface_count_dependent_model = BareMetalServerProfileNetworkInterfaceCountDependent.from_dict( + bare_metal_server_profile_network_interface_count_dependent_model_json + ) assert bare_metal_server_profile_network_interface_count_dependent_model != False # Construct a model instance of BareMetalServerProfileNetworkInterfaceCountDependent by calling from_dict on the json representation - bare_metal_server_profile_network_interface_count_dependent_model_dict = BareMetalServerProfileNetworkInterfaceCountDependent.from_dict(bare_metal_server_profile_network_interface_count_dependent_model_json).__dict__ - bare_metal_server_profile_network_interface_count_dependent_model2 = BareMetalServerProfileNetworkInterfaceCountDependent(**bare_metal_server_profile_network_interface_count_dependent_model_dict) + bare_metal_server_profile_network_interface_count_dependent_model_dict = BareMetalServerProfileNetworkInterfaceCountDependent.from_dict( + bare_metal_server_profile_network_interface_count_dependent_model_json + ).__dict__ + bare_metal_server_profile_network_interface_count_dependent_model2 = BareMetalServerProfileNetworkInterfaceCountDependent( + ** + bare_metal_server_profile_network_interface_count_dependent_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_profile_network_interface_count_dependent_model == bare_metal_server_profile_network_interface_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_network_interface_count_dependent_model_json2 = bare_metal_server_profile_network_interface_count_dependent_model.to_dict() + bare_metal_server_profile_network_interface_count_dependent_model_json2 = bare_metal_server_profile_network_interface_count_dependent_model.to_dict( + ) assert bare_metal_server_profile_network_interface_count_dependent_model_json2 == bare_metal_server_profile_network_interface_count_dependent_model_json @@ -77475,30 +89783,40 @@ class TestModel_BareMetalServerProfileNetworkInterfaceCountRange: Test Class for BareMetalServerProfileNetworkInterfaceCountRange """ - def test_bare_metal_server_profile_network_interface_count_range_serialization(self): + def test_bare_metal_server_profile_network_interface_count_range_serialization( + self): """ Test serialization/deserialization for BareMetalServerProfileNetworkInterfaceCountRange """ # Construct a json representation of a BareMetalServerProfileNetworkInterfaceCountRange model bare_metal_server_profile_network_interface_count_range_model_json = {} - bare_metal_server_profile_network_interface_count_range_model_json['max'] = 128 - bare_metal_server_profile_network_interface_count_range_model_json['min'] = 1 - bare_metal_server_profile_network_interface_count_range_model_json['type'] = 'range' + bare_metal_server_profile_network_interface_count_range_model_json[ + 'max'] = 128 + bare_metal_server_profile_network_interface_count_range_model_json[ + 'min'] = 1 + bare_metal_server_profile_network_interface_count_range_model_json[ + 'type'] = 'range' # Construct a model instance of BareMetalServerProfileNetworkInterfaceCountRange by calling from_dict on the json representation - bare_metal_server_profile_network_interface_count_range_model = BareMetalServerProfileNetworkInterfaceCountRange.from_dict(bare_metal_server_profile_network_interface_count_range_model_json) + bare_metal_server_profile_network_interface_count_range_model = BareMetalServerProfileNetworkInterfaceCountRange.from_dict( + bare_metal_server_profile_network_interface_count_range_model_json) assert bare_metal_server_profile_network_interface_count_range_model != False # Construct a model instance of BareMetalServerProfileNetworkInterfaceCountRange by calling from_dict on the json representation - bare_metal_server_profile_network_interface_count_range_model_dict = BareMetalServerProfileNetworkInterfaceCountRange.from_dict(bare_metal_server_profile_network_interface_count_range_model_json).__dict__ - bare_metal_server_profile_network_interface_count_range_model2 = BareMetalServerProfileNetworkInterfaceCountRange(**bare_metal_server_profile_network_interface_count_range_model_dict) + bare_metal_server_profile_network_interface_count_range_model_dict = BareMetalServerProfileNetworkInterfaceCountRange.from_dict( + bare_metal_server_profile_network_interface_count_range_model_json + ).__dict__ + bare_metal_server_profile_network_interface_count_range_model2 = BareMetalServerProfileNetworkInterfaceCountRange( + ** + bare_metal_server_profile_network_interface_count_range_model_dict) # Verify the model instances are equivalent assert bare_metal_server_profile_network_interface_count_range_model == bare_metal_server_profile_network_interface_count_range_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_profile_network_interface_count_range_model_json2 = bare_metal_server_profile_network_interface_count_range_model.to_dict() + bare_metal_server_profile_network_interface_count_range_model_json2 = bare_metal_server_profile_network_interface_count_range_model.to_dict( + ) assert bare_metal_server_profile_network_interface_count_range_model_json2 == bare_metal_server_profile_network_interface_count_range_model_json @@ -77507,7 +89825,8 @@ class TestModel_BareMetalServerPrototypeBareMetalServerByNetworkAttachment: Test Class for BareMetalServerPrototypeBareMetalServerByNetworkAttachment """ - def test_bare_metal_server_prototype_bare_metal_server_by_network_attachment_serialization(self): + def test_bare_metal_server_prototype_bare_metal_server_by_network_attachment_serialization( + self): """ Test serialization/deserialization for BareMetalServerPrototypeBareMetalServerByNetworkAttachment """ @@ -77520,19 +89839,27 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_attachment_ser key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - bare_metal_server_initialization_prototype_model = {} # BareMetalServerInitializationPrototype - bare_metal_server_initialization_prototype_model['image'] = image_identity_model - bare_metal_server_initialization_prototype_model['keys'] = [key_identity_model] - bare_metal_server_initialization_prototype_model['user_data'] = 'testString' - - bare_metal_server_profile_identity_model = {} # BareMetalServerProfileIdentityByName + bare_metal_server_initialization_prototype_model = { + } # BareMetalServerInitializationPrototype + bare_metal_server_initialization_prototype_model[ + 'image'] = image_identity_model + bare_metal_server_initialization_prototype_model['keys'] = [ + key_identity_model + ] + bare_metal_server_initialization_prototype_model[ + 'user_data'] = 'testString' + + bare_metal_server_profile_identity_model = { + } # BareMetalServerProfileIdentityByName bare_metal_server_profile_identity_model['name'] = 'bx2-metal-192x768' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - bare_metal_server_trusted_platform_module_prototype_model = {} # BareMetalServerTrustedPlatformModulePrototype - bare_metal_server_trusted_platform_module_prototype_model['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_prototype_model = { + } # BareMetalServerTrustedPlatformModulePrototype + bare_metal_server_trusted_platform_module_prototype_model[ + 'mode'] = 'disabled' vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' @@ -77540,71 +89867,121 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_attachment_ser zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model = {} # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - bare_metal_server_network_attachment_prototype_model = {} # BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype - bare_metal_server_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_network_attachment_prototype_model['interface_type'] = 'pci' - - bare_metal_server_primary_network_attachment_prototype_model = {} # BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype - bare_metal_server_primary_network_attachment_prototype_model['name'] = 'my-bare-metal-server-network-attachment' - bare_metal_server_primary_network_attachment_prototype_model['virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model - bare_metal_server_primary_network_attachment_prototype_model['allowed_vlans'] = [] - bare_metal_server_primary_network_attachment_prototype_model['interface_type'] = 'pci' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model = { + } # BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + bare_metal_server_network_attachment_prototype_model = { + } # BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype + bare_metal_server_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_network_attachment_prototype_model[ + 'interface_type'] = 'pci' + + bare_metal_server_primary_network_attachment_prototype_model = { + } # BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype + bare_metal_server_primary_network_attachment_prototype_model[ + 'name'] = 'my-bare-metal-server-network-attachment' + bare_metal_server_primary_network_attachment_prototype_model[ + 'virtual_network_interface'] = bare_metal_server_network_attachment_prototype_virtual_network_interface_model + bare_metal_server_primary_network_attachment_prototype_model[ + 'allowed_vlans'] = [] + bare_metal_server_primary_network_attachment_prototype_model[ + 'interface_type'] = 'pci' # Construct a json representation of a BareMetalServerPrototypeBareMetalServerByNetworkAttachment model bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json = {} - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['enable_secure_boot'] = False - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['initialization'] = bare_metal_server_initialization_prototype_model - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['name'] = 'my-bare-metal-server' - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['profile'] = bare_metal_server_profile_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['vpc'] = vpc_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['zone'] = zone_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['network_attachments'] = [bare_metal_server_network_attachment_prototype_model] - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['primary_network_attachment'] = bare_metal_server_primary_network_attachment_prototype_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'bandwidth'] = 20000 + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'enable_secure_boot'] = False + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'initialization'] = bare_metal_server_initialization_prototype_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'name'] = 'my-bare-metal-server' + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'profile'] = bare_metal_server_profile_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'network_attachments'] = [ + bare_metal_server_network_attachment_prototype_model + ] + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json[ + 'primary_network_attachment'] = bare_metal_server_primary_network_attachment_prototype_model # Construct a model instance of BareMetalServerPrototypeBareMetalServerByNetworkAttachment by calling from_dict on the json representation - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model = BareMetalServerPrototypeBareMetalServerByNetworkAttachment.from_dict(bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json) + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model = BareMetalServerPrototypeBareMetalServerByNetworkAttachment.from_dict( + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json + ) assert bare_metal_server_prototype_bare_metal_server_by_network_attachment_model != False # Construct a model instance of BareMetalServerPrototypeBareMetalServerByNetworkAttachment by calling from_dict on the json representation - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_dict = BareMetalServerPrototypeBareMetalServerByNetworkAttachment.from_dict(bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json).__dict__ - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model2 = BareMetalServerPrototypeBareMetalServerByNetworkAttachment(**bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_dict) + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_dict = BareMetalServerPrototypeBareMetalServerByNetworkAttachment.from_dict( + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json + ).__dict__ + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model2 = BareMetalServerPrototypeBareMetalServerByNetworkAttachment( + ** + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_prototype_bare_metal_server_by_network_attachment_model == bare_metal_server_prototype_bare_metal_server_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json2 = bare_metal_server_prototype_bare_metal_server_by_network_attachment_model.to_dict() + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json2 = bare_metal_server_prototype_bare_metal_server_by_network_attachment_model.to_dict( + ) assert bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json2 == bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json @@ -77613,7 +89990,8 @@ class TestModel_BareMetalServerPrototypeBareMetalServerByNetworkInterface: Test Class for BareMetalServerPrototypeBareMetalServerByNetworkInterface """ - def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_serialization(self): + def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_serialization( + self): """ Test serialization/deserialization for BareMetalServerPrototypeBareMetalServerByNetworkInterface """ @@ -77626,19 +90004,27 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_seri key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - bare_metal_server_initialization_prototype_model = {} # BareMetalServerInitializationPrototype - bare_metal_server_initialization_prototype_model['image'] = image_identity_model - bare_metal_server_initialization_prototype_model['keys'] = [key_identity_model] - bare_metal_server_initialization_prototype_model['user_data'] = 'testString' - - bare_metal_server_profile_identity_model = {} # BareMetalServerProfileIdentityByName + bare_metal_server_initialization_prototype_model = { + } # BareMetalServerInitializationPrototype + bare_metal_server_initialization_prototype_model[ + 'image'] = image_identity_model + bare_metal_server_initialization_prototype_model['keys'] = [ + key_identity_model + ] + bare_metal_server_initialization_prototype_model[ + 'user_data'] = 'testString' + + bare_metal_server_profile_identity_model = { + } # BareMetalServerProfileIdentityByName bare_metal_server_profile_identity_model['name'] = 'bx2-metal-192x768' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - bare_metal_server_trusted_platform_module_prototype_model = {} # BareMetalServerTrustedPlatformModulePrototype - bare_metal_server_trusted_platform_module_prototype_model['mode'] = 'disabled' + bare_metal_server_trusted_platform_module_prototype_model = { + } # BareMetalServerTrustedPlatformModulePrototype + bare_metal_server_trusted_platform_module_prototype_model[ + 'mode'] = 'disabled' vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' @@ -77646,62 +90032,103 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_seri zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - bare_metal_server_network_interface_prototype_model = {} # BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype - bare_metal_server_network_interface_prototype_model['allow_ip_spoofing'] = True - bare_metal_server_network_interface_prototype_model['enable_infrastructure_nat'] = True - bare_metal_server_network_interface_prototype_model['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - bare_metal_server_network_interface_prototype_model['subnet'] = subnet_identity_model - bare_metal_server_network_interface_prototype_model['interface_type'] = 'hipersocket' - - bare_metal_server_primary_network_interface_prototype_model = {} # BareMetalServerPrimaryNetworkInterfacePrototype - bare_metal_server_primary_network_interface_prototype_model['allow_ip_spoofing'] = True - bare_metal_server_primary_network_interface_prototype_model['allowed_vlans'] = [4] - bare_metal_server_primary_network_interface_prototype_model['enable_infrastructure_nat'] = True - bare_metal_server_primary_network_interface_prototype_model['interface_type'] = 'pci' - bare_metal_server_primary_network_interface_prototype_model['name'] = 'my-bare-metal-server-network-interface' - bare_metal_server_primary_network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - bare_metal_server_primary_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - bare_metal_server_primary_network_interface_prototype_model['subnet'] = subnet_identity_model + bare_metal_server_network_interface_prototype_model = { + } # BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype + bare_metal_server_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_network_interface_prototype_model[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model + bare_metal_server_network_interface_prototype_model[ + 'interface_type'] = 'hipersocket' + + bare_metal_server_primary_network_interface_prototype_model = { + } # BareMetalServerPrimaryNetworkInterfacePrototype + bare_metal_server_primary_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + bare_metal_server_primary_network_interface_prototype_model[ + 'allowed_vlans'] = [4] + bare_metal_server_primary_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + bare_metal_server_primary_network_interface_prototype_model[ + 'interface_type'] = 'pci' + bare_metal_server_primary_network_interface_prototype_model[ + 'name'] = 'my-bare-metal-server-network-interface' + bare_metal_server_primary_network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + bare_metal_server_primary_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + bare_metal_server_primary_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model # Construct a json representation of a BareMetalServerPrototypeBareMetalServerByNetworkInterface model bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json = {} - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['enable_secure_boot'] = False - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['initialization'] = bare_metal_server_initialization_prototype_model - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['name'] = 'my-bare-metal-server' - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['profile'] = bare_metal_server_profile_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['resource_group'] = resource_group_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['vpc'] = vpc_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['zone'] = zone_identity_model - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['network_interfaces'] = [bare_metal_server_network_interface_prototype_model] - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['primary_network_interface'] = bare_metal_server_primary_network_interface_prototype_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'bandwidth'] = 20000 + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'enable_secure_boot'] = False + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'initialization'] = bare_metal_server_initialization_prototype_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'name'] = 'my-bare-metal-server' + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'profile'] = bare_metal_server_profile_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'trusted_platform_module'] = bare_metal_server_trusted_platform_module_prototype_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'zone'] = zone_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'network_interfaces'] = [ + bare_metal_server_network_interface_prototype_model + ] + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json[ + 'primary_network_interface'] = bare_metal_server_primary_network_interface_prototype_model # Construct a model instance of BareMetalServerPrototypeBareMetalServerByNetworkInterface by calling from_dict on the json representation - bare_metal_server_prototype_bare_metal_server_by_network_interface_model = BareMetalServerPrototypeBareMetalServerByNetworkInterface.from_dict(bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json) + bare_metal_server_prototype_bare_metal_server_by_network_interface_model = BareMetalServerPrototypeBareMetalServerByNetworkInterface.from_dict( + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json + ) assert bare_metal_server_prototype_bare_metal_server_by_network_interface_model != False # Construct a model instance of BareMetalServerPrototypeBareMetalServerByNetworkInterface by calling from_dict on the json representation - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_dict = BareMetalServerPrototypeBareMetalServerByNetworkInterface.from_dict(bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json).__dict__ - bare_metal_server_prototype_bare_metal_server_by_network_interface_model2 = BareMetalServerPrototypeBareMetalServerByNetworkInterface(**bare_metal_server_prototype_bare_metal_server_by_network_interface_model_dict) + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_dict = BareMetalServerPrototypeBareMetalServerByNetworkInterface.from_dict( + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json + ).__dict__ + bare_metal_server_prototype_bare_metal_server_by_network_interface_model2 = BareMetalServerPrototypeBareMetalServerByNetworkInterface( + ** + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_prototype_bare_metal_server_by_network_interface_model == bare_metal_server_prototype_bare_metal_server_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json2 = bare_metal_server_prototype_bare_metal_server_by_network_interface_model.to_dict() + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json2 = bare_metal_server_prototype_bare_metal_server_by_network_interface_model.to_dict( + ) assert bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json2 == bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json @@ -77710,28 +90137,35 @@ class TestModel_CatalogOfferingIdentityCatalogOfferingByCRN: Test Class for CatalogOfferingIdentityCatalogOfferingByCRN """ - def test_catalog_offering_identity_catalog_offering_by_crn_serialization(self): + def test_catalog_offering_identity_catalog_offering_by_crn_serialization( + self): """ Test serialization/deserialization for CatalogOfferingIdentityCatalogOfferingByCRN """ # Construct a json representation of a CatalogOfferingIdentityCatalogOfferingByCRN model catalog_offering_identity_catalog_offering_by_crn_model_json = {} - catalog_offering_identity_catalog_offering_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + catalog_offering_identity_catalog_offering_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' # Construct a model instance of CatalogOfferingIdentityCatalogOfferingByCRN by calling from_dict on the json representation - catalog_offering_identity_catalog_offering_by_crn_model = CatalogOfferingIdentityCatalogOfferingByCRN.from_dict(catalog_offering_identity_catalog_offering_by_crn_model_json) + catalog_offering_identity_catalog_offering_by_crn_model = CatalogOfferingIdentityCatalogOfferingByCRN.from_dict( + catalog_offering_identity_catalog_offering_by_crn_model_json) assert catalog_offering_identity_catalog_offering_by_crn_model != False # Construct a model instance of CatalogOfferingIdentityCatalogOfferingByCRN by calling from_dict on the json representation - catalog_offering_identity_catalog_offering_by_crn_model_dict = CatalogOfferingIdentityCatalogOfferingByCRN.from_dict(catalog_offering_identity_catalog_offering_by_crn_model_json).__dict__ - catalog_offering_identity_catalog_offering_by_crn_model2 = CatalogOfferingIdentityCatalogOfferingByCRN(**catalog_offering_identity_catalog_offering_by_crn_model_dict) + catalog_offering_identity_catalog_offering_by_crn_model_dict = CatalogOfferingIdentityCatalogOfferingByCRN.from_dict( + catalog_offering_identity_catalog_offering_by_crn_model_json + ).__dict__ + catalog_offering_identity_catalog_offering_by_crn_model2 = CatalogOfferingIdentityCatalogOfferingByCRN( + **catalog_offering_identity_catalog_offering_by_crn_model_dict) # Verify the model instances are equivalent assert catalog_offering_identity_catalog_offering_by_crn_model == catalog_offering_identity_catalog_offering_by_crn_model2 # Convert model instance back to dict and verify no loss of data - catalog_offering_identity_catalog_offering_by_crn_model_json2 = catalog_offering_identity_catalog_offering_by_crn_model.to_dict() + catalog_offering_identity_catalog_offering_by_crn_model_json2 = catalog_offering_identity_catalog_offering_by_crn_model.to_dict( + ) assert catalog_offering_identity_catalog_offering_by_crn_model_json2 == catalog_offering_identity_catalog_offering_by_crn_model_json @@ -77740,31 +90174,81 @@ class TestModel_CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN: Test Class for CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN """ - def test_catalog_offering_version_identity_catalog_offering_version_by_crn_serialization(self): + def test_catalog_offering_version_identity_catalog_offering_version_by_crn_serialization( + self): """ Test serialization/deserialization for CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN """ # Construct a json representation of a CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN model catalog_offering_version_identity_catalog_offering_version_by_crn_model_json = {} - catalog_offering_version_identity_catalog_offering_version_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + catalog_offering_version_identity_catalog_offering_version_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' # Construct a model instance of CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN by calling from_dict on the json representation - catalog_offering_version_identity_catalog_offering_version_by_crn_model = CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.from_dict(catalog_offering_version_identity_catalog_offering_version_by_crn_model_json) + catalog_offering_version_identity_catalog_offering_version_by_crn_model = CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.from_dict( + catalog_offering_version_identity_catalog_offering_version_by_crn_model_json + ) assert catalog_offering_version_identity_catalog_offering_version_by_crn_model != False # Construct a model instance of CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN by calling from_dict on the json representation - catalog_offering_version_identity_catalog_offering_version_by_crn_model_dict = CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.from_dict(catalog_offering_version_identity_catalog_offering_version_by_crn_model_json).__dict__ - catalog_offering_version_identity_catalog_offering_version_by_crn_model2 = CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(**catalog_offering_version_identity_catalog_offering_version_by_crn_model_dict) + catalog_offering_version_identity_catalog_offering_version_by_crn_model_dict = CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.from_dict( + catalog_offering_version_identity_catalog_offering_version_by_crn_model_json + ).__dict__ + catalog_offering_version_identity_catalog_offering_version_by_crn_model2 = CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN( + ** + catalog_offering_version_identity_catalog_offering_version_by_crn_model_dict + ) # Verify the model instances are equivalent assert catalog_offering_version_identity_catalog_offering_version_by_crn_model == catalog_offering_version_identity_catalog_offering_version_by_crn_model2 # Convert model instance back to dict and verify no loss of data - catalog_offering_version_identity_catalog_offering_version_by_crn_model_json2 = catalog_offering_version_identity_catalog_offering_version_by_crn_model.to_dict() + catalog_offering_version_identity_catalog_offering_version_by_crn_model_json2 = catalog_offering_version_identity_catalog_offering_version_by_crn_model.to_dict( + ) assert catalog_offering_version_identity_catalog_offering_version_by_crn_model_json2 == catalog_offering_version_identity_catalog_offering_version_by_crn_model_json +class TestModel_CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN: + """ + Test Class for CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + """ + + def test_catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_serialization( + self): + """ + Test serialization/deserialization for CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + """ + + # Construct a json representation of a CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN model + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_json = {} + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + # Construct a model instance of CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN by calling from_dict on the json representation + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model = CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN.from_dict( + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_json + ) + assert catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model != False + + # Construct a model instance of CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN by calling from_dict on the json representation + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_dict = CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN.from_dict( + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_json + ).__dict__ + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model2 = CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN( + ** + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_dict + ) + + # Verify the model instances are equivalent + assert catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model == catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model2 + + # Convert model instance back to dict and verify no loss of data + catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_json2 = catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model.to_dict( + ) + assert catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_json2 == catalog_offering_version_plan_identity_catalog_offering_version_plan_by_crn_model_json + + class TestModel_CertificateInstanceIdentityByCRN: """ Test Class for CertificateInstanceIdentityByCRN @@ -77777,21 +90261,26 @@ def test_certificate_instance_identity_by_crn_serialization(self): # Construct a json representation of a CertificateInstanceIdentityByCRN model certificate_instance_identity_by_crn_model_json = {} - certificate_instance_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a model instance of CertificateInstanceIdentityByCRN by calling from_dict on the json representation - certificate_instance_identity_by_crn_model = CertificateInstanceIdentityByCRN.from_dict(certificate_instance_identity_by_crn_model_json) + certificate_instance_identity_by_crn_model = CertificateInstanceIdentityByCRN.from_dict( + certificate_instance_identity_by_crn_model_json) assert certificate_instance_identity_by_crn_model != False # Construct a model instance of CertificateInstanceIdentityByCRN by calling from_dict on the json representation - certificate_instance_identity_by_crn_model_dict = CertificateInstanceIdentityByCRN.from_dict(certificate_instance_identity_by_crn_model_json).__dict__ - certificate_instance_identity_by_crn_model2 = CertificateInstanceIdentityByCRN(**certificate_instance_identity_by_crn_model_dict) + certificate_instance_identity_by_crn_model_dict = CertificateInstanceIdentityByCRN.from_dict( + certificate_instance_identity_by_crn_model_json).__dict__ + certificate_instance_identity_by_crn_model2 = CertificateInstanceIdentityByCRN( + **certificate_instance_identity_by_crn_model_dict) # Verify the model instances are equivalent assert certificate_instance_identity_by_crn_model == certificate_instance_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - certificate_instance_identity_by_crn_model_json2 = certificate_instance_identity_by_crn_model.to_dict() + certificate_instance_identity_by_crn_model_json2 = certificate_instance_identity_by_crn_model.to_dict( + ) assert certificate_instance_identity_by_crn_model_json2 == certificate_instance_identity_by_crn_model_json @@ -77807,21 +90296,26 @@ def test_cloud_object_storage_bucket_identity_by_crn_serialization(self): # Construct a json representation of a CloudObjectStorageBucketIdentityByCRN model cloud_object_storage_bucket_identity_by_crn_model_json = {} - cloud_object_storage_bucket_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' + cloud_object_storage_bucket_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket' # Construct a model instance of CloudObjectStorageBucketIdentityByCRN by calling from_dict on the json representation - cloud_object_storage_bucket_identity_by_crn_model = CloudObjectStorageBucketIdentityByCRN.from_dict(cloud_object_storage_bucket_identity_by_crn_model_json) + cloud_object_storage_bucket_identity_by_crn_model = CloudObjectStorageBucketIdentityByCRN.from_dict( + cloud_object_storage_bucket_identity_by_crn_model_json) assert cloud_object_storage_bucket_identity_by_crn_model != False # Construct a model instance of CloudObjectStorageBucketIdentityByCRN by calling from_dict on the json representation - cloud_object_storage_bucket_identity_by_crn_model_dict = CloudObjectStorageBucketIdentityByCRN.from_dict(cloud_object_storage_bucket_identity_by_crn_model_json).__dict__ - cloud_object_storage_bucket_identity_by_crn_model2 = CloudObjectStorageBucketIdentityByCRN(**cloud_object_storage_bucket_identity_by_crn_model_dict) + cloud_object_storage_bucket_identity_by_crn_model_dict = CloudObjectStorageBucketIdentityByCRN.from_dict( + cloud_object_storage_bucket_identity_by_crn_model_json).__dict__ + cloud_object_storage_bucket_identity_by_crn_model2 = CloudObjectStorageBucketIdentityByCRN( + **cloud_object_storage_bucket_identity_by_crn_model_dict) # Verify the model instances are equivalent assert cloud_object_storage_bucket_identity_by_crn_model == cloud_object_storage_bucket_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - cloud_object_storage_bucket_identity_by_crn_model_json2 = cloud_object_storage_bucket_identity_by_crn_model.to_dict() + cloud_object_storage_bucket_identity_by_crn_model_json2 = cloud_object_storage_bucket_identity_by_crn_model.to_dict( + ) assert cloud_object_storage_bucket_identity_by_crn_model_json2 == cloud_object_storage_bucket_identity_by_crn_model_json @@ -77830,28 +90324,38 @@ class TestModel_CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentity Test Class for CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName """ - def test_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_serialization(self): + def test_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_serialization( + self): """ Test serialization/deserialization for CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName """ # Construct a json representation of a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json = {} - cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json['name'] = 'bucket-27200-lwx4cfvcue' + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Construct a model instance of CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName by calling from_dict on the json representation - cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model = CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict(cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json) + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model = CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict( + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json + ) assert cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model != False # Construct a model instance of CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName by calling from_dict on the json representation - cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict = CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict(cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json).__dict__ - cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model2 = CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(**cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict) + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict = CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict( + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json + ).__dict__ + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model2 = CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName( + ** + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict + ) # Verify the model instances are equivalent assert cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model == cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json2 = cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model.to_dict() + cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json2 = cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model.to_dict( + ) assert cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json2 == cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json @@ -77867,21 +90371,26 @@ def test_dns_instance_identity_by_crn_serialization(self): # Construct a json representation of a DNSInstanceIdentityByCRN model dns_instance_identity_by_crn_model_json = {} - dns_instance_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/aa2432b1fa4d4ace891e9b80fc104e34:6860c359-b2e2-46fa-a944-b38c28201c6e' + dns_instance_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' # Construct a model instance of DNSInstanceIdentityByCRN by calling from_dict on the json representation - dns_instance_identity_by_crn_model = DNSInstanceIdentityByCRN.from_dict(dns_instance_identity_by_crn_model_json) + dns_instance_identity_by_crn_model = DNSInstanceIdentityByCRN.from_dict( + dns_instance_identity_by_crn_model_json) assert dns_instance_identity_by_crn_model != False # Construct a model instance of DNSInstanceIdentityByCRN by calling from_dict on the json representation - dns_instance_identity_by_crn_model_dict = DNSInstanceIdentityByCRN.from_dict(dns_instance_identity_by_crn_model_json).__dict__ - dns_instance_identity_by_crn_model2 = DNSInstanceIdentityByCRN(**dns_instance_identity_by_crn_model_dict) + dns_instance_identity_by_crn_model_dict = DNSInstanceIdentityByCRN.from_dict( + dns_instance_identity_by_crn_model_json).__dict__ + dns_instance_identity_by_crn_model2 = DNSInstanceIdentityByCRN( + **dns_instance_identity_by_crn_model_dict) # Verify the model instances are equivalent assert dns_instance_identity_by_crn_model == dns_instance_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - dns_instance_identity_by_crn_model_json2 = dns_instance_identity_by_crn_model.to_dict() + dns_instance_identity_by_crn_model_json2 = dns_instance_identity_by_crn_model.to_dict( + ) assert dns_instance_identity_by_crn_model_json2 == dns_instance_identity_by_crn_model_json @@ -77897,21 +90406,26 @@ def test_dns_zone_identity_by_id_serialization(self): # Construct a json representation of a DNSZoneIdentityById model dns_zone_identity_by_id_model_json = {} - dns_zone_identity_by_id_model_json['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' + dns_zone_identity_by_id_model_json[ + 'id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45' # Construct a model instance of DNSZoneIdentityById by calling from_dict on the json representation - dns_zone_identity_by_id_model = DNSZoneIdentityById.from_dict(dns_zone_identity_by_id_model_json) + dns_zone_identity_by_id_model = DNSZoneIdentityById.from_dict( + dns_zone_identity_by_id_model_json) assert dns_zone_identity_by_id_model != False # Construct a model instance of DNSZoneIdentityById by calling from_dict on the json representation - dns_zone_identity_by_id_model_dict = DNSZoneIdentityById.from_dict(dns_zone_identity_by_id_model_json).__dict__ - dns_zone_identity_by_id_model2 = DNSZoneIdentityById(**dns_zone_identity_by_id_model_dict) + dns_zone_identity_by_id_model_dict = DNSZoneIdentityById.from_dict( + dns_zone_identity_by_id_model_json).__dict__ + dns_zone_identity_by_id_model2 = DNSZoneIdentityById( + **dns_zone_identity_by_id_model_dict) # Verify the model instances are equivalent assert dns_zone_identity_by_id_model == dns_zone_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - dns_zone_identity_by_id_model_json2 = dns_zone_identity_by_id_model.to_dict() + dns_zone_identity_by_id_model_json2 = dns_zone_identity_by_id_model.to_dict( + ) assert dns_zone_identity_by_id_model_json2 == dns_zone_identity_by_id_model_json @@ -77927,21 +90441,26 @@ def test_dedicated_host_group_identity_by_crn_serialization(self): # Construct a json representation of a DedicatedHostGroupIdentityByCRN model dedicated_host_group_identity_by_crn_model_json = {} - dedicated_host_group_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of DedicatedHostGroupIdentityByCRN by calling from_dict on the json representation - dedicated_host_group_identity_by_crn_model = DedicatedHostGroupIdentityByCRN.from_dict(dedicated_host_group_identity_by_crn_model_json) + dedicated_host_group_identity_by_crn_model = DedicatedHostGroupIdentityByCRN.from_dict( + dedicated_host_group_identity_by_crn_model_json) assert dedicated_host_group_identity_by_crn_model != False # Construct a model instance of DedicatedHostGroupIdentityByCRN by calling from_dict on the json representation - dedicated_host_group_identity_by_crn_model_dict = DedicatedHostGroupIdentityByCRN.from_dict(dedicated_host_group_identity_by_crn_model_json).__dict__ - dedicated_host_group_identity_by_crn_model2 = DedicatedHostGroupIdentityByCRN(**dedicated_host_group_identity_by_crn_model_dict) + dedicated_host_group_identity_by_crn_model_dict = DedicatedHostGroupIdentityByCRN.from_dict( + dedicated_host_group_identity_by_crn_model_json).__dict__ + dedicated_host_group_identity_by_crn_model2 = DedicatedHostGroupIdentityByCRN( + **dedicated_host_group_identity_by_crn_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_identity_by_crn_model == dedicated_host_group_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_identity_by_crn_model_json2 = dedicated_host_group_identity_by_crn_model.to_dict() + dedicated_host_group_identity_by_crn_model_json2 = dedicated_host_group_identity_by_crn_model.to_dict( + ) assert dedicated_host_group_identity_by_crn_model_json2 == dedicated_host_group_identity_by_crn_model_json @@ -77957,21 +90476,26 @@ def test_dedicated_host_group_identity_by_href_serialization(self): # Construct a json representation of a DedicatedHostGroupIdentityByHref model dedicated_host_group_identity_by_href_model_json = {} - dedicated_host_group_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of DedicatedHostGroupIdentityByHref by calling from_dict on the json representation - dedicated_host_group_identity_by_href_model = DedicatedHostGroupIdentityByHref.from_dict(dedicated_host_group_identity_by_href_model_json) + dedicated_host_group_identity_by_href_model = DedicatedHostGroupIdentityByHref.from_dict( + dedicated_host_group_identity_by_href_model_json) assert dedicated_host_group_identity_by_href_model != False # Construct a model instance of DedicatedHostGroupIdentityByHref by calling from_dict on the json representation - dedicated_host_group_identity_by_href_model_dict = DedicatedHostGroupIdentityByHref.from_dict(dedicated_host_group_identity_by_href_model_json).__dict__ - dedicated_host_group_identity_by_href_model2 = DedicatedHostGroupIdentityByHref(**dedicated_host_group_identity_by_href_model_dict) + dedicated_host_group_identity_by_href_model_dict = DedicatedHostGroupIdentityByHref.from_dict( + dedicated_host_group_identity_by_href_model_json).__dict__ + dedicated_host_group_identity_by_href_model2 = DedicatedHostGroupIdentityByHref( + **dedicated_host_group_identity_by_href_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_identity_by_href_model == dedicated_host_group_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_identity_by_href_model_json2 = dedicated_host_group_identity_by_href_model.to_dict() + dedicated_host_group_identity_by_href_model_json2 = dedicated_host_group_identity_by_href_model.to_dict( + ) assert dedicated_host_group_identity_by_href_model_json2 == dedicated_host_group_identity_by_href_model_json @@ -77987,21 +90511,26 @@ def test_dedicated_host_group_identity_by_id_serialization(self): # Construct a json representation of a DedicatedHostGroupIdentityById model dedicated_host_group_identity_by_id_model_json = {} - dedicated_host_group_identity_by_id_model_json['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_identity_by_id_model_json[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of DedicatedHostGroupIdentityById by calling from_dict on the json representation - dedicated_host_group_identity_by_id_model = DedicatedHostGroupIdentityById.from_dict(dedicated_host_group_identity_by_id_model_json) + dedicated_host_group_identity_by_id_model = DedicatedHostGroupIdentityById.from_dict( + dedicated_host_group_identity_by_id_model_json) assert dedicated_host_group_identity_by_id_model != False # Construct a model instance of DedicatedHostGroupIdentityById by calling from_dict on the json representation - dedicated_host_group_identity_by_id_model_dict = DedicatedHostGroupIdentityById.from_dict(dedicated_host_group_identity_by_id_model_json).__dict__ - dedicated_host_group_identity_by_id_model2 = DedicatedHostGroupIdentityById(**dedicated_host_group_identity_by_id_model_dict) + dedicated_host_group_identity_by_id_model_dict = DedicatedHostGroupIdentityById.from_dict( + dedicated_host_group_identity_by_id_model_json).__dict__ + dedicated_host_group_identity_by_id_model2 = DedicatedHostGroupIdentityById( + **dedicated_host_group_identity_by_id_model_dict) # Verify the model instances are equivalent assert dedicated_host_group_identity_by_id_model == dedicated_host_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_group_identity_by_id_model_json2 = dedicated_host_group_identity_by_id_model.to_dict() + dedicated_host_group_identity_by_id_model_json2 = dedicated_host_group_identity_by_id_model.to_dict( + ) assert dedicated_host_group_identity_by_id_model_json2 == dedicated_host_group_identity_by_id_model_json @@ -78017,21 +90546,26 @@ def test_dedicated_host_profile_identity_by_href_serialization(self): # Construct a json representation of a DedicatedHostProfileIdentityByHref model dedicated_host_profile_identity_by_href_model_json = {} - dedicated_host_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216' + dedicated_host_profile_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216' # Construct a model instance of DedicatedHostProfileIdentityByHref by calling from_dict on the json representation - dedicated_host_profile_identity_by_href_model = DedicatedHostProfileIdentityByHref.from_dict(dedicated_host_profile_identity_by_href_model_json) + dedicated_host_profile_identity_by_href_model = DedicatedHostProfileIdentityByHref.from_dict( + dedicated_host_profile_identity_by_href_model_json) assert dedicated_host_profile_identity_by_href_model != False # Construct a model instance of DedicatedHostProfileIdentityByHref by calling from_dict on the json representation - dedicated_host_profile_identity_by_href_model_dict = DedicatedHostProfileIdentityByHref.from_dict(dedicated_host_profile_identity_by_href_model_json).__dict__ - dedicated_host_profile_identity_by_href_model2 = DedicatedHostProfileIdentityByHref(**dedicated_host_profile_identity_by_href_model_dict) + dedicated_host_profile_identity_by_href_model_dict = DedicatedHostProfileIdentityByHref.from_dict( + dedicated_host_profile_identity_by_href_model_json).__dict__ + dedicated_host_profile_identity_by_href_model2 = DedicatedHostProfileIdentityByHref( + **dedicated_host_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_identity_by_href_model == dedicated_host_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_identity_by_href_model_json2 = dedicated_host_profile_identity_by_href_model.to_dict() + dedicated_host_profile_identity_by_href_model_json2 = dedicated_host_profile_identity_by_href_model.to_dict( + ) assert dedicated_host_profile_identity_by_href_model_json2 == dedicated_host_profile_identity_by_href_model_json @@ -78047,21 +90581,26 @@ def test_dedicated_host_profile_identity_by_name_serialization(self): # Construct a json representation of a DedicatedHostProfileIdentityByName model dedicated_host_profile_identity_by_name_model_json = {} - dedicated_host_profile_identity_by_name_model_json['name'] = 'mx2-host-152x1216' + dedicated_host_profile_identity_by_name_model_json[ + 'name'] = 'mx2-host-152x1216' # Construct a model instance of DedicatedHostProfileIdentityByName by calling from_dict on the json representation - dedicated_host_profile_identity_by_name_model = DedicatedHostProfileIdentityByName.from_dict(dedicated_host_profile_identity_by_name_model_json) + dedicated_host_profile_identity_by_name_model = DedicatedHostProfileIdentityByName.from_dict( + dedicated_host_profile_identity_by_name_model_json) assert dedicated_host_profile_identity_by_name_model != False # Construct a model instance of DedicatedHostProfileIdentityByName by calling from_dict on the json representation - dedicated_host_profile_identity_by_name_model_dict = DedicatedHostProfileIdentityByName.from_dict(dedicated_host_profile_identity_by_name_model_json).__dict__ - dedicated_host_profile_identity_by_name_model2 = DedicatedHostProfileIdentityByName(**dedicated_host_profile_identity_by_name_model_dict) + dedicated_host_profile_identity_by_name_model_dict = DedicatedHostProfileIdentityByName.from_dict( + dedicated_host_profile_identity_by_name_model_json).__dict__ + dedicated_host_profile_identity_by_name_model2 = DedicatedHostProfileIdentityByName( + **dedicated_host_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_identity_by_name_model == dedicated_host_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_identity_by_name_model_json2 = dedicated_host_profile_identity_by_name_model.to_dict() + dedicated_host_profile_identity_by_name_model_json2 = dedicated_host_profile_identity_by_name_model.to_dict( + ) assert dedicated_host_profile_identity_by_name_model_json2 == dedicated_host_profile_identity_by_name_model_json @@ -78080,18 +90619,22 @@ def test_dedicated_host_profile_memory_dependent_serialization(self): dedicated_host_profile_memory_dependent_model_json['type'] = 'dependent' # Construct a model instance of DedicatedHostProfileMemoryDependent by calling from_dict on the json representation - dedicated_host_profile_memory_dependent_model = DedicatedHostProfileMemoryDependent.from_dict(dedicated_host_profile_memory_dependent_model_json) + dedicated_host_profile_memory_dependent_model = DedicatedHostProfileMemoryDependent.from_dict( + dedicated_host_profile_memory_dependent_model_json) assert dedicated_host_profile_memory_dependent_model != False # Construct a model instance of DedicatedHostProfileMemoryDependent by calling from_dict on the json representation - dedicated_host_profile_memory_dependent_model_dict = DedicatedHostProfileMemoryDependent.from_dict(dedicated_host_profile_memory_dependent_model_json).__dict__ - dedicated_host_profile_memory_dependent_model2 = DedicatedHostProfileMemoryDependent(**dedicated_host_profile_memory_dependent_model_dict) + dedicated_host_profile_memory_dependent_model_dict = DedicatedHostProfileMemoryDependent.from_dict( + dedicated_host_profile_memory_dependent_model_json).__dict__ + dedicated_host_profile_memory_dependent_model2 = DedicatedHostProfileMemoryDependent( + **dedicated_host_profile_memory_dependent_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_memory_dependent_model == dedicated_host_profile_memory_dependent_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_memory_dependent_model_json2 = dedicated_host_profile_memory_dependent_model.to_dict() + dedicated_host_profile_memory_dependent_model_json2 = dedicated_host_profile_memory_dependent_model.to_dict( + ) assert dedicated_host_profile_memory_dependent_model_json2 == dedicated_host_profile_memory_dependent_model_json @@ -78112,18 +90655,22 @@ def test_dedicated_host_profile_memory_enum_serialization(self): dedicated_host_profile_memory_enum_model_json['values'] = [8, 16, 32] # Construct a model instance of DedicatedHostProfileMemoryEnum by calling from_dict on the json representation - dedicated_host_profile_memory_enum_model = DedicatedHostProfileMemoryEnum.from_dict(dedicated_host_profile_memory_enum_model_json) + dedicated_host_profile_memory_enum_model = DedicatedHostProfileMemoryEnum.from_dict( + dedicated_host_profile_memory_enum_model_json) assert dedicated_host_profile_memory_enum_model != False # Construct a model instance of DedicatedHostProfileMemoryEnum by calling from_dict on the json representation - dedicated_host_profile_memory_enum_model_dict = DedicatedHostProfileMemoryEnum.from_dict(dedicated_host_profile_memory_enum_model_json).__dict__ - dedicated_host_profile_memory_enum_model2 = DedicatedHostProfileMemoryEnum(**dedicated_host_profile_memory_enum_model_dict) + dedicated_host_profile_memory_enum_model_dict = DedicatedHostProfileMemoryEnum.from_dict( + dedicated_host_profile_memory_enum_model_json).__dict__ + dedicated_host_profile_memory_enum_model2 = DedicatedHostProfileMemoryEnum( + **dedicated_host_profile_memory_enum_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_memory_enum_model == dedicated_host_profile_memory_enum_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_memory_enum_model_json2 = dedicated_host_profile_memory_enum_model.to_dict() + dedicated_host_profile_memory_enum_model_json2 = dedicated_host_profile_memory_enum_model.to_dict( + ) assert dedicated_host_profile_memory_enum_model_json2 == dedicated_host_profile_memory_enum_model_json @@ -78143,18 +90690,22 @@ def test_dedicated_host_profile_memory_fixed_serialization(self): dedicated_host_profile_memory_fixed_model_json['value'] = 16 # Construct a model instance of DedicatedHostProfileMemoryFixed by calling from_dict on the json representation - dedicated_host_profile_memory_fixed_model = DedicatedHostProfileMemoryFixed.from_dict(dedicated_host_profile_memory_fixed_model_json) + dedicated_host_profile_memory_fixed_model = DedicatedHostProfileMemoryFixed.from_dict( + dedicated_host_profile_memory_fixed_model_json) assert dedicated_host_profile_memory_fixed_model != False # Construct a model instance of DedicatedHostProfileMemoryFixed by calling from_dict on the json representation - dedicated_host_profile_memory_fixed_model_dict = DedicatedHostProfileMemoryFixed.from_dict(dedicated_host_profile_memory_fixed_model_json).__dict__ - dedicated_host_profile_memory_fixed_model2 = DedicatedHostProfileMemoryFixed(**dedicated_host_profile_memory_fixed_model_dict) + dedicated_host_profile_memory_fixed_model_dict = DedicatedHostProfileMemoryFixed.from_dict( + dedicated_host_profile_memory_fixed_model_json).__dict__ + dedicated_host_profile_memory_fixed_model2 = DedicatedHostProfileMemoryFixed( + **dedicated_host_profile_memory_fixed_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_memory_fixed_model == dedicated_host_profile_memory_fixed_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_memory_fixed_model_json2 = dedicated_host_profile_memory_fixed_model.to_dict() + dedicated_host_profile_memory_fixed_model_json2 = dedicated_host_profile_memory_fixed_model.to_dict( + ) assert dedicated_host_profile_memory_fixed_model_json2 == dedicated_host_profile_memory_fixed_model_json @@ -78177,18 +90728,22 @@ def test_dedicated_host_profile_memory_range_serialization(self): dedicated_host_profile_memory_range_model_json['type'] = 'range' # Construct a model instance of DedicatedHostProfileMemoryRange by calling from_dict on the json representation - dedicated_host_profile_memory_range_model = DedicatedHostProfileMemoryRange.from_dict(dedicated_host_profile_memory_range_model_json) + dedicated_host_profile_memory_range_model = DedicatedHostProfileMemoryRange.from_dict( + dedicated_host_profile_memory_range_model_json) assert dedicated_host_profile_memory_range_model != False # Construct a model instance of DedicatedHostProfileMemoryRange by calling from_dict on the json representation - dedicated_host_profile_memory_range_model_dict = DedicatedHostProfileMemoryRange.from_dict(dedicated_host_profile_memory_range_model_json).__dict__ - dedicated_host_profile_memory_range_model2 = DedicatedHostProfileMemoryRange(**dedicated_host_profile_memory_range_model_dict) + dedicated_host_profile_memory_range_model_dict = DedicatedHostProfileMemoryRange.from_dict( + dedicated_host_profile_memory_range_model_json).__dict__ + dedicated_host_profile_memory_range_model2 = DedicatedHostProfileMemoryRange( + **dedicated_host_profile_memory_range_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_memory_range_model == dedicated_host_profile_memory_range_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_memory_range_model_json2 = dedicated_host_profile_memory_range_model.to_dict() + dedicated_host_profile_memory_range_model_json2 = dedicated_host_profile_memory_range_model.to_dict( + ) assert dedicated_host_profile_memory_range_model_json2 == dedicated_host_profile_memory_range_model_json @@ -78207,18 +90762,22 @@ def test_dedicated_host_profile_socket_dependent_serialization(self): dedicated_host_profile_socket_dependent_model_json['type'] = 'dependent' # Construct a model instance of DedicatedHostProfileSocketDependent by calling from_dict on the json representation - dedicated_host_profile_socket_dependent_model = DedicatedHostProfileSocketDependent.from_dict(dedicated_host_profile_socket_dependent_model_json) + dedicated_host_profile_socket_dependent_model = DedicatedHostProfileSocketDependent.from_dict( + dedicated_host_profile_socket_dependent_model_json) assert dedicated_host_profile_socket_dependent_model != False # Construct a model instance of DedicatedHostProfileSocketDependent by calling from_dict on the json representation - dedicated_host_profile_socket_dependent_model_dict = DedicatedHostProfileSocketDependent.from_dict(dedicated_host_profile_socket_dependent_model_json).__dict__ - dedicated_host_profile_socket_dependent_model2 = DedicatedHostProfileSocketDependent(**dedicated_host_profile_socket_dependent_model_dict) + dedicated_host_profile_socket_dependent_model_dict = DedicatedHostProfileSocketDependent.from_dict( + dedicated_host_profile_socket_dependent_model_json).__dict__ + dedicated_host_profile_socket_dependent_model2 = DedicatedHostProfileSocketDependent( + **dedicated_host_profile_socket_dependent_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_socket_dependent_model == dedicated_host_profile_socket_dependent_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_socket_dependent_model_json2 = dedicated_host_profile_socket_dependent_model.to_dict() + dedicated_host_profile_socket_dependent_model_json2 = dedicated_host_profile_socket_dependent_model.to_dict( + ) assert dedicated_host_profile_socket_dependent_model_json2 == dedicated_host_profile_socket_dependent_model_json @@ -78239,18 +90798,22 @@ def test_dedicated_host_profile_socket_enum_serialization(self): dedicated_host_profile_socket_enum_model_json['values'] = [2, 4, 8] # Construct a model instance of DedicatedHostProfileSocketEnum by calling from_dict on the json representation - dedicated_host_profile_socket_enum_model = DedicatedHostProfileSocketEnum.from_dict(dedicated_host_profile_socket_enum_model_json) + dedicated_host_profile_socket_enum_model = DedicatedHostProfileSocketEnum.from_dict( + dedicated_host_profile_socket_enum_model_json) assert dedicated_host_profile_socket_enum_model != False # Construct a model instance of DedicatedHostProfileSocketEnum by calling from_dict on the json representation - dedicated_host_profile_socket_enum_model_dict = DedicatedHostProfileSocketEnum.from_dict(dedicated_host_profile_socket_enum_model_json).__dict__ - dedicated_host_profile_socket_enum_model2 = DedicatedHostProfileSocketEnum(**dedicated_host_profile_socket_enum_model_dict) + dedicated_host_profile_socket_enum_model_dict = DedicatedHostProfileSocketEnum.from_dict( + dedicated_host_profile_socket_enum_model_json).__dict__ + dedicated_host_profile_socket_enum_model2 = DedicatedHostProfileSocketEnum( + **dedicated_host_profile_socket_enum_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_socket_enum_model == dedicated_host_profile_socket_enum_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_socket_enum_model_json2 = dedicated_host_profile_socket_enum_model.to_dict() + dedicated_host_profile_socket_enum_model_json2 = dedicated_host_profile_socket_enum_model.to_dict( + ) assert dedicated_host_profile_socket_enum_model_json2 == dedicated_host_profile_socket_enum_model_json @@ -78270,18 +90833,22 @@ def test_dedicated_host_profile_socket_fixed_serialization(self): dedicated_host_profile_socket_fixed_model_json['value'] = 2 # Construct a model instance of DedicatedHostProfileSocketFixed by calling from_dict on the json representation - dedicated_host_profile_socket_fixed_model = DedicatedHostProfileSocketFixed.from_dict(dedicated_host_profile_socket_fixed_model_json) + dedicated_host_profile_socket_fixed_model = DedicatedHostProfileSocketFixed.from_dict( + dedicated_host_profile_socket_fixed_model_json) assert dedicated_host_profile_socket_fixed_model != False # Construct a model instance of DedicatedHostProfileSocketFixed by calling from_dict on the json representation - dedicated_host_profile_socket_fixed_model_dict = DedicatedHostProfileSocketFixed.from_dict(dedicated_host_profile_socket_fixed_model_json).__dict__ - dedicated_host_profile_socket_fixed_model2 = DedicatedHostProfileSocketFixed(**dedicated_host_profile_socket_fixed_model_dict) + dedicated_host_profile_socket_fixed_model_dict = DedicatedHostProfileSocketFixed.from_dict( + dedicated_host_profile_socket_fixed_model_json).__dict__ + dedicated_host_profile_socket_fixed_model2 = DedicatedHostProfileSocketFixed( + **dedicated_host_profile_socket_fixed_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_socket_fixed_model == dedicated_host_profile_socket_fixed_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_socket_fixed_model_json2 = dedicated_host_profile_socket_fixed_model.to_dict() + dedicated_host_profile_socket_fixed_model_json2 = dedicated_host_profile_socket_fixed_model.to_dict( + ) assert dedicated_host_profile_socket_fixed_model_json2 == dedicated_host_profile_socket_fixed_model_json @@ -78304,18 +90871,22 @@ def test_dedicated_host_profile_socket_range_serialization(self): dedicated_host_profile_socket_range_model_json['type'] = 'range' # Construct a model instance of DedicatedHostProfileSocketRange by calling from_dict on the json representation - dedicated_host_profile_socket_range_model = DedicatedHostProfileSocketRange.from_dict(dedicated_host_profile_socket_range_model_json) + dedicated_host_profile_socket_range_model = DedicatedHostProfileSocketRange.from_dict( + dedicated_host_profile_socket_range_model_json) assert dedicated_host_profile_socket_range_model != False # Construct a model instance of DedicatedHostProfileSocketRange by calling from_dict on the json representation - dedicated_host_profile_socket_range_model_dict = DedicatedHostProfileSocketRange.from_dict(dedicated_host_profile_socket_range_model_json).__dict__ - dedicated_host_profile_socket_range_model2 = DedicatedHostProfileSocketRange(**dedicated_host_profile_socket_range_model_dict) + dedicated_host_profile_socket_range_model_dict = DedicatedHostProfileSocketRange.from_dict( + dedicated_host_profile_socket_range_model_json).__dict__ + dedicated_host_profile_socket_range_model2 = DedicatedHostProfileSocketRange( + **dedicated_host_profile_socket_range_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_socket_range_model == dedicated_host_profile_socket_range_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_socket_range_model_json2 = dedicated_host_profile_socket_range_model.to_dict() + dedicated_host_profile_socket_range_model_json2 = dedicated_host_profile_socket_range_model.to_dict( + ) assert dedicated_host_profile_socket_range_model_json2 == dedicated_host_profile_socket_range_model_json @@ -78334,18 +90905,22 @@ def test_dedicated_host_profile_vcpu_dependent_serialization(self): dedicated_host_profile_vcpu_dependent_model_json['type'] = 'dependent' # Construct a model instance of DedicatedHostProfileVCPUDependent by calling from_dict on the json representation - dedicated_host_profile_vcpu_dependent_model = DedicatedHostProfileVCPUDependent.from_dict(dedicated_host_profile_vcpu_dependent_model_json) + dedicated_host_profile_vcpu_dependent_model = DedicatedHostProfileVCPUDependent.from_dict( + dedicated_host_profile_vcpu_dependent_model_json) assert dedicated_host_profile_vcpu_dependent_model != False # Construct a model instance of DedicatedHostProfileVCPUDependent by calling from_dict on the json representation - dedicated_host_profile_vcpu_dependent_model_dict = DedicatedHostProfileVCPUDependent.from_dict(dedicated_host_profile_vcpu_dependent_model_json).__dict__ - dedicated_host_profile_vcpu_dependent_model2 = DedicatedHostProfileVCPUDependent(**dedicated_host_profile_vcpu_dependent_model_dict) + dedicated_host_profile_vcpu_dependent_model_dict = DedicatedHostProfileVCPUDependent.from_dict( + dedicated_host_profile_vcpu_dependent_model_json).__dict__ + dedicated_host_profile_vcpu_dependent_model2 = DedicatedHostProfileVCPUDependent( + **dedicated_host_profile_vcpu_dependent_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_vcpu_dependent_model == dedicated_host_profile_vcpu_dependent_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_vcpu_dependent_model_json2 = dedicated_host_profile_vcpu_dependent_model.to_dict() + dedicated_host_profile_vcpu_dependent_model_json2 = dedicated_host_profile_vcpu_dependent_model.to_dict( + ) assert dedicated_host_profile_vcpu_dependent_model_json2 == dedicated_host_profile_vcpu_dependent_model_json @@ -78366,18 +90941,22 @@ def test_dedicated_host_profile_vcpu_enum_serialization(self): dedicated_host_profile_vcpu_enum_model_json['values'] = [2, 4, 16] # Construct a model instance of DedicatedHostProfileVCPUEnum by calling from_dict on the json representation - dedicated_host_profile_vcpu_enum_model = DedicatedHostProfileVCPUEnum.from_dict(dedicated_host_profile_vcpu_enum_model_json) + dedicated_host_profile_vcpu_enum_model = DedicatedHostProfileVCPUEnum.from_dict( + dedicated_host_profile_vcpu_enum_model_json) assert dedicated_host_profile_vcpu_enum_model != False # Construct a model instance of DedicatedHostProfileVCPUEnum by calling from_dict on the json representation - dedicated_host_profile_vcpu_enum_model_dict = DedicatedHostProfileVCPUEnum.from_dict(dedicated_host_profile_vcpu_enum_model_json).__dict__ - dedicated_host_profile_vcpu_enum_model2 = DedicatedHostProfileVCPUEnum(**dedicated_host_profile_vcpu_enum_model_dict) + dedicated_host_profile_vcpu_enum_model_dict = DedicatedHostProfileVCPUEnum.from_dict( + dedicated_host_profile_vcpu_enum_model_json).__dict__ + dedicated_host_profile_vcpu_enum_model2 = DedicatedHostProfileVCPUEnum( + **dedicated_host_profile_vcpu_enum_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_vcpu_enum_model == dedicated_host_profile_vcpu_enum_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_vcpu_enum_model_json2 = dedicated_host_profile_vcpu_enum_model.to_dict() + dedicated_host_profile_vcpu_enum_model_json2 = dedicated_host_profile_vcpu_enum_model.to_dict( + ) assert dedicated_host_profile_vcpu_enum_model_json2 == dedicated_host_profile_vcpu_enum_model_json @@ -78397,18 +90976,22 @@ def test_dedicated_host_profile_vcpu_fixed_serialization(self): dedicated_host_profile_vcpu_fixed_model_json['value'] = 16 # Construct a model instance of DedicatedHostProfileVCPUFixed by calling from_dict on the json representation - dedicated_host_profile_vcpu_fixed_model = DedicatedHostProfileVCPUFixed.from_dict(dedicated_host_profile_vcpu_fixed_model_json) + dedicated_host_profile_vcpu_fixed_model = DedicatedHostProfileVCPUFixed.from_dict( + dedicated_host_profile_vcpu_fixed_model_json) assert dedicated_host_profile_vcpu_fixed_model != False # Construct a model instance of DedicatedHostProfileVCPUFixed by calling from_dict on the json representation - dedicated_host_profile_vcpu_fixed_model_dict = DedicatedHostProfileVCPUFixed.from_dict(dedicated_host_profile_vcpu_fixed_model_json).__dict__ - dedicated_host_profile_vcpu_fixed_model2 = DedicatedHostProfileVCPUFixed(**dedicated_host_profile_vcpu_fixed_model_dict) + dedicated_host_profile_vcpu_fixed_model_dict = DedicatedHostProfileVCPUFixed.from_dict( + dedicated_host_profile_vcpu_fixed_model_json).__dict__ + dedicated_host_profile_vcpu_fixed_model2 = DedicatedHostProfileVCPUFixed( + **dedicated_host_profile_vcpu_fixed_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_vcpu_fixed_model == dedicated_host_profile_vcpu_fixed_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_vcpu_fixed_model_json2 = dedicated_host_profile_vcpu_fixed_model.to_dict() + dedicated_host_profile_vcpu_fixed_model_json2 = dedicated_host_profile_vcpu_fixed_model.to_dict( + ) assert dedicated_host_profile_vcpu_fixed_model_json2 == dedicated_host_profile_vcpu_fixed_model_json @@ -78431,18 +91014,22 @@ def test_dedicated_host_profile_vcpu_range_serialization(self): dedicated_host_profile_vcpu_range_model_json['type'] = 'range' # Construct a model instance of DedicatedHostProfileVCPURange by calling from_dict on the json representation - dedicated_host_profile_vcpu_range_model = DedicatedHostProfileVCPURange.from_dict(dedicated_host_profile_vcpu_range_model_json) + dedicated_host_profile_vcpu_range_model = DedicatedHostProfileVCPURange.from_dict( + dedicated_host_profile_vcpu_range_model_json) assert dedicated_host_profile_vcpu_range_model != False # Construct a model instance of DedicatedHostProfileVCPURange by calling from_dict on the json representation - dedicated_host_profile_vcpu_range_model_dict = DedicatedHostProfileVCPURange.from_dict(dedicated_host_profile_vcpu_range_model_json).__dict__ - dedicated_host_profile_vcpu_range_model2 = DedicatedHostProfileVCPURange(**dedicated_host_profile_vcpu_range_model_dict) + dedicated_host_profile_vcpu_range_model_dict = DedicatedHostProfileVCPURange.from_dict( + dedicated_host_profile_vcpu_range_model_json).__dict__ + dedicated_host_profile_vcpu_range_model2 = DedicatedHostProfileVCPURange( + **dedicated_host_profile_vcpu_range_model_dict) # Verify the model instances are equivalent assert dedicated_host_profile_vcpu_range_model == dedicated_host_profile_vcpu_range_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_profile_vcpu_range_model_json2 = dedicated_host_profile_vcpu_range_model.to_dict() + dedicated_host_profile_vcpu_range_model_json2 = dedicated_host_profile_vcpu_range_model.to_dict( + ) assert dedicated_host_profile_vcpu_range_model_json2 == dedicated_host_profile_vcpu_range_model_json @@ -78451,43 +91038,57 @@ class TestModel_DedicatedHostPrototypeDedicatedHostByGroup: Test Class for DedicatedHostPrototypeDedicatedHostByGroup """ - def test_dedicated_host_prototype_dedicated_host_by_group_serialization(self): + def test_dedicated_host_prototype_dedicated_host_by_group_serialization( + self): """ Test serialization/deserialization for DedicatedHostPrototypeDedicatedHostByGroup """ # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_profile_identity_model = {} # DedicatedHostProfileIdentityByName + dedicated_host_profile_identity_model = { + } # DedicatedHostProfileIdentityByName dedicated_host_profile_identity_model['name'] = 'mx2-host-152x1216' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - dedicated_host_group_identity_model = {} # DedicatedHostGroupIdentityById - dedicated_host_group_identity_model['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + dedicated_host_group_identity_model = { + } # DedicatedHostGroupIdentityById + dedicated_host_group_identity_model[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a json representation of a DedicatedHostPrototypeDedicatedHostByGroup model dedicated_host_prototype_dedicated_host_by_group_model_json = {} - dedicated_host_prototype_dedicated_host_by_group_model_json['instance_placement_enabled'] = True - dedicated_host_prototype_dedicated_host_by_group_model_json['name'] = 'my-host' - dedicated_host_prototype_dedicated_host_by_group_model_json['profile'] = dedicated_host_profile_identity_model - dedicated_host_prototype_dedicated_host_by_group_model_json['resource_group'] = resource_group_identity_model - dedicated_host_prototype_dedicated_host_by_group_model_json['group'] = dedicated_host_group_identity_model + dedicated_host_prototype_dedicated_host_by_group_model_json[ + 'instance_placement_enabled'] = True + dedicated_host_prototype_dedicated_host_by_group_model_json[ + 'name'] = 'my-host' + dedicated_host_prototype_dedicated_host_by_group_model_json[ + 'profile'] = dedicated_host_profile_identity_model + dedicated_host_prototype_dedicated_host_by_group_model_json[ + 'resource_group'] = resource_group_identity_model + dedicated_host_prototype_dedicated_host_by_group_model_json[ + 'group'] = dedicated_host_group_identity_model # Construct a model instance of DedicatedHostPrototypeDedicatedHostByGroup by calling from_dict on the json representation - dedicated_host_prototype_dedicated_host_by_group_model = DedicatedHostPrototypeDedicatedHostByGroup.from_dict(dedicated_host_prototype_dedicated_host_by_group_model_json) + dedicated_host_prototype_dedicated_host_by_group_model = DedicatedHostPrototypeDedicatedHostByGroup.from_dict( + dedicated_host_prototype_dedicated_host_by_group_model_json) assert dedicated_host_prototype_dedicated_host_by_group_model != False # Construct a model instance of DedicatedHostPrototypeDedicatedHostByGroup by calling from_dict on the json representation - dedicated_host_prototype_dedicated_host_by_group_model_dict = DedicatedHostPrototypeDedicatedHostByGroup.from_dict(dedicated_host_prototype_dedicated_host_by_group_model_json).__dict__ - dedicated_host_prototype_dedicated_host_by_group_model2 = DedicatedHostPrototypeDedicatedHostByGroup(**dedicated_host_prototype_dedicated_host_by_group_model_dict) + dedicated_host_prototype_dedicated_host_by_group_model_dict = DedicatedHostPrototypeDedicatedHostByGroup.from_dict( + dedicated_host_prototype_dedicated_host_by_group_model_json + ).__dict__ + dedicated_host_prototype_dedicated_host_by_group_model2 = DedicatedHostPrototypeDedicatedHostByGroup( + **dedicated_host_prototype_dedicated_host_by_group_model_dict) # Verify the model instances are equivalent assert dedicated_host_prototype_dedicated_host_by_group_model == dedicated_host_prototype_dedicated_host_by_group_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_prototype_dedicated_host_by_group_model_json2 = dedicated_host_prototype_dedicated_host_by_group_model.to_dict() + dedicated_host_prototype_dedicated_host_by_group_model_json2 = dedicated_host_prototype_dedicated_host_by_group_model.to_dict( + ) assert dedicated_host_prototype_dedicated_host_by_group_model_json2 == dedicated_host_prototype_dedicated_host_by_group_model_json @@ -78496,48 +91097,63 @@ class TestModel_DedicatedHostPrototypeDedicatedHostByZone: Test Class for DedicatedHostPrototypeDedicatedHostByZone """ - def test_dedicated_host_prototype_dedicated_host_by_zone_serialization(self): + def test_dedicated_host_prototype_dedicated_host_by_zone_serialization( + self): """ Test serialization/deserialization for DedicatedHostPrototypeDedicatedHostByZone """ # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_profile_identity_model = {} # DedicatedHostProfileIdentityByName + dedicated_host_profile_identity_model = { + } # DedicatedHostProfileIdentityByName dedicated_host_profile_identity_model['name'] = 'mx2-host-152x1216' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - dedicated_host_group_prototype_dedicated_host_by_zone_context_model = {} # DedicatedHostGroupPrototypeDedicatedHostByZoneContext - dedicated_host_group_prototype_dedicated_host_by_zone_context_model['name'] = 'my-host-group' - dedicated_host_group_prototype_dedicated_host_by_zone_context_model['resource_group'] = resource_group_identity_model + dedicated_host_group_prototype_dedicated_host_by_zone_context_model = { + } # DedicatedHostGroupPrototypeDedicatedHostByZoneContext + dedicated_host_group_prototype_dedicated_host_by_zone_context_model[ + 'name'] = 'my-host-group' + dedicated_host_group_prototype_dedicated_host_by_zone_context_model[ + 'resource_group'] = resource_group_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' # Construct a json representation of a DedicatedHostPrototypeDedicatedHostByZone model dedicated_host_prototype_dedicated_host_by_zone_model_json = {} - dedicated_host_prototype_dedicated_host_by_zone_model_json['instance_placement_enabled'] = True - dedicated_host_prototype_dedicated_host_by_zone_model_json['name'] = 'my-host' - dedicated_host_prototype_dedicated_host_by_zone_model_json['profile'] = dedicated_host_profile_identity_model - dedicated_host_prototype_dedicated_host_by_zone_model_json['resource_group'] = resource_group_identity_model - dedicated_host_prototype_dedicated_host_by_zone_model_json['group'] = dedicated_host_group_prototype_dedicated_host_by_zone_context_model - dedicated_host_prototype_dedicated_host_by_zone_model_json['zone'] = zone_identity_model + dedicated_host_prototype_dedicated_host_by_zone_model_json[ + 'instance_placement_enabled'] = True + dedicated_host_prototype_dedicated_host_by_zone_model_json[ + 'name'] = 'my-host' + dedicated_host_prototype_dedicated_host_by_zone_model_json[ + 'profile'] = dedicated_host_profile_identity_model + dedicated_host_prototype_dedicated_host_by_zone_model_json[ + 'resource_group'] = resource_group_identity_model + dedicated_host_prototype_dedicated_host_by_zone_model_json[ + 'group'] = dedicated_host_group_prototype_dedicated_host_by_zone_context_model + dedicated_host_prototype_dedicated_host_by_zone_model_json[ + 'zone'] = zone_identity_model # Construct a model instance of DedicatedHostPrototypeDedicatedHostByZone by calling from_dict on the json representation - dedicated_host_prototype_dedicated_host_by_zone_model = DedicatedHostPrototypeDedicatedHostByZone.from_dict(dedicated_host_prototype_dedicated_host_by_zone_model_json) + dedicated_host_prototype_dedicated_host_by_zone_model = DedicatedHostPrototypeDedicatedHostByZone.from_dict( + dedicated_host_prototype_dedicated_host_by_zone_model_json) assert dedicated_host_prototype_dedicated_host_by_zone_model != False # Construct a model instance of DedicatedHostPrototypeDedicatedHostByZone by calling from_dict on the json representation - dedicated_host_prototype_dedicated_host_by_zone_model_dict = DedicatedHostPrototypeDedicatedHostByZone.from_dict(dedicated_host_prototype_dedicated_host_by_zone_model_json).__dict__ - dedicated_host_prototype_dedicated_host_by_zone_model2 = DedicatedHostPrototypeDedicatedHostByZone(**dedicated_host_prototype_dedicated_host_by_zone_model_dict) + dedicated_host_prototype_dedicated_host_by_zone_model_dict = DedicatedHostPrototypeDedicatedHostByZone.from_dict( + dedicated_host_prototype_dedicated_host_by_zone_model_json).__dict__ + dedicated_host_prototype_dedicated_host_by_zone_model2 = DedicatedHostPrototypeDedicatedHostByZone( + **dedicated_host_prototype_dedicated_host_by_zone_model_dict) # Verify the model instances are equivalent assert dedicated_host_prototype_dedicated_host_by_zone_model == dedicated_host_prototype_dedicated_host_by_zone_model2 # Convert model instance back to dict and verify no loss of data - dedicated_host_prototype_dedicated_host_by_zone_model_json2 = dedicated_host_prototype_dedicated_host_by_zone_model.to_dict() + dedicated_host_prototype_dedicated_host_by_zone_model_json2 = dedicated_host_prototype_dedicated_host_by_zone_model.to_dict( + ) assert dedicated_host_prototype_dedicated_host_by_zone_model_json2 == dedicated_host_prototype_dedicated_host_by_zone_model_json @@ -78553,21 +91169,26 @@ def test_encryption_key_identity_by_crn_serialization(self): # Construct a json representation of a EncryptionKeyIdentityByCRN model encryption_key_identity_by_crn_model_json = {} - encryption_key_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a model instance of EncryptionKeyIdentityByCRN by calling from_dict on the json representation - encryption_key_identity_by_crn_model = EncryptionKeyIdentityByCRN.from_dict(encryption_key_identity_by_crn_model_json) + encryption_key_identity_by_crn_model = EncryptionKeyIdentityByCRN.from_dict( + encryption_key_identity_by_crn_model_json) assert encryption_key_identity_by_crn_model != False # Construct a model instance of EncryptionKeyIdentityByCRN by calling from_dict on the json representation - encryption_key_identity_by_crn_model_dict = EncryptionKeyIdentityByCRN.from_dict(encryption_key_identity_by_crn_model_json).__dict__ - encryption_key_identity_by_crn_model2 = EncryptionKeyIdentityByCRN(**encryption_key_identity_by_crn_model_dict) + encryption_key_identity_by_crn_model_dict = EncryptionKeyIdentityByCRN.from_dict( + encryption_key_identity_by_crn_model_json).__dict__ + encryption_key_identity_by_crn_model2 = EncryptionKeyIdentityByCRN( + **encryption_key_identity_by_crn_model_dict) # Verify the model instances are equivalent assert encryption_key_identity_by_crn_model == encryption_key_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - encryption_key_identity_by_crn_model_json2 = encryption_key_identity_by_crn_model.to_dict() + encryption_key_identity_by_crn_model_json2 = encryption_key_identity_by_crn_model.to_dict( + ) assert encryption_key_identity_by_crn_model_json2 == encryption_key_identity_by_crn_model_json @@ -78576,7 +91197,8 @@ class TestModel_EndpointGatewayReservedIPReservedIPPrototypeTargetContext: Test Class for EndpointGatewayReservedIPReservedIPPrototypeTargetContext """ - def test_endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_serialization(self): + def test_endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_serialization( + self): """ Test serialization/deserialization for EndpointGatewayReservedIPReservedIPPrototypeTargetContext """ @@ -78584,28 +91206,41 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_seria # Construct dict forms of any model objects needed in order to build this model. subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a EndpointGatewayReservedIPReservedIPPrototypeTargetContext model endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json = {} - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json['address'] = '192.168.3.4' - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json['auto_delete'] = False - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json['name'] = 'my-reserved-ip' - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json['subnet'] = subnet_identity_model + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json[ + 'address'] = '192.168.3.4' + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json[ + 'auto_delete'] = False + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json[ + 'name'] = 'my-reserved-ip' + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json[ + 'subnet'] = subnet_identity_model # Construct a model instance of EndpointGatewayReservedIPReservedIPPrototypeTargetContext by calling from_dict on the json representation - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model = EndpointGatewayReservedIPReservedIPPrototypeTargetContext.from_dict(endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json) + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model = EndpointGatewayReservedIPReservedIPPrototypeTargetContext.from_dict( + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json + ) assert endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model != False # Construct a model instance of EndpointGatewayReservedIPReservedIPPrototypeTargetContext by calling from_dict on the json representation - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_dict = EndpointGatewayReservedIPReservedIPPrototypeTargetContext.from_dict(endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json).__dict__ - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model2 = EndpointGatewayReservedIPReservedIPPrototypeTargetContext(**endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_dict) + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_dict = EndpointGatewayReservedIPReservedIPPrototypeTargetContext.from_dict( + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json + ).__dict__ + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model2 = EndpointGatewayReservedIPReservedIPPrototypeTargetContext( + ** + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_dict + ) # Verify the model instances are equivalent assert endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model == endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model.to_dict() + endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model.to_dict( + ) assert endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json2 == endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json @@ -78614,29 +91249,38 @@ class TestModel_EndpointGatewayTargetProviderCloudServiceReference: Test Class for EndpointGatewayTargetProviderCloudServiceReference """ - def test_endpoint_gateway_target_provider_cloud_service_reference_serialization(self): + def test_endpoint_gateway_target_provider_cloud_service_reference_serialization( + self): """ Test serialization/deserialization for EndpointGatewayTargetProviderCloudServiceReference """ # Construct a json representation of a EndpointGatewayTargetProviderCloudServiceReference model endpoint_gateway_target_provider_cloud_service_reference_model_json = {} - endpoint_gateway_target_provider_cloud_service_reference_model_json['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' - endpoint_gateway_target_provider_cloud_service_reference_model_json['resource_type'] = 'provider_cloud_service' + endpoint_gateway_target_provider_cloud_service_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' + endpoint_gateway_target_provider_cloud_service_reference_model_json[ + 'resource_type'] = 'provider_cloud_service' # Construct a model instance of EndpointGatewayTargetProviderCloudServiceReference by calling from_dict on the json representation - endpoint_gateway_target_provider_cloud_service_reference_model = EndpointGatewayTargetProviderCloudServiceReference.from_dict(endpoint_gateway_target_provider_cloud_service_reference_model_json) + endpoint_gateway_target_provider_cloud_service_reference_model = EndpointGatewayTargetProviderCloudServiceReference.from_dict( + endpoint_gateway_target_provider_cloud_service_reference_model_json) assert endpoint_gateway_target_provider_cloud_service_reference_model != False # Construct a model instance of EndpointGatewayTargetProviderCloudServiceReference by calling from_dict on the json representation - endpoint_gateway_target_provider_cloud_service_reference_model_dict = EndpointGatewayTargetProviderCloudServiceReference.from_dict(endpoint_gateway_target_provider_cloud_service_reference_model_json).__dict__ - endpoint_gateway_target_provider_cloud_service_reference_model2 = EndpointGatewayTargetProviderCloudServiceReference(**endpoint_gateway_target_provider_cloud_service_reference_model_dict) + endpoint_gateway_target_provider_cloud_service_reference_model_dict = EndpointGatewayTargetProviderCloudServiceReference.from_dict( + endpoint_gateway_target_provider_cloud_service_reference_model_json + ).__dict__ + endpoint_gateway_target_provider_cloud_service_reference_model2 = EndpointGatewayTargetProviderCloudServiceReference( + ** + endpoint_gateway_target_provider_cloud_service_reference_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_target_provider_cloud_service_reference_model == endpoint_gateway_target_provider_cloud_service_reference_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_provider_cloud_service_reference_model_json2 = endpoint_gateway_target_provider_cloud_service_reference_model.to_dict() + endpoint_gateway_target_provider_cloud_service_reference_model_json2 = endpoint_gateway_target_provider_cloud_service_reference_model.to_dict( + ) assert endpoint_gateway_target_provider_cloud_service_reference_model_json2 == endpoint_gateway_target_provider_cloud_service_reference_model_json @@ -78645,29 +91289,40 @@ class TestModel_EndpointGatewayTargetProviderInfrastructureServiceReference: Test Class for EndpointGatewayTargetProviderInfrastructureServiceReference """ - def test_endpoint_gateway_target_provider_infrastructure_service_reference_serialization(self): + def test_endpoint_gateway_target_provider_infrastructure_service_reference_serialization( + self): """ Test serialization/deserialization for EndpointGatewayTargetProviderInfrastructureServiceReference """ # Construct a json representation of a EndpointGatewayTargetProviderInfrastructureServiceReference model endpoint_gateway_target_provider_infrastructure_service_reference_model_json = {} - endpoint_gateway_target_provider_infrastructure_service_reference_model_json['name'] = 'ibm-ntp-server' - endpoint_gateway_target_provider_infrastructure_service_reference_model_json['resource_type'] = 'provider_infrastructure_service' + endpoint_gateway_target_provider_infrastructure_service_reference_model_json[ + 'name'] = 'ibm-ntp-server' + endpoint_gateway_target_provider_infrastructure_service_reference_model_json[ + 'resource_type'] = 'provider_infrastructure_service' # Construct a model instance of EndpointGatewayTargetProviderInfrastructureServiceReference by calling from_dict on the json representation - endpoint_gateway_target_provider_infrastructure_service_reference_model = EndpointGatewayTargetProviderInfrastructureServiceReference.from_dict(endpoint_gateway_target_provider_infrastructure_service_reference_model_json) + endpoint_gateway_target_provider_infrastructure_service_reference_model = EndpointGatewayTargetProviderInfrastructureServiceReference.from_dict( + endpoint_gateway_target_provider_infrastructure_service_reference_model_json + ) assert endpoint_gateway_target_provider_infrastructure_service_reference_model != False # Construct a model instance of EndpointGatewayTargetProviderInfrastructureServiceReference by calling from_dict on the json representation - endpoint_gateway_target_provider_infrastructure_service_reference_model_dict = EndpointGatewayTargetProviderInfrastructureServiceReference.from_dict(endpoint_gateway_target_provider_infrastructure_service_reference_model_json).__dict__ - endpoint_gateway_target_provider_infrastructure_service_reference_model2 = EndpointGatewayTargetProviderInfrastructureServiceReference(**endpoint_gateway_target_provider_infrastructure_service_reference_model_dict) + endpoint_gateway_target_provider_infrastructure_service_reference_model_dict = EndpointGatewayTargetProviderInfrastructureServiceReference.from_dict( + endpoint_gateway_target_provider_infrastructure_service_reference_model_json + ).__dict__ + endpoint_gateway_target_provider_infrastructure_service_reference_model2 = EndpointGatewayTargetProviderInfrastructureServiceReference( + ** + endpoint_gateway_target_provider_infrastructure_service_reference_model_dict + ) # Verify the model instances are equivalent assert endpoint_gateway_target_provider_infrastructure_service_reference_model == endpoint_gateway_target_provider_infrastructure_service_reference_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_provider_infrastructure_service_reference_model_json2 = endpoint_gateway_target_provider_infrastructure_service_reference_model.to_dict() + endpoint_gateway_target_provider_infrastructure_service_reference_model_json2 = endpoint_gateway_target_provider_infrastructure_service_reference_model.to_dict( + ) assert endpoint_gateway_target_provider_infrastructure_service_reference_model_json2 == endpoint_gateway_target_provider_infrastructure_service_reference_model_json @@ -78686,28 +91341,37 @@ def test_floating_ip_prototype_floating_ip_by_target_serialization(self): resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - floating_ip_target_prototype_model = {} # FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById - floating_ip_target_prototype_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_prototype_model = { + } # FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById + floating_ip_target_prototype_model[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a json representation of a FloatingIPPrototypeFloatingIPByTarget model floating_ip_prototype_floating_ip_by_target_model_json = {} - floating_ip_prototype_floating_ip_by_target_model_json['name'] = 'my-floating-ip' - floating_ip_prototype_floating_ip_by_target_model_json['resource_group'] = resource_group_identity_model - floating_ip_prototype_floating_ip_by_target_model_json['target'] = floating_ip_target_prototype_model + floating_ip_prototype_floating_ip_by_target_model_json[ + 'name'] = 'my-floating-ip' + floating_ip_prototype_floating_ip_by_target_model_json[ + 'resource_group'] = resource_group_identity_model + floating_ip_prototype_floating_ip_by_target_model_json[ + 'target'] = floating_ip_target_prototype_model # Construct a model instance of FloatingIPPrototypeFloatingIPByTarget by calling from_dict on the json representation - floating_ip_prototype_floating_ip_by_target_model = FloatingIPPrototypeFloatingIPByTarget.from_dict(floating_ip_prototype_floating_ip_by_target_model_json) + floating_ip_prototype_floating_ip_by_target_model = FloatingIPPrototypeFloatingIPByTarget.from_dict( + floating_ip_prototype_floating_ip_by_target_model_json) assert floating_ip_prototype_floating_ip_by_target_model != False # Construct a model instance of FloatingIPPrototypeFloatingIPByTarget by calling from_dict on the json representation - floating_ip_prototype_floating_ip_by_target_model_dict = FloatingIPPrototypeFloatingIPByTarget.from_dict(floating_ip_prototype_floating_ip_by_target_model_json).__dict__ - floating_ip_prototype_floating_ip_by_target_model2 = FloatingIPPrototypeFloatingIPByTarget(**floating_ip_prototype_floating_ip_by_target_model_dict) + floating_ip_prototype_floating_ip_by_target_model_dict = FloatingIPPrototypeFloatingIPByTarget.from_dict( + floating_ip_prototype_floating_ip_by_target_model_json).__dict__ + floating_ip_prototype_floating_ip_by_target_model2 = FloatingIPPrototypeFloatingIPByTarget( + **floating_ip_prototype_floating_ip_by_target_model_dict) # Verify the model instances are equivalent assert floating_ip_prototype_floating_ip_by_target_model == floating_ip_prototype_floating_ip_by_target_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_prototype_floating_ip_by_target_model_json2 = floating_ip_prototype_floating_ip_by_target_model.to_dict() + floating_ip_prototype_floating_ip_by_target_model_json2 = floating_ip_prototype_floating_ip_by_target_model.to_dict( + ) assert floating_ip_prototype_floating_ip_by_target_model_json2 == floating_ip_prototype_floating_ip_by_target_model_json @@ -78731,23 +91395,30 @@ def test_floating_ip_prototype_floating_ip_by_zone_serialization(self): # Construct a json representation of a FloatingIPPrototypeFloatingIPByZone model floating_ip_prototype_floating_ip_by_zone_model_json = {} - floating_ip_prototype_floating_ip_by_zone_model_json['name'] = 'my-floating-ip' - floating_ip_prototype_floating_ip_by_zone_model_json['resource_group'] = resource_group_identity_model - floating_ip_prototype_floating_ip_by_zone_model_json['zone'] = zone_identity_model + floating_ip_prototype_floating_ip_by_zone_model_json[ + 'name'] = 'my-floating-ip' + floating_ip_prototype_floating_ip_by_zone_model_json[ + 'resource_group'] = resource_group_identity_model + floating_ip_prototype_floating_ip_by_zone_model_json[ + 'zone'] = zone_identity_model # Construct a model instance of FloatingIPPrototypeFloatingIPByZone by calling from_dict on the json representation - floating_ip_prototype_floating_ip_by_zone_model = FloatingIPPrototypeFloatingIPByZone.from_dict(floating_ip_prototype_floating_ip_by_zone_model_json) + floating_ip_prototype_floating_ip_by_zone_model = FloatingIPPrototypeFloatingIPByZone.from_dict( + floating_ip_prototype_floating_ip_by_zone_model_json) assert floating_ip_prototype_floating_ip_by_zone_model != False # Construct a model instance of FloatingIPPrototypeFloatingIPByZone by calling from_dict on the json representation - floating_ip_prototype_floating_ip_by_zone_model_dict = FloatingIPPrototypeFloatingIPByZone.from_dict(floating_ip_prototype_floating_ip_by_zone_model_json).__dict__ - floating_ip_prototype_floating_ip_by_zone_model2 = FloatingIPPrototypeFloatingIPByZone(**floating_ip_prototype_floating_ip_by_zone_model_dict) + floating_ip_prototype_floating_ip_by_zone_model_dict = FloatingIPPrototypeFloatingIPByZone.from_dict( + floating_ip_prototype_floating_ip_by_zone_model_json).__dict__ + floating_ip_prototype_floating_ip_by_zone_model2 = FloatingIPPrototypeFloatingIPByZone( + **floating_ip_prototype_floating_ip_by_zone_model_dict) # Verify the model instances are equivalent assert floating_ip_prototype_floating_ip_by_zone_model == floating_ip_prototype_floating_ip_by_zone_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_prototype_floating_ip_by_zone_model_json2 = floating_ip_prototype_floating_ip_by_zone_model.to_dict() + floating_ip_prototype_floating_ip_by_zone_model_json2 = floating_ip_prototype_floating_ip_by_zone_model.to_dict( + ) assert floating_ip_prototype_floating_ip_by_zone_model_json2 == floating_ip_prototype_floating_ip_by_zone_model_json @@ -78756,49 +91427,70 @@ class TestModel_FloatingIPTargetBareMetalServerNetworkInterfaceReference: Test Class for FloatingIPTargetBareMetalServerNetworkInterfaceReference """ - def test_floating_ip_target_bare_metal_server_network_interface_reference_serialization(self): + def test_floating_ip_target_bare_metal_server_network_interface_reference_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetBareMetalServerNetworkInterfaceReference """ # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_network_interface_reference_deleted_model = {} # BareMetalServerNetworkInterfaceReferenceDeleted - bare_metal_server_network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_network_interface_reference_deleted_model = { + } # BareMetalServerNetworkInterfaceReferenceDeleted + bare_metal_server_network_interface_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' # Construct a json representation of a FloatingIPTargetBareMetalServerNetworkInterfaceReference model floating_ip_target_bare_metal_server_network_interface_reference_model_json = {} - floating_ip_target_bare_metal_server_network_interface_reference_model_json['deleted'] = bare_metal_server_network_interface_reference_deleted_model - floating_ip_target_bare_metal_server_network_interface_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - floating_ip_target_bare_metal_server_network_interface_reference_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - floating_ip_target_bare_metal_server_network_interface_reference_model_json['name'] = 'my-bare-metal-server-network-interface' - floating_ip_target_bare_metal_server_network_interface_reference_model_json['primary_ip'] = reserved_ip_reference_model - floating_ip_target_bare_metal_server_network_interface_reference_model_json['resource_type'] = 'network_interface' + floating_ip_target_bare_metal_server_network_interface_reference_model_json[ + 'deleted'] = bare_metal_server_network_interface_reference_deleted_model + floating_ip_target_bare_metal_server_network_interface_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_bare_metal_server_network_interface_reference_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_bare_metal_server_network_interface_reference_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + floating_ip_target_bare_metal_server_network_interface_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + floating_ip_target_bare_metal_server_network_interface_reference_model_json[ + 'resource_type'] = 'network_interface' # Construct a model instance of FloatingIPTargetBareMetalServerNetworkInterfaceReference by calling from_dict on the json representation - floating_ip_target_bare_metal_server_network_interface_reference_model = FloatingIPTargetBareMetalServerNetworkInterfaceReference.from_dict(floating_ip_target_bare_metal_server_network_interface_reference_model_json) + floating_ip_target_bare_metal_server_network_interface_reference_model = FloatingIPTargetBareMetalServerNetworkInterfaceReference.from_dict( + floating_ip_target_bare_metal_server_network_interface_reference_model_json + ) assert floating_ip_target_bare_metal_server_network_interface_reference_model != False # Construct a model instance of FloatingIPTargetBareMetalServerNetworkInterfaceReference by calling from_dict on the json representation - floating_ip_target_bare_metal_server_network_interface_reference_model_dict = FloatingIPTargetBareMetalServerNetworkInterfaceReference.from_dict(floating_ip_target_bare_metal_server_network_interface_reference_model_json).__dict__ - floating_ip_target_bare_metal_server_network_interface_reference_model2 = FloatingIPTargetBareMetalServerNetworkInterfaceReference(**floating_ip_target_bare_metal_server_network_interface_reference_model_dict) + floating_ip_target_bare_metal_server_network_interface_reference_model_dict = FloatingIPTargetBareMetalServerNetworkInterfaceReference.from_dict( + floating_ip_target_bare_metal_server_network_interface_reference_model_json + ).__dict__ + floating_ip_target_bare_metal_server_network_interface_reference_model2 = FloatingIPTargetBareMetalServerNetworkInterfaceReference( + ** + floating_ip_target_bare_metal_server_network_interface_reference_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_bare_metal_server_network_interface_reference_model == floating_ip_target_bare_metal_server_network_interface_reference_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_bare_metal_server_network_interface_reference_model_json2 = floating_ip_target_bare_metal_server_network_interface_reference_model.to_dict() + floating_ip_target_bare_metal_server_network_interface_reference_model_json2 = floating_ip_target_bare_metal_server_network_interface_reference_model.to_dict( + ) assert floating_ip_target_bare_metal_server_network_interface_reference_model_json2 == floating_ip_target_bare_metal_server_network_interface_reference_model_json @@ -78814,42 +91506,58 @@ def test_floating_ip_target_network_interface_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted - network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_deleted_model = { + } # NetworkInterfaceReferenceDeleted + network_interface_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.240.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' # Construct a json representation of a FloatingIPTargetNetworkInterfaceReference model floating_ip_target_network_interface_reference_model_json = {} - floating_ip_target_network_interface_reference_model_json['deleted'] = network_interface_reference_deleted_model - floating_ip_target_network_interface_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - floating_ip_target_network_interface_reference_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - floating_ip_target_network_interface_reference_model_json['name'] = 'my-instance-network-interface' - floating_ip_target_network_interface_reference_model_json['primary_ip'] = reserved_ip_reference_model - floating_ip_target_network_interface_reference_model_json['resource_type'] = 'network_interface' + floating_ip_target_network_interface_reference_model_json[ + 'deleted'] = network_interface_reference_deleted_model + floating_ip_target_network_interface_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_network_interface_reference_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_network_interface_reference_model_json[ + 'name'] = 'my-instance-network-interface' + floating_ip_target_network_interface_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + floating_ip_target_network_interface_reference_model_json[ + 'resource_type'] = 'network_interface' # Construct a model instance of FloatingIPTargetNetworkInterfaceReference by calling from_dict on the json representation - floating_ip_target_network_interface_reference_model = FloatingIPTargetNetworkInterfaceReference.from_dict(floating_ip_target_network_interface_reference_model_json) + floating_ip_target_network_interface_reference_model = FloatingIPTargetNetworkInterfaceReference.from_dict( + floating_ip_target_network_interface_reference_model_json) assert floating_ip_target_network_interface_reference_model != False # Construct a model instance of FloatingIPTargetNetworkInterfaceReference by calling from_dict on the json representation - floating_ip_target_network_interface_reference_model_dict = FloatingIPTargetNetworkInterfaceReference.from_dict(floating_ip_target_network_interface_reference_model_json).__dict__ - floating_ip_target_network_interface_reference_model2 = FloatingIPTargetNetworkInterfaceReference(**floating_ip_target_network_interface_reference_model_dict) + floating_ip_target_network_interface_reference_model_dict = FloatingIPTargetNetworkInterfaceReference.from_dict( + floating_ip_target_network_interface_reference_model_json).__dict__ + floating_ip_target_network_interface_reference_model2 = FloatingIPTargetNetworkInterfaceReference( + **floating_ip_target_network_interface_reference_model_dict) # Verify the model instances are equivalent assert floating_ip_target_network_interface_reference_model == floating_ip_target_network_interface_reference_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_network_interface_reference_model_json2 = floating_ip_target_network_interface_reference_model.to_dict() + floating_ip_target_network_interface_reference_model_json2 = floating_ip_target_network_interface_reference_model.to_dict( + ) assert floating_ip_target_network_interface_reference_model_json2 == floating_ip_target_network_interface_reference_model_json @@ -78865,31 +91573,43 @@ def test_floating_ip_target_public_gateway_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted - public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + public_gateway_reference_deleted_model = { + } # PublicGatewayReferenceDeleted + public_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a FloatingIPTargetPublicGatewayReference model floating_ip_target_public_gateway_reference_model_json = {} - floating_ip_target_public_gateway_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' - floating_ip_target_public_gateway_reference_model_json['deleted'] = public_gateway_reference_deleted_model - floating_ip_target_public_gateway_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' - floating_ip_target_public_gateway_reference_model_json['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' - floating_ip_target_public_gateway_reference_model_json['name'] = 'my-public-gateway' - floating_ip_target_public_gateway_reference_model_json['resource_type'] = 'public_gateway' + floating_ip_target_public_gateway_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + floating_ip_target_public_gateway_reference_model_json[ + 'deleted'] = public_gateway_reference_deleted_model + floating_ip_target_public_gateway_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + floating_ip_target_public_gateway_reference_model_json[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + floating_ip_target_public_gateway_reference_model_json[ + 'name'] = 'my-public-gateway' + floating_ip_target_public_gateway_reference_model_json[ + 'resource_type'] = 'public_gateway' # Construct a model instance of FloatingIPTargetPublicGatewayReference by calling from_dict on the json representation - floating_ip_target_public_gateway_reference_model = FloatingIPTargetPublicGatewayReference.from_dict(floating_ip_target_public_gateway_reference_model_json) + floating_ip_target_public_gateway_reference_model = FloatingIPTargetPublicGatewayReference.from_dict( + floating_ip_target_public_gateway_reference_model_json) assert floating_ip_target_public_gateway_reference_model != False # Construct a model instance of FloatingIPTargetPublicGatewayReference by calling from_dict on the json representation - floating_ip_target_public_gateway_reference_model_dict = FloatingIPTargetPublicGatewayReference.from_dict(floating_ip_target_public_gateway_reference_model_json).__dict__ - floating_ip_target_public_gateway_reference_model2 = FloatingIPTargetPublicGatewayReference(**floating_ip_target_public_gateway_reference_model_dict) + floating_ip_target_public_gateway_reference_model_dict = FloatingIPTargetPublicGatewayReference.from_dict( + floating_ip_target_public_gateway_reference_model_json).__dict__ + floating_ip_target_public_gateway_reference_model2 = FloatingIPTargetPublicGatewayReference( + **floating_ip_target_public_gateway_reference_model_dict) # Verify the model instances are equivalent assert floating_ip_target_public_gateway_reference_model == floating_ip_target_public_gateway_reference_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_public_gateway_reference_model_json2 = floating_ip_target_public_gateway_reference_model.to_dict() + floating_ip_target_public_gateway_reference_model_json2 = floating_ip_target_public_gateway_reference_model.to_dict( + ) assert floating_ip_target_public_gateway_reference_model_json2 == floating_ip_target_public_gateway_reference_model_json @@ -78898,62 +91618,86 @@ class TestModel_FloatingIPTargetVirtualNetworkInterfaceReference: Test Class for FloatingIPTargetVirtualNetworkInterfaceReference """ - def test_floating_ip_target_virtual_network_interface_reference_serialization(self): + def test_floating_ip_target_virtual_network_interface_reference_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetVirtualNetworkInterfaceReference """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_reference_deleted_model = {} # VirtualNetworkInterfaceReferenceDeleted - virtual_network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + virtual_network_interface_reference_deleted_model = { + } # VirtualNetworkInterfaceReferenceDeleted + virtual_network_interface_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a FloatingIPTargetVirtualNetworkInterfaceReference model floating_ip_target_virtual_network_interface_reference_model_json = {} - floating_ip_target_virtual_network_interface_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - floating_ip_target_virtual_network_interface_reference_model_json['deleted'] = virtual_network_interface_reference_deleted_model - floating_ip_target_virtual_network_interface_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - floating_ip_target_virtual_network_interface_reference_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - floating_ip_target_virtual_network_interface_reference_model_json['name'] = 'my-virtual-network-interface' - floating_ip_target_virtual_network_interface_reference_model_json['primary_ip'] = reserved_ip_reference_model - floating_ip_target_virtual_network_interface_reference_model_json['resource_type'] = 'virtual_network_interface' - floating_ip_target_virtual_network_interface_reference_model_json['subnet'] = subnet_reference_model + floating_ip_target_virtual_network_interface_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_virtual_network_interface_reference_model_json[ + 'deleted'] = virtual_network_interface_reference_deleted_model + floating_ip_target_virtual_network_interface_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_virtual_network_interface_reference_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_virtual_network_interface_reference_model_json[ + 'name'] = 'my-virtual-network-interface' + floating_ip_target_virtual_network_interface_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + floating_ip_target_virtual_network_interface_reference_model_json[ + 'resource_type'] = 'virtual_network_interface' + floating_ip_target_virtual_network_interface_reference_model_json[ + 'subnet'] = subnet_reference_model # Construct a model instance of FloatingIPTargetVirtualNetworkInterfaceReference by calling from_dict on the json representation - floating_ip_target_virtual_network_interface_reference_model = FloatingIPTargetVirtualNetworkInterfaceReference.from_dict(floating_ip_target_virtual_network_interface_reference_model_json) + floating_ip_target_virtual_network_interface_reference_model = FloatingIPTargetVirtualNetworkInterfaceReference.from_dict( + floating_ip_target_virtual_network_interface_reference_model_json) assert floating_ip_target_virtual_network_interface_reference_model != False # Construct a model instance of FloatingIPTargetVirtualNetworkInterfaceReference by calling from_dict on the json representation - floating_ip_target_virtual_network_interface_reference_model_dict = FloatingIPTargetVirtualNetworkInterfaceReference.from_dict(floating_ip_target_virtual_network_interface_reference_model_json).__dict__ - floating_ip_target_virtual_network_interface_reference_model2 = FloatingIPTargetVirtualNetworkInterfaceReference(**floating_ip_target_virtual_network_interface_reference_model_dict) + floating_ip_target_virtual_network_interface_reference_model_dict = FloatingIPTargetVirtualNetworkInterfaceReference.from_dict( + floating_ip_target_virtual_network_interface_reference_model_json + ).__dict__ + floating_ip_target_virtual_network_interface_reference_model2 = FloatingIPTargetVirtualNetworkInterfaceReference( + **floating_ip_target_virtual_network_interface_reference_model_dict) # Verify the model instances are equivalent assert floating_ip_target_virtual_network_interface_reference_model == floating_ip_target_virtual_network_interface_reference_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_virtual_network_interface_reference_model_json2 = floating_ip_target_virtual_network_interface_reference_model.to_dict() + floating_ip_target_virtual_network_interface_reference_model_json2 = floating_ip_target_virtual_network_interface_reference_model.to_dict( + ) assert floating_ip_target_virtual_network_interface_reference_model_json2 == floating_ip_target_virtual_network_interface_reference_model_json @@ -78962,61 +91706,87 @@ class TestModel_FlowLogCollectorTargetInstanceNetworkAttachmentReference: Test Class for FlowLogCollectorTargetInstanceNetworkAttachmentReference """ - def test_flow_log_collector_target_instance_network_attachment_reference_serialization(self): + def test_flow_log_collector_target_instance_network_attachment_reference_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetInstanceNetworkAttachmentReference """ # Construct dict forms of any model objects needed in order to build this model. - instance_network_attachment_reference_deleted_model = {} # InstanceNetworkAttachmentReferenceDeleted - instance_network_attachment_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_network_attachment_reference_deleted_model = { + } # InstanceNetworkAttachmentReferenceDeleted + instance_network_attachment_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.240.0.5' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a FlowLogCollectorTargetInstanceNetworkAttachmentReference model flow_log_collector_target_instance_network_attachment_reference_model_json = {} - flow_log_collector_target_instance_network_attachment_reference_model_json['deleted'] = instance_network_attachment_reference_deleted_model - flow_log_collector_target_instance_network_attachment_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - flow_log_collector_target_instance_network_attachment_reference_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - flow_log_collector_target_instance_network_attachment_reference_model_json['name'] = 'my-instance-network-attachment' - flow_log_collector_target_instance_network_attachment_reference_model_json['primary_ip'] = reserved_ip_reference_model - flow_log_collector_target_instance_network_attachment_reference_model_json['resource_type'] = 'instance_network_attachment' - flow_log_collector_target_instance_network_attachment_reference_model_json['subnet'] = subnet_reference_model + flow_log_collector_target_instance_network_attachment_reference_model_json[ + 'deleted'] = instance_network_attachment_reference_deleted_model + flow_log_collector_target_instance_network_attachment_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + flow_log_collector_target_instance_network_attachment_reference_model_json[ + 'id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + flow_log_collector_target_instance_network_attachment_reference_model_json[ + 'name'] = 'my-instance-network-attachment' + flow_log_collector_target_instance_network_attachment_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + flow_log_collector_target_instance_network_attachment_reference_model_json[ + 'resource_type'] = 'instance_network_attachment' + flow_log_collector_target_instance_network_attachment_reference_model_json[ + 'subnet'] = subnet_reference_model # Construct a model instance of FlowLogCollectorTargetInstanceNetworkAttachmentReference by calling from_dict on the json representation - flow_log_collector_target_instance_network_attachment_reference_model = FlowLogCollectorTargetInstanceNetworkAttachmentReference.from_dict(flow_log_collector_target_instance_network_attachment_reference_model_json) + flow_log_collector_target_instance_network_attachment_reference_model = FlowLogCollectorTargetInstanceNetworkAttachmentReference.from_dict( + flow_log_collector_target_instance_network_attachment_reference_model_json + ) assert flow_log_collector_target_instance_network_attachment_reference_model != False # Construct a model instance of FlowLogCollectorTargetInstanceNetworkAttachmentReference by calling from_dict on the json representation - flow_log_collector_target_instance_network_attachment_reference_model_dict = FlowLogCollectorTargetInstanceNetworkAttachmentReference.from_dict(flow_log_collector_target_instance_network_attachment_reference_model_json).__dict__ - flow_log_collector_target_instance_network_attachment_reference_model2 = FlowLogCollectorTargetInstanceNetworkAttachmentReference(**flow_log_collector_target_instance_network_attachment_reference_model_dict) + flow_log_collector_target_instance_network_attachment_reference_model_dict = FlowLogCollectorTargetInstanceNetworkAttachmentReference.from_dict( + flow_log_collector_target_instance_network_attachment_reference_model_json + ).__dict__ + flow_log_collector_target_instance_network_attachment_reference_model2 = FlowLogCollectorTargetInstanceNetworkAttachmentReference( + ** + flow_log_collector_target_instance_network_attachment_reference_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_instance_network_attachment_reference_model == flow_log_collector_target_instance_network_attachment_reference_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_instance_network_attachment_reference_model_json2 = flow_log_collector_target_instance_network_attachment_reference_model.to_dict() + flow_log_collector_target_instance_network_attachment_reference_model_json2 = flow_log_collector_target_instance_network_attachment_reference_model.to_dict( + ) assert flow_log_collector_target_instance_network_attachment_reference_model_json2 == flow_log_collector_target_instance_network_attachment_reference_model_json @@ -79033,29 +91803,39 @@ def test_flow_log_collector_target_instance_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a FlowLogCollectorTargetInstanceReference model flow_log_collector_target_instance_reference_model_json = {} - flow_log_collector_target_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - flow_log_collector_target_instance_reference_model_json['deleted'] = instance_reference_deleted_model - flow_log_collector_target_instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - flow_log_collector_target_instance_reference_model_json['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - flow_log_collector_target_instance_reference_model_json['name'] = 'my-instance' + flow_log_collector_target_instance_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + flow_log_collector_target_instance_reference_model_json[ + 'deleted'] = instance_reference_deleted_model + flow_log_collector_target_instance_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + flow_log_collector_target_instance_reference_model_json[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + flow_log_collector_target_instance_reference_model_json[ + 'name'] = 'my-instance' # Construct a model instance of FlowLogCollectorTargetInstanceReference by calling from_dict on the json representation - flow_log_collector_target_instance_reference_model = FlowLogCollectorTargetInstanceReference.from_dict(flow_log_collector_target_instance_reference_model_json) + flow_log_collector_target_instance_reference_model = FlowLogCollectorTargetInstanceReference.from_dict( + flow_log_collector_target_instance_reference_model_json) assert flow_log_collector_target_instance_reference_model != False # Construct a model instance of FlowLogCollectorTargetInstanceReference by calling from_dict on the json representation - flow_log_collector_target_instance_reference_model_dict = FlowLogCollectorTargetInstanceReference.from_dict(flow_log_collector_target_instance_reference_model_json).__dict__ - flow_log_collector_target_instance_reference_model2 = FlowLogCollectorTargetInstanceReference(**flow_log_collector_target_instance_reference_model_dict) + flow_log_collector_target_instance_reference_model_dict = FlowLogCollectorTargetInstanceReference.from_dict( + flow_log_collector_target_instance_reference_model_json).__dict__ + flow_log_collector_target_instance_reference_model2 = FlowLogCollectorTargetInstanceReference( + **flow_log_collector_target_instance_reference_model_dict) # Verify the model instances are equivalent assert flow_log_collector_target_instance_reference_model == flow_log_collector_target_instance_reference_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_instance_reference_model_json2 = flow_log_collector_target_instance_reference_model.to_dict() + flow_log_collector_target_instance_reference_model_json2 = flow_log_collector_target_instance_reference_model.to_dict( + ) assert flow_log_collector_target_instance_reference_model_json2 == flow_log_collector_target_instance_reference_model_json @@ -79064,37 +91844,53 @@ class TestModel_FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext: Test Class for FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext """ - def test_flow_log_collector_target_network_interface_reference_target_context_serialization(self): + def test_flow_log_collector_target_network_interface_reference_target_context_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext model flow_log_collector_target_network_interface_reference_target_context_model_json = {} - flow_log_collector_target_network_interface_reference_target_context_model_json['deleted'] = network_interface_reference_target_context_deleted_model - flow_log_collector_target_network_interface_reference_target_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - flow_log_collector_target_network_interface_reference_target_context_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - flow_log_collector_target_network_interface_reference_target_context_model_json['name'] = 'my-instance-network-interface' - flow_log_collector_target_network_interface_reference_target_context_model_json['resource_type'] = 'network_interface' + flow_log_collector_target_network_interface_reference_target_context_model_json[ + 'deleted'] = network_interface_reference_target_context_deleted_model + flow_log_collector_target_network_interface_reference_target_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_network_interface_reference_target_context_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_network_interface_reference_target_context_model_json[ + 'name'] = 'my-instance-network-interface' + flow_log_collector_target_network_interface_reference_target_context_model_json[ + 'resource_type'] = 'network_interface' # Construct a model instance of FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - flow_log_collector_target_network_interface_reference_target_context_model = FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.from_dict(flow_log_collector_target_network_interface_reference_target_context_model_json) + flow_log_collector_target_network_interface_reference_target_context_model = FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.from_dict( + flow_log_collector_target_network_interface_reference_target_context_model_json + ) assert flow_log_collector_target_network_interface_reference_target_context_model != False # Construct a model instance of FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - flow_log_collector_target_network_interface_reference_target_context_model_dict = FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.from_dict(flow_log_collector_target_network_interface_reference_target_context_model_json).__dict__ - flow_log_collector_target_network_interface_reference_target_context_model2 = FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext(**flow_log_collector_target_network_interface_reference_target_context_model_dict) + flow_log_collector_target_network_interface_reference_target_context_model_dict = FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.from_dict( + flow_log_collector_target_network_interface_reference_target_context_model_json + ).__dict__ + flow_log_collector_target_network_interface_reference_target_context_model2 = FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext( + ** + flow_log_collector_target_network_interface_reference_target_context_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_network_interface_reference_target_context_model == flow_log_collector_target_network_interface_reference_target_context_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_network_interface_reference_target_context_model_json2 = flow_log_collector_target_network_interface_reference_target_context_model.to_dict() + flow_log_collector_target_network_interface_reference_target_context_model_json2 = flow_log_collector_target_network_interface_reference_target_context_model.to_dict( + ) assert flow_log_collector_target_network_interface_reference_target_context_model_json2 == flow_log_collector_target_network_interface_reference_target_context_model_json @@ -79111,30 +91907,41 @@ def test_flow_log_collector_target_subnet_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a FlowLogCollectorTargetSubnetReference model flow_log_collector_target_subnet_reference_model_json = {} - flow_log_collector_target_subnet_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - flow_log_collector_target_subnet_reference_model_json['deleted'] = subnet_reference_deleted_model - flow_log_collector_target_subnet_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - flow_log_collector_target_subnet_reference_model_json['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - flow_log_collector_target_subnet_reference_model_json['name'] = 'my-subnet' - flow_log_collector_target_subnet_reference_model_json['resource_type'] = 'subnet' + flow_log_collector_target_subnet_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + flow_log_collector_target_subnet_reference_model_json[ + 'deleted'] = subnet_reference_deleted_model + flow_log_collector_target_subnet_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + flow_log_collector_target_subnet_reference_model_json[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + flow_log_collector_target_subnet_reference_model_json[ + 'name'] = 'my-subnet' + flow_log_collector_target_subnet_reference_model_json[ + 'resource_type'] = 'subnet' # Construct a model instance of FlowLogCollectorTargetSubnetReference by calling from_dict on the json representation - flow_log_collector_target_subnet_reference_model = FlowLogCollectorTargetSubnetReference.from_dict(flow_log_collector_target_subnet_reference_model_json) + flow_log_collector_target_subnet_reference_model = FlowLogCollectorTargetSubnetReference.from_dict( + flow_log_collector_target_subnet_reference_model_json) assert flow_log_collector_target_subnet_reference_model != False # Construct a model instance of FlowLogCollectorTargetSubnetReference by calling from_dict on the json representation - flow_log_collector_target_subnet_reference_model_dict = FlowLogCollectorTargetSubnetReference.from_dict(flow_log_collector_target_subnet_reference_model_json).__dict__ - flow_log_collector_target_subnet_reference_model2 = FlowLogCollectorTargetSubnetReference(**flow_log_collector_target_subnet_reference_model_dict) + flow_log_collector_target_subnet_reference_model_dict = FlowLogCollectorTargetSubnetReference.from_dict( + flow_log_collector_target_subnet_reference_model_json).__dict__ + flow_log_collector_target_subnet_reference_model2 = FlowLogCollectorTargetSubnetReference( + **flow_log_collector_target_subnet_reference_model_dict) # Verify the model instances are equivalent assert flow_log_collector_target_subnet_reference_model == flow_log_collector_target_subnet_reference_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_subnet_reference_model_json2 = flow_log_collector_target_subnet_reference_model.to_dict() + flow_log_collector_target_subnet_reference_model_json2 = flow_log_collector_target_subnet_reference_model.to_dict( + ) assert flow_log_collector_target_subnet_reference_model_json2 == flow_log_collector_target_subnet_reference_model_json @@ -79151,30 +91958,40 @@ def test_flow_log_collector_target_vpc_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a FlowLogCollectorTargetVPCReference model flow_log_collector_target_vpc_reference_model_json = {} - flow_log_collector_target_vpc_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - flow_log_collector_target_vpc_reference_model_json['deleted'] = vpc_reference_deleted_model - flow_log_collector_target_vpc_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - flow_log_collector_target_vpc_reference_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + flow_log_collector_target_vpc_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + flow_log_collector_target_vpc_reference_model_json[ + 'deleted'] = vpc_reference_deleted_model + flow_log_collector_target_vpc_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + flow_log_collector_target_vpc_reference_model_json[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' flow_log_collector_target_vpc_reference_model_json['name'] = 'my-vpc' - flow_log_collector_target_vpc_reference_model_json['resource_type'] = 'vpc' + flow_log_collector_target_vpc_reference_model_json[ + 'resource_type'] = 'vpc' # Construct a model instance of FlowLogCollectorTargetVPCReference by calling from_dict on the json representation - flow_log_collector_target_vpc_reference_model = FlowLogCollectorTargetVPCReference.from_dict(flow_log_collector_target_vpc_reference_model_json) + flow_log_collector_target_vpc_reference_model = FlowLogCollectorTargetVPCReference.from_dict( + flow_log_collector_target_vpc_reference_model_json) assert flow_log_collector_target_vpc_reference_model != False # Construct a model instance of FlowLogCollectorTargetVPCReference by calling from_dict on the json representation - flow_log_collector_target_vpc_reference_model_dict = FlowLogCollectorTargetVPCReference.from_dict(flow_log_collector_target_vpc_reference_model_json).__dict__ - flow_log_collector_target_vpc_reference_model2 = FlowLogCollectorTargetVPCReference(**flow_log_collector_target_vpc_reference_model_dict) + flow_log_collector_target_vpc_reference_model_dict = FlowLogCollectorTargetVPCReference.from_dict( + flow_log_collector_target_vpc_reference_model_json).__dict__ + flow_log_collector_target_vpc_reference_model2 = FlowLogCollectorTargetVPCReference( + **flow_log_collector_target_vpc_reference_model_dict) # Verify the model instances are equivalent assert flow_log_collector_target_vpc_reference_model == flow_log_collector_target_vpc_reference_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_vpc_reference_model_json2 = flow_log_collector_target_vpc_reference_model.to_dict() + flow_log_collector_target_vpc_reference_model_json2 = flow_log_collector_target_vpc_reference_model.to_dict( + ) assert flow_log_collector_target_vpc_reference_model_json2 == flow_log_collector_target_vpc_reference_model_json @@ -79183,32 +92000,46 @@ class TestModel_FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachment Test Class for FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext """ - def test_flow_log_collector_target_virtual_network_interface_reference_attachment_context_serialization(self): + def test_flow_log_collector_target_virtual_network_interface_reference_attachment_context_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext """ # Construct a json representation of a FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext model flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json = {} - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['name'] = 'my-virtual-network-interface' - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['resource_type'] = 'virtual_network_interface' + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json[ + 'name'] = 'my-virtual-network-interface' + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json[ + 'resource_type'] = 'virtual_network_interface' # Construct a model instance of FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext by calling from_dict on the json representation - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model = FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.from_dict(flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json) + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model = FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json + ) assert flow_log_collector_target_virtual_network_interface_reference_attachment_context_model != False # Construct a model instance of FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext by calling from_dict on the json representation - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_dict = FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.from_dict(flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json).__dict__ - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model2 = FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext(**flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_dict) + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_dict = FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext.from_dict( + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json + ).__dict__ + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model2 = FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext( + ** + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_virtual_network_interface_reference_attachment_context_model == flow_log_collector_target_virtual_network_interface_reference_attachment_context_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json2 = flow_log_collector_target_virtual_network_interface_reference_attachment_context_model.to_dict() + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json2 = flow_log_collector_target_virtual_network_interface_reference_attachment_context_model.to_dict( + ) assert flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json2 == flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json @@ -79224,21 +92055,26 @@ def test_image_identity_by_crn_serialization(self): # Construct a json representation of a ImageIdentityByCRN model image_identity_by_crn_model_json = {} - image_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::image:r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' # Construct a model instance of ImageIdentityByCRN by calling from_dict on the json representation - image_identity_by_crn_model = ImageIdentityByCRN.from_dict(image_identity_by_crn_model_json) + image_identity_by_crn_model = ImageIdentityByCRN.from_dict( + image_identity_by_crn_model_json) assert image_identity_by_crn_model != False # Construct a model instance of ImageIdentityByCRN by calling from_dict on the json representation - image_identity_by_crn_model_dict = ImageIdentityByCRN.from_dict(image_identity_by_crn_model_json).__dict__ - image_identity_by_crn_model2 = ImageIdentityByCRN(**image_identity_by_crn_model_dict) + image_identity_by_crn_model_dict = ImageIdentityByCRN.from_dict( + image_identity_by_crn_model_json).__dict__ + image_identity_by_crn_model2 = ImageIdentityByCRN( + **image_identity_by_crn_model_dict) # Verify the model instances are equivalent assert image_identity_by_crn_model == image_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - image_identity_by_crn_model_json2 = image_identity_by_crn_model.to_dict() + image_identity_by_crn_model_json2 = image_identity_by_crn_model.to_dict( + ) assert image_identity_by_crn_model_json2 == image_identity_by_crn_model_json @@ -79254,21 +92090,26 @@ def test_image_identity_by_href_serialization(self): # Construct a json representation of a ImageIdentityByHref model image_identity_by_href_model_json = {} - image_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' # Construct a model instance of ImageIdentityByHref by calling from_dict on the json representation - image_identity_by_href_model = ImageIdentityByHref.from_dict(image_identity_by_href_model_json) + image_identity_by_href_model = ImageIdentityByHref.from_dict( + image_identity_by_href_model_json) assert image_identity_by_href_model != False # Construct a model instance of ImageIdentityByHref by calling from_dict on the json representation - image_identity_by_href_model_dict = ImageIdentityByHref.from_dict(image_identity_by_href_model_json).__dict__ - image_identity_by_href_model2 = ImageIdentityByHref(**image_identity_by_href_model_dict) + image_identity_by_href_model_dict = ImageIdentityByHref.from_dict( + image_identity_by_href_model_json).__dict__ + image_identity_by_href_model2 = ImageIdentityByHref( + **image_identity_by_href_model_dict) # Verify the model instances are equivalent assert image_identity_by_href_model == image_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - image_identity_by_href_model_json2 = image_identity_by_href_model.to_dict() + image_identity_by_href_model_json2 = image_identity_by_href_model.to_dict( + ) assert image_identity_by_href_model_json2 == image_identity_by_href_model_json @@ -79284,15 +92125,19 @@ def test_image_identity_by_id_serialization(self): # Construct a json representation of a ImageIdentityById model image_identity_by_id_model_json = {} - image_identity_by_id_model_json['id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' + image_identity_by_id_model_json[ + 'id'] = 'r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8' # Construct a model instance of ImageIdentityById by calling from_dict on the json representation - image_identity_by_id_model = ImageIdentityById.from_dict(image_identity_by_id_model_json) + image_identity_by_id_model = ImageIdentityById.from_dict( + image_identity_by_id_model_json) assert image_identity_by_id_model != False # Construct a model instance of ImageIdentityById by calling from_dict on the json representation - image_identity_by_id_model_dict = ImageIdentityById.from_dict(image_identity_by_id_model_json).__dict__ - image_identity_by_id_model2 = ImageIdentityById(**image_identity_by_id_model_dict) + image_identity_by_id_model_dict = ImageIdentityById.from_dict( + image_identity_by_id_model_json).__dict__ + image_identity_by_id_model2 = ImageIdentityById( + **image_identity_by_id_model_dict) # Verify the model instances are equivalent assert image_identity_by_id_model == image_identity_by_id_model2 @@ -79318,38 +92163,51 @@ def test_image_prototype_image_by_file_serialization(self): resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' image_file_prototype_model = {} # ImageFilePrototype - image_file_prototype_model['href'] = 'cos://us-south/custom-image-vpc-bucket/customImage-0.vhd' + image_file_prototype_model[ + 'href'] = 'cos://us-south/custom-image-vpc-bucket/customImage-0.vhd' operating_system_identity_model = {} # OperatingSystemIdentityByName operating_system_identity_model['name'] = 'ubuntu-16-amd64' # Construct a json representation of a ImagePrototypeImageByFile model image_prototype_image_by_file_model_json = {} - image_prototype_image_by_file_model_json['deprecation_at'] = '2019-01-01T12:00:00Z' + image_prototype_image_by_file_model_json[ + 'deprecation_at'] = '2019-01-01T12:00:00Z' image_prototype_image_by_file_model_json['name'] = 'my-image' - image_prototype_image_by_file_model_json['obsolescence_at'] = '2019-01-01T12:00:00Z' - image_prototype_image_by_file_model_json['resource_group'] = resource_group_identity_model - image_prototype_image_by_file_model_json['encrypted_data_key'] = 'testString' - image_prototype_image_by_file_model_json['encryption_key'] = encryption_key_identity_model - image_prototype_image_by_file_model_json['file'] = image_file_prototype_model - image_prototype_image_by_file_model_json['operating_system'] = operating_system_identity_model + image_prototype_image_by_file_model_json[ + 'obsolescence_at'] = '2019-01-01T12:00:00Z' + image_prototype_image_by_file_model_json[ + 'resource_group'] = resource_group_identity_model + image_prototype_image_by_file_model_json[ + 'encrypted_data_key'] = 'testString' + image_prototype_image_by_file_model_json[ + 'encryption_key'] = encryption_key_identity_model + image_prototype_image_by_file_model_json[ + 'file'] = image_file_prototype_model + image_prototype_image_by_file_model_json[ + 'operating_system'] = operating_system_identity_model # Construct a model instance of ImagePrototypeImageByFile by calling from_dict on the json representation - image_prototype_image_by_file_model = ImagePrototypeImageByFile.from_dict(image_prototype_image_by_file_model_json) + image_prototype_image_by_file_model = ImagePrototypeImageByFile.from_dict( + image_prototype_image_by_file_model_json) assert image_prototype_image_by_file_model != False # Construct a model instance of ImagePrototypeImageByFile by calling from_dict on the json representation - image_prototype_image_by_file_model_dict = ImagePrototypeImageByFile.from_dict(image_prototype_image_by_file_model_json).__dict__ - image_prototype_image_by_file_model2 = ImagePrototypeImageByFile(**image_prototype_image_by_file_model_dict) + image_prototype_image_by_file_model_dict = ImagePrototypeImageByFile.from_dict( + image_prototype_image_by_file_model_json).__dict__ + image_prototype_image_by_file_model2 = ImagePrototypeImageByFile( + **image_prototype_image_by_file_model_dict) # Verify the model instances are equivalent assert image_prototype_image_by_file_model == image_prototype_image_by_file_model2 # Convert model instance back to dict and verify no loss of data - image_prototype_image_by_file_model_json2 = image_prototype_image_by_file_model.to_dict() + image_prototype_image_by_file_model_json2 = image_prototype_image_by_file_model.to_dict( + ) assert image_prototype_image_by_file_model_json2 == image_prototype_image_by_file_model_json @@ -79369,33 +92227,43 @@ def test_image_prototype_image_by_source_volume_serialization(self): resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_identity_model = {} # VolumeIdentityById volume_identity_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a json representation of a ImagePrototypeImageBySourceVolume model image_prototype_image_by_source_volume_model_json = {} - image_prototype_image_by_source_volume_model_json['deprecation_at'] = '2019-01-01T12:00:00Z' + image_prototype_image_by_source_volume_model_json[ + 'deprecation_at'] = '2019-01-01T12:00:00Z' image_prototype_image_by_source_volume_model_json['name'] = 'my-image' - image_prototype_image_by_source_volume_model_json['obsolescence_at'] = '2019-01-01T12:00:00Z' - image_prototype_image_by_source_volume_model_json['resource_group'] = resource_group_identity_model - image_prototype_image_by_source_volume_model_json['encryption_key'] = encryption_key_identity_model - image_prototype_image_by_source_volume_model_json['source_volume'] = volume_identity_model + image_prototype_image_by_source_volume_model_json[ + 'obsolescence_at'] = '2019-01-01T12:00:00Z' + image_prototype_image_by_source_volume_model_json[ + 'resource_group'] = resource_group_identity_model + image_prototype_image_by_source_volume_model_json[ + 'encryption_key'] = encryption_key_identity_model + image_prototype_image_by_source_volume_model_json[ + 'source_volume'] = volume_identity_model # Construct a model instance of ImagePrototypeImageBySourceVolume by calling from_dict on the json representation - image_prototype_image_by_source_volume_model = ImagePrototypeImageBySourceVolume.from_dict(image_prototype_image_by_source_volume_model_json) + image_prototype_image_by_source_volume_model = ImagePrototypeImageBySourceVolume.from_dict( + image_prototype_image_by_source_volume_model_json) assert image_prototype_image_by_source_volume_model != False # Construct a model instance of ImagePrototypeImageBySourceVolume by calling from_dict on the json representation - image_prototype_image_by_source_volume_model_dict = ImagePrototypeImageBySourceVolume.from_dict(image_prototype_image_by_source_volume_model_json).__dict__ - image_prototype_image_by_source_volume_model2 = ImagePrototypeImageBySourceVolume(**image_prototype_image_by_source_volume_model_dict) + image_prototype_image_by_source_volume_model_dict = ImagePrototypeImageBySourceVolume.from_dict( + image_prototype_image_by_source_volume_model_json).__dict__ + image_prototype_image_by_source_volume_model2 = ImagePrototypeImageBySourceVolume( + **image_prototype_image_by_source_volume_model_dict) # Verify the model instances are equivalent assert image_prototype_image_by_source_volume_model == image_prototype_image_by_source_volume_model2 # Convert model instance back to dict and verify no loss of data - image_prototype_image_by_source_volume_model_json2 = image_prototype_image_by_source_volume_model.to_dict() + image_prototype_image_by_source_volume_model_json2 = image_prototype_image_by_source_volume_model.to_dict( + ) assert image_prototype_image_by_source_volume_model_json2 == image_prototype_image_by_source_volume_model_json @@ -79404,33 +92272,52 @@ class TestModel_InstanceCatalogOfferingPrototypeCatalogOfferingByOffering: Test Class for InstanceCatalogOfferingPrototypeCatalogOfferingByOffering """ - def test_instance_catalog_offering_prototype_catalog_offering_by_offering_serialization(self): + def test_instance_catalog_offering_prototype_catalog_offering_by_offering_serialization( + self): """ Test serialization/deserialization for InstanceCatalogOfferingPrototypeCatalogOfferingByOffering """ # Construct dict forms of any model objects needed in order to build this model. - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' # Construct a json representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model instance_catalog_offering_prototype_catalog_offering_by_offering_model_json = {} - instance_catalog_offering_prototype_catalog_offering_by_offering_model_json['offering'] = catalog_offering_identity_model + instance_catalog_offering_prototype_catalog_offering_by_offering_model_json[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_catalog_offering_by_offering_model_json[ + 'offering'] = catalog_offering_identity_model # Construct a model instance of InstanceCatalogOfferingPrototypeCatalogOfferingByOffering by calling from_dict on the json representation - instance_catalog_offering_prototype_catalog_offering_by_offering_model = InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.from_dict(instance_catalog_offering_prototype_catalog_offering_by_offering_model_json) + instance_catalog_offering_prototype_catalog_offering_by_offering_model = InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.from_dict( + instance_catalog_offering_prototype_catalog_offering_by_offering_model_json + ) assert instance_catalog_offering_prototype_catalog_offering_by_offering_model != False # Construct a model instance of InstanceCatalogOfferingPrototypeCatalogOfferingByOffering by calling from_dict on the json representation - instance_catalog_offering_prototype_catalog_offering_by_offering_model_dict = InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.from_dict(instance_catalog_offering_prototype_catalog_offering_by_offering_model_json).__dict__ - instance_catalog_offering_prototype_catalog_offering_by_offering_model2 = InstanceCatalogOfferingPrototypeCatalogOfferingByOffering(**instance_catalog_offering_prototype_catalog_offering_by_offering_model_dict) + instance_catalog_offering_prototype_catalog_offering_by_offering_model_dict = InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.from_dict( + instance_catalog_offering_prototype_catalog_offering_by_offering_model_json + ).__dict__ + instance_catalog_offering_prototype_catalog_offering_by_offering_model2 = InstanceCatalogOfferingPrototypeCatalogOfferingByOffering( + ** + instance_catalog_offering_prototype_catalog_offering_by_offering_model_dict + ) # Verify the model instances are equivalent assert instance_catalog_offering_prototype_catalog_offering_by_offering_model == instance_catalog_offering_prototype_catalog_offering_by_offering_model2 # Convert model instance back to dict and verify no loss of data - instance_catalog_offering_prototype_catalog_offering_by_offering_model_json2 = instance_catalog_offering_prototype_catalog_offering_by_offering_model.to_dict() + instance_catalog_offering_prototype_catalog_offering_by_offering_model_json2 = instance_catalog_offering_prototype_catalog_offering_by_offering_model.to_dict( + ) assert instance_catalog_offering_prototype_catalog_offering_by_offering_model_json2 == instance_catalog_offering_prototype_catalog_offering_by_offering_model_json @@ -79439,33 +92326,52 @@ class TestModel_InstanceCatalogOfferingPrototypeCatalogOfferingByVersion: Test Class for InstanceCatalogOfferingPrototypeCatalogOfferingByVersion """ - def test_instance_catalog_offering_prototype_catalog_offering_by_version_serialization(self): + def test_instance_catalog_offering_prototype_catalog_offering_by_version_serialization( + self): """ Test serialization/deserialization for InstanceCatalogOfferingPrototypeCatalogOfferingByVersion """ # Construct dict forms of any model objects needed in order to build this model. - catalog_offering_version_identity_model = {} # CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN - catalog_offering_version_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_version_identity_model = { + } # CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN + catalog_offering_version_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d' # Construct a json representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByVersion model instance_catalog_offering_prototype_catalog_offering_by_version_model_json = {} - instance_catalog_offering_prototype_catalog_offering_by_version_model_json['version'] = catalog_offering_version_identity_model + instance_catalog_offering_prototype_catalog_offering_by_version_model_json[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_catalog_offering_by_version_model_json[ + 'version'] = catalog_offering_version_identity_model # Construct a model instance of InstanceCatalogOfferingPrototypeCatalogOfferingByVersion by calling from_dict on the json representation - instance_catalog_offering_prototype_catalog_offering_by_version_model = InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.from_dict(instance_catalog_offering_prototype_catalog_offering_by_version_model_json) + instance_catalog_offering_prototype_catalog_offering_by_version_model = InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.from_dict( + instance_catalog_offering_prototype_catalog_offering_by_version_model_json + ) assert instance_catalog_offering_prototype_catalog_offering_by_version_model != False # Construct a model instance of InstanceCatalogOfferingPrototypeCatalogOfferingByVersion by calling from_dict on the json representation - instance_catalog_offering_prototype_catalog_offering_by_version_model_dict = InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.from_dict(instance_catalog_offering_prototype_catalog_offering_by_version_model_json).__dict__ - instance_catalog_offering_prototype_catalog_offering_by_version_model2 = InstanceCatalogOfferingPrototypeCatalogOfferingByVersion(**instance_catalog_offering_prototype_catalog_offering_by_version_model_dict) + instance_catalog_offering_prototype_catalog_offering_by_version_model_dict = InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.from_dict( + instance_catalog_offering_prototype_catalog_offering_by_version_model_json + ).__dict__ + instance_catalog_offering_prototype_catalog_offering_by_version_model2 = InstanceCatalogOfferingPrototypeCatalogOfferingByVersion( + ** + instance_catalog_offering_prototype_catalog_offering_by_version_model_dict + ) # Verify the model instances are equivalent assert instance_catalog_offering_prototype_catalog_offering_by_version_model == instance_catalog_offering_prototype_catalog_offering_by_version_model2 # Convert model instance back to dict and verify no loss of data - instance_catalog_offering_prototype_catalog_offering_by_version_model_json2 = instance_catalog_offering_prototype_catalog_offering_by_version_model.to_dict() + instance_catalog_offering_prototype_catalog_offering_by_version_model_json2 = instance_catalog_offering_prototype_catalog_offering_by_version_model.to_dict( + ) assert instance_catalog_offering_prototype_catalog_offering_by_version_model_json2 == instance_catalog_offering_prototype_catalog_offering_by_version_model_json @@ -79481,43 +92387,65 @@ def test_instance_group_manager_auto_scale_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted - instance_group_manager_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_group_manager_policy_reference_model = {} # InstanceGroupManagerPolicyReference - instance_group_manager_policy_reference_model['deleted'] = instance_group_manager_policy_reference_deleted_model - instance_group_manager_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_reference_model['name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_reference_deleted_model = { + } # InstanceGroupManagerPolicyReferenceDeleted + instance_group_manager_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_group_manager_policy_reference_model = { + } # InstanceGroupManagerPolicyReference + instance_group_manager_policy_reference_model[ + 'deleted'] = instance_group_manager_policy_reference_deleted_model + instance_group_manager_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_reference_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_reference_model[ + 'name'] = 'my-instance-group-manager-policy' # Construct a json representation of a InstanceGroupManagerAutoScale model instance_group_manager_auto_scale_model_json = {} - instance_group_manager_auto_scale_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_auto_scale_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_auto_scale_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_auto_scale_model_json['management_enabled'] = True - instance_group_manager_auto_scale_model_json['name'] = 'my-instance-group-manager' - instance_group_manager_auto_scale_model_json['updated_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_auto_scale_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_auto_scale_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_auto_scale_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_auto_scale_model_json[ + 'management_enabled'] = True + instance_group_manager_auto_scale_model_json[ + 'name'] = 'my-instance-group-manager' + instance_group_manager_auto_scale_model_json[ + 'updated_at'] = '2019-01-01T12:00:00Z' instance_group_manager_auto_scale_model_json['aggregation_window'] = 120 instance_group_manager_auto_scale_model_json['cooldown'] = 210 - instance_group_manager_auto_scale_model_json['manager_type'] = 'autoscale' - instance_group_manager_auto_scale_model_json['max_membership_count'] = 10 - instance_group_manager_auto_scale_model_json['min_membership_count'] = 10 - instance_group_manager_auto_scale_model_json['policies'] = [instance_group_manager_policy_reference_model] + instance_group_manager_auto_scale_model_json[ + 'manager_type'] = 'autoscale' + instance_group_manager_auto_scale_model_json[ + 'max_membership_count'] = 10 + instance_group_manager_auto_scale_model_json[ + 'min_membership_count'] = 10 + instance_group_manager_auto_scale_model_json['policies'] = [ + instance_group_manager_policy_reference_model + ] # Construct a model instance of InstanceGroupManagerAutoScale by calling from_dict on the json representation - instance_group_manager_auto_scale_model = InstanceGroupManagerAutoScale.from_dict(instance_group_manager_auto_scale_model_json) + instance_group_manager_auto_scale_model = InstanceGroupManagerAutoScale.from_dict( + instance_group_manager_auto_scale_model_json) assert instance_group_manager_auto_scale_model != False # Construct a model instance of InstanceGroupManagerAutoScale by calling from_dict on the json representation - instance_group_manager_auto_scale_model_dict = InstanceGroupManagerAutoScale.from_dict(instance_group_manager_auto_scale_model_json).__dict__ - instance_group_manager_auto_scale_model2 = InstanceGroupManagerAutoScale(**instance_group_manager_auto_scale_model_dict) + instance_group_manager_auto_scale_model_dict = InstanceGroupManagerAutoScale.from_dict( + instance_group_manager_auto_scale_model_json).__dict__ + instance_group_manager_auto_scale_model2 = InstanceGroupManagerAutoScale( + **instance_group_manager_auto_scale_model_dict) # Verify the model instances are equivalent assert instance_group_manager_auto_scale_model == instance_group_manager_auto_scale_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_auto_scale_model_json2 = instance_group_manager_auto_scale_model.to_dict() + instance_group_manager_auto_scale_model_json2 = instance_group_manager_auto_scale_model.to_dict( + ) assert instance_group_manager_auto_scale_model_json2 == instance_group_manager_auto_scale_model_json @@ -79526,31 +92454,44 @@ class TestModel_InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPol Test Class for InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype """ - def test_instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_serialization(self): + def test_instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype """ # Construct a json representation of a InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype model instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json = {} - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json['name'] = 'my-instance-group-manager-policy' - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json['metric_type'] = 'cpu' - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json['metric_value'] = 38 - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json['policy_type'] = 'target' + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json[ + 'name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json[ + 'metric_type'] = 'cpu' + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json[ + 'metric_value'] = 38 + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json[ + 'policy_type'] = 'target' # Construct a model instance of InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype by calling from_dict on the json representation - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model = InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.from_dict(instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json) + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model = InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.from_dict( + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json + ) assert instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model != False # Construct a model instance of InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype by calling from_dict on the json representation - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_dict = InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.from_dict(instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json).__dict__ - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model2 = InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(**instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_dict) + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_dict = InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.from_dict( + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json + ).__dict__ + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model2 = InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype( + ** + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model == instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json2 = instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model.to_dict() + instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json2 = instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model.to_dict( + ) assert instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json2 == instance_group_manager_policy_prototype_instance_group_manager_target_policy_prototype_model_json @@ -79559,35 +92500,52 @@ class TestModel_InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy: Test Class for InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy """ - def test_instance_group_manager_policy_instance_group_manager_target_policy_serialization(self): + def test_instance_group_manager_policy_instance_group_manager_target_policy_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy """ # Construct a json representation of a InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy model instance_group_manager_policy_instance_group_manager_target_policy_model_json = {} - instance_group_manager_policy_instance_group_manager_target_policy_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_policy_instance_group_manager_target_policy_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_instance_group_manager_target_policy_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_policy_instance_group_manager_target_policy_model_json['name'] = 'my-instance-group-manager-policy' - instance_group_manager_policy_instance_group_manager_target_policy_model_json['updated_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_policy_instance_group_manager_target_policy_model_json['metric_type'] = 'cpu' - instance_group_manager_policy_instance_group_manager_target_policy_model_json['metric_value'] = 38 - instance_group_manager_policy_instance_group_manager_target_policy_model_json['policy_type'] = 'target' + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'name'] = 'my-instance-group-manager-policy' + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'updated_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'metric_type'] = 'cpu' + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'metric_value'] = 38 + instance_group_manager_policy_instance_group_manager_target_policy_model_json[ + 'policy_type'] = 'target' # Construct a model instance of InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy by calling from_dict on the json representation - instance_group_manager_policy_instance_group_manager_target_policy_model = InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.from_dict(instance_group_manager_policy_instance_group_manager_target_policy_model_json) + instance_group_manager_policy_instance_group_manager_target_policy_model = InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.from_dict( + instance_group_manager_policy_instance_group_manager_target_policy_model_json + ) assert instance_group_manager_policy_instance_group_manager_target_policy_model != False # Construct a model instance of InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy by calling from_dict on the json representation - instance_group_manager_policy_instance_group_manager_target_policy_model_dict = InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.from_dict(instance_group_manager_policy_instance_group_manager_target_policy_model_json).__dict__ - instance_group_manager_policy_instance_group_manager_target_policy_model2 = InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(**instance_group_manager_policy_instance_group_manager_target_policy_model_dict) + instance_group_manager_policy_instance_group_manager_target_policy_model_dict = InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.from_dict( + instance_group_manager_policy_instance_group_manager_target_policy_model_json + ).__dict__ + instance_group_manager_policy_instance_group_manager_target_policy_model2 = InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy( + ** + instance_group_manager_policy_instance_group_manager_target_policy_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_policy_instance_group_manager_target_policy_model == instance_group_manager_policy_instance_group_manager_target_policy_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_policy_instance_group_manager_target_policy_model_json2 = instance_group_manager_policy_instance_group_manager_target_policy_model.to_dict() + instance_group_manager_policy_instance_group_manager_target_policy_model_json2 = instance_group_manager_policy_instance_group_manager_target_policy_model.to_dict( + ) assert instance_group_manager_policy_instance_group_manager_target_policy_model_json2 == instance_group_manager_policy_instance_group_manager_target_policy_model_json @@ -79596,34 +92554,50 @@ class TestModel_InstanceGroupManagerPrototypeInstanceGroupManagerAutoScaleProtot Test Class for InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype """ - def test_instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_serialization(self): + def test_instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype """ # Construct a json representation of a InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype model instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json = {} - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json['management_enabled'] = True - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json['name'] = 'my-instance-group-manager' - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json['aggregation_window'] = 120 - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json['cooldown'] = 210 - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json['manager_type'] = 'autoscale' - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json['max_membership_count'] = 10 - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json['min_membership_count'] = 10 + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json[ + 'management_enabled'] = True + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json[ + 'name'] = 'my-instance-group-manager' + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json[ + 'aggregation_window'] = 120 + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json[ + 'cooldown'] = 210 + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json[ + 'manager_type'] = 'autoscale' + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json[ + 'max_membership_count'] = 10 + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json[ + 'min_membership_count'] = 10 # Construct a model instance of InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype by calling from_dict on the json representation - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model = InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.from_dict(instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json) + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model = InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.from_dict( + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json + ) assert instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model != False # Construct a model instance of InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype by calling from_dict on the json representation - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_dict = InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.from_dict(instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json).__dict__ - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model2 = InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(**instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_dict) + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_dict = InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.from_dict( + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json + ).__dict__ + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model2 = InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype( + ** + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model == instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json2 = instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model.to_dict() + instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json2 = instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model.to_dict( + ) assert instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json2 == instance_group_manager_prototype_instance_group_manager_auto_scale_prototype_model_json @@ -79632,30 +92606,42 @@ class TestModel_InstanceGroupManagerPrototypeInstanceGroupManagerScheduledProtot Test Class for InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype """ - def test_instance_group_manager_prototype_instance_group_manager_scheduled_prototype_serialization(self): + def test_instance_group_manager_prototype_instance_group_manager_scheduled_prototype_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype """ # Construct a json representation of a InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype model instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json = {} - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json['management_enabled'] = True - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json['name'] = 'my-instance-group-manager' - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json['manager_type'] = 'scheduled' + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json[ + 'management_enabled'] = True + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json[ + 'name'] = 'my-instance-group-manager' + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json[ + 'manager_type'] = 'scheduled' # Construct a model instance of InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype by calling from_dict on the json representation - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model = InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.from_dict(instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json) + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model = InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.from_dict( + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json + ) assert instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model != False # Construct a model instance of InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype by calling from_dict on the json representation - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_dict = InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.from_dict(instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json).__dict__ - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model2 = InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(**instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_dict) + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_dict = InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.from_dict( + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json + ).__dict__ + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model2 = InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype( + ** + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model == instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json2 = instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model.to_dict() + instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json2 = instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model.to_dict( + ) assert instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json2 == instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json @@ -79671,40 +92657,60 @@ def test_instance_group_manager_scheduled_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_action_reference_deleted_model = {} # InstanceGroupManagerActionReferenceDeleted - instance_group_manager_action_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_group_manager_action_reference_model = {} # InstanceGroupManagerActionReference - instance_group_manager_action_reference_model['deleted'] = instance_group_manager_action_reference_deleted_model - instance_group_manager_action_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_reference_model['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_reference_model['resource_type'] = 'instance_group_manager_action' + instance_group_manager_action_reference_deleted_model = { + } # InstanceGroupManagerActionReferenceDeleted + instance_group_manager_action_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_group_manager_action_reference_model = { + } # InstanceGroupManagerActionReference + instance_group_manager_action_reference_model[ + 'deleted'] = instance_group_manager_action_reference_deleted_model + instance_group_manager_action_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_reference_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_reference_model[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_reference_model[ + 'resource_type'] = 'instance_group_manager_action' # Construct a json representation of a InstanceGroupManagerScheduled model instance_group_manager_scheduled_model_json = {} - instance_group_manager_scheduled_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_scheduled_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_scheduled_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_scheduled_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_scheduled_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_scheduled_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' instance_group_manager_scheduled_model_json['management_enabled'] = True - instance_group_manager_scheduled_model_json['name'] = 'my-instance-group-manager' - instance_group_manager_scheduled_model_json['updated_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_scheduled_model_json['actions'] = [instance_group_manager_action_reference_model] - instance_group_manager_scheduled_model_json['manager_type'] = 'scheduled' + instance_group_manager_scheduled_model_json[ + 'name'] = 'my-instance-group-manager' + instance_group_manager_scheduled_model_json[ + 'updated_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_scheduled_model_json['actions'] = [ + instance_group_manager_action_reference_model + ] + instance_group_manager_scheduled_model_json[ + 'manager_type'] = 'scheduled' # Construct a model instance of InstanceGroupManagerScheduled by calling from_dict on the json representation - instance_group_manager_scheduled_model = InstanceGroupManagerScheduled.from_dict(instance_group_manager_scheduled_model_json) + instance_group_manager_scheduled_model = InstanceGroupManagerScheduled.from_dict( + instance_group_manager_scheduled_model_json) assert instance_group_manager_scheduled_model != False # Construct a model instance of InstanceGroupManagerScheduled by calling from_dict on the json representation - instance_group_manager_scheduled_model_dict = InstanceGroupManagerScheduled.from_dict(instance_group_manager_scheduled_model_json).__dict__ - instance_group_manager_scheduled_model2 = InstanceGroupManagerScheduled(**instance_group_manager_scheduled_model_dict) + instance_group_manager_scheduled_model_dict = InstanceGroupManagerScheduled.from_dict( + instance_group_manager_scheduled_model_json).__dict__ + instance_group_manager_scheduled_model2 = InstanceGroupManagerScheduled( + **instance_group_manager_scheduled_model_dict) # Verify the model instances are equivalent assert instance_group_manager_scheduled_model == instance_group_manager_scheduled_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_scheduled_model_json2 = instance_group_manager_scheduled_model.to_dict() + instance_group_manager_scheduled_model_json2 = instance_group_manager_scheduled_model.to_dict( + ) assert instance_group_manager_scheduled_model_json2 == instance_group_manager_scheduled_model_json @@ -79713,38 +92719,55 @@ class TestModel_InstanceGroupManagerScheduledActionManagerAutoScale: Test Class for InstanceGroupManagerScheduledActionManagerAutoScale """ - def test_instance_group_manager_scheduled_action_manager_auto_scale_serialization(self): + def test_instance_group_manager_scheduled_action_manager_auto_scale_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerScheduledActionManagerAutoScale """ # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted - instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_group_manager_reference_deleted_model = { + } # InstanceGroupManagerReferenceDeleted + instance_group_manager_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstanceGroupManagerScheduledActionManagerAutoScale model instance_group_manager_scheduled_action_manager_auto_scale_model_json = {} - instance_group_manager_scheduled_action_manager_auto_scale_model_json['deleted'] = instance_group_manager_reference_deleted_model - instance_group_manager_scheduled_action_manager_auto_scale_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_scheduled_action_manager_auto_scale_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_scheduled_action_manager_auto_scale_model_json['name'] = 'my-instance-group-manager' - instance_group_manager_scheduled_action_manager_auto_scale_model_json['max_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_auto_scale_model_json['min_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_auto_scale_model_json[ + 'deleted'] = instance_group_manager_reference_deleted_model + instance_group_manager_scheduled_action_manager_auto_scale_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_scheduled_action_manager_auto_scale_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_scheduled_action_manager_auto_scale_model_json[ + 'name'] = 'my-instance-group-manager' + instance_group_manager_scheduled_action_manager_auto_scale_model_json[ + 'max_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_auto_scale_model_json[ + 'min_membership_count'] = 10 # Construct a model instance of InstanceGroupManagerScheduledActionManagerAutoScale by calling from_dict on the json representation - instance_group_manager_scheduled_action_manager_auto_scale_model = InstanceGroupManagerScheduledActionManagerAutoScale.from_dict(instance_group_manager_scheduled_action_manager_auto_scale_model_json) + instance_group_manager_scheduled_action_manager_auto_scale_model = InstanceGroupManagerScheduledActionManagerAutoScale.from_dict( + instance_group_manager_scheduled_action_manager_auto_scale_model_json + ) assert instance_group_manager_scheduled_action_manager_auto_scale_model != False # Construct a model instance of InstanceGroupManagerScheduledActionManagerAutoScale by calling from_dict on the json representation - instance_group_manager_scheduled_action_manager_auto_scale_model_dict = InstanceGroupManagerScheduledActionManagerAutoScale.from_dict(instance_group_manager_scheduled_action_manager_auto_scale_model_json).__dict__ - instance_group_manager_scheduled_action_manager_auto_scale_model2 = InstanceGroupManagerScheduledActionManagerAutoScale(**instance_group_manager_scheduled_action_manager_auto_scale_model_dict) + instance_group_manager_scheduled_action_manager_auto_scale_model_dict = InstanceGroupManagerScheduledActionManagerAutoScale.from_dict( + instance_group_manager_scheduled_action_manager_auto_scale_model_json + ).__dict__ + instance_group_manager_scheduled_action_manager_auto_scale_model2 = InstanceGroupManagerScheduledActionManagerAutoScale( + ** + instance_group_manager_scheduled_action_manager_auto_scale_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_scheduled_action_manager_auto_scale_model == instance_group_manager_scheduled_action_manager_auto_scale_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_scheduled_action_manager_auto_scale_model_json2 = instance_group_manager_scheduled_action_manager_auto_scale_model.to_dict() + instance_group_manager_scheduled_action_manager_auto_scale_model_json2 = instance_group_manager_scheduled_action_manager_auto_scale_model.to_dict( + ) assert instance_group_manager_scheduled_action_manager_auto_scale_model_json2 == instance_group_manager_scheduled_action_manager_auto_scale_model_json @@ -79753,57 +92776,84 @@ class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtual Test Class for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext """ - def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_serialization(self): + def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_serialization( + self): """ Test serialization/deserialization for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + subnet_identity_model[ + 'id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' # Construct a json representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext model instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json = {} - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json['subnet'] = subnet_identity_model + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json[ + 'subnet'] = subnet_identity_model # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model != False # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json).__dict__ - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext(**instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_dict) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json + ).__dict__ + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext( + ** + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_dict + ) # Verify the model instances are equivalent assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model.to_dict() + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model.to_dict( + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json2 == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model_json @@ -79812,28 +92862,36 @@ class TestModel_InstancePatchProfileInstanceProfileIdentityByHref: Test Class for InstancePatchProfileInstanceProfileIdentityByHref """ - def test_instance_patch_profile_instance_profile_identity_by_href_serialization(self): + def test_instance_patch_profile_instance_profile_identity_by_href_serialization( + self): """ Test serialization/deserialization for InstancePatchProfileInstanceProfileIdentityByHref """ # Construct a json representation of a InstancePatchProfileInstanceProfileIdentityByHref model instance_patch_profile_instance_profile_identity_by_href_model_json = {} - instance_patch_profile_instance_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_patch_profile_instance_profile_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' # Construct a model instance of InstancePatchProfileInstanceProfileIdentityByHref by calling from_dict on the json representation - instance_patch_profile_instance_profile_identity_by_href_model = InstancePatchProfileInstanceProfileIdentityByHref.from_dict(instance_patch_profile_instance_profile_identity_by_href_model_json) + instance_patch_profile_instance_profile_identity_by_href_model = InstancePatchProfileInstanceProfileIdentityByHref.from_dict( + instance_patch_profile_instance_profile_identity_by_href_model_json) assert instance_patch_profile_instance_profile_identity_by_href_model != False # Construct a model instance of InstancePatchProfileInstanceProfileIdentityByHref by calling from_dict on the json representation - instance_patch_profile_instance_profile_identity_by_href_model_dict = InstancePatchProfileInstanceProfileIdentityByHref.from_dict(instance_patch_profile_instance_profile_identity_by_href_model_json).__dict__ - instance_patch_profile_instance_profile_identity_by_href_model2 = InstancePatchProfileInstanceProfileIdentityByHref(**instance_patch_profile_instance_profile_identity_by_href_model_dict) + instance_patch_profile_instance_profile_identity_by_href_model_dict = InstancePatchProfileInstanceProfileIdentityByHref.from_dict( + instance_patch_profile_instance_profile_identity_by_href_model_json + ).__dict__ + instance_patch_profile_instance_profile_identity_by_href_model2 = InstancePatchProfileInstanceProfileIdentityByHref( + ** + instance_patch_profile_instance_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert instance_patch_profile_instance_profile_identity_by_href_model == instance_patch_profile_instance_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_patch_profile_instance_profile_identity_by_href_model_json2 = instance_patch_profile_instance_profile_identity_by_href_model.to_dict() + instance_patch_profile_instance_profile_identity_by_href_model_json2 = instance_patch_profile_instance_profile_identity_by_href_model.to_dict( + ) assert instance_patch_profile_instance_profile_identity_by_href_model_json2 == instance_patch_profile_instance_profile_identity_by_href_model_json @@ -79842,28 +92900,36 @@ class TestModel_InstancePatchProfileInstanceProfileIdentityByName: Test Class for InstancePatchProfileInstanceProfileIdentityByName """ - def test_instance_patch_profile_instance_profile_identity_by_name_serialization(self): + def test_instance_patch_profile_instance_profile_identity_by_name_serialization( + self): """ Test serialization/deserialization for InstancePatchProfileInstanceProfileIdentityByName """ # Construct a json representation of a InstancePatchProfileInstanceProfileIdentityByName model instance_patch_profile_instance_profile_identity_by_name_model_json = {} - instance_patch_profile_instance_profile_identity_by_name_model_json['name'] = 'bx2-4x16' + instance_patch_profile_instance_profile_identity_by_name_model_json[ + 'name'] = 'bx2-4x16' # Construct a model instance of InstancePatchProfileInstanceProfileIdentityByName by calling from_dict on the json representation - instance_patch_profile_instance_profile_identity_by_name_model = InstancePatchProfileInstanceProfileIdentityByName.from_dict(instance_patch_profile_instance_profile_identity_by_name_model_json) + instance_patch_profile_instance_profile_identity_by_name_model = InstancePatchProfileInstanceProfileIdentityByName.from_dict( + instance_patch_profile_instance_profile_identity_by_name_model_json) assert instance_patch_profile_instance_profile_identity_by_name_model != False # Construct a model instance of InstancePatchProfileInstanceProfileIdentityByName by calling from_dict on the json representation - instance_patch_profile_instance_profile_identity_by_name_model_dict = InstancePatchProfileInstanceProfileIdentityByName.from_dict(instance_patch_profile_instance_profile_identity_by_name_model_json).__dict__ - instance_patch_profile_instance_profile_identity_by_name_model2 = InstancePatchProfileInstanceProfileIdentityByName(**instance_patch_profile_instance_profile_identity_by_name_model_dict) + instance_patch_profile_instance_profile_identity_by_name_model_dict = InstancePatchProfileInstanceProfileIdentityByName.from_dict( + instance_patch_profile_instance_profile_identity_by_name_model_json + ).__dict__ + instance_patch_profile_instance_profile_identity_by_name_model2 = InstancePatchProfileInstanceProfileIdentityByName( + ** + instance_patch_profile_instance_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert instance_patch_profile_instance_profile_identity_by_name_model == instance_patch_profile_instance_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - instance_patch_profile_instance_profile_identity_by_name_model_json2 = instance_patch_profile_instance_profile_identity_by_name_model.to_dict() + instance_patch_profile_instance_profile_identity_by_name_model_json2 = instance_patch_profile_instance_profile_identity_by_name_model.to_dict( + ) assert instance_patch_profile_instance_profile_identity_by_name_model_json2 == instance_patch_profile_instance_profile_identity_by_name_model_json @@ -79872,38 +92938,53 @@ class TestModel_InstancePlacementTargetDedicatedHostGroupReference: Test Class for InstancePlacementTargetDedicatedHostGroupReference """ - def test_instance_placement_target_dedicated_host_group_reference_serialization(self): + def test_instance_placement_target_dedicated_host_group_reference_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetDedicatedHostGroupReference """ # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted - dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_group_reference_deleted_model = { + } # DedicatedHostGroupReferenceDeleted + dedicated_host_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstancePlacementTargetDedicatedHostGroupReference model instance_placement_target_dedicated_host_group_reference_model_json = {} - instance_placement_target_dedicated_host_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - instance_placement_target_dedicated_host_group_reference_model_json['deleted'] = dedicated_host_group_reference_deleted_model - instance_placement_target_dedicated_host_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - instance_placement_target_dedicated_host_group_reference_model_json['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - instance_placement_target_dedicated_host_group_reference_model_json['name'] = 'my-host-group' - instance_placement_target_dedicated_host_group_reference_model_json['resource_type'] = 'dedicated_host_group' + instance_placement_target_dedicated_host_group_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_dedicated_host_group_reference_model_json[ + 'deleted'] = dedicated_host_group_reference_deleted_model + instance_placement_target_dedicated_host_group_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_dedicated_host_group_reference_model_json[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_dedicated_host_group_reference_model_json[ + 'name'] = 'my-host-group' + instance_placement_target_dedicated_host_group_reference_model_json[ + 'resource_type'] = 'dedicated_host_group' # Construct a model instance of InstancePlacementTargetDedicatedHostGroupReference by calling from_dict on the json representation - instance_placement_target_dedicated_host_group_reference_model = InstancePlacementTargetDedicatedHostGroupReference.from_dict(instance_placement_target_dedicated_host_group_reference_model_json) + instance_placement_target_dedicated_host_group_reference_model = InstancePlacementTargetDedicatedHostGroupReference.from_dict( + instance_placement_target_dedicated_host_group_reference_model_json) assert instance_placement_target_dedicated_host_group_reference_model != False # Construct a model instance of InstancePlacementTargetDedicatedHostGroupReference by calling from_dict on the json representation - instance_placement_target_dedicated_host_group_reference_model_dict = InstancePlacementTargetDedicatedHostGroupReference.from_dict(instance_placement_target_dedicated_host_group_reference_model_json).__dict__ - instance_placement_target_dedicated_host_group_reference_model2 = InstancePlacementTargetDedicatedHostGroupReference(**instance_placement_target_dedicated_host_group_reference_model_dict) + instance_placement_target_dedicated_host_group_reference_model_dict = InstancePlacementTargetDedicatedHostGroupReference.from_dict( + instance_placement_target_dedicated_host_group_reference_model_json + ).__dict__ + instance_placement_target_dedicated_host_group_reference_model2 = InstancePlacementTargetDedicatedHostGroupReference( + ** + instance_placement_target_dedicated_host_group_reference_model_dict) # Verify the model instances are equivalent assert instance_placement_target_dedicated_host_group_reference_model == instance_placement_target_dedicated_host_group_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_dedicated_host_group_reference_model_json2 = instance_placement_target_dedicated_host_group_reference_model.to_dict() + instance_placement_target_dedicated_host_group_reference_model_json2 = instance_placement_target_dedicated_host_group_reference_model.to_dict( + ) assert instance_placement_target_dedicated_host_group_reference_model_json2 == instance_placement_target_dedicated_host_group_reference_model_json @@ -79912,38 +92993,52 @@ class TestModel_InstancePlacementTargetDedicatedHostReference: Test Class for InstancePlacementTargetDedicatedHostReference """ - def test_instance_placement_target_dedicated_host_reference_serialization(self): + def test_instance_placement_target_dedicated_host_reference_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetDedicatedHostReference """ # Construct dict forms of any model objects needed in order to build this model. - dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted - dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + dedicated_host_reference_deleted_model = { + } # DedicatedHostReferenceDeleted + dedicated_host_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstancePlacementTargetDedicatedHostReference model instance_placement_target_dedicated_host_reference_model_json = {} - instance_placement_target_dedicated_host_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_placement_target_dedicated_host_reference_model_json['deleted'] = dedicated_host_reference_deleted_model - instance_placement_target_dedicated_host_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_placement_target_dedicated_host_reference_model_json['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_placement_target_dedicated_host_reference_model_json['name'] = 'my-host' - instance_placement_target_dedicated_host_reference_model_json['resource_type'] = 'dedicated_host' + instance_placement_target_dedicated_host_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_dedicated_host_reference_model_json[ + 'deleted'] = dedicated_host_reference_deleted_model + instance_placement_target_dedicated_host_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_dedicated_host_reference_model_json[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_dedicated_host_reference_model_json[ + 'name'] = 'my-host' + instance_placement_target_dedicated_host_reference_model_json[ + 'resource_type'] = 'dedicated_host' # Construct a model instance of InstancePlacementTargetDedicatedHostReference by calling from_dict on the json representation - instance_placement_target_dedicated_host_reference_model = InstancePlacementTargetDedicatedHostReference.from_dict(instance_placement_target_dedicated_host_reference_model_json) + instance_placement_target_dedicated_host_reference_model = InstancePlacementTargetDedicatedHostReference.from_dict( + instance_placement_target_dedicated_host_reference_model_json) assert instance_placement_target_dedicated_host_reference_model != False # Construct a model instance of InstancePlacementTargetDedicatedHostReference by calling from_dict on the json representation - instance_placement_target_dedicated_host_reference_model_dict = InstancePlacementTargetDedicatedHostReference.from_dict(instance_placement_target_dedicated_host_reference_model_json).__dict__ - instance_placement_target_dedicated_host_reference_model2 = InstancePlacementTargetDedicatedHostReference(**instance_placement_target_dedicated_host_reference_model_dict) + instance_placement_target_dedicated_host_reference_model_dict = InstancePlacementTargetDedicatedHostReference.from_dict( + instance_placement_target_dedicated_host_reference_model_json + ).__dict__ + instance_placement_target_dedicated_host_reference_model2 = InstancePlacementTargetDedicatedHostReference( + **instance_placement_target_dedicated_host_reference_model_dict) # Verify the model instances are equivalent assert instance_placement_target_dedicated_host_reference_model == instance_placement_target_dedicated_host_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_dedicated_host_reference_model_json2 = instance_placement_target_dedicated_host_reference_model.to_dict() + instance_placement_target_dedicated_host_reference_model_json2 = instance_placement_target_dedicated_host_reference_model.to_dict( + ) assert instance_placement_target_dedicated_host_reference_model_json2 == instance_placement_target_dedicated_host_reference_model_json @@ -79952,38 +93047,52 @@ class TestModel_InstancePlacementTargetPlacementGroupReference: Test Class for InstancePlacementTargetPlacementGroupReference """ - def test_instance_placement_target_placement_group_reference_serialization(self): + def test_instance_placement_target_placement_group_reference_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPlacementGroupReference """ # Construct dict forms of any model objects needed in order to build this model. - placement_group_reference_deleted_model = {} # PlacementGroupReferenceDeleted - placement_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + placement_group_reference_deleted_model = { + } # PlacementGroupReferenceDeleted + placement_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a InstancePlacementTargetPlacementGroupReference model instance_placement_target_placement_group_reference_model_json = {} - instance_placement_target_placement_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871' - instance_placement_target_placement_group_reference_model_json['deleted'] = placement_group_reference_deleted_model - instance_placement_target_placement_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' - instance_placement_target_placement_group_reference_model_json['id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' - instance_placement_target_placement_group_reference_model_json['name'] = 'my-placement-group' - instance_placement_target_placement_group_reference_model_json['resource_type'] = 'placement_group' + instance_placement_target_placement_group_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + instance_placement_target_placement_group_reference_model_json[ + 'deleted'] = placement_group_reference_deleted_model + instance_placement_target_placement_group_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + instance_placement_target_placement_group_reference_model_json[ + 'id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + instance_placement_target_placement_group_reference_model_json[ + 'name'] = 'my-placement-group' + instance_placement_target_placement_group_reference_model_json[ + 'resource_type'] = 'placement_group' # Construct a model instance of InstancePlacementTargetPlacementGroupReference by calling from_dict on the json representation - instance_placement_target_placement_group_reference_model = InstancePlacementTargetPlacementGroupReference.from_dict(instance_placement_target_placement_group_reference_model_json) + instance_placement_target_placement_group_reference_model = InstancePlacementTargetPlacementGroupReference.from_dict( + instance_placement_target_placement_group_reference_model_json) assert instance_placement_target_placement_group_reference_model != False # Construct a model instance of InstancePlacementTargetPlacementGroupReference by calling from_dict on the json representation - instance_placement_target_placement_group_reference_model_dict = InstancePlacementTargetPlacementGroupReference.from_dict(instance_placement_target_placement_group_reference_model_json).__dict__ - instance_placement_target_placement_group_reference_model2 = InstancePlacementTargetPlacementGroupReference(**instance_placement_target_placement_group_reference_model_dict) + instance_placement_target_placement_group_reference_model_dict = InstancePlacementTargetPlacementGroupReference.from_dict( + instance_placement_target_placement_group_reference_model_json + ).__dict__ + instance_placement_target_placement_group_reference_model2 = InstancePlacementTargetPlacementGroupReference( + **instance_placement_target_placement_group_reference_model_dict) # Verify the model instances are equivalent assert instance_placement_target_placement_group_reference_model == instance_placement_target_placement_group_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_placement_group_reference_model_json2 = instance_placement_target_placement_group_reference_model.to_dict() + instance_placement_target_placement_group_reference_model_json2 = instance_placement_target_placement_group_reference_model.to_dict( + ) assert instance_placement_target_placement_group_reference_model_json2 == instance_placement_target_placement_group_reference_model_json @@ -80002,18 +93111,22 @@ def test_instance_profile_bandwidth_dependent_serialization(self): instance_profile_bandwidth_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileBandwidthDependent by calling from_dict on the json representation - instance_profile_bandwidth_dependent_model = InstanceProfileBandwidthDependent.from_dict(instance_profile_bandwidth_dependent_model_json) + instance_profile_bandwidth_dependent_model = InstanceProfileBandwidthDependent.from_dict( + instance_profile_bandwidth_dependent_model_json) assert instance_profile_bandwidth_dependent_model != False # Construct a model instance of InstanceProfileBandwidthDependent by calling from_dict on the json representation - instance_profile_bandwidth_dependent_model_dict = InstanceProfileBandwidthDependent.from_dict(instance_profile_bandwidth_dependent_model_json).__dict__ - instance_profile_bandwidth_dependent_model2 = InstanceProfileBandwidthDependent(**instance_profile_bandwidth_dependent_model_dict) + instance_profile_bandwidth_dependent_model_dict = InstanceProfileBandwidthDependent.from_dict( + instance_profile_bandwidth_dependent_model_json).__dict__ + instance_profile_bandwidth_dependent_model2 = InstanceProfileBandwidthDependent( + **instance_profile_bandwidth_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_bandwidth_dependent_model == instance_profile_bandwidth_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_bandwidth_dependent_model_json2 = instance_profile_bandwidth_dependent_model.to_dict() + instance_profile_bandwidth_dependent_model_json2 = instance_profile_bandwidth_dependent_model.to_dict( + ) assert instance_profile_bandwidth_dependent_model_json2 == instance_profile_bandwidth_dependent_model_json @@ -80031,21 +93144,27 @@ def test_instance_profile_bandwidth_enum_serialization(self): instance_profile_bandwidth_enum_model_json = {} instance_profile_bandwidth_enum_model_json['default'] = 38 instance_profile_bandwidth_enum_model_json['type'] = 'enum' - instance_profile_bandwidth_enum_model_json['values'] = [16000, 32000, 48000] + instance_profile_bandwidth_enum_model_json['values'] = [ + 16000, 32000, 48000 + ] # Construct a model instance of InstanceProfileBandwidthEnum by calling from_dict on the json representation - instance_profile_bandwidth_enum_model = InstanceProfileBandwidthEnum.from_dict(instance_profile_bandwidth_enum_model_json) + instance_profile_bandwidth_enum_model = InstanceProfileBandwidthEnum.from_dict( + instance_profile_bandwidth_enum_model_json) assert instance_profile_bandwidth_enum_model != False # Construct a model instance of InstanceProfileBandwidthEnum by calling from_dict on the json representation - instance_profile_bandwidth_enum_model_dict = InstanceProfileBandwidthEnum.from_dict(instance_profile_bandwidth_enum_model_json).__dict__ - instance_profile_bandwidth_enum_model2 = InstanceProfileBandwidthEnum(**instance_profile_bandwidth_enum_model_dict) + instance_profile_bandwidth_enum_model_dict = InstanceProfileBandwidthEnum.from_dict( + instance_profile_bandwidth_enum_model_json).__dict__ + instance_profile_bandwidth_enum_model2 = InstanceProfileBandwidthEnum( + **instance_profile_bandwidth_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_bandwidth_enum_model == instance_profile_bandwidth_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_bandwidth_enum_model_json2 = instance_profile_bandwidth_enum_model.to_dict() + instance_profile_bandwidth_enum_model_json2 = instance_profile_bandwidth_enum_model.to_dict( + ) assert instance_profile_bandwidth_enum_model_json2 == instance_profile_bandwidth_enum_model_json @@ -80065,18 +93184,22 @@ def test_instance_profile_bandwidth_fixed_serialization(self): instance_profile_bandwidth_fixed_model_json['value'] = 20000 # Construct a model instance of InstanceProfileBandwidthFixed by calling from_dict on the json representation - instance_profile_bandwidth_fixed_model = InstanceProfileBandwidthFixed.from_dict(instance_profile_bandwidth_fixed_model_json) + instance_profile_bandwidth_fixed_model = InstanceProfileBandwidthFixed.from_dict( + instance_profile_bandwidth_fixed_model_json) assert instance_profile_bandwidth_fixed_model != False # Construct a model instance of InstanceProfileBandwidthFixed by calling from_dict on the json representation - instance_profile_bandwidth_fixed_model_dict = InstanceProfileBandwidthFixed.from_dict(instance_profile_bandwidth_fixed_model_json).__dict__ - instance_profile_bandwidth_fixed_model2 = InstanceProfileBandwidthFixed(**instance_profile_bandwidth_fixed_model_dict) + instance_profile_bandwidth_fixed_model_dict = InstanceProfileBandwidthFixed.from_dict( + instance_profile_bandwidth_fixed_model_json).__dict__ + instance_profile_bandwidth_fixed_model2 = InstanceProfileBandwidthFixed( + **instance_profile_bandwidth_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_bandwidth_fixed_model == instance_profile_bandwidth_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_bandwidth_fixed_model_json2 = instance_profile_bandwidth_fixed_model.to_dict() + instance_profile_bandwidth_fixed_model_json2 = instance_profile_bandwidth_fixed_model.to_dict( + ) assert instance_profile_bandwidth_fixed_model_json2 == instance_profile_bandwidth_fixed_model_json @@ -80099,18 +93222,22 @@ def test_instance_profile_bandwidth_range_serialization(self): instance_profile_bandwidth_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileBandwidthRange by calling from_dict on the json representation - instance_profile_bandwidth_range_model = InstanceProfileBandwidthRange.from_dict(instance_profile_bandwidth_range_model_json) + instance_profile_bandwidth_range_model = InstanceProfileBandwidthRange.from_dict( + instance_profile_bandwidth_range_model_json) assert instance_profile_bandwidth_range_model != False # Construct a model instance of InstanceProfileBandwidthRange by calling from_dict on the json representation - instance_profile_bandwidth_range_model_dict = InstanceProfileBandwidthRange.from_dict(instance_profile_bandwidth_range_model_json).__dict__ - instance_profile_bandwidth_range_model2 = InstanceProfileBandwidthRange(**instance_profile_bandwidth_range_model_dict) + instance_profile_bandwidth_range_model_dict = InstanceProfileBandwidthRange.from_dict( + instance_profile_bandwidth_range_model_json).__dict__ + instance_profile_bandwidth_range_model2 = InstanceProfileBandwidthRange( + **instance_profile_bandwidth_range_model_dict) # Verify the model instances are equivalent assert instance_profile_bandwidth_range_model == instance_profile_bandwidth_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_bandwidth_range_model_json2 = instance_profile_bandwidth_range_model.to_dict() + instance_profile_bandwidth_range_model_json2 = instance_profile_bandwidth_range_model.to_dict( + ) assert instance_profile_bandwidth_range_model_json2 == instance_profile_bandwidth_range_model_json @@ -80126,21 +93253,26 @@ def test_instance_profile_disk_quantity_dependent_serialization(self): # Construct a json representation of a InstanceProfileDiskQuantityDependent model instance_profile_disk_quantity_dependent_model_json = {} - instance_profile_disk_quantity_dependent_model_json['type'] = 'dependent' + instance_profile_disk_quantity_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of InstanceProfileDiskQuantityDependent by calling from_dict on the json representation - instance_profile_disk_quantity_dependent_model = InstanceProfileDiskQuantityDependent.from_dict(instance_profile_disk_quantity_dependent_model_json) + instance_profile_disk_quantity_dependent_model = InstanceProfileDiskQuantityDependent.from_dict( + instance_profile_disk_quantity_dependent_model_json) assert instance_profile_disk_quantity_dependent_model != False # Construct a model instance of InstanceProfileDiskQuantityDependent by calling from_dict on the json representation - instance_profile_disk_quantity_dependent_model_dict = InstanceProfileDiskQuantityDependent.from_dict(instance_profile_disk_quantity_dependent_model_json).__dict__ - instance_profile_disk_quantity_dependent_model2 = InstanceProfileDiskQuantityDependent(**instance_profile_disk_quantity_dependent_model_dict) + instance_profile_disk_quantity_dependent_model_dict = InstanceProfileDiskQuantityDependent.from_dict( + instance_profile_disk_quantity_dependent_model_json).__dict__ + instance_profile_disk_quantity_dependent_model2 = InstanceProfileDiskQuantityDependent( + **instance_profile_disk_quantity_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_quantity_dependent_model == instance_profile_disk_quantity_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_quantity_dependent_model_json2 = instance_profile_disk_quantity_dependent_model.to_dict() + instance_profile_disk_quantity_dependent_model_json2 = instance_profile_disk_quantity_dependent_model.to_dict( + ) assert instance_profile_disk_quantity_dependent_model_json2 == instance_profile_disk_quantity_dependent_model_json @@ -80161,18 +93293,22 @@ def test_instance_profile_disk_quantity_enum_serialization(self): instance_profile_disk_quantity_enum_model_json['values'] = [1, 2, 4, 8] # Construct a model instance of InstanceProfileDiskQuantityEnum by calling from_dict on the json representation - instance_profile_disk_quantity_enum_model = InstanceProfileDiskQuantityEnum.from_dict(instance_profile_disk_quantity_enum_model_json) + instance_profile_disk_quantity_enum_model = InstanceProfileDiskQuantityEnum.from_dict( + instance_profile_disk_quantity_enum_model_json) assert instance_profile_disk_quantity_enum_model != False # Construct a model instance of InstanceProfileDiskQuantityEnum by calling from_dict on the json representation - instance_profile_disk_quantity_enum_model_dict = InstanceProfileDiskQuantityEnum.from_dict(instance_profile_disk_quantity_enum_model_json).__dict__ - instance_profile_disk_quantity_enum_model2 = InstanceProfileDiskQuantityEnum(**instance_profile_disk_quantity_enum_model_dict) + instance_profile_disk_quantity_enum_model_dict = InstanceProfileDiskQuantityEnum.from_dict( + instance_profile_disk_quantity_enum_model_json).__dict__ + instance_profile_disk_quantity_enum_model2 = InstanceProfileDiskQuantityEnum( + **instance_profile_disk_quantity_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_quantity_enum_model == instance_profile_disk_quantity_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_quantity_enum_model_json2 = instance_profile_disk_quantity_enum_model.to_dict() + instance_profile_disk_quantity_enum_model_json2 = instance_profile_disk_quantity_enum_model.to_dict( + ) assert instance_profile_disk_quantity_enum_model_json2 == instance_profile_disk_quantity_enum_model_json @@ -80192,18 +93328,22 @@ def test_instance_profile_disk_quantity_fixed_serialization(self): instance_profile_disk_quantity_fixed_model_json['value'] = 4 # Construct a model instance of InstanceProfileDiskQuantityFixed by calling from_dict on the json representation - instance_profile_disk_quantity_fixed_model = InstanceProfileDiskQuantityFixed.from_dict(instance_profile_disk_quantity_fixed_model_json) + instance_profile_disk_quantity_fixed_model = InstanceProfileDiskQuantityFixed.from_dict( + instance_profile_disk_quantity_fixed_model_json) assert instance_profile_disk_quantity_fixed_model != False # Construct a model instance of InstanceProfileDiskQuantityFixed by calling from_dict on the json representation - instance_profile_disk_quantity_fixed_model_dict = InstanceProfileDiskQuantityFixed.from_dict(instance_profile_disk_quantity_fixed_model_json).__dict__ - instance_profile_disk_quantity_fixed_model2 = InstanceProfileDiskQuantityFixed(**instance_profile_disk_quantity_fixed_model_dict) + instance_profile_disk_quantity_fixed_model_dict = InstanceProfileDiskQuantityFixed.from_dict( + instance_profile_disk_quantity_fixed_model_json).__dict__ + instance_profile_disk_quantity_fixed_model2 = InstanceProfileDiskQuantityFixed( + **instance_profile_disk_quantity_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_quantity_fixed_model == instance_profile_disk_quantity_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_quantity_fixed_model_json2 = instance_profile_disk_quantity_fixed_model.to_dict() + instance_profile_disk_quantity_fixed_model_json2 = instance_profile_disk_quantity_fixed_model.to_dict( + ) assert instance_profile_disk_quantity_fixed_model_json2 == instance_profile_disk_quantity_fixed_model_json @@ -80226,18 +93366,22 @@ def test_instance_profile_disk_quantity_range_serialization(self): instance_profile_disk_quantity_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileDiskQuantityRange by calling from_dict on the json representation - instance_profile_disk_quantity_range_model = InstanceProfileDiskQuantityRange.from_dict(instance_profile_disk_quantity_range_model_json) + instance_profile_disk_quantity_range_model = InstanceProfileDiskQuantityRange.from_dict( + instance_profile_disk_quantity_range_model_json) assert instance_profile_disk_quantity_range_model != False # Construct a model instance of InstanceProfileDiskQuantityRange by calling from_dict on the json representation - instance_profile_disk_quantity_range_model_dict = InstanceProfileDiskQuantityRange.from_dict(instance_profile_disk_quantity_range_model_json).__dict__ - instance_profile_disk_quantity_range_model2 = InstanceProfileDiskQuantityRange(**instance_profile_disk_quantity_range_model_dict) + instance_profile_disk_quantity_range_model_dict = InstanceProfileDiskQuantityRange.from_dict( + instance_profile_disk_quantity_range_model_json).__dict__ + instance_profile_disk_quantity_range_model2 = InstanceProfileDiskQuantityRange( + **instance_profile_disk_quantity_range_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_quantity_range_model == instance_profile_disk_quantity_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_quantity_range_model_json2 = instance_profile_disk_quantity_range_model.to_dict() + instance_profile_disk_quantity_range_model_json2 = instance_profile_disk_quantity_range_model.to_dict( + ) assert instance_profile_disk_quantity_range_model_json2 == instance_profile_disk_quantity_range_model_json @@ -80256,18 +93400,22 @@ def test_instance_profile_disk_size_dependent_serialization(self): instance_profile_disk_size_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileDiskSizeDependent by calling from_dict on the json representation - instance_profile_disk_size_dependent_model = InstanceProfileDiskSizeDependent.from_dict(instance_profile_disk_size_dependent_model_json) + instance_profile_disk_size_dependent_model = InstanceProfileDiskSizeDependent.from_dict( + instance_profile_disk_size_dependent_model_json) assert instance_profile_disk_size_dependent_model != False # Construct a model instance of InstanceProfileDiskSizeDependent by calling from_dict on the json representation - instance_profile_disk_size_dependent_model_dict = InstanceProfileDiskSizeDependent.from_dict(instance_profile_disk_size_dependent_model_json).__dict__ - instance_profile_disk_size_dependent_model2 = InstanceProfileDiskSizeDependent(**instance_profile_disk_size_dependent_model_dict) + instance_profile_disk_size_dependent_model_dict = InstanceProfileDiskSizeDependent.from_dict( + instance_profile_disk_size_dependent_model_json).__dict__ + instance_profile_disk_size_dependent_model2 = InstanceProfileDiskSizeDependent( + **instance_profile_disk_size_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_size_dependent_model == instance_profile_disk_size_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_size_dependent_model_json2 = instance_profile_disk_size_dependent_model.to_dict() + instance_profile_disk_size_dependent_model_json2 = instance_profile_disk_size_dependent_model.to_dict( + ) assert instance_profile_disk_size_dependent_model_json2 == instance_profile_disk_size_dependent_model_json @@ -80288,18 +93436,22 @@ def test_instance_profile_disk_size_enum_serialization(self): instance_profile_disk_size_enum_model_json['values'] = [1, 2, 4, 8] # Construct a model instance of InstanceProfileDiskSizeEnum by calling from_dict on the json representation - instance_profile_disk_size_enum_model = InstanceProfileDiskSizeEnum.from_dict(instance_profile_disk_size_enum_model_json) + instance_profile_disk_size_enum_model = InstanceProfileDiskSizeEnum.from_dict( + instance_profile_disk_size_enum_model_json) assert instance_profile_disk_size_enum_model != False # Construct a model instance of InstanceProfileDiskSizeEnum by calling from_dict on the json representation - instance_profile_disk_size_enum_model_dict = InstanceProfileDiskSizeEnum.from_dict(instance_profile_disk_size_enum_model_json).__dict__ - instance_profile_disk_size_enum_model2 = InstanceProfileDiskSizeEnum(**instance_profile_disk_size_enum_model_dict) + instance_profile_disk_size_enum_model_dict = InstanceProfileDiskSizeEnum.from_dict( + instance_profile_disk_size_enum_model_json).__dict__ + instance_profile_disk_size_enum_model2 = InstanceProfileDiskSizeEnum( + **instance_profile_disk_size_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_size_enum_model == instance_profile_disk_size_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_size_enum_model_json2 = instance_profile_disk_size_enum_model.to_dict() + instance_profile_disk_size_enum_model_json2 = instance_profile_disk_size_enum_model.to_dict( + ) assert instance_profile_disk_size_enum_model_json2 == instance_profile_disk_size_enum_model_json @@ -80319,18 +93471,22 @@ def test_instance_profile_disk_size_fixed_serialization(self): instance_profile_disk_size_fixed_model_json['value'] = 100 # Construct a model instance of InstanceProfileDiskSizeFixed by calling from_dict on the json representation - instance_profile_disk_size_fixed_model = InstanceProfileDiskSizeFixed.from_dict(instance_profile_disk_size_fixed_model_json) + instance_profile_disk_size_fixed_model = InstanceProfileDiskSizeFixed.from_dict( + instance_profile_disk_size_fixed_model_json) assert instance_profile_disk_size_fixed_model != False # Construct a model instance of InstanceProfileDiskSizeFixed by calling from_dict on the json representation - instance_profile_disk_size_fixed_model_dict = InstanceProfileDiskSizeFixed.from_dict(instance_profile_disk_size_fixed_model_json).__dict__ - instance_profile_disk_size_fixed_model2 = InstanceProfileDiskSizeFixed(**instance_profile_disk_size_fixed_model_dict) + instance_profile_disk_size_fixed_model_dict = InstanceProfileDiskSizeFixed.from_dict( + instance_profile_disk_size_fixed_model_json).__dict__ + instance_profile_disk_size_fixed_model2 = InstanceProfileDiskSizeFixed( + **instance_profile_disk_size_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_size_fixed_model == instance_profile_disk_size_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_size_fixed_model_json2 = instance_profile_disk_size_fixed_model.to_dict() + instance_profile_disk_size_fixed_model_json2 = instance_profile_disk_size_fixed_model.to_dict( + ) assert instance_profile_disk_size_fixed_model_json2 == instance_profile_disk_size_fixed_model_json @@ -80353,18 +93509,22 @@ def test_instance_profile_disk_size_range_serialization(self): instance_profile_disk_size_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileDiskSizeRange by calling from_dict on the json representation - instance_profile_disk_size_range_model = InstanceProfileDiskSizeRange.from_dict(instance_profile_disk_size_range_model_json) + instance_profile_disk_size_range_model = InstanceProfileDiskSizeRange.from_dict( + instance_profile_disk_size_range_model_json) assert instance_profile_disk_size_range_model != False # Construct a model instance of InstanceProfileDiskSizeRange by calling from_dict on the json representation - instance_profile_disk_size_range_model_dict = InstanceProfileDiskSizeRange.from_dict(instance_profile_disk_size_range_model_json).__dict__ - instance_profile_disk_size_range_model2 = InstanceProfileDiskSizeRange(**instance_profile_disk_size_range_model_dict) + instance_profile_disk_size_range_model_dict = InstanceProfileDiskSizeRange.from_dict( + instance_profile_disk_size_range_model_json).__dict__ + instance_profile_disk_size_range_model2 = InstanceProfileDiskSizeRange( + **instance_profile_disk_size_range_model_dict) # Verify the model instances are equivalent assert instance_profile_disk_size_range_model == instance_profile_disk_size_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_disk_size_range_model_json2 = instance_profile_disk_size_range_model.to_dict() + instance_profile_disk_size_range_model_json2 = instance_profile_disk_size_range_model.to_dict( + ) assert instance_profile_disk_size_range_model_json2 == instance_profile_disk_size_range_model_json @@ -80383,18 +93543,22 @@ def test_instance_profile_gpu_dependent_serialization(self): instance_profile_gpu_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileGPUDependent by calling from_dict on the json representation - instance_profile_gpu_dependent_model = InstanceProfileGPUDependent.from_dict(instance_profile_gpu_dependent_model_json) + instance_profile_gpu_dependent_model = InstanceProfileGPUDependent.from_dict( + instance_profile_gpu_dependent_model_json) assert instance_profile_gpu_dependent_model != False # Construct a model instance of InstanceProfileGPUDependent by calling from_dict on the json representation - instance_profile_gpu_dependent_model_dict = InstanceProfileGPUDependent.from_dict(instance_profile_gpu_dependent_model_json).__dict__ - instance_profile_gpu_dependent_model2 = InstanceProfileGPUDependent(**instance_profile_gpu_dependent_model_dict) + instance_profile_gpu_dependent_model_dict = InstanceProfileGPUDependent.from_dict( + instance_profile_gpu_dependent_model_json).__dict__ + instance_profile_gpu_dependent_model2 = InstanceProfileGPUDependent( + **instance_profile_gpu_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_dependent_model == instance_profile_gpu_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_dependent_model_json2 = instance_profile_gpu_dependent_model.to_dict() + instance_profile_gpu_dependent_model_json2 = instance_profile_gpu_dependent_model.to_dict( + ) assert instance_profile_gpu_dependent_model_json2 == instance_profile_gpu_dependent_model_json @@ -80415,18 +93579,22 @@ def test_instance_profile_gpu_enum_serialization(self): instance_profile_gpu_enum_model_json['values'] = [2, 4] # Construct a model instance of InstanceProfileGPUEnum by calling from_dict on the json representation - instance_profile_gpu_enum_model = InstanceProfileGPUEnum.from_dict(instance_profile_gpu_enum_model_json) + instance_profile_gpu_enum_model = InstanceProfileGPUEnum.from_dict( + instance_profile_gpu_enum_model_json) assert instance_profile_gpu_enum_model != False # Construct a model instance of InstanceProfileGPUEnum by calling from_dict on the json representation - instance_profile_gpu_enum_model_dict = InstanceProfileGPUEnum.from_dict(instance_profile_gpu_enum_model_json).__dict__ - instance_profile_gpu_enum_model2 = InstanceProfileGPUEnum(**instance_profile_gpu_enum_model_dict) + instance_profile_gpu_enum_model_dict = InstanceProfileGPUEnum.from_dict( + instance_profile_gpu_enum_model_json).__dict__ + instance_profile_gpu_enum_model2 = InstanceProfileGPUEnum( + **instance_profile_gpu_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_enum_model == instance_profile_gpu_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_enum_model_json2 = instance_profile_gpu_enum_model.to_dict() + instance_profile_gpu_enum_model_json2 = instance_profile_gpu_enum_model.to_dict( + ) assert instance_profile_gpu_enum_model_json2 == instance_profile_gpu_enum_model_json @@ -80446,18 +93614,22 @@ def test_instance_profile_gpu_fixed_serialization(self): instance_profile_gpu_fixed_model_json['value'] = 2 # Construct a model instance of InstanceProfileGPUFixed by calling from_dict on the json representation - instance_profile_gpu_fixed_model = InstanceProfileGPUFixed.from_dict(instance_profile_gpu_fixed_model_json) + instance_profile_gpu_fixed_model = InstanceProfileGPUFixed.from_dict( + instance_profile_gpu_fixed_model_json) assert instance_profile_gpu_fixed_model != False # Construct a model instance of InstanceProfileGPUFixed by calling from_dict on the json representation - instance_profile_gpu_fixed_model_dict = InstanceProfileGPUFixed.from_dict(instance_profile_gpu_fixed_model_json).__dict__ - instance_profile_gpu_fixed_model2 = InstanceProfileGPUFixed(**instance_profile_gpu_fixed_model_dict) + instance_profile_gpu_fixed_model_dict = InstanceProfileGPUFixed.from_dict( + instance_profile_gpu_fixed_model_json).__dict__ + instance_profile_gpu_fixed_model2 = InstanceProfileGPUFixed( + **instance_profile_gpu_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_fixed_model == instance_profile_gpu_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_fixed_model_json2 = instance_profile_gpu_fixed_model.to_dict() + instance_profile_gpu_fixed_model_json2 = instance_profile_gpu_fixed_model.to_dict( + ) assert instance_profile_gpu_fixed_model_json2 == instance_profile_gpu_fixed_model_json @@ -80476,18 +93648,22 @@ def test_instance_profile_gpu_memory_dependent_serialization(self): instance_profile_gpu_memory_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileGPUMemoryDependent by calling from_dict on the json representation - instance_profile_gpu_memory_dependent_model = InstanceProfileGPUMemoryDependent.from_dict(instance_profile_gpu_memory_dependent_model_json) + instance_profile_gpu_memory_dependent_model = InstanceProfileGPUMemoryDependent.from_dict( + instance_profile_gpu_memory_dependent_model_json) assert instance_profile_gpu_memory_dependent_model != False # Construct a model instance of InstanceProfileGPUMemoryDependent by calling from_dict on the json representation - instance_profile_gpu_memory_dependent_model_dict = InstanceProfileGPUMemoryDependent.from_dict(instance_profile_gpu_memory_dependent_model_json).__dict__ - instance_profile_gpu_memory_dependent_model2 = InstanceProfileGPUMemoryDependent(**instance_profile_gpu_memory_dependent_model_dict) + instance_profile_gpu_memory_dependent_model_dict = InstanceProfileGPUMemoryDependent.from_dict( + instance_profile_gpu_memory_dependent_model_json).__dict__ + instance_profile_gpu_memory_dependent_model2 = InstanceProfileGPUMemoryDependent( + **instance_profile_gpu_memory_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_memory_dependent_model == instance_profile_gpu_memory_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_memory_dependent_model_json2 = instance_profile_gpu_memory_dependent_model.to_dict() + instance_profile_gpu_memory_dependent_model_json2 = instance_profile_gpu_memory_dependent_model.to_dict( + ) assert instance_profile_gpu_memory_dependent_model_json2 == instance_profile_gpu_memory_dependent_model_json @@ -80508,18 +93684,22 @@ def test_instance_profile_gpu_memory_enum_serialization(self): instance_profile_gpu_memory_enum_model_json['values'] = [16, 32] # Construct a model instance of InstanceProfileGPUMemoryEnum by calling from_dict on the json representation - instance_profile_gpu_memory_enum_model = InstanceProfileGPUMemoryEnum.from_dict(instance_profile_gpu_memory_enum_model_json) + instance_profile_gpu_memory_enum_model = InstanceProfileGPUMemoryEnum.from_dict( + instance_profile_gpu_memory_enum_model_json) assert instance_profile_gpu_memory_enum_model != False # Construct a model instance of InstanceProfileGPUMemoryEnum by calling from_dict on the json representation - instance_profile_gpu_memory_enum_model_dict = InstanceProfileGPUMemoryEnum.from_dict(instance_profile_gpu_memory_enum_model_json).__dict__ - instance_profile_gpu_memory_enum_model2 = InstanceProfileGPUMemoryEnum(**instance_profile_gpu_memory_enum_model_dict) + instance_profile_gpu_memory_enum_model_dict = InstanceProfileGPUMemoryEnum.from_dict( + instance_profile_gpu_memory_enum_model_json).__dict__ + instance_profile_gpu_memory_enum_model2 = InstanceProfileGPUMemoryEnum( + **instance_profile_gpu_memory_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_memory_enum_model == instance_profile_gpu_memory_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_memory_enum_model_json2 = instance_profile_gpu_memory_enum_model.to_dict() + instance_profile_gpu_memory_enum_model_json2 = instance_profile_gpu_memory_enum_model.to_dict( + ) assert instance_profile_gpu_memory_enum_model_json2 == instance_profile_gpu_memory_enum_model_json @@ -80539,18 +93719,22 @@ def test_instance_profile_gpu_memory_fixed_serialization(self): instance_profile_gpu_memory_fixed_model_json['value'] = 16 # Construct a model instance of InstanceProfileGPUMemoryFixed by calling from_dict on the json representation - instance_profile_gpu_memory_fixed_model = InstanceProfileGPUMemoryFixed.from_dict(instance_profile_gpu_memory_fixed_model_json) + instance_profile_gpu_memory_fixed_model = InstanceProfileGPUMemoryFixed.from_dict( + instance_profile_gpu_memory_fixed_model_json) assert instance_profile_gpu_memory_fixed_model != False # Construct a model instance of InstanceProfileGPUMemoryFixed by calling from_dict on the json representation - instance_profile_gpu_memory_fixed_model_dict = InstanceProfileGPUMemoryFixed.from_dict(instance_profile_gpu_memory_fixed_model_json).__dict__ - instance_profile_gpu_memory_fixed_model2 = InstanceProfileGPUMemoryFixed(**instance_profile_gpu_memory_fixed_model_dict) + instance_profile_gpu_memory_fixed_model_dict = InstanceProfileGPUMemoryFixed.from_dict( + instance_profile_gpu_memory_fixed_model_json).__dict__ + instance_profile_gpu_memory_fixed_model2 = InstanceProfileGPUMemoryFixed( + **instance_profile_gpu_memory_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_memory_fixed_model == instance_profile_gpu_memory_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_memory_fixed_model_json2 = instance_profile_gpu_memory_fixed_model.to_dict() + instance_profile_gpu_memory_fixed_model_json2 = instance_profile_gpu_memory_fixed_model.to_dict( + ) assert instance_profile_gpu_memory_fixed_model_json2 == instance_profile_gpu_memory_fixed_model_json @@ -80573,18 +93757,22 @@ def test_instance_profile_gpu_memory_range_serialization(self): instance_profile_gpu_memory_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileGPUMemoryRange by calling from_dict on the json representation - instance_profile_gpu_memory_range_model = InstanceProfileGPUMemoryRange.from_dict(instance_profile_gpu_memory_range_model_json) + instance_profile_gpu_memory_range_model = InstanceProfileGPUMemoryRange.from_dict( + instance_profile_gpu_memory_range_model_json) assert instance_profile_gpu_memory_range_model != False # Construct a model instance of InstanceProfileGPUMemoryRange by calling from_dict on the json representation - instance_profile_gpu_memory_range_model_dict = InstanceProfileGPUMemoryRange.from_dict(instance_profile_gpu_memory_range_model_json).__dict__ - instance_profile_gpu_memory_range_model2 = InstanceProfileGPUMemoryRange(**instance_profile_gpu_memory_range_model_dict) + instance_profile_gpu_memory_range_model_dict = InstanceProfileGPUMemoryRange.from_dict( + instance_profile_gpu_memory_range_model_json).__dict__ + instance_profile_gpu_memory_range_model2 = InstanceProfileGPUMemoryRange( + **instance_profile_gpu_memory_range_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_memory_range_model == instance_profile_gpu_memory_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_memory_range_model_json2 = instance_profile_gpu_memory_range_model.to_dict() + instance_profile_gpu_memory_range_model_json2 = instance_profile_gpu_memory_range_model.to_dict( + ) assert instance_profile_gpu_memory_range_model_json2 == instance_profile_gpu_memory_range_model_json @@ -80607,18 +93795,22 @@ def test_instance_profile_gpu_range_serialization(self): instance_profile_gpu_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileGPURange by calling from_dict on the json representation - instance_profile_gpu_range_model = InstanceProfileGPURange.from_dict(instance_profile_gpu_range_model_json) + instance_profile_gpu_range_model = InstanceProfileGPURange.from_dict( + instance_profile_gpu_range_model_json) assert instance_profile_gpu_range_model != False # Construct a model instance of InstanceProfileGPURange by calling from_dict on the json representation - instance_profile_gpu_range_model_dict = InstanceProfileGPURange.from_dict(instance_profile_gpu_range_model_json).__dict__ - instance_profile_gpu_range_model2 = InstanceProfileGPURange(**instance_profile_gpu_range_model_dict) + instance_profile_gpu_range_model_dict = InstanceProfileGPURange.from_dict( + instance_profile_gpu_range_model_json).__dict__ + instance_profile_gpu_range_model2 = InstanceProfileGPURange( + **instance_profile_gpu_range_model_dict) # Verify the model instances are equivalent assert instance_profile_gpu_range_model == instance_profile_gpu_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_gpu_range_model_json2 = instance_profile_gpu_range_model.to_dict() + instance_profile_gpu_range_model_json2 = instance_profile_gpu_range_model.to_dict( + ) assert instance_profile_gpu_range_model_json2 == instance_profile_gpu_range_model_json @@ -80634,21 +93826,26 @@ def test_instance_profile_identity_by_href_serialization(self): # Construct a json representation of a InstanceProfileIdentityByHref model instance_profile_identity_by_href_model_json = {} - instance_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + instance_profile_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' # Construct a model instance of InstanceProfileIdentityByHref by calling from_dict on the json representation - instance_profile_identity_by_href_model = InstanceProfileIdentityByHref.from_dict(instance_profile_identity_by_href_model_json) + instance_profile_identity_by_href_model = InstanceProfileIdentityByHref.from_dict( + instance_profile_identity_by_href_model_json) assert instance_profile_identity_by_href_model != False # Construct a model instance of InstanceProfileIdentityByHref by calling from_dict on the json representation - instance_profile_identity_by_href_model_dict = InstanceProfileIdentityByHref.from_dict(instance_profile_identity_by_href_model_json).__dict__ - instance_profile_identity_by_href_model2 = InstanceProfileIdentityByHref(**instance_profile_identity_by_href_model_dict) + instance_profile_identity_by_href_model_dict = InstanceProfileIdentityByHref.from_dict( + instance_profile_identity_by_href_model_json).__dict__ + instance_profile_identity_by_href_model2 = InstanceProfileIdentityByHref( + **instance_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert instance_profile_identity_by_href_model == instance_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_identity_by_href_model_json2 = instance_profile_identity_by_href_model.to_dict() + instance_profile_identity_by_href_model_json2 = instance_profile_identity_by_href_model.to_dict( + ) assert instance_profile_identity_by_href_model_json2 == instance_profile_identity_by_href_model_json @@ -80667,18 +93864,22 @@ def test_instance_profile_identity_by_name_serialization(self): instance_profile_identity_by_name_model_json['name'] = 'bx2-4x16' # Construct a model instance of InstanceProfileIdentityByName by calling from_dict on the json representation - instance_profile_identity_by_name_model = InstanceProfileIdentityByName.from_dict(instance_profile_identity_by_name_model_json) + instance_profile_identity_by_name_model = InstanceProfileIdentityByName.from_dict( + instance_profile_identity_by_name_model_json) assert instance_profile_identity_by_name_model != False # Construct a model instance of InstanceProfileIdentityByName by calling from_dict on the json representation - instance_profile_identity_by_name_model_dict = InstanceProfileIdentityByName.from_dict(instance_profile_identity_by_name_model_json).__dict__ - instance_profile_identity_by_name_model2 = InstanceProfileIdentityByName(**instance_profile_identity_by_name_model_dict) + instance_profile_identity_by_name_model_dict = InstanceProfileIdentityByName.from_dict( + instance_profile_identity_by_name_model_json).__dict__ + instance_profile_identity_by_name_model2 = InstanceProfileIdentityByName( + **instance_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert instance_profile_identity_by_name_model == instance_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_identity_by_name_model_json2 = instance_profile_identity_by_name_model.to_dict() + instance_profile_identity_by_name_model_json2 = instance_profile_identity_by_name_model.to_dict( + ) assert instance_profile_identity_by_name_model_json2 == instance_profile_identity_by_name_model_json @@ -80697,18 +93898,22 @@ def test_instance_profile_memory_dependent_serialization(self): instance_profile_memory_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileMemoryDependent by calling from_dict on the json representation - instance_profile_memory_dependent_model = InstanceProfileMemoryDependent.from_dict(instance_profile_memory_dependent_model_json) + instance_profile_memory_dependent_model = InstanceProfileMemoryDependent.from_dict( + instance_profile_memory_dependent_model_json) assert instance_profile_memory_dependent_model != False # Construct a model instance of InstanceProfileMemoryDependent by calling from_dict on the json representation - instance_profile_memory_dependent_model_dict = InstanceProfileMemoryDependent.from_dict(instance_profile_memory_dependent_model_json).__dict__ - instance_profile_memory_dependent_model2 = InstanceProfileMemoryDependent(**instance_profile_memory_dependent_model_dict) + instance_profile_memory_dependent_model_dict = InstanceProfileMemoryDependent.from_dict( + instance_profile_memory_dependent_model_json).__dict__ + instance_profile_memory_dependent_model2 = InstanceProfileMemoryDependent( + **instance_profile_memory_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_memory_dependent_model == instance_profile_memory_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_memory_dependent_model_json2 = instance_profile_memory_dependent_model.to_dict() + instance_profile_memory_dependent_model_json2 = instance_profile_memory_dependent_model.to_dict( + ) assert instance_profile_memory_dependent_model_json2 == instance_profile_memory_dependent_model_json @@ -80729,18 +93934,22 @@ def test_instance_profile_memory_enum_serialization(self): instance_profile_memory_enum_model_json['values'] = [8, 16, 32] # Construct a model instance of InstanceProfileMemoryEnum by calling from_dict on the json representation - instance_profile_memory_enum_model = InstanceProfileMemoryEnum.from_dict(instance_profile_memory_enum_model_json) + instance_profile_memory_enum_model = InstanceProfileMemoryEnum.from_dict( + instance_profile_memory_enum_model_json) assert instance_profile_memory_enum_model != False # Construct a model instance of InstanceProfileMemoryEnum by calling from_dict on the json representation - instance_profile_memory_enum_model_dict = InstanceProfileMemoryEnum.from_dict(instance_profile_memory_enum_model_json).__dict__ - instance_profile_memory_enum_model2 = InstanceProfileMemoryEnum(**instance_profile_memory_enum_model_dict) + instance_profile_memory_enum_model_dict = InstanceProfileMemoryEnum.from_dict( + instance_profile_memory_enum_model_json).__dict__ + instance_profile_memory_enum_model2 = InstanceProfileMemoryEnum( + **instance_profile_memory_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_memory_enum_model == instance_profile_memory_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_memory_enum_model_json2 = instance_profile_memory_enum_model.to_dict() + instance_profile_memory_enum_model_json2 = instance_profile_memory_enum_model.to_dict( + ) assert instance_profile_memory_enum_model_json2 == instance_profile_memory_enum_model_json @@ -80760,18 +93969,22 @@ def test_instance_profile_memory_fixed_serialization(self): instance_profile_memory_fixed_model_json['value'] = 16 # Construct a model instance of InstanceProfileMemoryFixed by calling from_dict on the json representation - instance_profile_memory_fixed_model = InstanceProfileMemoryFixed.from_dict(instance_profile_memory_fixed_model_json) + instance_profile_memory_fixed_model = InstanceProfileMemoryFixed.from_dict( + instance_profile_memory_fixed_model_json) assert instance_profile_memory_fixed_model != False # Construct a model instance of InstanceProfileMemoryFixed by calling from_dict on the json representation - instance_profile_memory_fixed_model_dict = InstanceProfileMemoryFixed.from_dict(instance_profile_memory_fixed_model_json).__dict__ - instance_profile_memory_fixed_model2 = InstanceProfileMemoryFixed(**instance_profile_memory_fixed_model_dict) + instance_profile_memory_fixed_model_dict = InstanceProfileMemoryFixed.from_dict( + instance_profile_memory_fixed_model_json).__dict__ + instance_profile_memory_fixed_model2 = InstanceProfileMemoryFixed( + **instance_profile_memory_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_memory_fixed_model == instance_profile_memory_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_memory_fixed_model_json2 = instance_profile_memory_fixed_model.to_dict() + instance_profile_memory_fixed_model_json2 = instance_profile_memory_fixed_model.to_dict( + ) assert instance_profile_memory_fixed_model_json2 == instance_profile_memory_fixed_model_json @@ -80794,18 +94007,22 @@ def test_instance_profile_memory_range_serialization(self): instance_profile_memory_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileMemoryRange by calling from_dict on the json representation - instance_profile_memory_range_model = InstanceProfileMemoryRange.from_dict(instance_profile_memory_range_model_json) + instance_profile_memory_range_model = InstanceProfileMemoryRange.from_dict( + instance_profile_memory_range_model_json) assert instance_profile_memory_range_model != False # Construct a model instance of InstanceProfileMemoryRange by calling from_dict on the json representation - instance_profile_memory_range_model_dict = InstanceProfileMemoryRange.from_dict(instance_profile_memory_range_model_json).__dict__ - instance_profile_memory_range_model2 = InstanceProfileMemoryRange(**instance_profile_memory_range_model_dict) + instance_profile_memory_range_model_dict = InstanceProfileMemoryRange.from_dict( + instance_profile_memory_range_model_json).__dict__ + instance_profile_memory_range_model2 = InstanceProfileMemoryRange( + **instance_profile_memory_range_model_dict) # Verify the model instances are equivalent assert instance_profile_memory_range_model == instance_profile_memory_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_memory_range_model_json2 = instance_profile_memory_range_model.to_dict() + instance_profile_memory_range_model_json2 = instance_profile_memory_range_model.to_dict( + ) assert instance_profile_memory_range_model_json2 == instance_profile_memory_range_model_json @@ -80824,18 +94041,22 @@ def test_instance_profile_numa_count_dependent_serialization(self): instance_profile_numa_count_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileNUMACountDependent by calling from_dict on the json representation - instance_profile_numa_count_dependent_model = InstanceProfileNUMACountDependent.from_dict(instance_profile_numa_count_dependent_model_json) + instance_profile_numa_count_dependent_model = InstanceProfileNUMACountDependent.from_dict( + instance_profile_numa_count_dependent_model_json) assert instance_profile_numa_count_dependent_model != False # Construct a model instance of InstanceProfileNUMACountDependent by calling from_dict on the json representation - instance_profile_numa_count_dependent_model_dict = InstanceProfileNUMACountDependent.from_dict(instance_profile_numa_count_dependent_model_json).__dict__ - instance_profile_numa_count_dependent_model2 = InstanceProfileNUMACountDependent(**instance_profile_numa_count_dependent_model_dict) + instance_profile_numa_count_dependent_model_dict = InstanceProfileNUMACountDependent.from_dict( + instance_profile_numa_count_dependent_model_json).__dict__ + instance_profile_numa_count_dependent_model2 = InstanceProfileNUMACountDependent( + **instance_profile_numa_count_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_numa_count_dependent_model == instance_profile_numa_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_numa_count_dependent_model_json2 = instance_profile_numa_count_dependent_model.to_dict() + instance_profile_numa_count_dependent_model_json2 = instance_profile_numa_count_dependent_model.to_dict( + ) assert instance_profile_numa_count_dependent_model_json2 == instance_profile_numa_count_dependent_model_json @@ -80855,18 +94076,22 @@ def test_instance_profile_numa_count_fixed_serialization(self): instance_profile_numa_count_fixed_model_json['value'] = 2 # Construct a model instance of InstanceProfileNUMACountFixed by calling from_dict on the json representation - instance_profile_numa_count_fixed_model = InstanceProfileNUMACountFixed.from_dict(instance_profile_numa_count_fixed_model_json) + instance_profile_numa_count_fixed_model = InstanceProfileNUMACountFixed.from_dict( + instance_profile_numa_count_fixed_model_json) assert instance_profile_numa_count_fixed_model != False # Construct a model instance of InstanceProfileNUMACountFixed by calling from_dict on the json representation - instance_profile_numa_count_fixed_model_dict = InstanceProfileNUMACountFixed.from_dict(instance_profile_numa_count_fixed_model_json).__dict__ - instance_profile_numa_count_fixed_model2 = InstanceProfileNUMACountFixed(**instance_profile_numa_count_fixed_model_dict) + instance_profile_numa_count_fixed_model_dict = InstanceProfileNUMACountFixed.from_dict( + instance_profile_numa_count_fixed_model_json).__dict__ + instance_profile_numa_count_fixed_model2 = InstanceProfileNUMACountFixed( + **instance_profile_numa_count_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_numa_count_fixed_model == instance_profile_numa_count_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_numa_count_fixed_model_json2 = instance_profile_numa_count_fixed_model.to_dict() + instance_profile_numa_count_fixed_model_json2 = instance_profile_numa_count_fixed_model.to_dict( + ) assert instance_profile_numa_count_fixed_model_json2 == instance_profile_numa_count_fixed_model_json @@ -80875,28 +94100,35 @@ class TestModel_InstanceProfileNetworkAttachmentCountDependent: Test Class for InstanceProfileNetworkAttachmentCountDependent """ - def test_instance_profile_network_attachment_count_dependent_serialization(self): + def test_instance_profile_network_attachment_count_dependent_serialization( + self): """ Test serialization/deserialization for InstanceProfileNetworkAttachmentCountDependent """ # Construct a json representation of a InstanceProfileNetworkAttachmentCountDependent model instance_profile_network_attachment_count_dependent_model_json = {} - instance_profile_network_attachment_count_dependent_model_json['type'] = 'dependent' + instance_profile_network_attachment_count_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of InstanceProfileNetworkAttachmentCountDependent by calling from_dict on the json representation - instance_profile_network_attachment_count_dependent_model = InstanceProfileNetworkAttachmentCountDependent.from_dict(instance_profile_network_attachment_count_dependent_model_json) + instance_profile_network_attachment_count_dependent_model = InstanceProfileNetworkAttachmentCountDependent.from_dict( + instance_profile_network_attachment_count_dependent_model_json) assert instance_profile_network_attachment_count_dependent_model != False # Construct a model instance of InstanceProfileNetworkAttachmentCountDependent by calling from_dict on the json representation - instance_profile_network_attachment_count_dependent_model_dict = InstanceProfileNetworkAttachmentCountDependent.from_dict(instance_profile_network_attachment_count_dependent_model_json).__dict__ - instance_profile_network_attachment_count_dependent_model2 = InstanceProfileNetworkAttachmentCountDependent(**instance_profile_network_attachment_count_dependent_model_dict) + instance_profile_network_attachment_count_dependent_model_dict = InstanceProfileNetworkAttachmentCountDependent.from_dict( + instance_profile_network_attachment_count_dependent_model_json + ).__dict__ + instance_profile_network_attachment_count_dependent_model2 = InstanceProfileNetworkAttachmentCountDependent( + **instance_profile_network_attachment_count_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_network_attachment_count_dependent_model == instance_profile_network_attachment_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_network_attachment_count_dependent_model_json2 = instance_profile_network_attachment_count_dependent_model.to_dict() + instance_profile_network_attachment_count_dependent_model_json2 = instance_profile_network_attachment_count_dependent_model.to_dict( + ) assert instance_profile_network_attachment_count_dependent_model_json2 == instance_profile_network_attachment_count_dependent_model_json @@ -80905,7 +94137,8 @@ class TestModel_InstanceProfileNetworkAttachmentCountRange: Test Class for InstanceProfileNetworkAttachmentCountRange """ - def test_instance_profile_network_attachment_count_range_serialization(self): + def test_instance_profile_network_attachment_count_range_serialization( + self): """ Test serialization/deserialization for InstanceProfileNetworkAttachmentCountRange """ @@ -80914,21 +94147,26 @@ def test_instance_profile_network_attachment_count_range_serialization(self): instance_profile_network_attachment_count_range_model_json = {} instance_profile_network_attachment_count_range_model_json['max'] = 5 instance_profile_network_attachment_count_range_model_json['min'] = 1 - instance_profile_network_attachment_count_range_model_json['type'] = 'range' + instance_profile_network_attachment_count_range_model_json[ + 'type'] = 'range' # Construct a model instance of InstanceProfileNetworkAttachmentCountRange by calling from_dict on the json representation - instance_profile_network_attachment_count_range_model = InstanceProfileNetworkAttachmentCountRange.from_dict(instance_profile_network_attachment_count_range_model_json) + instance_profile_network_attachment_count_range_model = InstanceProfileNetworkAttachmentCountRange.from_dict( + instance_profile_network_attachment_count_range_model_json) assert instance_profile_network_attachment_count_range_model != False # Construct a model instance of InstanceProfileNetworkAttachmentCountRange by calling from_dict on the json representation - instance_profile_network_attachment_count_range_model_dict = InstanceProfileNetworkAttachmentCountRange.from_dict(instance_profile_network_attachment_count_range_model_json).__dict__ - instance_profile_network_attachment_count_range_model2 = InstanceProfileNetworkAttachmentCountRange(**instance_profile_network_attachment_count_range_model_dict) + instance_profile_network_attachment_count_range_model_dict = InstanceProfileNetworkAttachmentCountRange.from_dict( + instance_profile_network_attachment_count_range_model_json).__dict__ + instance_profile_network_attachment_count_range_model2 = InstanceProfileNetworkAttachmentCountRange( + **instance_profile_network_attachment_count_range_model_dict) # Verify the model instances are equivalent assert instance_profile_network_attachment_count_range_model == instance_profile_network_attachment_count_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_network_attachment_count_range_model_json2 = instance_profile_network_attachment_count_range_model.to_dict() + instance_profile_network_attachment_count_range_model_json2 = instance_profile_network_attachment_count_range_model.to_dict( + ) assert instance_profile_network_attachment_count_range_model_json2 == instance_profile_network_attachment_count_range_model_json @@ -80937,28 +94175,35 @@ class TestModel_InstanceProfileNetworkInterfaceCountDependent: Test Class for InstanceProfileNetworkInterfaceCountDependent """ - def test_instance_profile_network_interface_count_dependent_serialization(self): + def test_instance_profile_network_interface_count_dependent_serialization( + self): """ Test serialization/deserialization for InstanceProfileNetworkInterfaceCountDependent """ # Construct a json representation of a InstanceProfileNetworkInterfaceCountDependent model instance_profile_network_interface_count_dependent_model_json = {} - instance_profile_network_interface_count_dependent_model_json['type'] = 'dependent' + instance_profile_network_interface_count_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of InstanceProfileNetworkInterfaceCountDependent by calling from_dict on the json representation - instance_profile_network_interface_count_dependent_model = InstanceProfileNetworkInterfaceCountDependent.from_dict(instance_profile_network_interface_count_dependent_model_json) + instance_profile_network_interface_count_dependent_model = InstanceProfileNetworkInterfaceCountDependent.from_dict( + instance_profile_network_interface_count_dependent_model_json) assert instance_profile_network_interface_count_dependent_model != False # Construct a model instance of InstanceProfileNetworkInterfaceCountDependent by calling from_dict on the json representation - instance_profile_network_interface_count_dependent_model_dict = InstanceProfileNetworkInterfaceCountDependent.from_dict(instance_profile_network_interface_count_dependent_model_json).__dict__ - instance_profile_network_interface_count_dependent_model2 = InstanceProfileNetworkInterfaceCountDependent(**instance_profile_network_interface_count_dependent_model_dict) + instance_profile_network_interface_count_dependent_model_dict = InstanceProfileNetworkInterfaceCountDependent.from_dict( + instance_profile_network_interface_count_dependent_model_json + ).__dict__ + instance_profile_network_interface_count_dependent_model2 = InstanceProfileNetworkInterfaceCountDependent( + **instance_profile_network_interface_count_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_network_interface_count_dependent_model == instance_profile_network_interface_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_network_interface_count_dependent_model_json2 = instance_profile_network_interface_count_dependent_model.to_dict() + instance_profile_network_interface_count_dependent_model_json2 = instance_profile_network_interface_count_dependent_model.to_dict( + ) assert instance_profile_network_interface_count_dependent_model_json2 == instance_profile_network_interface_count_dependent_model_json @@ -80976,21 +94221,26 @@ def test_instance_profile_network_interface_count_range_serialization(self): instance_profile_network_interface_count_range_model_json = {} instance_profile_network_interface_count_range_model_json['max'] = 5 instance_profile_network_interface_count_range_model_json['min'] = 1 - instance_profile_network_interface_count_range_model_json['type'] = 'range' + instance_profile_network_interface_count_range_model_json[ + 'type'] = 'range' # Construct a model instance of InstanceProfileNetworkInterfaceCountRange by calling from_dict on the json representation - instance_profile_network_interface_count_range_model = InstanceProfileNetworkInterfaceCountRange.from_dict(instance_profile_network_interface_count_range_model_json) + instance_profile_network_interface_count_range_model = InstanceProfileNetworkInterfaceCountRange.from_dict( + instance_profile_network_interface_count_range_model_json) assert instance_profile_network_interface_count_range_model != False # Construct a model instance of InstanceProfileNetworkInterfaceCountRange by calling from_dict on the json representation - instance_profile_network_interface_count_range_model_dict = InstanceProfileNetworkInterfaceCountRange.from_dict(instance_profile_network_interface_count_range_model_json).__dict__ - instance_profile_network_interface_count_range_model2 = InstanceProfileNetworkInterfaceCountRange(**instance_profile_network_interface_count_range_model_dict) + instance_profile_network_interface_count_range_model_dict = InstanceProfileNetworkInterfaceCountRange.from_dict( + instance_profile_network_interface_count_range_model_json).__dict__ + instance_profile_network_interface_count_range_model2 = InstanceProfileNetworkInterfaceCountRange( + **instance_profile_network_interface_count_range_model_dict) # Verify the model instances are equivalent assert instance_profile_network_interface_count_range_model == instance_profile_network_interface_count_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_network_interface_count_range_model_json2 = instance_profile_network_interface_count_range_model.to_dict() + instance_profile_network_interface_count_range_model_json2 = instance_profile_network_interface_count_range_model.to_dict( + ) assert instance_profile_network_interface_count_range_model_json2 == instance_profile_network_interface_count_range_model_json @@ -81009,18 +94259,22 @@ def test_instance_profile_port_speed_dependent_serialization(self): instance_profile_port_speed_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfilePortSpeedDependent by calling from_dict on the json representation - instance_profile_port_speed_dependent_model = InstanceProfilePortSpeedDependent.from_dict(instance_profile_port_speed_dependent_model_json) + instance_profile_port_speed_dependent_model = InstanceProfilePortSpeedDependent.from_dict( + instance_profile_port_speed_dependent_model_json) assert instance_profile_port_speed_dependent_model != False # Construct a model instance of InstanceProfilePortSpeedDependent by calling from_dict on the json representation - instance_profile_port_speed_dependent_model_dict = InstanceProfilePortSpeedDependent.from_dict(instance_profile_port_speed_dependent_model_json).__dict__ - instance_profile_port_speed_dependent_model2 = InstanceProfilePortSpeedDependent(**instance_profile_port_speed_dependent_model_dict) + instance_profile_port_speed_dependent_model_dict = InstanceProfilePortSpeedDependent.from_dict( + instance_profile_port_speed_dependent_model_json).__dict__ + instance_profile_port_speed_dependent_model2 = InstanceProfilePortSpeedDependent( + **instance_profile_port_speed_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_port_speed_dependent_model == instance_profile_port_speed_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_port_speed_dependent_model_json2 = instance_profile_port_speed_dependent_model.to_dict() + instance_profile_port_speed_dependent_model_json2 = instance_profile_port_speed_dependent_model.to_dict( + ) assert instance_profile_port_speed_dependent_model_json2 == instance_profile_port_speed_dependent_model_json @@ -81040,18 +94294,22 @@ def test_instance_profile_port_speed_fixed_serialization(self): instance_profile_port_speed_fixed_model_json['value'] = 1000 # Construct a model instance of InstanceProfilePortSpeedFixed by calling from_dict on the json representation - instance_profile_port_speed_fixed_model = InstanceProfilePortSpeedFixed.from_dict(instance_profile_port_speed_fixed_model_json) + instance_profile_port_speed_fixed_model = InstanceProfilePortSpeedFixed.from_dict( + instance_profile_port_speed_fixed_model_json) assert instance_profile_port_speed_fixed_model != False # Construct a model instance of InstanceProfilePortSpeedFixed by calling from_dict on the json representation - instance_profile_port_speed_fixed_model_dict = InstanceProfilePortSpeedFixed.from_dict(instance_profile_port_speed_fixed_model_json).__dict__ - instance_profile_port_speed_fixed_model2 = InstanceProfilePortSpeedFixed(**instance_profile_port_speed_fixed_model_dict) + instance_profile_port_speed_fixed_model_dict = InstanceProfilePortSpeedFixed.from_dict( + instance_profile_port_speed_fixed_model_json).__dict__ + instance_profile_port_speed_fixed_model2 = InstanceProfilePortSpeedFixed( + **instance_profile_port_speed_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_port_speed_fixed_model == instance_profile_port_speed_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_port_speed_fixed_model_json2 = instance_profile_port_speed_fixed_model.to_dict() + instance_profile_port_speed_fixed_model_json2 = instance_profile_port_speed_fixed_model.to_dict( + ) assert instance_profile_port_speed_fixed_model_json2 == instance_profile_port_speed_fixed_model_json @@ -81070,18 +94328,22 @@ def test_instance_profile_vcpu_dependent_serialization(self): instance_profile_vcpu_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileVCPUDependent by calling from_dict on the json representation - instance_profile_vcpu_dependent_model = InstanceProfileVCPUDependent.from_dict(instance_profile_vcpu_dependent_model_json) + instance_profile_vcpu_dependent_model = InstanceProfileVCPUDependent.from_dict( + instance_profile_vcpu_dependent_model_json) assert instance_profile_vcpu_dependent_model != False # Construct a model instance of InstanceProfileVCPUDependent by calling from_dict on the json representation - instance_profile_vcpu_dependent_model_dict = InstanceProfileVCPUDependent.from_dict(instance_profile_vcpu_dependent_model_json).__dict__ - instance_profile_vcpu_dependent_model2 = InstanceProfileVCPUDependent(**instance_profile_vcpu_dependent_model_dict) + instance_profile_vcpu_dependent_model_dict = InstanceProfileVCPUDependent.from_dict( + instance_profile_vcpu_dependent_model_json).__dict__ + instance_profile_vcpu_dependent_model2 = InstanceProfileVCPUDependent( + **instance_profile_vcpu_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_vcpu_dependent_model == instance_profile_vcpu_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_vcpu_dependent_model_json2 = instance_profile_vcpu_dependent_model.to_dict() + instance_profile_vcpu_dependent_model_json2 = instance_profile_vcpu_dependent_model.to_dict( + ) assert instance_profile_vcpu_dependent_model_json2 == instance_profile_vcpu_dependent_model_json @@ -81102,18 +94364,22 @@ def test_instance_profile_vcpu_enum_serialization(self): instance_profile_vcpu_enum_model_json['values'] = [2, 4, 16] # Construct a model instance of InstanceProfileVCPUEnum by calling from_dict on the json representation - instance_profile_vcpu_enum_model = InstanceProfileVCPUEnum.from_dict(instance_profile_vcpu_enum_model_json) + instance_profile_vcpu_enum_model = InstanceProfileVCPUEnum.from_dict( + instance_profile_vcpu_enum_model_json) assert instance_profile_vcpu_enum_model != False # Construct a model instance of InstanceProfileVCPUEnum by calling from_dict on the json representation - instance_profile_vcpu_enum_model_dict = InstanceProfileVCPUEnum.from_dict(instance_profile_vcpu_enum_model_json).__dict__ - instance_profile_vcpu_enum_model2 = InstanceProfileVCPUEnum(**instance_profile_vcpu_enum_model_dict) + instance_profile_vcpu_enum_model_dict = InstanceProfileVCPUEnum.from_dict( + instance_profile_vcpu_enum_model_json).__dict__ + instance_profile_vcpu_enum_model2 = InstanceProfileVCPUEnum( + **instance_profile_vcpu_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_vcpu_enum_model == instance_profile_vcpu_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_vcpu_enum_model_json2 = instance_profile_vcpu_enum_model.to_dict() + instance_profile_vcpu_enum_model_json2 = instance_profile_vcpu_enum_model.to_dict( + ) assert instance_profile_vcpu_enum_model_json2 == instance_profile_vcpu_enum_model_json @@ -81133,18 +94399,22 @@ def test_instance_profile_vcpu_fixed_serialization(self): instance_profile_vcpu_fixed_model_json['value'] = 16 # Construct a model instance of InstanceProfileVCPUFixed by calling from_dict on the json representation - instance_profile_vcpu_fixed_model = InstanceProfileVCPUFixed.from_dict(instance_profile_vcpu_fixed_model_json) + instance_profile_vcpu_fixed_model = InstanceProfileVCPUFixed.from_dict( + instance_profile_vcpu_fixed_model_json) assert instance_profile_vcpu_fixed_model != False # Construct a model instance of InstanceProfileVCPUFixed by calling from_dict on the json representation - instance_profile_vcpu_fixed_model_dict = InstanceProfileVCPUFixed.from_dict(instance_profile_vcpu_fixed_model_json).__dict__ - instance_profile_vcpu_fixed_model2 = InstanceProfileVCPUFixed(**instance_profile_vcpu_fixed_model_dict) + instance_profile_vcpu_fixed_model_dict = InstanceProfileVCPUFixed.from_dict( + instance_profile_vcpu_fixed_model_json).__dict__ + instance_profile_vcpu_fixed_model2 = InstanceProfileVCPUFixed( + **instance_profile_vcpu_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_vcpu_fixed_model == instance_profile_vcpu_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_vcpu_fixed_model_json2 = instance_profile_vcpu_fixed_model.to_dict() + instance_profile_vcpu_fixed_model_json2 = instance_profile_vcpu_fixed_model.to_dict( + ) assert instance_profile_vcpu_fixed_model_json2 == instance_profile_vcpu_fixed_model_json @@ -81167,18 +94437,22 @@ def test_instance_profile_vcpu_range_serialization(self): instance_profile_vcpu_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileVCPURange by calling from_dict on the json representation - instance_profile_vcpu_range_model = InstanceProfileVCPURange.from_dict(instance_profile_vcpu_range_model_json) + instance_profile_vcpu_range_model = InstanceProfileVCPURange.from_dict( + instance_profile_vcpu_range_model_json) assert instance_profile_vcpu_range_model != False # Construct a model instance of InstanceProfileVCPURange by calling from_dict on the json representation - instance_profile_vcpu_range_model_dict = InstanceProfileVCPURange.from_dict(instance_profile_vcpu_range_model_json).__dict__ - instance_profile_vcpu_range_model2 = InstanceProfileVCPURange(**instance_profile_vcpu_range_model_dict) + instance_profile_vcpu_range_model_dict = InstanceProfileVCPURange.from_dict( + instance_profile_vcpu_range_model_json).__dict__ + instance_profile_vcpu_range_model2 = InstanceProfileVCPURange( + **instance_profile_vcpu_range_model_dict) # Verify the model instances are equivalent assert instance_profile_vcpu_range_model == instance_profile_vcpu_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_vcpu_range_model_json2 = instance_profile_vcpu_range_model.to_dict() + instance_profile_vcpu_range_model_json2 = instance_profile_vcpu_range_model.to_dict( + ) assert instance_profile_vcpu_range_model_json2 == instance_profile_vcpu_range_model_json @@ -81194,21 +94468,26 @@ def test_instance_profile_volume_bandwidth_dependent_serialization(self): # Construct a json representation of a InstanceProfileVolumeBandwidthDependent model instance_profile_volume_bandwidth_dependent_model_json = {} - instance_profile_volume_bandwidth_dependent_model_json['type'] = 'dependent' + instance_profile_volume_bandwidth_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of InstanceProfileVolumeBandwidthDependent by calling from_dict on the json representation - instance_profile_volume_bandwidth_dependent_model = InstanceProfileVolumeBandwidthDependent.from_dict(instance_profile_volume_bandwidth_dependent_model_json) + instance_profile_volume_bandwidth_dependent_model = InstanceProfileVolumeBandwidthDependent.from_dict( + instance_profile_volume_bandwidth_dependent_model_json) assert instance_profile_volume_bandwidth_dependent_model != False # Construct a model instance of InstanceProfileVolumeBandwidthDependent by calling from_dict on the json representation - instance_profile_volume_bandwidth_dependent_model_dict = InstanceProfileVolumeBandwidthDependent.from_dict(instance_profile_volume_bandwidth_dependent_model_json).__dict__ - instance_profile_volume_bandwidth_dependent_model2 = InstanceProfileVolumeBandwidthDependent(**instance_profile_volume_bandwidth_dependent_model_dict) + instance_profile_volume_bandwidth_dependent_model_dict = InstanceProfileVolumeBandwidthDependent.from_dict( + instance_profile_volume_bandwidth_dependent_model_json).__dict__ + instance_profile_volume_bandwidth_dependent_model2 = InstanceProfileVolumeBandwidthDependent( + **instance_profile_volume_bandwidth_dependent_model_dict) # Verify the model instances are equivalent assert instance_profile_volume_bandwidth_dependent_model == instance_profile_volume_bandwidth_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_volume_bandwidth_dependent_model_json2 = instance_profile_volume_bandwidth_dependent_model.to_dict() + instance_profile_volume_bandwidth_dependent_model_json2 = instance_profile_volume_bandwidth_dependent_model.to_dict( + ) assert instance_profile_volume_bandwidth_dependent_model_json2 == instance_profile_volume_bandwidth_dependent_model_json @@ -81226,21 +94505,27 @@ def test_instance_profile_volume_bandwidth_enum_serialization(self): instance_profile_volume_bandwidth_enum_model_json = {} instance_profile_volume_bandwidth_enum_model_json['default'] = 38 instance_profile_volume_bandwidth_enum_model_json['type'] = 'enum' - instance_profile_volume_bandwidth_enum_model_json['values'] = [16000, 32000, 48000] + instance_profile_volume_bandwidth_enum_model_json['values'] = [ + 16000, 32000, 48000 + ] # Construct a model instance of InstanceProfileVolumeBandwidthEnum by calling from_dict on the json representation - instance_profile_volume_bandwidth_enum_model = InstanceProfileVolumeBandwidthEnum.from_dict(instance_profile_volume_bandwidth_enum_model_json) + instance_profile_volume_bandwidth_enum_model = InstanceProfileVolumeBandwidthEnum.from_dict( + instance_profile_volume_bandwidth_enum_model_json) assert instance_profile_volume_bandwidth_enum_model != False # Construct a model instance of InstanceProfileVolumeBandwidthEnum by calling from_dict on the json representation - instance_profile_volume_bandwidth_enum_model_dict = InstanceProfileVolumeBandwidthEnum.from_dict(instance_profile_volume_bandwidth_enum_model_json).__dict__ - instance_profile_volume_bandwidth_enum_model2 = InstanceProfileVolumeBandwidthEnum(**instance_profile_volume_bandwidth_enum_model_dict) + instance_profile_volume_bandwidth_enum_model_dict = InstanceProfileVolumeBandwidthEnum.from_dict( + instance_profile_volume_bandwidth_enum_model_json).__dict__ + instance_profile_volume_bandwidth_enum_model2 = InstanceProfileVolumeBandwidthEnum( + **instance_profile_volume_bandwidth_enum_model_dict) # Verify the model instances are equivalent assert instance_profile_volume_bandwidth_enum_model == instance_profile_volume_bandwidth_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_volume_bandwidth_enum_model_json2 = instance_profile_volume_bandwidth_enum_model.to_dict() + instance_profile_volume_bandwidth_enum_model_json2 = instance_profile_volume_bandwidth_enum_model.to_dict( + ) assert instance_profile_volume_bandwidth_enum_model_json2 == instance_profile_volume_bandwidth_enum_model_json @@ -81260,18 +94545,22 @@ def test_instance_profile_volume_bandwidth_fixed_serialization(self): instance_profile_volume_bandwidth_fixed_model_json['value'] = 20000 # Construct a model instance of InstanceProfileVolumeBandwidthFixed by calling from_dict on the json representation - instance_profile_volume_bandwidth_fixed_model = InstanceProfileVolumeBandwidthFixed.from_dict(instance_profile_volume_bandwidth_fixed_model_json) + instance_profile_volume_bandwidth_fixed_model = InstanceProfileVolumeBandwidthFixed.from_dict( + instance_profile_volume_bandwidth_fixed_model_json) assert instance_profile_volume_bandwidth_fixed_model != False # Construct a model instance of InstanceProfileVolumeBandwidthFixed by calling from_dict on the json representation - instance_profile_volume_bandwidth_fixed_model_dict = InstanceProfileVolumeBandwidthFixed.from_dict(instance_profile_volume_bandwidth_fixed_model_json).__dict__ - instance_profile_volume_bandwidth_fixed_model2 = InstanceProfileVolumeBandwidthFixed(**instance_profile_volume_bandwidth_fixed_model_dict) + instance_profile_volume_bandwidth_fixed_model_dict = InstanceProfileVolumeBandwidthFixed.from_dict( + instance_profile_volume_bandwidth_fixed_model_json).__dict__ + instance_profile_volume_bandwidth_fixed_model2 = InstanceProfileVolumeBandwidthFixed( + **instance_profile_volume_bandwidth_fixed_model_dict) # Verify the model instances are equivalent assert instance_profile_volume_bandwidth_fixed_model == instance_profile_volume_bandwidth_fixed_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_volume_bandwidth_fixed_model_json2 = instance_profile_volume_bandwidth_fixed_model.to_dict() + instance_profile_volume_bandwidth_fixed_model_json2 = instance_profile_volume_bandwidth_fixed_model.to_dict( + ) assert instance_profile_volume_bandwidth_fixed_model_json2 == instance_profile_volume_bandwidth_fixed_model_json @@ -81294,18 +94583,22 @@ def test_instance_profile_volume_bandwidth_range_serialization(self): instance_profile_volume_bandwidth_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileVolumeBandwidthRange by calling from_dict on the json representation - instance_profile_volume_bandwidth_range_model = InstanceProfileVolumeBandwidthRange.from_dict(instance_profile_volume_bandwidth_range_model_json) + instance_profile_volume_bandwidth_range_model = InstanceProfileVolumeBandwidthRange.from_dict( + instance_profile_volume_bandwidth_range_model_json) assert instance_profile_volume_bandwidth_range_model != False # Construct a model instance of InstanceProfileVolumeBandwidthRange by calling from_dict on the json representation - instance_profile_volume_bandwidth_range_model_dict = InstanceProfileVolumeBandwidthRange.from_dict(instance_profile_volume_bandwidth_range_model_json).__dict__ - instance_profile_volume_bandwidth_range_model2 = InstanceProfileVolumeBandwidthRange(**instance_profile_volume_bandwidth_range_model_dict) + instance_profile_volume_bandwidth_range_model_dict = InstanceProfileVolumeBandwidthRange.from_dict( + instance_profile_volume_bandwidth_range_model_json).__dict__ + instance_profile_volume_bandwidth_range_model2 = InstanceProfileVolumeBandwidthRange( + **instance_profile_volume_bandwidth_range_model_dict) # Verify the model instances are equivalent assert instance_profile_volume_bandwidth_range_model == instance_profile_volume_bandwidth_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_volume_bandwidth_range_model_json2 = instance_profile_volume_bandwidth_range_model.to_dict() + instance_profile_volume_bandwidth_range_model_json2 = instance_profile_volume_bandwidth_range_model.to_dict( + ) assert instance_profile_volume_bandwidth_range_model_json2 == instance_profile_volume_bandwidth_range_model_json @@ -81321,167 +94614,263 @@ def test_instance_prototype_instance_by_source_template_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model - - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' - - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model - - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model instance_template_identity_model = {} # InstanceTemplateIdentityById - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' # Construct a json representation of a InstancePrototypeInstanceBySourceTemplate model instance_prototype_instance_by_source_template_model_json = {} - instance_prototype_instance_by_source_template_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_source_template_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_source_template_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_source_template_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_source_template_model_json['name'] = 'my-instance' - instance_prototype_instance_by_source_template_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_source_template_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_source_template_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_source_template_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_source_template_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_source_template_model_json['user_data'] = 'testString' - instance_prototype_instance_by_source_template_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_source_template_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_source_template_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_prototype_instance_by_source_template_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_prototype_instance_by_source_template_model_json['image'] = image_identity_model - instance_prototype_instance_by_source_template_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_prototype_instance_by_source_template_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_prototype_instance_by_source_template_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model - instance_prototype_instance_by_source_template_model_json['primary_network_interface'] = network_interface_prototype_model - instance_prototype_instance_by_source_template_model_json['source_template'] = instance_template_identity_model - instance_prototype_instance_by_source_template_model_json['zone'] = zone_identity_model + instance_prototype_instance_by_source_template_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_source_template_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_source_template_model_json['keys'] = [ + key_identity_model + ] + instance_prototype_instance_by_source_template_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_source_template_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_source_template_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_source_template_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_source_template_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_source_template_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_source_template_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_source_template_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_prototype_instance_by_source_template_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'image'] = image_identity_model + instance_prototype_instance_by_source_template_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_prototype_instance_by_source_template_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_prototype_instance_by_source_template_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'primary_network_interface'] = network_interface_prototype_model + instance_prototype_instance_by_source_template_model_json[ + 'source_template'] = instance_template_identity_model + instance_prototype_instance_by_source_template_model_json[ + 'zone'] = zone_identity_model # Construct a model instance of InstancePrototypeInstanceBySourceTemplate by calling from_dict on the json representation - instance_prototype_instance_by_source_template_model = InstancePrototypeInstanceBySourceTemplate.from_dict(instance_prototype_instance_by_source_template_model_json) + instance_prototype_instance_by_source_template_model = InstancePrototypeInstanceBySourceTemplate.from_dict( + instance_prototype_instance_by_source_template_model_json) assert instance_prototype_instance_by_source_template_model != False # Construct a model instance of InstancePrototypeInstanceBySourceTemplate by calling from_dict on the json representation - instance_prototype_instance_by_source_template_model_dict = InstancePrototypeInstanceBySourceTemplate.from_dict(instance_prototype_instance_by_source_template_model_json).__dict__ - instance_prototype_instance_by_source_template_model2 = InstancePrototypeInstanceBySourceTemplate(**instance_prototype_instance_by_source_template_model_dict) + instance_prototype_instance_by_source_template_model_dict = InstancePrototypeInstanceBySourceTemplate.from_dict( + instance_prototype_instance_by_source_template_model_json).__dict__ + instance_prototype_instance_by_source_template_model2 = InstancePrototypeInstanceBySourceTemplate( + **instance_prototype_instance_by_source_template_model_dict) # Verify the model instances are equivalent assert instance_prototype_instance_by_source_template_model == instance_prototype_instance_by_source_template_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_source_template_model_json2 = instance_prototype_instance_by_source_template_model.to_dict() + instance_prototype_instance_by_source_template_model_json2 = instance_prototype_instance_by_source_template_model.to_dict( + ) assert instance_prototype_instance_by_source_template_model_json2 == instance_prototype_instance_by_source_template_model_json @@ -81497,21 +94886,26 @@ def test_instance_template_identity_by_crn_serialization(self): # Construct a json representation of a InstanceTemplateIdentityByCRN model instance_template_identity_by_crn_model_json = {} - instance_template_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstanceTemplateIdentityByCRN by calling from_dict on the json representation - instance_template_identity_by_crn_model = InstanceTemplateIdentityByCRN.from_dict(instance_template_identity_by_crn_model_json) + instance_template_identity_by_crn_model = InstanceTemplateIdentityByCRN.from_dict( + instance_template_identity_by_crn_model_json) assert instance_template_identity_by_crn_model != False # Construct a model instance of InstanceTemplateIdentityByCRN by calling from_dict on the json representation - instance_template_identity_by_crn_model_dict = InstanceTemplateIdentityByCRN.from_dict(instance_template_identity_by_crn_model_json).__dict__ - instance_template_identity_by_crn_model2 = InstanceTemplateIdentityByCRN(**instance_template_identity_by_crn_model_dict) + instance_template_identity_by_crn_model_dict = InstanceTemplateIdentityByCRN.from_dict( + instance_template_identity_by_crn_model_json).__dict__ + instance_template_identity_by_crn_model2 = InstanceTemplateIdentityByCRN( + **instance_template_identity_by_crn_model_dict) # Verify the model instances are equivalent assert instance_template_identity_by_crn_model == instance_template_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - instance_template_identity_by_crn_model_json2 = instance_template_identity_by_crn_model.to_dict() + instance_template_identity_by_crn_model_json2 = instance_template_identity_by_crn_model.to_dict( + ) assert instance_template_identity_by_crn_model_json2 == instance_template_identity_by_crn_model_json @@ -81527,21 +94921,26 @@ def test_instance_template_identity_by_href_serialization(self): # Construct a json representation of a InstanceTemplateIdentityByHref model instance_template_identity_by_href_model_json = {} - instance_template_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstanceTemplateIdentityByHref by calling from_dict on the json representation - instance_template_identity_by_href_model = InstanceTemplateIdentityByHref.from_dict(instance_template_identity_by_href_model_json) + instance_template_identity_by_href_model = InstanceTemplateIdentityByHref.from_dict( + instance_template_identity_by_href_model_json) assert instance_template_identity_by_href_model != False # Construct a model instance of InstanceTemplateIdentityByHref by calling from_dict on the json representation - instance_template_identity_by_href_model_dict = InstanceTemplateIdentityByHref.from_dict(instance_template_identity_by_href_model_json).__dict__ - instance_template_identity_by_href_model2 = InstanceTemplateIdentityByHref(**instance_template_identity_by_href_model_dict) + instance_template_identity_by_href_model_dict = InstanceTemplateIdentityByHref.from_dict( + instance_template_identity_by_href_model_json).__dict__ + instance_template_identity_by_href_model2 = InstanceTemplateIdentityByHref( + **instance_template_identity_by_href_model_dict) # Verify the model instances are equivalent assert instance_template_identity_by_href_model == instance_template_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_template_identity_by_href_model_json2 = instance_template_identity_by_href_model.to_dict() + instance_template_identity_by_href_model_json2 = instance_template_identity_by_href_model.to_dict( + ) assert instance_template_identity_by_href_model_json2 == instance_template_identity_by_href_model_json @@ -81557,21 +94956,26 @@ def test_instance_template_identity_by_id_serialization(self): # Construct a json representation of a InstanceTemplateIdentityById model instance_template_identity_by_id_model_json = {} - instance_template_identity_by_id_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_by_id_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a model instance of InstanceTemplateIdentityById by calling from_dict on the json representation - instance_template_identity_by_id_model = InstanceTemplateIdentityById.from_dict(instance_template_identity_by_id_model_json) + instance_template_identity_by_id_model = InstanceTemplateIdentityById.from_dict( + instance_template_identity_by_id_model_json) assert instance_template_identity_by_id_model != False # Construct a model instance of InstanceTemplateIdentityById by calling from_dict on the json representation - instance_template_identity_by_id_model_dict = InstanceTemplateIdentityById.from_dict(instance_template_identity_by_id_model_json).__dict__ - instance_template_identity_by_id_model2 = InstanceTemplateIdentityById(**instance_template_identity_by_id_model_dict) + instance_template_identity_by_id_model_dict = InstanceTemplateIdentityById.from_dict( + instance_template_identity_by_id_model_json).__dict__ + instance_template_identity_by_id_model2 = InstanceTemplateIdentityById( + **instance_template_identity_by_id_model_dict) # Verify the model instances are equivalent assert instance_template_identity_by_id_model == instance_template_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_template_identity_by_id_model_json2 = instance_template_identity_by_id_model.to_dict() + instance_template_identity_by_id_model_json2 = instance_template_identity_by_id_model.to_dict( + ) assert instance_template_identity_by_id_model_json2 == instance_template_identity_by_id_model_json @@ -81580,174 +94984,274 @@ class TestModel_InstanceTemplatePrototypeInstanceTemplateBySourceTemplate: Test Class for InstanceTemplatePrototypeInstanceTemplateBySourceTemplate """ - def test_instance_template_prototype_instance_template_by_source_template_serialization(self): + def test_instance_template_prototype_instance_template_by_source_template_serialization( + self): """ Test serialization/deserialization for InstanceTemplatePrototypeInstanceTemplateBySourceTemplate """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model - - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' - - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model - - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model instance_template_identity_model = {} # InstanceTemplateIdentityById - instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_identity_model[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' # Construct a json representation of a InstanceTemplatePrototypeInstanceTemplateBySourceTemplate model instance_template_prototype_instance_template_by_source_template_model_json = {} - instance_template_prototype_instance_template_by_source_template_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['keys'] = [key_identity_model] - instance_template_prototype_instance_template_by_source_template_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['name'] = 'my-instance' - instance_template_prototype_instance_template_by_source_template_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['profile'] = instance_profile_identity_model - instance_template_prototype_instance_template_by_source_template_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['resource_group'] = resource_group_identity_model - instance_template_prototype_instance_template_by_source_template_model_json['total_volume_bandwidth'] = 500 - instance_template_prototype_instance_template_by_source_template_model_json['user_data'] = 'testString' - instance_template_prototype_instance_template_by_source_template_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_prototype_instance_template_by_source_template_model_json['vpc'] = vpc_identity_model - instance_template_prototype_instance_template_by_source_template_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_prototype_instance_template_by_source_template_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['image'] = image_identity_model - instance_template_prototype_instance_template_by_source_template_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_prototype_instance_template_by_source_template_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_prototype_instance_template_by_source_template_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['primary_network_interface'] = network_interface_prototype_model - instance_template_prototype_instance_template_by_source_template_model_json['source_template'] = instance_template_identity_model - instance_template_prototype_instance_template_by_source_template_model_json['zone'] = zone_identity_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_instance_template_by_source_template_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'enable_secure_boot'] = True + instance_template_prototype_instance_template_by_source_template_model_json[ + 'keys'] = [key_identity_model] + instance_template_prototype_instance_template_by_source_template_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'name'] = 'my-instance' + instance_template_prototype_instance_template_by_source_template_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'resource_group'] = resource_group_identity_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_prototype_instance_template_by_source_template_model_json[ + 'user_data'] = 'testString' + instance_template_prototype_instance_template_by_source_template_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_instance_template_by_source_template_model_json[ + 'vpc'] = vpc_identity_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'image'] = image_identity_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_prototype_instance_template_by_source_template_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_prototype_instance_template_by_source_template_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'primary_network_interface'] = network_interface_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'source_template'] = instance_template_identity_model + instance_template_prototype_instance_template_by_source_template_model_json[ + 'zone'] = zone_identity_model # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateBySourceTemplate by calling from_dict on the json representation - instance_template_prototype_instance_template_by_source_template_model = InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.from_dict(instance_template_prototype_instance_template_by_source_template_model_json) + instance_template_prototype_instance_template_by_source_template_model = InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.from_dict( + instance_template_prototype_instance_template_by_source_template_model_json + ) assert instance_template_prototype_instance_template_by_source_template_model != False # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateBySourceTemplate by calling from_dict on the json representation - instance_template_prototype_instance_template_by_source_template_model_dict = InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.from_dict(instance_template_prototype_instance_template_by_source_template_model_json).__dict__ - instance_template_prototype_instance_template_by_source_template_model2 = InstanceTemplatePrototypeInstanceTemplateBySourceTemplate(**instance_template_prototype_instance_template_by_source_template_model_dict) + instance_template_prototype_instance_template_by_source_template_model_dict = InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.from_dict( + instance_template_prototype_instance_template_by_source_template_model_json + ).__dict__ + instance_template_prototype_instance_template_by_source_template_model2 = InstanceTemplatePrototypeInstanceTemplateBySourceTemplate( + ** + instance_template_prototype_instance_template_by_source_template_model_dict + ) # Verify the model instances are equivalent assert instance_template_prototype_instance_template_by_source_template_model == instance_template_prototype_instance_template_by_source_template_model2 # Convert model instance back to dict and verify no loss of data - instance_template_prototype_instance_template_by_source_template_model_json2 = instance_template_prototype_instance_template_by_source_template_model.to_dict() + instance_template_prototype_instance_template_by_source_template_model_json2 = instance_template_prototype_instance_template_by_source_template_model.to_dict( + ) assert instance_template_prototype_instance_template_by_source_template_model_json2 == instance_template_prototype_instance_template_by_source_template_model_json @@ -81763,15 +95267,19 @@ def test_key_identity_by_crn_serialization(self): # Construct a json representation of a KeyIdentityByCRN model key_identity_by_crn_model_json = {} - key_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a model instance of KeyIdentityByCRN by calling from_dict on the json representation - key_identity_by_crn_model = KeyIdentityByCRN.from_dict(key_identity_by_crn_model_json) + key_identity_by_crn_model = KeyIdentityByCRN.from_dict( + key_identity_by_crn_model_json) assert key_identity_by_crn_model != False # Construct a model instance of KeyIdentityByCRN by calling from_dict on the json representation - key_identity_by_crn_model_dict = KeyIdentityByCRN.from_dict(key_identity_by_crn_model_json).__dict__ - key_identity_by_crn_model2 = KeyIdentityByCRN(**key_identity_by_crn_model_dict) + key_identity_by_crn_model_dict = KeyIdentityByCRN.from_dict( + key_identity_by_crn_model_json).__dict__ + key_identity_by_crn_model2 = KeyIdentityByCRN( + **key_identity_by_crn_model_dict) # Verify the model instances are equivalent assert key_identity_by_crn_model == key_identity_by_crn_model2 @@ -81793,21 +95301,26 @@ def test_key_identity_by_fingerprint_serialization(self): # Construct a json representation of a KeyIdentityByFingerprint model key_identity_by_fingerprint_model_json = {} - key_identity_by_fingerprint_model_json['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' + key_identity_by_fingerprint_model_json[ + 'fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' # Construct a model instance of KeyIdentityByFingerprint by calling from_dict on the json representation - key_identity_by_fingerprint_model = KeyIdentityByFingerprint.from_dict(key_identity_by_fingerprint_model_json) + key_identity_by_fingerprint_model = KeyIdentityByFingerprint.from_dict( + key_identity_by_fingerprint_model_json) assert key_identity_by_fingerprint_model != False # Construct a model instance of KeyIdentityByFingerprint by calling from_dict on the json representation - key_identity_by_fingerprint_model_dict = KeyIdentityByFingerprint.from_dict(key_identity_by_fingerprint_model_json).__dict__ - key_identity_by_fingerprint_model2 = KeyIdentityByFingerprint(**key_identity_by_fingerprint_model_dict) + key_identity_by_fingerprint_model_dict = KeyIdentityByFingerprint.from_dict( + key_identity_by_fingerprint_model_json).__dict__ + key_identity_by_fingerprint_model2 = KeyIdentityByFingerprint( + **key_identity_by_fingerprint_model_dict) # Verify the model instances are equivalent assert key_identity_by_fingerprint_model == key_identity_by_fingerprint_model2 # Convert model instance back to dict and verify no loss of data - key_identity_by_fingerprint_model_json2 = key_identity_by_fingerprint_model.to_dict() + key_identity_by_fingerprint_model_json2 = key_identity_by_fingerprint_model.to_dict( + ) assert key_identity_by_fingerprint_model_json2 == key_identity_by_fingerprint_model_json @@ -81823,15 +95336,19 @@ def test_key_identity_by_href_serialization(self): # Construct a json representation of a KeyIdentityByHref model key_identity_by_href_model_json = {} - key_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a model instance of KeyIdentityByHref by calling from_dict on the json representation - key_identity_by_href_model = KeyIdentityByHref.from_dict(key_identity_by_href_model_json) + key_identity_by_href_model = KeyIdentityByHref.from_dict( + key_identity_by_href_model_json) assert key_identity_by_href_model != False # Construct a model instance of KeyIdentityByHref by calling from_dict on the json representation - key_identity_by_href_model_dict = KeyIdentityByHref.from_dict(key_identity_by_href_model_json).__dict__ - key_identity_by_href_model2 = KeyIdentityByHref(**key_identity_by_href_model_dict) + key_identity_by_href_model_dict = KeyIdentityByHref.from_dict( + key_identity_by_href_model_json).__dict__ + key_identity_by_href_model2 = KeyIdentityByHref( + **key_identity_by_href_model_dict) # Verify the model instances are equivalent assert key_identity_by_href_model == key_identity_by_href_model2 @@ -81853,15 +95370,19 @@ def test_key_identity_by_id_serialization(self): # Construct a json representation of a KeyIdentityById model key_identity_by_id_model_json = {} - key_identity_by_id_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + key_identity_by_id_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' # Construct a model instance of KeyIdentityById by calling from_dict on the json representation - key_identity_by_id_model = KeyIdentityById.from_dict(key_identity_by_id_model_json) + key_identity_by_id_model = KeyIdentityById.from_dict( + key_identity_by_id_model_json) assert key_identity_by_id_model != False # Construct a model instance of KeyIdentityById by calling from_dict on the json representation - key_identity_by_id_model_dict = KeyIdentityById.from_dict(key_identity_by_id_model_json).__dict__ - key_identity_by_id_model2 = KeyIdentityById(**key_identity_by_id_model_dict) + key_identity_by_id_model_dict = KeyIdentityById.from_dict( + key_identity_by_id_model_json).__dict__ + key_identity_by_id_model2 = KeyIdentityById( + **key_identity_by_id_model_dict) # Verify the model instances are equivalent assert key_identity_by_id_model == key_identity_by_id_model2 @@ -81876,28 +95397,38 @@ class TestModel_LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketId Test Class for LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName """ - def test_legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_serialization(self): + def test_legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_serialization( + self): """ Test serialization/deserialization for LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName """ # Construct a json representation of a LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json = {} - legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json['name'] = 'bucket-27200-lwx4cfvcue' + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json[ + 'name'] = 'bucket-27200-lwx4cfvcue' # Construct a model instance of LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName by calling from_dict on the json representation - legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model = LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict(legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json) + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model = LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict( + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json + ) assert legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model != False # Construct a model instance of LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName by calling from_dict on the json representation - legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict = LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict(legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json).__dict__ - legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model2 = LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(**legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict) + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict = LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.from_dict( + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json + ).__dict__ + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model2 = LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName( + ** + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_dict + ) # Verify the model instances are equivalent assert legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model == legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json2 = legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model.to_dict() + legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json2 = legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model.to_dict( + ) assert legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json2 == legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json @@ -81913,21 +95444,26 @@ def test_load_balancer_identity_by_crn_serialization(self): # Construct a json representation of a LoadBalancerIdentityByCRN model load_balancer_identity_by_crn_model_json = {} - load_balancer_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a model instance of LoadBalancerIdentityByCRN by calling from_dict on the json representation - load_balancer_identity_by_crn_model = LoadBalancerIdentityByCRN.from_dict(load_balancer_identity_by_crn_model_json) + load_balancer_identity_by_crn_model = LoadBalancerIdentityByCRN.from_dict( + load_balancer_identity_by_crn_model_json) assert load_balancer_identity_by_crn_model != False # Construct a model instance of LoadBalancerIdentityByCRN by calling from_dict on the json representation - load_balancer_identity_by_crn_model_dict = LoadBalancerIdentityByCRN.from_dict(load_balancer_identity_by_crn_model_json).__dict__ - load_balancer_identity_by_crn_model2 = LoadBalancerIdentityByCRN(**load_balancer_identity_by_crn_model_dict) + load_balancer_identity_by_crn_model_dict = LoadBalancerIdentityByCRN.from_dict( + load_balancer_identity_by_crn_model_json).__dict__ + load_balancer_identity_by_crn_model2 = LoadBalancerIdentityByCRN( + **load_balancer_identity_by_crn_model_dict) # Verify the model instances are equivalent assert load_balancer_identity_by_crn_model == load_balancer_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_identity_by_crn_model_json2 = load_balancer_identity_by_crn_model.to_dict() + load_balancer_identity_by_crn_model_json2 = load_balancer_identity_by_crn_model.to_dict( + ) assert load_balancer_identity_by_crn_model_json2 == load_balancer_identity_by_crn_model_json @@ -81943,21 +95479,26 @@ def test_load_balancer_identity_by_href_serialization(self): # Construct a json representation of a LoadBalancerIdentityByHref model load_balancer_identity_by_href_model_json = {} - load_balancer_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a model instance of LoadBalancerIdentityByHref by calling from_dict on the json representation - load_balancer_identity_by_href_model = LoadBalancerIdentityByHref.from_dict(load_balancer_identity_by_href_model_json) + load_balancer_identity_by_href_model = LoadBalancerIdentityByHref.from_dict( + load_balancer_identity_by_href_model_json) assert load_balancer_identity_by_href_model != False # Construct a model instance of LoadBalancerIdentityByHref by calling from_dict on the json representation - load_balancer_identity_by_href_model_dict = LoadBalancerIdentityByHref.from_dict(load_balancer_identity_by_href_model_json).__dict__ - load_balancer_identity_by_href_model2 = LoadBalancerIdentityByHref(**load_balancer_identity_by_href_model_dict) + load_balancer_identity_by_href_model_dict = LoadBalancerIdentityByHref.from_dict( + load_balancer_identity_by_href_model_json).__dict__ + load_balancer_identity_by_href_model2 = LoadBalancerIdentityByHref( + **load_balancer_identity_by_href_model_dict) # Verify the model instances are equivalent assert load_balancer_identity_by_href_model == load_balancer_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_identity_by_href_model_json2 = load_balancer_identity_by_href_model.to_dict() + load_balancer_identity_by_href_model_json2 = load_balancer_identity_by_href_model.to_dict( + ) assert load_balancer_identity_by_href_model_json2 == load_balancer_identity_by_href_model_json @@ -81973,21 +95514,26 @@ def test_load_balancer_identity_by_id_serialization(self): # Construct a json representation of a LoadBalancerIdentityById model load_balancer_identity_by_id_model_json = {} - load_balancer_identity_by_id_model_json['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_by_id_model_json[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a model instance of LoadBalancerIdentityById by calling from_dict on the json representation - load_balancer_identity_by_id_model = LoadBalancerIdentityById.from_dict(load_balancer_identity_by_id_model_json) + load_balancer_identity_by_id_model = LoadBalancerIdentityById.from_dict( + load_balancer_identity_by_id_model_json) assert load_balancer_identity_by_id_model != False # Construct a model instance of LoadBalancerIdentityById by calling from_dict on the json representation - load_balancer_identity_by_id_model_dict = LoadBalancerIdentityById.from_dict(load_balancer_identity_by_id_model_json).__dict__ - load_balancer_identity_by_id_model2 = LoadBalancerIdentityById(**load_balancer_identity_by_id_model_dict) + load_balancer_identity_by_id_model_dict = LoadBalancerIdentityById.from_dict( + load_balancer_identity_by_id_model_json).__dict__ + load_balancer_identity_by_id_model2 = LoadBalancerIdentityById( + **load_balancer_identity_by_id_model_dict) # Verify the model instances are equivalent assert load_balancer_identity_by_id_model == load_balancer_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_identity_by_id_model_json2 = load_balancer_identity_by_id_model.to_dict() + load_balancer_identity_by_id_model_json2 = load_balancer_identity_by_id_model.to_dict( + ) assert load_balancer_identity_by_id_model_json2 == load_balancer_identity_by_id_model_json @@ -81996,28 +95542,38 @@ class TestModel_LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHr Test Class for LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref """ - def test_load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_serialization(self): + def test_load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref """ # Construct a json representation of a LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref model load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json = {} - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.from_dict(load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json) + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json + ) assert load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model != False # Construct a model instance of LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_dict = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.from_dict(load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json).__dict__ - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model2 = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref(**load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_dict) + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_dict = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json + ).__dict__ + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model2 = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref( + ** + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model == load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json2 = load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model.to_dict() + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json2 = load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model.to_dict( + ) assert load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json2 == load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_href_model_json @@ -82026,28 +95582,38 @@ class TestModel_LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById Test Class for LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById """ - def test_load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_serialization(self): + def test_load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById """ # Construct a json representation of a LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById model load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json = {} - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.from_dict(load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json) + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.from_dict( + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json + ) assert load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model != False # Construct a model instance of LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_dict = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.from_dict(load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json).__dict__ - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model2 = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById(**load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_dict) + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_dict = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById.from_dict( + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json + ).__dict__ + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model2 = LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById( + ** + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model == load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json2 = load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model.to_dict() + load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json2 = load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model.to_dict( + ) assert load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json2 == load_balancer_listener_default_pool_patch_load_balancer_pool_identity_by_id_model_json @@ -82063,21 +95629,26 @@ def test_load_balancer_listener_identity_by_href_serialization(self): # Construct a json representation of a LoadBalancerListenerIdentityByHref model load_balancer_listener_identity_by_href_model_json = {} - load_balancer_listener_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerIdentityByHref by calling from_dict on the json representation - load_balancer_listener_identity_by_href_model = LoadBalancerListenerIdentityByHref.from_dict(load_balancer_listener_identity_by_href_model_json) + load_balancer_listener_identity_by_href_model = LoadBalancerListenerIdentityByHref.from_dict( + load_balancer_listener_identity_by_href_model_json) assert load_balancer_listener_identity_by_href_model != False # Construct a model instance of LoadBalancerListenerIdentityByHref by calling from_dict on the json representation - load_balancer_listener_identity_by_href_model_dict = LoadBalancerListenerIdentityByHref.from_dict(load_balancer_listener_identity_by_href_model_json).__dict__ - load_balancer_listener_identity_by_href_model2 = LoadBalancerListenerIdentityByHref(**load_balancer_listener_identity_by_href_model_dict) + load_balancer_listener_identity_by_href_model_dict = LoadBalancerListenerIdentityByHref.from_dict( + load_balancer_listener_identity_by_href_model_json).__dict__ + load_balancer_listener_identity_by_href_model2 = LoadBalancerListenerIdentityByHref( + **load_balancer_listener_identity_by_href_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_identity_by_href_model == load_balancer_listener_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_identity_by_href_model_json2 = load_balancer_listener_identity_by_href_model.to_dict() + load_balancer_listener_identity_by_href_model_json2 = load_balancer_listener_identity_by_href_model.to_dict( + ) assert load_balancer_listener_identity_by_href_model_json2 == load_balancer_listener_identity_by_href_model_json @@ -82093,21 +95664,26 @@ def test_load_balancer_listener_identity_by_id_serialization(self): # Construct a json representation of a LoadBalancerListenerIdentityById model load_balancer_listener_identity_by_id_model_json = {} - load_balancer_listener_identity_by_id_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_by_id_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerIdentityById by calling from_dict on the json representation - load_balancer_listener_identity_by_id_model = LoadBalancerListenerIdentityById.from_dict(load_balancer_listener_identity_by_id_model_json) + load_balancer_listener_identity_by_id_model = LoadBalancerListenerIdentityById.from_dict( + load_balancer_listener_identity_by_id_model_json) assert load_balancer_listener_identity_by_id_model != False # Construct a model instance of LoadBalancerListenerIdentityById by calling from_dict on the json representation - load_balancer_listener_identity_by_id_model_dict = LoadBalancerListenerIdentityById.from_dict(load_balancer_listener_identity_by_id_model_json).__dict__ - load_balancer_listener_identity_by_id_model2 = LoadBalancerListenerIdentityById(**load_balancer_listener_identity_by_id_model_dict) + load_balancer_listener_identity_by_id_model_dict = LoadBalancerListenerIdentityById.from_dict( + load_balancer_listener_identity_by_id_model_json).__dict__ + load_balancer_listener_identity_by_id_model2 = LoadBalancerListenerIdentityById( + **load_balancer_listener_identity_by_id_model_dict) # Verify the model instances are equivalent assert load_balancer_listener_identity_by_id_model == load_balancer_listener_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_identity_by_id_model_json2 = load_balancer_listener_identity_by_id_model.to_dict() + load_balancer_listener_identity_by_id_model_json2 = load_balancer_listener_identity_by_id_model.to_dict( + ) assert load_balancer_listener_identity_by_id_model_json2 == load_balancer_listener_identity_by_id_model_json @@ -82116,35 +95692,49 @@ class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyH Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch """ - def test_load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_serialization(self): + def test_load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch """ # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model = { + } # LoadBalancerListenerIdentityById + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch model load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json = {} - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json['http_status_code'] = 301 - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json['listener'] = load_balancer_listener_identity_model - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json['uri'] = '/example?doc=get' + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json[ + 'uri'] = '/example?doc=get' # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.from_dict(load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json) + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json + ) assert load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.from_dict(load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json).__dict__ - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch(**load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_dict) + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json + ).__dict__ + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch( + ** + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model == load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model.to_dict() + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model.to_dict( + ) assert load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json2 == load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model_json @@ -82153,29 +95743,40 @@ class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyR Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch """ - def test_load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_serialization(self): + def test_load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch """ # Construct a json representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch model load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json = {} - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json['http_status_code'] = 301 - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json['url'] = 'https://www.example.com' + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json[ + 'url'] = 'https://www.example.com' # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.from_dict(load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json) + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json + ) assert load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.from_dict(load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json).__dict__ - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch(**load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_dict) + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json + ).__dict__ + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch( + ** + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model == load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model.to_dict() + load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model.to_dict( + ) assert load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json2 == load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model_json @@ -82184,35 +95785,49 @@ class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPol Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype """ - def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_serialization(self): + def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype """ # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById - load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_identity_model = { + } # LoadBalancerListenerIdentityById + load_balancer_listener_identity_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype model load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json = {} - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json['http_status_code'] = 301 - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json['listener'] = load_balancer_listener_identity_model - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json['uri'] = '/example?doc=get' + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json[ + 'listener'] = load_balancer_listener_identity_model + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json[ + 'uri'] = '/example?doc=get' # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json) + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json + ) assert load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json).__dict__ - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype(**load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_dict) + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json + ).__dict__ + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype( + ** + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model == load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model.to_dict() + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model.to_dict( + ) assert load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json2 == load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model_json @@ -82221,29 +95836,40 @@ class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPol Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype """ - def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_serialization(self): + def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype """ # Construct a json representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype model load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json = {} - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json['http_status_code'] = 301 - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json['url'] = 'https://www.example.com' + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json[ + 'url'] = 'https://www.example.com' # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json) + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json + ) assert load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json).__dict__ - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(**load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_dict) + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json + ).__dict__ + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype( + ** + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model == load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model.to_dict() + load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model.to_dict( + ) assert load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json2 == load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model_json @@ -82252,40 +95878,58 @@ class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSR Test Class for LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect """ - def test_load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_serialization(self): + def test_load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect """ # Construct dict forms of any model objects needed in order to build this model. - load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted - load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_listener_reference_deleted_model = { + } # LoadBalancerListenerReferenceDeleted + load_balancer_listener_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - load_balancer_listener_reference_model = {} # LoadBalancerListenerReference - load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model - load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model = { + } # LoadBalancerListenerReference + load_balancer_listener_reference_model[ + 'deleted'] = load_balancer_listener_reference_deleted_model + load_balancer_listener_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_reference_model[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a json representation of a LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect model load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json = {} - load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json['http_status_code'] = 301 - load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json['listener'] = load_balancer_listener_reference_model - load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json['uri'] = '/example?doc=get' + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json[ + 'listener'] = load_balancer_listener_reference_model + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json[ + 'uri'] = '/example?doc=get' # Construct a model instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect by calling from_dict on the json representation - load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.from_dict(load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json) + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.from_dict( + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json + ) assert load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect by calling from_dict on the json representation - load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_dict = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.from_dict(load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json).__dict__ - load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model2 = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect(**load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_dict) + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_dict = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect.from_dict( + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json + ).__dict__ + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model2 = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect( + ** + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model == load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json2 = load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model.to_dict() + load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json2 = load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model.to_dict( + ) assert load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json2 == load_balancer_listener_policy_target_load_balancer_listener_policy_https_redirect_model_json @@ -82294,29 +95938,40 @@ class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedire Test Class for LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL """ - def test_load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_serialization(self): + def test_load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL """ # Construct a json representation of a LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL model load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json = {} - load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json['http_status_code'] = 301 - load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json['url'] = 'https://www.example.com' + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json[ + 'http_status_code'] = 301 + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json[ + 'url'] = 'https://www.example.com' # Construct a model instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL by calling from_dict on the json representation - load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.from_dict(load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json) + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.from_dict( + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json + ) assert load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL by calling from_dict on the json representation - load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_dict = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.from_dict(load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json).__dict__ - load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model2 = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(**load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_dict) + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_dict = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.from_dict( + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json + ).__dict__ + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model2 = LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL( + ** + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model == load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json2 = load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model.to_dict() + load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json2 = load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model.to_dict( + ) assert load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json2 == load_balancer_listener_policy_target_load_balancer_listener_policy_redirect_url_model_json @@ -82325,36 +95980,51 @@ class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerPoolReference: Test Class for LoadBalancerListenerPolicyTargetLoadBalancerPoolReference """ - def test_load_balancer_listener_policy_target_load_balancer_pool_reference_serialization(self): + def test_load_balancer_listener_policy_target_load_balancer_pool_reference_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetLoadBalancerPoolReference """ # Construct dict forms of any model objects needed in order to build this model. - load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted - load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_pool_reference_deleted_model = { + } # LoadBalancerPoolReferenceDeleted + load_balancer_pool_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerListenerPolicyTargetLoadBalancerPoolReference model load_balancer_listener_policy_target_load_balancer_pool_reference_model_json = {} - load_balancer_listener_policy_target_load_balancer_pool_reference_model_json['deleted'] = load_balancer_pool_reference_deleted_model - load_balancer_listener_policy_target_load_balancer_pool_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_target_load_balancer_pool_reference_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' - load_balancer_listener_policy_target_load_balancer_pool_reference_model_json['name'] = 'my-load-balancer-pool' + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json[ + 'deleted'] = load_balancer_pool_reference_deleted_model + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json[ + 'name'] = 'my-load-balancer-pool' # Construct a model instance of LoadBalancerListenerPolicyTargetLoadBalancerPoolReference by calling from_dict on the json representation - load_balancer_listener_policy_target_load_balancer_pool_reference_model = LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.from_dict(load_balancer_listener_policy_target_load_balancer_pool_reference_model_json) + load_balancer_listener_policy_target_load_balancer_pool_reference_model = LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.from_dict( + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json + ) assert load_balancer_listener_policy_target_load_balancer_pool_reference_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetLoadBalancerPoolReference by calling from_dict on the json representation - load_balancer_listener_policy_target_load_balancer_pool_reference_model_dict = LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.from_dict(load_balancer_listener_policy_target_load_balancer_pool_reference_model_json).__dict__ - load_balancer_listener_policy_target_load_balancer_pool_reference_model2 = LoadBalancerListenerPolicyTargetLoadBalancerPoolReference(**load_balancer_listener_policy_target_load_balancer_pool_reference_model_dict) + load_balancer_listener_policy_target_load_balancer_pool_reference_model_dict = LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.from_dict( + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json + ).__dict__ + load_balancer_listener_policy_target_load_balancer_pool_reference_model2 = LoadBalancerListenerPolicyTargetLoadBalancerPoolReference( + ** + load_balancer_listener_policy_target_load_balancer_pool_reference_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_load_balancer_pool_reference_model == load_balancer_listener_policy_target_load_balancer_pool_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_load_balancer_pool_reference_model_json2 = load_balancer_listener_policy_target_load_balancer_pool_reference_model.to_dict() + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json2 = load_balancer_listener_policy_target_load_balancer_pool_reference_model.to_dict( + ) assert load_balancer_listener_policy_target_load_balancer_pool_reference_model_json2 == load_balancer_listener_policy_target_load_balancer_pool_reference_model_json @@ -82363,28 +96033,38 @@ class TestModel_LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref: Test Class for LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref """ - def test_load_balancer_pool_identity_load_balancer_pool_identity_by_href_serialization(self): + def test_load_balancer_pool_identity_load_balancer_pool_identity_by_href_serialization( + self): """ Test serialization/deserialization for LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref """ # Construct a json representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref model load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json = {} - load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_pool_identity_load_balancer_pool_identity_by_href_model = LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict(load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json) + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model = LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json + ) assert load_balancer_pool_identity_load_balancer_pool_identity_by_href_model != False # Construct a model instance of LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict = LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict(load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json).__dict__ - load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 = LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(**load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict) + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict = LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json + ).__dict__ + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 = LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref( + ** + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert load_balancer_pool_identity_load_balancer_pool_identity_by_href_model == load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 = load_balancer_pool_identity_load_balancer_pool_identity_by_href_model.to_dict() + load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 = load_balancer_pool_identity_load_balancer_pool_identity_by_href_model.to_dict( + ) assert load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 == load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json @@ -82393,28 +96073,38 @@ class TestModel_LoadBalancerPoolIdentityLoadBalancerPoolIdentityById: Test Class for LoadBalancerPoolIdentityLoadBalancerPoolIdentityById """ - def test_load_balancer_pool_identity_load_balancer_pool_identity_by_id_serialization(self): + def test_load_balancer_pool_identity_load_balancer_pool_identity_by_id_serialization( + self): """ Test serialization/deserialization for LoadBalancerPoolIdentityLoadBalancerPoolIdentityById """ # Construct a json representation of a LoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json = {} - load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerPoolIdentityLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_pool_identity_load_balancer_pool_identity_by_id_model = LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict(load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json) + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model = LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict( + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json + ) assert load_balancer_pool_identity_load_balancer_pool_identity_by_id_model != False # Construct a model instance of LoadBalancerPoolIdentityLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict = LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict(load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json).__dict__ - load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 = LoadBalancerPoolIdentityLoadBalancerPoolIdentityById(**load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict) + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict = LoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict( + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json + ).__dict__ + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 = LoadBalancerPoolIdentityLoadBalancerPoolIdentityById( + ** + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert load_balancer_pool_identity_load_balancer_pool_identity_by_id_model == load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 = load_balancer_pool_identity_load_balancer_pool_identity_by_id_model.to_dict() + load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 = load_balancer_pool_identity_load_balancer_pool_identity_by_id_model.to_dict( + ) assert load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 == load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json @@ -82430,21 +96120,26 @@ def test_load_balancer_pool_member_target_prototype_ip_serialization(self): # Construct a json representation of a LoadBalancerPoolMemberTargetPrototypeIP model load_balancer_pool_member_target_prototype_ip_model_json = {} - load_balancer_pool_member_target_prototype_ip_model_json['address'] = '192.168.3.4' + load_balancer_pool_member_target_prototype_ip_model_json[ + 'address'] = '192.168.3.4' # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeIP by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_ip_model = LoadBalancerPoolMemberTargetPrototypeIP.from_dict(load_balancer_pool_member_target_prototype_ip_model_json) + load_balancer_pool_member_target_prototype_ip_model = LoadBalancerPoolMemberTargetPrototypeIP.from_dict( + load_balancer_pool_member_target_prototype_ip_model_json) assert load_balancer_pool_member_target_prototype_ip_model != False # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeIP by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_ip_model_dict = LoadBalancerPoolMemberTargetPrototypeIP.from_dict(load_balancer_pool_member_target_prototype_ip_model_json).__dict__ - load_balancer_pool_member_target_prototype_ip_model2 = LoadBalancerPoolMemberTargetPrototypeIP(**load_balancer_pool_member_target_prototype_ip_model_dict) + load_balancer_pool_member_target_prototype_ip_model_dict = LoadBalancerPoolMemberTargetPrototypeIP.from_dict( + load_balancer_pool_member_target_prototype_ip_model_json).__dict__ + load_balancer_pool_member_target_prototype_ip_model2 = LoadBalancerPoolMemberTargetPrototypeIP( + **load_balancer_pool_member_target_prototype_ip_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_target_prototype_ip_model == load_balancer_pool_member_target_prototype_ip_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_target_prototype_ip_model_json2 = load_balancer_pool_member_target_prototype_ip_model.to_dict() + load_balancer_pool_member_target_prototype_ip_model_json2 = load_balancer_pool_member_target_prototype_ip_model.to_dict( + ) assert load_balancer_pool_member_target_prototype_ip_model_json2 == load_balancer_pool_member_target_prototype_ip_model_json @@ -82460,21 +96155,26 @@ def test_load_balancer_pool_member_target_ip_serialization(self): # Construct a json representation of a LoadBalancerPoolMemberTargetIP model load_balancer_pool_member_target_ip_model_json = {} - load_balancer_pool_member_target_ip_model_json['address'] = '192.168.3.4' + load_balancer_pool_member_target_ip_model_json[ + 'address'] = '192.168.3.4' # Construct a model instance of LoadBalancerPoolMemberTargetIP by calling from_dict on the json representation - load_balancer_pool_member_target_ip_model = LoadBalancerPoolMemberTargetIP.from_dict(load_balancer_pool_member_target_ip_model_json) + load_balancer_pool_member_target_ip_model = LoadBalancerPoolMemberTargetIP.from_dict( + load_balancer_pool_member_target_ip_model_json) assert load_balancer_pool_member_target_ip_model != False # Construct a model instance of LoadBalancerPoolMemberTargetIP by calling from_dict on the json representation - load_balancer_pool_member_target_ip_model_dict = LoadBalancerPoolMemberTargetIP.from_dict(load_balancer_pool_member_target_ip_model_json).__dict__ - load_balancer_pool_member_target_ip_model2 = LoadBalancerPoolMemberTargetIP(**load_balancer_pool_member_target_ip_model_dict) + load_balancer_pool_member_target_ip_model_dict = LoadBalancerPoolMemberTargetIP.from_dict( + load_balancer_pool_member_target_ip_model_json).__dict__ + load_balancer_pool_member_target_ip_model2 = LoadBalancerPoolMemberTargetIP( + **load_balancer_pool_member_target_ip_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_target_ip_model == load_balancer_pool_member_target_ip_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_target_ip_model_json2 = load_balancer_pool_member_target_ip_model.to_dict() + load_balancer_pool_member_target_ip_model_json2 = load_balancer_pool_member_target_ip_model.to_dict( + ) assert load_balancer_pool_member_target_ip_model_json2 == load_balancer_pool_member_target_ip_model_json @@ -82483,7 +96183,8 @@ class TestModel_LoadBalancerPoolMemberTargetInstanceReference: Test Class for LoadBalancerPoolMemberTargetInstanceReference """ - def test_load_balancer_pool_member_target_instance_reference_serialization(self): + def test_load_balancer_pool_member_target_instance_reference_serialization( + self): """ Test serialization/deserialization for LoadBalancerPoolMemberTargetInstanceReference """ @@ -82491,29 +96192,40 @@ def test_load_balancer_pool_member_target_instance_reference_serialization(self) # Construct dict forms of any model objects needed in order to build this model. instance_reference_deleted_model = {} # InstanceReferenceDeleted - instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + instance_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a LoadBalancerPoolMemberTargetInstanceReference model load_balancer_pool_member_target_instance_reference_model_json = {} - load_balancer_pool_member_target_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - load_balancer_pool_member_target_instance_reference_model_json['deleted'] = instance_reference_deleted_model - load_balancer_pool_member_target_instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' - load_balancer_pool_member_target_instance_reference_model_json['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' - load_balancer_pool_member_target_instance_reference_model_json['name'] = 'my-instance' + load_balancer_pool_member_target_instance_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_instance_reference_model_json[ + 'deleted'] = instance_reference_deleted_model + load_balancer_pool_member_target_instance_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + load_balancer_pool_member_target_instance_reference_model_json[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_instance_reference_model_json[ + 'name'] = 'my-instance' # Construct a model instance of LoadBalancerPoolMemberTargetInstanceReference by calling from_dict on the json representation - load_balancer_pool_member_target_instance_reference_model = LoadBalancerPoolMemberTargetInstanceReference.from_dict(load_balancer_pool_member_target_instance_reference_model_json) + load_balancer_pool_member_target_instance_reference_model = LoadBalancerPoolMemberTargetInstanceReference.from_dict( + load_balancer_pool_member_target_instance_reference_model_json) assert load_balancer_pool_member_target_instance_reference_model != False # Construct a model instance of LoadBalancerPoolMemberTargetInstanceReference by calling from_dict on the json representation - load_balancer_pool_member_target_instance_reference_model_dict = LoadBalancerPoolMemberTargetInstanceReference.from_dict(load_balancer_pool_member_target_instance_reference_model_json).__dict__ - load_balancer_pool_member_target_instance_reference_model2 = LoadBalancerPoolMemberTargetInstanceReference(**load_balancer_pool_member_target_instance_reference_model_dict) + load_balancer_pool_member_target_instance_reference_model_dict = LoadBalancerPoolMemberTargetInstanceReference.from_dict( + load_balancer_pool_member_target_instance_reference_model_json + ).__dict__ + load_balancer_pool_member_target_instance_reference_model2 = LoadBalancerPoolMemberTargetInstanceReference( + **load_balancer_pool_member_target_instance_reference_model_dict) # Verify the model instances are equivalent assert load_balancer_pool_member_target_instance_reference_model == load_balancer_pool_member_target_instance_reference_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_target_instance_reference_model_json2 = load_balancer_pool_member_target_instance_reference_model.to_dict() + load_balancer_pool_member_target_instance_reference_model_json2 = load_balancer_pool_member_target_instance_reference_model.to_dict( + ) assert load_balancer_pool_member_target_instance_reference_model_json2 == load_balancer_pool_member_target_instance_reference_model_json @@ -82529,21 +96241,26 @@ def test_load_balancer_profile_identity_by_href_serialization(self): # Construct a json representation of a LoadBalancerProfileIdentityByHref model load_balancer_profile_identity_by_href_model_json = {} - load_balancer_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' + load_balancer_profile_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed' # Construct a model instance of LoadBalancerProfileIdentityByHref by calling from_dict on the json representation - load_balancer_profile_identity_by_href_model = LoadBalancerProfileIdentityByHref.from_dict(load_balancer_profile_identity_by_href_model_json) + load_balancer_profile_identity_by_href_model = LoadBalancerProfileIdentityByHref.from_dict( + load_balancer_profile_identity_by_href_model_json) assert load_balancer_profile_identity_by_href_model != False # Construct a model instance of LoadBalancerProfileIdentityByHref by calling from_dict on the json representation - load_balancer_profile_identity_by_href_model_dict = LoadBalancerProfileIdentityByHref.from_dict(load_balancer_profile_identity_by_href_model_json).__dict__ - load_balancer_profile_identity_by_href_model2 = LoadBalancerProfileIdentityByHref(**load_balancer_profile_identity_by_href_model_dict) + load_balancer_profile_identity_by_href_model_dict = LoadBalancerProfileIdentityByHref.from_dict( + load_balancer_profile_identity_by_href_model_json).__dict__ + load_balancer_profile_identity_by_href_model2 = LoadBalancerProfileIdentityByHref( + **load_balancer_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_identity_by_href_model == load_balancer_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_identity_by_href_model_json2 = load_balancer_profile_identity_by_href_model.to_dict() + load_balancer_profile_identity_by_href_model_json2 = load_balancer_profile_identity_by_href_model.to_dict( + ) assert load_balancer_profile_identity_by_href_model_json2 == load_balancer_profile_identity_by_href_model_json @@ -82559,21 +96276,26 @@ def test_load_balancer_profile_identity_by_name_serialization(self): # Construct a json representation of a LoadBalancerProfileIdentityByName model load_balancer_profile_identity_by_name_model_json = {} - load_balancer_profile_identity_by_name_model_json['name'] = 'network-fixed' + load_balancer_profile_identity_by_name_model_json[ + 'name'] = 'network-fixed' # Construct a model instance of LoadBalancerProfileIdentityByName by calling from_dict on the json representation - load_balancer_profile_identity_by_name_model = LoadBalancerProfileIdentityByName.from_dict(load_balancer_profile_identity_by_name_model_json) + load_balancer_profile_identity_by_name_model = LoadBalancerProfileIdentityByName.from_dict( + load_balancer_profile_identity_by_name_model_json) assert load_balancer_profile_identity_by_name_model != False # Construct a model instance of LoadBalancerProfileIdentityByName by calling from_dict on the json representation - load_balancer_profile_identity_by_name_model_dict = LoadBalancerProfileIdentityByName.from_dict(load_balancer_profile_identity_by_name_model_json).__dict__ - load_balancer_profile_identity_by_name_model2 = LoadBalancerProfileIdentityByName(**load_balancer_profile_identity_by_name_model_dict) + load_balancer_profile_identity_by_name_model_dict = LoadBalancerProfileIdentityByName.from_dict( + load_balancer_profile_identity_by_name_model_json).__dict__ + load_balancer_profile_identity_by_name_model2 = LoadBalancerProfileIdentityByName( + **load_balancer_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_identity_by_name_model == load_balancer_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_identity_by_name_model_json2 = load_balancer_profile_identity_by_name_model.to_dict() + load_balancer_profile_identity_by_name_model_json2 = load_balancer_profile_identity_by_name_model.to_dict( + ) assert load_balancer_profile_identity_by_name_model_json2 == load_balancer_profile_identity_by_name_model_json @@ -82582,28 +96304,38 @@ class TestModel_LoadBalancerProfileInstanceGroupsSupportedDependent: Test Class for LoadBalancerProfileInstanceGroupsSupportedDependent """ - def test_load_balancer_profile_instance_groups_supported_dependent_serialization(self): + def test_load_balancer_profile_instance_groups_supported_dependent_serialization( + self): """ Test serialization/deserialization for LoadBalancerProfileInstanceGroupsSupportedDependent """ # Construct a json representation of a LoadBalancerProfileInstanceGroupsSupportedDependent model load_balancer_profile_instance_groups_supported_dependent_model_json = {} - load_balancer_profile_instance_groups_supported_dependent_model_json['type'] = 'dependent' + load_balancer_profile_instance_groups_supported_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of LoadBalancerProfileInstanceGroupsSupportedDependent by calling from_dict on the json representation - load_balancer_profile_instance_groups_supported_dependent_model = LoadBalancerProfileInstanceGroupsSupportedDependent.from_dict(load_balancer_profile_instance_groups_supported_dependent_model_json) + load_balancer_profile_instance_groups_supported_dependent_model = LoadBalancerProfileInstanceGroupsSupportedDependent.from_dict( + load_balancer_profile_instance_groups_supported_dependent_model_json + ) assert load_balancer_profile_instance_groups_supported_dependent_model != False # Construct a model instance of LoadBalancerProfileInstanceGroupsSupportedDependent by calling from_dict on the json representation - load_balancer_profile_instance_groups_supported_dependent_model_dict = LoadBalancerProfileInstanceGroupsSupportedDependent.from_dict(load_balancer_profile_instance_groups_supported_dependent_model_json).__dict__ - load_balancer_profile_instance_groups_supported_dependent_model2 = LoadBalancerProfileInstanceGroupsSupportedDependent(**load_balancer_profile_instance_groups_supported_dependent_model_dict) + load_balancer_profile_instance_groups_supported_dependent_model_dict = LoadBalancerProfileInstanceGroupsSupportedDependent.from_dict( + load_balancer_profile_instance_groups_supported_dependent_model_json + ).__dict__ + load_balancer_profile_instance_groups_supported_dependent_model2 = LoadBalancerProfileInstanceGroupsSupportedDependent( + ** + load_balancer_profile_instance_groups_supported_dependent_model_dict + ) # Verify the model instances are equivalent assert load_balancer_profile_instance_groups_supported_dependent_model == load_balancer_profile_instance_groups_supported_dependent_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_instance_groups_supported_dependent_model_json2 = load_balancer_profile_instance_groups_supported_dependent_model.to_dict() + load_balancer_profile_instance_groups_supported_dependent_model_json2 = load_balancer_profile_instance_groups_supported_dependent_model.to_dict( + ) assert load_balancer_profile_instance_groups_supported_dependent_model_json2 == load_balancer_profile_instance_groups_supported_dependent_model_json @@ -82612,29 +96344,37 @@ class TestModel_LoadBalancerProfileInstanceGroupsSupportedFixed: Test Class for LoadBalancerProfileInstanceGroupsSupportedFixed """ - def test_load_balancer_profile_instance_groups_supported_fixed_serialization(self): + def test_load_balancer_profile_instance_groups_supported_fixed_serialization( + self): """ Test serialization/deserialization for LoadBalancerProfileInstanceGroupsSupportedFixed """ # Construct a json representation of a LoadBalancerProfileInstanceGroupsSupportedFixed model load_balancer_profile_instance_groups_supported_fixed_model_json = {} - load_balancer_profile_instance_groups_supported_fixed_model_json['type'] = 'fixed' - load_balancer_profile_instance_groups_supported_fixed_model_json['value'] = True + load_balancer_profile_instance_groups_supported_fixed_model_json[ + 'type'] = 'fixed' + load_balancer_profile_instance_groups_supported_fixed_model_json[ + 'value'] = True # Construct a model instance of LoadBalancerProfileInstanceGroupsSupportedFixed by calling from_dict on the json representation - load_balancer_profile_instance_groups_supported_fixed_model = LoadBalancerProfileInstanceGroupsSupportedFixed.from_dict(load_balancer_profile_instance_groups_supported_fixed_model_json) + load_balancer_profile_instance_groups_supported_fixed_model = LoadBalancerProfileInstanceGroupsSupportedFixed.from_dict( + load_balancer_profile_instance_groups_supported_fixed_model_json) assert load_balancer_profile_instance_groups_supported_fixed_model != False # Construct a model instance of LoadBalancerProfileInstanceGroupsSupportedFixed by calling from_dict on the json representation - load_balancer_profile_instance_groups_supported_fixed_model_dict = LoadBalancerProfileInstanceGroupsSupportedFixed.from_dict(load_balancer_profile_instance_groups_supported_fixed_model_json).__dict__ - load_balancer_profile_instance_groups_supported_fixed_model2 = LoadBalancerProfileInstanceGroupsSupportedFixed(**load_balancer_profile_instance_groups_supported_fixed_model_dict) + load_balancer_profile_instance_groups_supported_fixed_model_dict = LoadBalancerProfileInstanceGroupsSupportedFixed.from_dict( + load_balancer_profile_instance_groups_supported_fixed_model_json + ).__dict__ + load_balancer_profile_instance_groups_supported_fixed_model2 = LoadBalancerProfileInstanceGroupsSupportedFixed( + **load_balancer_profile_instance_groups_supported_fixed_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_instance_groups_supported_fixed_model == load_balancer_profile_instance_groups_supported_fixed_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_instance_groups_supported_fixed_model_json2 = load_balancer_profile_instance_groups_supported_fixed_model.to_dict() + load_balancer_profile_instance_groups_supported_fixed_model_json2 = load_balancer_profile_instance_groups_supported_fixed_model.to_dict( + ) assert load_balancer_profile_instance_groups_supported_fixed_model_json2 == load_balancer_profile_instance_groups_supported_fixed_model_json @@ -82643,28 +96383,35 @@ class TestModel_LoadBalancerProfileRouteModeSupportedDependent: Test Class for LoadBalancerProfileRouteModeSupportedDependent """ - def test_load_balancer_profile_route_mode_supported_dependent_serialization(self): + def test_load_balancer_profile_route_mode_supported_dependent_serialization( + self): """ Test serialization/deserialization for LoadBalancerProfileRouteModeSupportedDependent """ # Construct a json representation of a LoadBalancerProfileRouteModeSupportedDependent model load_balancer_profile_route_mode_supported_dependent_model_json = {} - load_balancer_profile_route_mode_supported_dependent_model_json['type'] = 'dependent' + load_balancer_profile_route_mode_supported_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of LoadBalancerProfileRouteModeSupportedDependent by calling from_dict on the json representation - load_balancer_profile_route_mode_supported_dependent_model = LoadBalancerProfileRouteModeSupportedDependent.from_dict(load_balancer_profile_route_mode_supported_dependent_model_json) + load_balancer_profile_route_mode_supported_dependent_model = LoadBalancerProfileRouteModeSupportedDependent.from_dict( + load_balancer_profile_route_mode_supported_dependent_model_json) assert load_balancer_profile_route_mode_supported_dependent_model != False # Construct a model instance of LoadBalancerProfileRouteModeSupportedDependent by calling from_dict on the json representation - load_balancer_profile_route_mode_supported_dependent_model_dict = LoadBalancerProfileRouteModeSupportedDependent.from_dict(load_balancer_profile_route_mode_supported_dependent_model_json).__dict__ - load_balancer_profile_route_mode_supported_dependent_model2 = LoadBalancerProfileRouteModeSupportedDependent(**load_balancer_profile_route_mode_supported_dependent_model_dict) + load_balancer_profile_route_mode_supported_dependent_model_dict = LoadBalancerProfileRouteModeSupportedDependent.from_dict( + load_balancer_profile_route_mode_supported_dependent_model_json + ).__dict__ + load_balancer_profile_route_mode_supported_dependent_model2 = LoadBalancerProfileRouteModeSupportedDependent( + **load_balancer_profile_route_mode_supported_dependent_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_route_mode_supported_dependent_model == load_balancer_profile_route_mode_supported_dependent_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_route_mode_supported_dependent_model_json2 = load_balancer_profile_route_mode_supported_dependent_model.to_dict() + load_balancer_profile_route_mode_supported_dependent_model_json2 = load_balancer_profile_route_mode_supported_dependent_model.to_dict( + ) assert load_balancer_profile_route_mode_supported_dependent_model_json2 == load_balancer_profile_route_mode_supported_dependent_model_json @@ -82673,29 +96420,37 @@ class TestModel_LoadBalancerProfileRouteModeSupportedFixed: Test Class for LoadBalancerProfileRouteModeSupportedFixed """ - def test_load_balancer_profile_route_mode_supported_fixed_serialization(self): + def test_load_balancer_profile_route_mode_supported_fixed_serialization( + self): """ Test serialization/deserialization for LoadBalancerProfileRouteModeSupportedFixed """ # Construct a json representation of a LoadBalancerProfileRouteModeSupportedFixed model load_balancer_profile_route_mode_supported_fixed_model_json = {} - load_balancer_profile_route_mode_supported_fixed_model_json['type'] = 'fixed' - load_balancer_profile_route_mode_supported_fixed_model_json['value'] = True + load_balancer_profile_route_mode_supported_fixed_model_json[ + 'type'] = 'fixed' + load_balancer_profile_route_mode_supported_fixed_model_json[ + 'value'] = True # Construct a model instance of LoadBalancerProfileRouteModeSupportedFixed by calling from_dict on the json representation - load_balancer_profile_route_mode_supported_fixed_model = LoadBalancerProfileRouteModeSupportedFixed.from_dict(load_balancer_profile_route_mode_supported_fixed_model_json) + load_balancer_profile_route_mode_supported_fixed_model = LoadBalancerProfileRouteModeSupportedFixed.from_dict( + load_balancer_profile_route_mode_supported_fixed_model_json) assert load_balancer_profile_route_mode_supported_fixed_model != False # Construct a model instance of LoadBalancerProfileRouteModeSupportedFixed by calling from_dict on the json representation - load_balancer_profile_route_mode_supported_fixed_model_dict = LoadBalancerProfileRouteModeSupportedFixed.from_dict(load_balancer_profile_route_mode_supported_fixed_model_json).__dict__ - load_balancer_profile_route_mode_supported_fixed_model2 = LoadBalancerProfileRouteModeSupportedFixed(**load_balancer_profile_route_mode_supported_fixed_model_dict) + load_balancer_profile_route_mode_supported_fixed_model_dict = LoadBalancerProfileRouteModeSupportedFixed.from_dict( + load_balancer_profile_route_mode_supported_fixed_model_json + ).__dict__ + load_balancer_profile_route_mode_supported_fixed_model2 = LoadBalancerProfileRouteModeSupportedFixed( + **load_balancer_profile_route_mode_supported_fixed_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_route_mode_supported_fixed_model == load_balancer_profile_route_mode_supported_fixed_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_route_mode_supported_fixed_model_json2 = load_balancer_profile_route_mode_supported_fixed_model.to_dict() + load_balancer_profile_route_mode_supported_fixed_model_json2 = load_balancer_profile_route_mode_supported_fixed_model.to_dict( + ) assert load_balancer_profile_route_mode_supported_fixed_model_json2 == load_balancer_profile_route_mode_supported_fixed_model_json @@ -82704,28 +96459,38 @@ class TestModel_LoadBalancerProfileSecurityGroupsSupportedDependent: Test Class for LoadBalancerProfileSecurityGroupsSupportedDependent """ - def test_load_balancer_profile_security_groups_supported_dependent_serialization(self): + def test_load_balancer_profile_security_groups_supported_dependent_serialization( + self): """ Test serialization/deserialization for LoadBalancerProfileSecurityGroupsSupportedDependent """ # Construct a json representation of a LoadBalancerProfileSecurityGroupsSupportedDependent model load_balancer_profile_security_groups_supported_dependent_model_json = {} - load_balancer_profile_security_groups_supported_dependent_model_json['type'] = 'dependent' + load_balancer_profile_security_groups_supported_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of LoadBalancerProfileSecurityGroupsSupportedDependent by calling from_dict on the json representation - load_balancer_profile_security_groups_supported_dependent_model = LoadBalancerProfileSecurityGroupsSupportedDependent.from_dict(load_balancer_profile_security_groups_supported_dependent_model_json) + load_balancer_profile_security_groups_supported_dependent_model = LoadBalancerProfileSecurityGroupsSupportedDependent.from_dict( + load_balancer_profile_security_groups_supported_dependent_model_json + ) assert load_balancer_profile_security_groups_supported_dependent_model != False # Construct a model instance of LoadBalancerProfileSecurityGroupsSupportedDependent by calling from_dict on the json representation - load_balancer_profile_security_groups_supported_dependent_model_dict = LoadBalancerProfileSecurityGroupsSupportedDependent.from_dict(load_balancer_profile_security_groups_supported_dependent_model_json).__dict__ - load_balancer_profile_security_groups_supported_dependent_model2 = LoadBalancerProfileSecurityGroupsSupportedDependent(**load_balancer_profile_security_groups_supported_dependent_model_dict) + load_balancer_profile_security_groups_supported_dependent_model_dict = LoadBalancerProfileSecurityGroupsSupportedDependent.from_dict( + load_balancer_profile_security_groups_supported_dependent_model_json + ).__dict__ + load_balancer_profile_security_groups_supported_dependent_model2 = LoadBalancerProfileSecurityGroupsSupportedDependent( + ** + load_balancer_profile_security_groups_supported_dependent_model_dict + ) # Verify the model instances are equivalent assert load_balancer_profile_security_groups_supported_dependent_model == load_balancer_profile_security_groups_supported_dependent_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_security_groups_supported_dependent_model_json2 = load_balancer_profile_security_groups_supported_dependent_model.to_dict() + load_balancer_profile_security_groups_supported_dependent_model_json2 = load_balancer_profile_security_groups_supported_dependent_model.to_dict( + ) assert load_balancer_profile_security_groups_supported_dependent_model_json2 == load_balancer_profile_security_groups_supported_dependent_model_json @@ -82734,29 +96499,37 @@ class TestModel_LoadBalancerProfileSecurityGroupsSupportedFixed: Test Class for LoadBalancerProfileSecurityGroupsSupportedFixed """ - def test_load_balancer_profile_security_groups_supported_fixed_serialization(self): + def test_load_balancer_profile_security_groups_supported_fixed_serialization( + self): """ Test serialization/deserialization for LoadBalancerProfileSecurityGroupsSupportedFixed """ # Construct a json representation of a LoadBalancerProfileSecurityGroupsSupportedFixed model load_balancer_profile_security_groups_supported_fixed_model_json = {} - load_balancer_profile_security_groups_supported_fixed_model_json['type'] = 'fixed' - load_balancer_profile_security_groups_supported_fixed_model_json['value'] = True + load_balancer_profile_security_groups_supported_fixed_model_json[ + 'type'] = 'fixed' + load_balancer_profile_security_groups_supported_fixed_model_json[ + 'value'] = True # Construct a model instance of LoadBalancerProfileSecurityGroupsSupportedFixed by calling from_dict on the json representation - load_balancer_profile_security_groups_supported_fixed_model = LoadBalancerProfileSecurityGroupsSupportedFixed.from_dict(load_balancer_profile_security_groups_supported_fixed_model_json) + load_balancer_profile_security_groups_supported_fixed_model = LoadBalancerProfileSecurityGroupsSupportedFixed.from_dict( + load_balancer_profile_security_groups_supported_fixed_model_json) assert load_balancer_profile_security_groups_supported_fixed_model != False # Construct a model instance of LoadBalancerProfileSecurityGroupsSupportedFixed by calling from_dict on the json representation - load_balancer_profile_security_groups_supported_fixed_model_dict = LoadBalancerProfileSecurityGroupsSupportedFixed.from_dict(load_balancer_profile_security_groups_supported_fixed_model_json).__dict__ - load_balancer_profile_security_groups_supported_fixed_model2 = LoadBalancerProfileSecurityGroupsSupportedFixed(**load_balancer_profile_security_groups_supported_fixed_model_dict) + load_balancer_profile_security_groups_supported_fixed_model_dict = LoadBalancerProfileSecurityGroupsSupportedFixed.from_dict( + load_balancer_profile_security_groups_supported_fixed_model_json + ).__dict__ + load_balancer_profile_security_groups_supported_fixed_model2 = LoadBalancerProfileSecurityGroupsSupportedFixed( + **load_balancer_profile_security_groups_supported_fixed_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_security_groups_supported_fixed_model == load_balancer_profile_security_groups_supported_fixed_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_security_groups_supported_fixed_model_json2 = load_balancer_profile_security_groups_supported_fixed_model.to_dict() + load_balancer_profile_security_groups_supported_fixed_model_json2 = load_balancer_profile_security_groups_supported_fixed_model.to_dict( + ) assert load_balancer_profile_security_groups_supported_fixed_model_json2 == load_balancer_profile_security_groups_supported_fixed_model_json @@ -82772,21 +96545,26 @@ def test_load_balancer_profile_udp_supported_dependent_serialization(self): # Construct a json representation of a LoadBalancerProfileUDPSupportedDependent model load_balancer_profile_udp_supported_dependent_model_json = {} - load_balancer_profile_udp_supported_dependent_model_json['type'] = 'dependent' + load_balancer_profile_udp_supported_dependent_model_json[ + 'type'] = 'dependent' # Construct a model instance of LoadBalancerProfileUDPSupportedDependent by calling from_dict on the json representation - load_balancer_profile_udp_supported_dependent_model = LoadBalancerProfileUDPSupportedDependent.from_dict(load_balancer_profile_udp_supported_dependent_model_json) + load_balancer_profile_udp_supported_dependent_model = LoadBalancerProfileUDPSupportedDependent.from_dict( + load_balancer_profile_udp_supported_dependent_model_json) assert load_balancer_profile_udp_supported_dependent_model != False # Construct a model instance of LoadBalancerProfileUDPSupportedDependent by calling from_dict on the json representation - load_balancer_profile_udp_supported_dependent_model_dict = LoadBalancerProfileUDPSupportedDependent.from_dict(load_balancer_profile_udp_supported_dependent_model_json).__dict__ - load_balancer_profile_udp_supported_dependent_model2 = LoadBalancerProfileUDPSupportedDependent(**load_balancer_profile_udp_supported_dependent_model_dict) + load_balancer_profile_udp_supported_dependent_model_dict = LoadBalancerProfileUDPSupportedDependent.from_dict( + load_balancer_profile_udp_supported_dependent_model_json).__dict__ + load_balancer_profile_udp_supported_dependent_model2 = LoadBalancerProfileUDPSupportedDependent( + **load_balancer_profile_udp_supported_dependent_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_udp_supported_dependent_model == load_balancer_profile_udp_supported_dependent_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_udp_supported_dependent_model_json2 = load_balancer_profile_udp_supported_dependent_model.to_dict() + load_balancer_profile_udp_supported_dependent_model_json2 = load_balancer_profile_udp_supported_dependent_model.to_dict( + ) assert load_balancer_profile_udp_supported_dependent_model_json2 == load_balancer_profile_udp_supported_dependent_model_json @@ -82806,18 +96584,22 @@ def test_load_balancer_profile_udp_supported_fixed_serialization(self): load_balancer_profile_udp_supported_fixed_model_json['value'] = True # Construct a model instance of LoadBalancerProfileUDPSupportedFixed by calling from_dict on the json representation - load_balancer_profile_udp_supported_fixed_model = LoadBalancerProfileUDPSupportedFixed.from_dict(load_balancer_profile_udp_supported_fixed_model_json) + load_balancer_profile_udp_supported_fixed_model = LoadBalancerProfileUDPSupportedFixed.from_dict( + load_balancer_profile_udp_supported_fixed_model_json) assert load_balancer_profile_udp_supported_fixed_model != False # Construct a model instance of LoadBalancerProfileUDPSupportedFixed by calling from_dict on the json representation - load_balancer_profile_udp_supported_fixed_model_dict = LoadBalancerProfileUDPSupportedFixed.from_dict(load_balancer_profile_udp_supported_fixed_model_json).__dict__ - load_balancer_profile_udp_supported_fixed_model2 = LoadBalancerProfileUDPSupportedFixed(**load_balancer_profile_udp_supported_fixed_model_dict) + load_balancer_profile_udp_supported_fixed_model_dict = LoadBalancerProfileUDPSupportedFixed.from_dict( + load_balancer_profile_udp_supported_fixed_model_json).__dict__ + load_balancer_profile_udp_supported_fixed_model2 = LoadBalancerProfileUDPSupportedFixed( + **load_balancer_profile_udp_supported_fixed_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_udp_supported_fixed_model == load_balancer_profile_udp_supported_fixed_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_udp_supported_fixed_model_json2 = load_balancer_profile_udp_supported_fixed_model.to_dict() + load_balancer_profile_udp_supported_fixed_model_json2 = load_balancer_profile_udp_supported_fixed_model.to_dict( + ) assert load_balancer_profile_udp_supported_fixed_model_json2 == load_balancer_profile_udp_supported_fixed_model_json @@ -82833,21 +96615,26 @@ def test_network_acl_identity_by_crn_serialization(self): # Construct a json representation of a NetworkACLIdentityByCRN model network_acl_identity_by_crn_model_json = {} - network_acl_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a model instance of NetworkACLIdentityByCRN by calling from_dict on the json representation - network_acl_identity_by_crn_model = NetworkACLIdentityByCRN.from_dict(network_acl_identity_by_crn_model_json) + network_acl_identity_by_crn_model = NetworkACLIdentityByCRN.from_dict( + network_acl_identity_by_crn_model_json) assert network_acl_identity_by_crn_model != False # Construct a model instance of NetworkACLIdentityByCRN by calling from_dict on the json representation - network_acl_identity_by_crn_model_dict = NetworkACLIdentityByCRN.from_dict(network_acl_identity_by_crn_model_json).__dict__ - network_acl_identity_by_crn_model2 = NetworkACLIdentityByCRN(**network_acl_identity_by_crn_model_dict) + network_acl_identity_by_crn_model_dict = NetworkACLIdentityByCRN.from_dict( + network_acl_identity_by_crn_model_json).__dict__ + network_acl_identity_by_crn_model2 = NetworkACLIdentityByCRN( + **network_acl_identity_by_crn_model_dict) # Verify the model instances are equivalent assert network_acl_identity_by_crn_model == network_acl_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - network_acl_identity_by_crn_model_json2 = network_acl_identity_by_crn_model.to_dict() + network_acl_identity_by_crn_model_json2 = network_acl_identity_by_crn_model.to_dict( + ) assert network_acl_identity_by_crn_model_json2 == network_acl_identity_by_crn_model_json @@ -82863,21 +96650,26 @@ def test_network_acl_identity_by_href_serialization(self): # Construct a json representation of a NetworkACLIdentityByHref model network_acl_identity_by_href_model_json = {} - network_acl_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a model instance of NetworkACLIdentityByHref by calling from_dict on the json representation - network_acl_identity_by_href_model = NetworkACLIdentityByHref.from_dict(network_acl_identity_by_href_model_json) + network_acl_identity_by_href_model = NetworkACLIdentityByHref.from_dict( + network_acl_identity_by_href_model_json) assert network_acl_identity_by_href_model != False # Construct a model instance of NetworkACLIdentityByHref by calling from_dict on the json representation - network_acl_identity_by_href_model_dict = NetworkACLIdentityByHref.from_dict(network_acl_identity_by_href_model_json).__dict__ - network_acl_identity_by_href_model2 = NetworkACLIdentityByHref(**network_acl_identity_by_href_model_dict) + network_acl_identity_by_href_model_dict = NetworkACLIdentityByHref.from_dict( + network_acl_identity_by_href_model_json).__dict__ + network_acl_identity_by_href_model2 = NetworkACLIdentityByHref( + **network_acl_identity_by_href_model_dict) # Verify the model instances are equivalent assert network_acl_identity_by_href_model == network_acl_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - network_acl_identity_by_href_model_json2 = network_acl_identity_by_href_model.to_dict() + network_acl_identity_by_href_model_json2 = network_acl_identity_by_href_model.to_dict( + ) assert network_acl_identity_by_href_model_json2 == network_acl_identity_by_href_model_json @@ -82893,21 +96685,26 @@ def test_network_acl_identity_by_id_serialization(self): # Construct a json representation of a NetworkACLIdentityById model network_acl_identity_by_id_model_json = {} - network_acl_identity_by_id_model_json['id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_by_id_model_json[ + 'id'] = 'r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a model instance of NetworkACLIdentityById by calling from_dict on the json representation - network_acl_identity_by_id_model = NetworkACLIdentityById.from_dict(network_acl_identity_by_id_model_json) + network_acl_identity_by_id_model = NetworkACLIdentityById.from_dict( + network_acl_identity_by_id_model_json) assert network_acl_identity_by_id_model != False # Construct a model instance of NetworkACLIdentityById by calling from_dict on the json representation - network_acl_identity_by_id_model_dict = NetworkACLIdentityById.from_dict(network_acl_identity_by_id_model_json).__dict__ - network_acl_identity_by_id_model2 = NetworkACLIdentityById(**network_acl_identity_by_id_model_dict) + network_acl_identity_by_id_model_dict = NetworkACLIdentityById.from_dict( + network_acl_identity_by_id_model_json).__dict__ + network_acl_identity_by_id_model2 = NetworkACLIdentityById( + **network_acl_identity_by_id_model_dict) # Verify the model instances are equivalent assert network_acl_identity_by_id_model == network_acl_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - network_acl_identity_by_id_model_json2 = network_acl_identity_by_id_model.to_dict() + network_acl_identity_by_id_model_json2 = network_acl_identity_by_id_model.to_dict( + ) assert network_acl_identity_by_id_model_json2 == network_acl_identity_by_id_model_json @@ -82929,39 +96726,58 @@ def test_network_acl_prototype_network_acl_by_rules_serialization(self): vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'cf7cd5a-2f30-4336-a495-6addc820cd61' - network_acl_rule_prototype_network_acl_context_model = {} # NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype + network_acl_rule_prototype_network_acl_context_model = { + } # NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype network_acl_rule_prototype_network_acl_context_model['action'] = 'allow' - network_acl_rule_prototype_network_acl_context_model['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_model['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_context_model['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_context_model['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_context_model['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_model['destination_port_max'] = 22 - network_acl_rule_prototype_network_acl_context_model['destination_port_min'] = 22 + network_acl_rule_prototype_network_acl_context_model[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_model[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_context_model[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_context_model[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_context_model[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_model[ + 'destination_port_max'] = 22 + network_acl_rule_prototype_network_acl_context_model[ + 'destination_port_min'] = 22 network_acl_rule_prototype_network_acl_context_model['protocol'] = 'udp' - network_acl_rule_prototype_network_acl_context_model['source_port_max'] = 65535 - network_acl_rule_prototype_network_acl_context_model['source_port_min'] = 49152 + network_acl_rule_prototype_network_acl_context_model[ + 'source_port_max'] = 65535 + network_acl_rule_prototype_network_acl_context_model[ + 'source_port_min'] = 49152 # Construct a json representation of a NetworkACLPrototypeNetworkACLByRules model network_acl_prototype_network_acl_by_rules_model_json = {} - network_acl_prototype_network_acl_by_rules_model_json['name'] = 'my-network-acl' - network_acl_prototype_network_acl_by_rules_model_json['resource_group'] = resource_group_identity_model - network_acl_prototype_network_acl_by_rules_model_json['vpc'] = vpc_identity_model - network_acl_prototype_network_acl_by_rules_model_json['rules'] = [network_acl_rule_prototype_network_acl_context_model] + network_acl_prototype_network_acl_by_rules_model_json[ + 'name'] = 'my-network-acl' + network_acl_prototype_network_acl_by_rules_model_json[ + 'resource_group'] = resource_group_identity_model + network_acl_prototype_network_acl_by_rules_model_json[ + 'vpc'] = vpc_identity_model + network_acl_prototype_network_acl_by_rules_model_json['rules'] = [ + network_acl_rule_prototype_network_acl_context_model + ] # Construct a model instance of NetworkACLPrototypeNetworkACLByRules by calling from_dict on the json representation - network_acl_prototype_network_acl_by_rules_model = NetworkACLPrototypeNetworkACLByRules.from_dict(network_acl_prototype_network_acl_by_rules_model_json) + network_acl_prototype_network_acl_by_rules_model = NetworkACLPrototypeNetworkACLByRules.from_dict( + network_acl_prototype_network_acl_by_rules_model_json) assert network_acl_prototype_network_acl_by_rules_model != False # Construct a model instance of NetworkACLPrototypeNetworkACLByRules by calling from_dict on the json representation - network_acl_prototype_network_acl_by_rules_model_dict = NetworkACLPrototypeNetworkACLByRules.from_dict(network_acl_prototype_network_acl_by_rules_model_json).__dict__ - network_acl_prototype_network_acl_by_rules_model2 = NetworkACLPrototypeNetworkACLByRules(**network_acl_prototype_network_acl_by_rules_model_dict) + network_acl_prototype_network_acl_by_rules_model_dict = NetworkACLPrototypeNetworkACLByRules.from_dict( + network_acl_prototype_network_acl_by_rules_model_json).__dict__ + network_acl_prototype_network_acl_by_rules_model2 = NetworkACLPrototypeNetworkACLByRules( + **network_acl_prototype_network_acl_by_rules_model_dict) # Verify the model instances are equivalent assert network_acl_prototype_network_acl_by_rules_model == network_acl_prototype_network_acl_by_rules_model2 # Convert model instance back to dict and verify no loss of data - network_acl_prototype_network_acl_by_rules_model_json2 = network_acl_prototype_network_acl_by_rules_model.to_dict() + network_acl_prototype_network_acl_by_rules_model_json2 = network_acl_prototype_network_acl_by_rules_model.to_dict( + ) assert network_acl_prototype_network_acl_by_rules_model_json2 == network_acl_prototype_network_acl_by_rules_model_json @@ -82970,7 +96786,8 @@ class TestModel_NetworkACLPrototypeNetworkACLBySourceNetworkACL: Test Class for NetworkACLPrototypeNetworkACLBySourceNetworkACL """ - def test_network_acl_prototype_network_acl_by_source_network_acl_serialization(self): + def test_network_acl_prototype_network_acl_by_source_network_acl_serialization( + self): """ Test serialization/deserialization for NetworkACLPrototypeNetworkACLBySourceNetworkACL """ @@ -82984,28 +96801,39 @@ def test_network_acl_prototype_network_acl_by_source_network_acl_serialization(s vpc_identity_model['id'] = 'cf7cd5a-2f30-4336-a495-6addc820cd61' network_acl_identity_model = {} # NetworkACLIdentityById - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' # Construct a json representation of a NetworkACLPrototypeNetworkACLBySourceNetworkACL model network_acl_prototype_network_acl_by_source_network_acl_model_json = {} - network_acl_prototype_network_acl_by_source_network_acl_model_json['name'] = 'my-network-acl' - network_acl_prototype_network_acl_by_source_network_acl_model_json['resource_group'] = resource_group_identity_model - network_acl_prototype_network_acl_by_source_network_acl_model_json['vpc'] = vpc_identity_model - network_acl_prototype_network_acl_by_source_network_acl_model_json['source_network_acl'] = network_acl_identity_model + network_acl_prototype_network_acl_by_source_network_acl_model_json[ + 'name'] = 'my-network-acl' + network_acl_prototype_network_acl_by_source_network_acl_model_json[ + 'resource_group'] = resource_group_identity_model + network_acl_prototype_network_acl_by_source_network_acl_model_json[ + 'vpc'] = vpc_identity_model + network_acl_prototype_network_acl_by_source_network_acl_model_json[ + 'source_network_acl'] = network_acl_identity_model # Construct a model instance of NetworkACLPrototypeNetworkACLBySourceNetworkACL by calling from_dict on the json representation - network_acl_prototype_network_acl_by_source_network_acl_model = NetworkACLPrototypeNetworkACLBySourceNetworkACL.from_dict(network_acl_prototype_network_acl_by_source_network_acl_model_json) + network_acl_prototype_network_acl_by_source_network_acl_model = NetworkACLPrototypeNetworkACLBySourceNetworkACL.from_dict( + network_acl_prototype_network_acl_by_source_network_acl_model_json) assert network_acl_prototype_network_acl_by_source_network_acl_model != False # Construct a model instance of NetworkACLPrototypeNetworkACLBySourceNetworkACL by calling from_dict on the json representation - network_acl_prototype_network_acl_by_source_network_acl_model_dict = NetworkACLPrototypeNetworkACLBySourceNetworkACL.from_dict(network_acl_prototype_network_acl_by_source_network_acl_model_json).__dict__ - network_acl_prototype_network_acl_by_source_network_acl_model2 = NetworkACLPrototypeNetworkACLBySourceNetworkACL(**network_acl_prototype_network_acl_by_source_network_acl_model_dict) + network_acl_prototype_network_acl_by_source_network_acl_model_dict = NetworkACLPrototypeNetworkACLBySourceNetworkACL.from_dict( + network_acl_prototype_network_acl_by_source_network_acl_model_json + ).__dict__ + network_acl_prototype_network_acl_by_source_network_acl_model2 = NetworkACLPrototypeNetworkACLBySourceNetworkACL( + ** + network_acl_prototype_network_acl_by_source_network_acl_model_dict) # Verify the model instances are equivalent assert network_acl_prototype_network_acl_by_source_network_acl_model == network_acl_prototype_network_acl_by_source_network_acl_model2 # Convert model instance back to dict and verify no loss of data - network_acl_prototype_network_acl_by_source_network_acl_model_json2 = network_acl_prototype_network_acl_by_source_network_acl_model.to_dict() + network_acl_prototype_network_acl_by_source_network_acl_model_json2 = network_acl_prototype_network_acl_by_source_network_acl_model.to_dict( + ) assert network_acl_prototype_network_acl_by_source_network_acl_model_json2 == network_acl_prototype_network_acl_by_source_network_acl_model_json @@ -83014,28 +96842,38 @@ class TestModel_NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref: Test Class for NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref """ - def test_network_acl_rule_before_patch_network_acl_rule_identity_by_href_serialization(self): + def test_network_acl_rule_before_patch_network_acl_rule_identity_by_href_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref """ # Construct a json representation of a NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref model network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json = {} - network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a model instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref by calling from_dict on the json representation - network_acl_rule_before_patch_network_acl_rule_identity_by_href_model = NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.from_dict(network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json) + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model = NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.from_dict( + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json + ) assert network_acl_rule_before_patch_network_acl_rule_identity_by_href_model != False # Construct a model instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref by calling from_dict on the json representation - network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_dict = NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.from_dict(network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json).__dict__ - network_acl_rule_before_patch_network_acl_rule_identity_by_href_model2 = NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(**network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_dict) + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_dict = NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.from_dict( + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json + ).__dict__ + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model2 = NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref( + ** + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_before_patch_network_acl_rule_identity_by_href_model == network_acl_rule_before_patch_network_acl_rule_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json2 = network_acl_rule_before_patch_network_acl_rule_identity_by_href_model.to_dict() + network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json2 = network_acl_rule_before_patch_network_acl_rule_identity_by_href_model.to_dict( + ) assert network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json2 == network_acl_rule_before_patch_network_acl_rule_identity_by_href_model_json @@ -83044,28 +96882,38 @@ class TestModel_NetworkACLRuleBeforePatchNetworkACLRuleIdentityById: Test Class for NetworkACLRuleBeforePatchNetworkACLRuleIdentityById """ - def test_network_acl_rule_before_patch_network_acl_rule_identity_by_id_serialization(self): + def test_network_acl_rule_before_patch_network_acl_rule_identity_by_id_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleBeforePatchNetworkACLRuleIdentityById """ # Construct a json representation of a NetworkACLRuleBeforePatchNetworkACLRuleIdentityById model network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json = {} - network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a model instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityById by calling from_dict on the json representation - network_acl_rule_before_patch_network_acl_rule_identity_by_id_model = NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.from_dict(network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json) + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model = NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.from_dict( + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json + ) assert network_acl_rule_before_patch_network_acl_rule_identity_by_id_model != False # Construct a model instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityById by calling from_dict on the json representation - network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_dict = NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.from_dict(network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json).__dict__ - network_acl_rule_before_patch_network_acl_rule_identity_by_id_model2 = NetworkACLRuleBeforePatchNetworkACLRuleIdentityById(**network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_dict) + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_dict = NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.from_dict( + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json + ).__dict__ + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model2 = NetworkACLRuleBeforePatchNetworkACLRuleIdentityById( + ** + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_before_patch_network_acl_rule_identity_by_id_model == network_acl_rule_before_patch_network_acl_rule_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json2 = network_acl_rule_before_patch_network_acl_rule_identity_by_id_model.to_dict() + network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json2 = network_acl_rule_before_patch_network_acl_rule_identity_by_id_model.to_dict( + ) assert network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json2 == network_acl_rule_before_patch_network_acl_rule_identity_by_id_model_json @@ -83074,28 +96922,38 @@ class TestModel_NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref: Test Class for NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref """ - def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_href_serialization(self): + def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_href_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref """ # Construct a json representation of a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref model network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json = {} - network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a model instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref by calling from_dict on the json representation - network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.from_dict(network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json) + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.from_dict( + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json + ) assert network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model != False # Construct a model instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref by calling from_dict on the json representation - network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_dict = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.from_dict(network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json).__dict__ - network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model2 = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(**network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_dict) + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_dict = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.from_dict( + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json + ).__dict__ + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model2 = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref( + ** + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model == network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json2 = network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model.to_dict() + network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json2 = network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model.to_dict( + ) assert network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json2 == network_acl_rule_before_prototype_network_acl_rule_identity_by_href_model_json @@ -83104,28 +96962,38 @@ class TestModel_NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById: Test Class for NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById """ - def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_id_serialization(self): + def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_id_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById """ # Construct a json representation of a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById model network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json = {} - network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a model instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById by calling from_dict on the json representation - network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.from_dict(network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json) + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.from_dict( + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json + ) assert network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model != False # Construct a model instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById by calling from_dict on the json representation - network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_dict = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.from_dict(network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json).__dict__ - network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model2 = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById(**network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_dict) + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_dict = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.from_dict( + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json + ).__dict__ + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model2 = NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById( + ** + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model == network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json2 = network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model.to_dict() + network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json2 = network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model.to_dict( + ) assert network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json2 == network_acl_rule_before_prototype_network_acl_rule_identity_by_id_model_json @@ -83134,49 +97002,71 @@ class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolAll: Test Class for NetworkACLRuleItemNetworkACLRuleProtocolAll """ - def test_network_acl_rule_item_network_acl_rule_protocol_all_serialization(self): + def test_network_acl_rule_item_network_acl_rule_protocol_all_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleItemNetworkACLRuleProtocolAll """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' # Construct a json representation of a NetworkACLRuleItemNetworkACLRuleProtocolAll model network_acl_rule_item_network_acl_rule_protocol_all_model_json = {} - network_acl_rule_item_network_acl_rule_protocol_all_model_json['action'] = 'allow' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['before'] = network_acl_rule_reference_model - network_acl_rule_item_network_acl_rule_protocol_all_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['destination'] = '192.168.3.0/24' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['direction'] = 'inbound' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['ip_version'] = 'ipv4' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['name'] = 'my-rule-1' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['source'] = '192.168.3.0/24' - network_acl_rule_item_network_acl_rule_protocol_all_model_json['protocol'] = 'all' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'action'] = 'allow' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'before'] = network_acl_rule_reference_model + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'destination'] = '192.168.3.0/24' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'direction'] = 'inbound' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'name'] = 'my-rule-1' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'source'] = '192.168.3.0/24' + network_acl_rule_item_network_acl_rule_protocol_all_model_json[ + 'protocol'] = 'all' # Construct a model instance of NetworkACLRuleItemNetworkACLRuleProtocolAll by calling from_dict on the json representation - network_acl_rule_item_network_acl_rule_protocol_all_model = NetworkACLRuleItemNetworkACLRuleProtocolAll.from_dict(network_acl_rule_item_network_acl_rule_protocol_all_model_json) + network_acl_rule_item_network_acl_rule_protocol_all_model = NetworkACLRuleItemNetworkACLRuleProtocolAll.from_dict( + network_acl_rule_item_network_acl_rule_protocol_all_model_json) assert network_acl_rule_item_network_acl_rule_protocol_all_model != False # Construct a model instance of NetworkACLRuleItemNetworkACLRuleProtocolAll by calling from_dict on the json representation - network_acl_rule_item_network_acl_rule_protocol_all_model_dict = NetworkACLRuleItemNetworkACLRuleProtocolAll.from_dict(network_acl_rule_item_network_acl_rule_protocol_all_model_json).__dict__ - network_acl_rule_item_network_acl_rule_protocol_all_model2 = NetworkACLRuleItemNetworkACLRuleProtocolAll(**network_acl_rule_item_network_acl_rule_protocol_all_model_dict) + network_acl_rule_item_network_acl_rule_protocol_all_model_dict = NetworkACLRuleItemNetworkACLRuleProtocolAll.from_dict( + network_acl_rule_item_network_acl_rule_protocol_all_model_json + ).__dict__ + network_acl_rule_item_network_acl_rule_protocol_all_model2 = NetworkACLRuleItemNetworkACLRuleProtocolAll( + **network_acl_rule_item_network_acl_rule_protocol_all_model_dict) # Verify the model instances are equivalent assert network_acl_rule_item_network_acl_rule_protocol_all_model == network_acl_rule_item_network_acl_rule_protocol_all_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_item_network_acl_rule_protocol_all_model_json2 = network_acl_rule_item_network_acl_rule_protocol_all_model.to_dict() + network_acl_rule_item_network_acl_rule_protocol_all_model_json2 = network_acl_rule_item_network_acl_rule_protocol_all_model.to_dict( + ) assert network_acl_rule_item_network_acl_rule_protocol_all_model_json2 == network_acl_rule_item_network_acl_rule_protocol_all_model_json @@ -83185,51 +97075,75 @@ class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolICMP: Test Class for NetworkACLRuleItemNetworkACLRuleProtocolICMP """ - def test_network_acl_rule_item_network_acl_rule_protocol_icmp_serialization(self): + def test_network_acl_rule_item_network_acl_rule_protocol_icmp_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleItemNetworkACLRuleProtocolICMP """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' # Construct a json representation of a NetworkACLRuleItemNetworkACLRuleProtocolICMP model network_acl_rule_item_network_acl_rule_protocol_icmp_model_json = {} - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['action'] = 'allow' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['before'] = network_acl_rule_reference_model - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['destination'] = '192.168.3.0/24' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['direction'] = 'inbound' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['ip_version'] = 'ipv4' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['name'] = 'my-rule-1' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['source'] = '192.168.3.0/24' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['code'] = 0 - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['protocol'] = 'icmp' - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['type'] = 8 + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'action'] = 'allow' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'before'] = network_acl_rule_reference_model + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'destination'] = '192.168.3.0/24' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'direction'] = 'inbound' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'name'] = 'my-rule-1' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'source'] = '192.168.3.0/24' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'code'] = 0 + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'protocol'] = 'icmp' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json[ + 'type'] = 8 # Construct a model instance of NetworkACLRuleItemNetworkACLRuleProtocolICMP by calling from_dict on the json representation - network_acl_rule_item_network_acl_rule_protocol_icmp_model = NetworkACLRuleItemNetworkACLRuleProtocolICMP.from_dict(network_acl_rule_item_network_acl_rule_protocol_icmp_model_json) + network_acl_rule_item_network_acl_rule_protocol_icmp_model = NetworkACLRuleItemNetworkACLRuleProtocolICMP.from_dict( + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json) assert network_acl_rule_item_network_acl_rule_protocol_icmp_model != False # Construct a model instance of NetworkACLRuleItemNetworkACLRuleProtocolICMP by calling from_dict on the json representation - network_acl_rule_item_network_acl_rule_protocol_icmp_model_dict = NetworkACLRuleItemNetworkACLRuleProtocolICMP.from_dict(network_acl_rule_item_network_acl_rule_protocol_icmp_model_json).__dict__ - network_acl_rule_item_network_acl_rule_protocol_icmp_model2 = NetworkACLRuleItemNetworkACLRuleProtocolICMP(**network_acl_rule_item_network_acl_rule_protocol_icmp_model_dict) + network_acl_rule_item_network_acl_rule_protocol_icmp_model_dict = NetworkACLRuleItemNetworkACLRuleProtocolICMP.from_dict( + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json + ).__dict__ + network_acl_rule_item_network_acl_rule_protocol_icmp_model2 = NetworkACLRuleItemNetworkACLRuleProtocolICMP( + **network_acl_rule_item_network_acl_rule_protocol_icmp_model_dict) # Verify the model instances are equivalent assert network_acl_rule_item_network_acl_rule_protocol_icmp_model == network_acl_rule_item_network_acl_rule_protocol_icmp_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json2 = network_acl_rule_item_network_acl_rule_protocol_icmp_model.to_dict() + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json2 = network_acl_rule_item_network_acl_rule_protocol_icmp_model.to_dict( + ) assert network_acl_rule_item_network_acl_rule_protocol_icmp_model_json2 == network_acl_rule_item_network_acl_rule_protocol_icmp_model_json @@ -83238,53 +97152,79 @@ class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP: Test Class for NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP """ - def test_network_acl_rule_item_network_acl_rule_protocol_tcpudp_serialization(self): + def test_network_acl_rule_item_network_acl_rule_protocol_tcpudp_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' # Construct a json representation of a NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP model network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json = {} - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['action'] = 'allow' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['before'] = network_acl_rule_reference_model - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['destination'] = '192.168.3.0/24' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['direction'] = 'inbound' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['ip_version'] = 'ipv4' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['name'] = 'my-rule-1' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['source'] = '192.168.3.0/24' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['destination_port_max'] = 22 - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['destination_port_min'] = 22 - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['protocol'] = 'udp' - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['source_port_max'] = 65535 - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['source_port_min'] = 49152 + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'action'] = 'allow' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'before'] = network_acl_rule_reference_model + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'destination'] = '192.168.3.0/24' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'direction'] = 'inbound' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'name'] = 'my-rule-1' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'source'] = '192.168.3.0/24' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'destination_port_max'] = 22 + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'destination_port_min'] = 22 + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'protocol'] = 'udp' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'source_port_max'] = 65535 + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json[ + 'source_port_min'] = 49152 # Construct a model instance of NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP by calling from_dict on the json representation - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model = NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.from_dict(network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json) + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model = NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.from_dict( + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json) assert network_acl_rule_item_network_acl_rule_protocol_tcpudp_model != False # Construct a model instance of NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP by calling from_dict on the json representation - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_dict = NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.from_dict(network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json).__dict__ - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model2 = NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP(**network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_dict) + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_dict = NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.from_dict( + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json + ).__dict__ + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model2 = NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP( + **network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_dict) # Verify the model instances are equivalent assert network_acl_rule_item_network_acl_rule_protocol_tcpudp_model == network_acl_rule_item_network_acl_rule_protocol_tcpudp_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json2 = network_acl_rule_item_network_acl_rule_protocol_tcpudp_model.to_dict() + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json2 = network_acl_rule_item_network_acl_rule_protocol_tcpudp_model.to_dict( + ) assert network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json2 == network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json @@ -83293,34 +97233,50 @@ class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAl Test Class for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype """ - def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_serialization(self): + def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_serialization( + self): """ Test serialization/deserialization for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype """ # Construct a json representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype model network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json = {} - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json['action'] = 'allow' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json['protocol'] = 'all' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json[ + 'action'] = 'allow' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json[ + 'protocol'] = 'all' # Construct a model instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.from_dict(network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json) + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.from_dict( + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json + ) assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model != False # Construct a model instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_dict = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.from_dict(network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json).__dict__ - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model2 = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype(**network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_dict) + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_dict = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.from_dict( + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json + ).__dict__ + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model2 = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype( + ** + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model == network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json2 = network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model.to_dict() + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json2 = network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model.to_dict( + ) assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json2 == network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_all_prototype_model_json @@ -83329,36 +97285,54 @@ class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIC Test Class for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype """ - def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_serialization(self): + def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_serialization( + self): """ Test serialization/deserialization for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype """ # Construct a json representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype model network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json = {} - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['action'] = 'allow' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['code'] = 0 - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['protocol'] = 'icmp' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json['type'] = 8 + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'action'] = 'allow' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'code'] = 0 + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'protocol'] = 'icmp' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json[ + 'type'] = 8 # Construct a model instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.from_dict(network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json) + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.from_dict( + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json + ) assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model != False # Construct a model instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.from_dict(network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json).__dict__ - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model2 = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype(**network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_dict) + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.from_dict( + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json + ).__dict__ + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model2 = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype( + ** + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model == network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json2 = network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model.to_dict() + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json2 = network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model.to_dict( + ) assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json2 == network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_icmp_prototype_model_json @@ -83367,38 +97341,58 @@ class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTC Test Class for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype """ - def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_serialization(self): + def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_serialization( + self): """ Test serialization/deserialization for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype """ # Construct a json representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json = {} - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['action'] = 'allow' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['destination_port_max'] = 22 - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['destination_port_min'] = 22 - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['protocol'] = 'udp' - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['source_port_max'] = 65535 - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json['source_port_min'] = 49152 + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'action'] = 'allow' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'destination_port_max'] = 22 + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'destination_port_min'] = 22 + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'protocol'] = 'udp' + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'source_port_max'] = 65535 + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'source_port_min'] = 49152 # Construct a model instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.from_dict(network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json) + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.from_dict( + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json + ) assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model != False # Construct a model instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.from_dict(network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json).__dict__ - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model2 = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype(**network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_dict) + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.from_dict( + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json + ).__dict__ + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model2 = NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype( + ** + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model == network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json2 = network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model.to_dict() + network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json2 = network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model.to_dict( + ) assert network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json2 == network_acl_rule_prototype_network_acl_context_network_acl_rule_protocol_tcpudp_prototype_model_json @@ -83407,40 +97401,59 @@ class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype: Test Class for NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype """ - def test_network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_serialization(self): + def test_network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_serialization( + self): """ Test serialization/deserialization for NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_before_prototype_model = {} # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById - network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_prototype_model = { + } # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById + network_acl_rule_before_prototype_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a json representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype model network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json = {} - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['action'] = 'allow' - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['before'] = network_acl_rule_before_prototype_model - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json['protocol'] = 'all' + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'action'] = 'allow' + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'before'] = network_acl_rule_before_prototype_model + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json[ + 'protocol'] = 'all' # Construct a model instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model = NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.from_dict(network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json) + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model = NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.from_dict( + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json + ) assert network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model != False # Construct a model instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_dict = NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.from_dict(network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json).__dict__ - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model2 = NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(**network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_dict) + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_dict = NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.from_dict( + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json + ).__dict__ + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model2 = NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype( + ** + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model == network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json2 = network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model.to_dict() + network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json2 = network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model.to_dict( + ) assert network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json2 == network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_model_json @@ -83449,42 +97462,63 @@ class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype: Test Class for NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype """ - def test_network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_serialization(self): + def test_network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_serialization( + self): """ Test serialization/deserialization for NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_before_prototype_model = {} # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById - network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_prototype_model = { + } # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById + network_acl_rule_before_prototype_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a json representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype model network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json = {} - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['action'] = 'allow' - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['before'] = network_acl_rule_before_prototype_model - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['code'] = 0 - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['protocol'] = 'icmp' - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json['type'] = 8 + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'action'] = 'allow' + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'before'] = network_acl_rule_before_prototype_model + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'code'] = 0 + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'protocol'] = 'icmp' + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json[ + 'type'] = 8 # Construct a model instance of NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model = NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.from_dict(network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json) + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model = NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.from_dict( + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json + ) assert network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model != False # Construct a model instance of NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.from_dict(network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json).__dict__ - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model2 = NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype(**network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_dict) + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.from_dict( + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json + ).__dict__ + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model2 = NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype( + ** + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model == network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json2 = network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model.to_dict() + network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json2 = network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model.to_dict( + ) assert network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json2 == network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_model_json @@ -83493,44 +97527,67 @@ class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype: Test Class for NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype """ - def test_network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_serialization(self): + def test_network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_serialization( + self): """ Test serialization/deserialization for NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_before_prototype_model = {} # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById - network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_before_prototype_model = { + } # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById + network_acl_rule_before_prototype_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a json representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json = {} - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['action'] = 'allow' - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['before'] = network_acl_rule_before_prototype_model - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['destination'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['direction'] = 'inbound' - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['ip_version'] = 'ipv4' - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['name'] = 'my-rule-2' - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['source'] = '192.168.3.2/32' - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['destination_port_max'] = 22 - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['destination_port_min'] = 22 - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['protocol'] = 'udp' - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['source_port_max'] = 65535 - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json['source_port_min'] = 49152 + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'action'] = 'allow' + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'before'] = network_acl_rule_before_prototype_model + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'destination'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'direction'] = 'inbound' + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'name'] = 'my-rule-2' + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'source'] = '192.168.3.2/32' + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'destination_port_max'] = 22 + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'destination_port_min'] = 22 + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'protocol'] = 'udp' + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'source_port_max'] = 65535 + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json[ + 'source_port_min'] = 49152 # Construct a model instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model = NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.from_dict(network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json) + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model = NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.from_dict( + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json + ) assert network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model != False # Construct a model instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype by calling from_dict on the json representation - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.from_dict(network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json).__dict__ - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model2 = NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype(**network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_dict) + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_dict = NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.from_dict( + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json + ).__dict__ + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model2 = NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype( + ** + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_dict + ) # Verify the model instances are equivalent assert network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model == network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json2 = network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model.to_dict() + network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json2 = network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model.to_dict( + ) assert network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json2 == network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_model_json @@ -83546,42 +97603,62 @@ def test_network_acl_rule_network_acl_rule_protocol_all_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' # Construct a json representation of a NetworkACLRuleNetworkACLRuleProtocolAll model network_acl_rule_network_acl_rule_protocol_all_model_json = {} - network_acl_rule_network_acl_rule_protocol_all_model_json['action'] = 'allow' - network_acl_rule_network_acl_rule_protocol_all_model_json['before'] = network_acl_rule_reference_model - network_acl_rule_network_acl_rule_protocol_all_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_acl_rule_network_acl_rule_protocol_all_model_json['destination'] = '192.168.3.0/24' - network_acl_rule_network_acl_rule_protocol_all_model_json['direction'] = 'inbound' - network_acl_rule_network_acl_rule_protocol_all_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_network_acl_rule_protocol_all_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_network_acl_rule_protocol_all_model_json['ip_version'] = 'ipv4' - network_acl_rule_network_acl_rule_protocol_all_model_json['name'] = 'my-rule-1' - network_acl_rule_network_acl_rule_protocol_all_model_json['source'] = '192.168.3.0/24' - network_acl_rule_network_acl_rule_protocol_all_model_json['protocol'] = 'all' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'action'] = 'allow' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'before'] = network_acl_rule_reference_model + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'destination'] = '192.168.3.0/24' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'direction'] = 'inbound' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'name'] = 'my-rule-1' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'source'] = '192.168.3.0/24' + network_acl_rule_network_acl_rule_protocol_all_model_json[ + 'protocol'] = 'all' # Construct a model instance of NetworkACLRuleNetworkACLRuleProtocolAll by calling from_dict on the json representation - network_acl_rule_network_acl_rule_protocol_all_model = NetworkACLRuleNetworkACLRuleProtocolAll.from_dict(network_acl_rule_network_acl_rule_protocol_all_model_json) + network_acl_rule_network_acl_rule_protocol_all_model = NetworkACLRuleNetworkACLRuleProtocolAll.from_dict( + network_acl_rule_network_acl_rule_protocol_all_model_json) assert network_acl_rule_network_acl_rule_protocol_all_model != False # Construct a model instance of NetworkACLRuleNetworkACLRuleProtocolAll by calling from_dict on the json representation - network_acl_rule_network_acl_rule_protocol_all_model_dict = NetworkACLRuleNetworkACLRuleProtocolAll.from_dict(network_acl_rule_network_acl_rule_protocol_all_model_json).__dict__ - network_acl_rule_network_acl_rule_protocol_all_model2 = NetworkACLRuleNetworkACLRuleProtocolAll(**network_acl_rule_network_acl_rule_protocol_all_model_dict) + network_acl_rule_network_acl_rule_protocol_all_model_dict = NetworkACLRuleNetworkACLRuleProtocolAll.from_dict( + network_acl_rule_network_acl_rule_protocol_all_model_json).__dict__ + network_acl_rule_network_acl_rule_protocol_all_model2 = NetworkACLRuleNetworkACLRuleProtocolAll( + **network_acl_rule_network_acl_rule_protocol_all_model_dict) # Verify the model instances are equivalent assert network_acl_rule_network_acl_rule_protocol_all_model == network_acl_rule_network_acl_rule_protocol_all_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_network_acl_rule_protocol_all_model_json2 = network_acl_rule_network_acl_rule_protocol_all_model.to_dict() + network_acl_rule_network_acl_rule_protocol_all_model_json2 = network_acl_rule_network_acl_rule_protocol_all_model.to_dict( + ) assert network_acl_rule_network_acl_rule_protocol_all_model_json2 == network_acl_rule_network_acl_rule_protocol_all_model_json @@ -83590,51 +97667,72 @@ class TestModel_NetworkACLRuleNetworkACLRuleProtocolICMP: Test Class for NetworkACLRuleNetworkACLRuleProtocolICMP """ - def test_network_acl_rule_network_acl_rule_protocol_icmp_serialization(self): + def test_network_acl_rule_network_acl_rule_protocol_icmp_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleNetworkACLRuleProtocolICMP """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' # Construct a json representation of a NetworkACLRuleNetworkACLRuleProtocolICMP model network_acl_rule_network_acl_rule_protocol_icmp_model_json = {} - network_acl_rule_network_acl_rule_protocol_icmp_model_json['action'] = 'allow' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['before'] = network_acl_rule_reference_model - network_acl_rule_network_acl_rule_protocol_icmp_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['destination'] = '192.168.3.0/24' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['direction'] = 'inbound' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['ip_version'] = 'ipv4' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['name'] = 'my-rule-1' - network_acl_rule_network_acl_rule_protocol_icmp_model_json['source'] = '192.168.3.0/24' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'action'] = 'allow' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'before'] = network_acl_rule_reference_model + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'destination'] = '192.168.3.0/24' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'direction'] = 'inbound' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'name'] = 'my-rule-1' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'source'] = '192.168.3.0/24' network_acl_rule_network_acl_rule_protocol_icmp_model_json['code'] = 0 - network_acl_rule_network_acl_rule_protocol_icmp_model_json['protocol'] = 'icmp' + network_acl_rule_network_acl_rule_protocol_icmp_model_json[ + 'protocol'] = 'icmp' network_acl_rule_network_acl_rule_protocol_icmp_model_json['type'] = 8 # Construct a model instance of NetworkACLRuleNetworkACLRuleProtocolICMP by calling from_dict on the json representation - network_acl_rule_network_acl_rule_protocol_icmp_model = NetworkACLRuleNetworkACLRuleProtocolICMP.from_dict(network_acl_rule_network_acl_rule_protocol_icmp_model_json) + network_acl_rule_network_acl_rule_protocol_icmp_model = NetworkACLRuleNetworkACLRuleProtocolICMP.from_dict( + network_acl_rule_network_acl_rule_protocol_icmp_model_json) assert network_acl_rule_network_acl_rule_protocol_icmp_model != False # Construct a model instance of NetworkACLRuleNetworkACLRuleProtocolICMP by calling from_dict on the json representation - network_acl_rule_network_acl_rule_protocol_icmp_model_dict = NetworkACLRuleNetworkACLRuleProtocolICMP.from_dict(network_acl_rule_network_acl_rule_protocol_icmp_model_json).__dict__ - network_acl_rule_network_acl_rule_protocol_icmp_model2 = NetworkACLRuleNetworkACLRuleProtocolICMP(**network_acl_rule_network_acl_rule_protocol_icmp_model_dict) + network_acl_rule_network_acl_rule_protocol_icmp_model_dict = NetworkACLRuleNetworkACLRuleProtocolICMP.from_dict( + network_acl_rule_network_acl_rule_protocol_icmp_model_json).__dict__ + network_acl_rule_network_acl_rule_protocol_icmp_model2 = NetworkACLRuleNetworkACLRuleProtocolICMP( + **network_acl_rule_network_acl_rule_protocol_icmp_model_dict) # Verify the model instances are equivalent assert network_acl_rule_network_acl_rule_protocol_icmp_model == network_acl_rule_network_acl_rule_protocol_icmp_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_network_acl_rule_protocol_icmp_model_json2 = network_acl_rule_network_acl_rule_protocol_icmp_model.to_dict() + network_acl_rule_network_acl_rule_protocol_icmp_model_json2 = network_acl_rule_network_acl_rule_protocol_icmp_model.to_dict( + ) assert network_acl_rule_network_acl_rule_protocol_icmp_model_json2 == network_acl_rule_network_acl_rule_protocol_icmp_model_json @@ -83643,53 +97741,79 @@ class TestModel_NetworkACLRuleNetworkACLRuleProtocolTCPUDP: Test Class for NetworkACLRuleNetworkACLRuleProtocolTCPUDP """ - def test_network_acl_rule_network_acl_rule_protocol_tcpudp_serialization(self): + def test_network_acl_rule_network_acl_rule_protocol_tcpudp_serialization( + self): """ Test serialization/deserialization for NetworkACLRuleNetworkACLRuleProtocolTCPUDP """ # Construct dict forms of any model objects needed in order to build this model. - network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted - network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_acl_rule_reference_deleted_model = { + } # NetworkACLRuleReferenceDeleted + network_acl_rule_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference - network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model - network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'deleted'] = network_acl_rule_reference_deleted_model + network_acl_rule_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' network_acl_rule_reference_model['name'] = 'my-rule-1' # Construct a json representation of a NetworkACLRuleNetworkACLRuleProtocolTCPUDP model network_acl_rule_network_acl_rule_protocol_tcpudp_model_json = {} - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['action'] = 'allow' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['before'] = network_acl_rule_reference_model - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['created_at'] = '2019-01-01T12:00:00Z' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['destination'] = '192.168.3.0/24' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['direction'] = 'inbound' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['ip_version'] = 'ipv4' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['name'] = 'my-rule-1' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['source'] = '192.168.3.0/24' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['destination_port_max'] = 22 - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['destination_port_min'] = 22 - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['protocol'] = 'udp' - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['source_port_max'] = 65535 - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['source_port_min'] = 49152 + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'action'] = 'allow' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'before'] = network_acl_rule_reference_model + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'destination'] = '192.168.3.0/24' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'direction'] = 'inbound' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'ip_version'] = 'ipv4' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'name'] = 'my-rule-1' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'source'] = '192.168.3.0/24' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'destination_port_max'] = 22 + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'destination_port_min'] = 22 + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'protocol'] = 'udp' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'source_port_max'] = 65535 + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json[ + 'source_port_min'] = 49152 # Construct a model instance of NetworkACLRuleNetworkACLRuleProtocolTCPUDP by calling from_dict on the json representation - network_acl_rule_network_acl_rule_protocol_tcpudp_model = NetworkACLRuleNetworkACLRuleProtocolTCPUDP.from_dict(network_acl_rule_network_acl_rule_protocol_tcpudp_model_json) + network_acl_rule_network_acl_rule_protocol_tcpudp_model = NetworkACLRuleNetworkACLRuleProtocolTCPUDP.from_dict( + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json) assert network_acl_rule_network_acl_rule_protocol_tcpudp_model != False # Construct a model instance of NetworkACLRuleNetworkACLRuleProtocolTCPUDP by calling from_dict on the json representation - network_acl_rule_network_acl_rule_protocol_tcpudp_model_dict = NetworkACLRuleNetworkACLRuleProtocolTCPUDP.from_dict(network_acl_rule_network_acl_rule_protocol_tcpudp_model_json).__dict__ - network_acl_rule_network_acl_rule_protocol_tcpudp_model2 = NetworkACLRuleNetworkACLRuleProtocolTCPUDP(**network_acl_rule_network_acl_rule_protocol_tcpudp_model_dict) + network_acl_rule_network_acl_rule_protocol_tcpudp_model_dict = NetworkACLRuleNetworkACLRuleProtocolTCPUDP.from_dict( + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json + ).__dict__ + network_acl_rule_network_acl_rule_protocol_tcpudp_model2 = NetworkACLRuleNetworkACLRuleProtocolTCPUDP( + **network_acl_rule_network_acl_rule_protocol_tcpudp_model_dict) # Verify the model instances are equivalent assert network_acl_rule_network_acl_rule_protocol_tcpudp_model == network_acl_rule_network_acl_rule_protocol_tcpudp_model2 # Convert model instance back to dict and verify no loss of data - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json2 = network_acl_rule_network_acl_rule_protocol_tcpudp_model.to_dict() + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json2 = network_acl_rule_network_acl_rule_protocol_tcpudp_model.to_dict( + ) assert network_acl_rule_network_acl_rule_protocol_tcpudp_model_json2 == network_acl_rule_network_acl_rule_protocol_tcpudp_model_json @@ -83698,30 +97822,42 @@ class TestModel_NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceCo Test Class for NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext """ - def test_network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_serialization(self): + def test_network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_serialization( + self): """ Test serialization/deserialization for NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext """ # Construct a json representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json = {} - network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json['address'] = '192.168.3.4' - network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json['auto_delete'] = False - network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json['name'] = 'my-reserved-ip' + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json[ + 'address'] = '192.168.3.4' + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json[ + 'auto_delete'] = False + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json[ + 'name'] = 'my-reserved-ip' # Construct a model instance of NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext by calling from_dict on the json representation - network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model = NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.from_dict(network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json) + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model = NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.from_dict( + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json + ) assert network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model != False # Construct a model instance of NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext by calling from_dict on the json representation - network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_dict = NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.from_dict(network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json).__dict__ - network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model2 = NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext(**network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_dict) + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_dict = NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.from_dict( + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json + ).__dict__ + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model2 = NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext( + ** + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_dict + ) # Verify the model instances are equivalent assert network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model == network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json2 = network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model.to_dict() + network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json2 = network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model.to_dict( + ) assert network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json2 == network_interface_ip_prototype_reserved_ip_prototype_network_interface_context_model_json @@ -83737,21 +97873,26 @@ def test_operating_system_identity_by_href_serialization(self): # Construct a json representation of a OperatingSystemIdentityByHref model operating_system_identity_by_href_model_json = {} - operating_system_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' + operating_system_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64' # Construct a model instance of OperatingSystemIdentityByHref by calling from_dict on the json representation - operating_system_identity_by_href_model = OperatingSystemIdentityByHref.from_dict(operating_system_identity_by_href_model_json) + operating_system_identity_by_href_model = OperatingSystemIdentityByHref.from_dict( + operating_system_identity_by_href_model_json) assert operating_system_identity_by_href_model != False # Construct a model instance of OperatingSystemIdentityByHref by calling from_dict on the json representation - operating_system_identity_by_href_model_dict = OperatingSystemIdentityByHref.from_dict(operating_system_identity_by_href_model_json).__dict__ - operating_system_identity_by_href_model2 = OperatingSystemIdentityByHref(**operating_system_identity_by_href_model_dict) + operating_system_identity_by_href_model_dict = OperatingSystemIdentityByHref.from_dict( + operating_system_identity_by_href_model_json).__dict__ + operating_system_identity_by_href_model2 = OperatingSystemIdentityByHref( + **operating_system_identity_by_href_model_dict) # Verify the model instances are equivalent assert operating_system_identity_by_href_model == operating_system_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - operating_system_identity_by_href_model_json2 = operating_system_identity_by_href_model.to_dict() + operating_system_identity_by_href_model_json2 = operating_system_identity_by_href_model.to_dict( + ) assert operating_system_identity_by_href_model_json2 == operating_system_identity_by_href_model_json @@ -83770,18 +97911,22 @@ def test_operating_system_identity_by_name_serialization(self): operating_system_identity_by_name_model_json['name'] = 'ubuntu-16-amd64' # Construct a model instance of OperatingSystemIdentityByName by calling from_dict on the json representation - operating_system_identity_by_name_model = OperatingSystemIdentityByName.from_dict(operating_system_identity_by_name_model_json) + operating_system_identity_by_name_model = OperatingSystemIdentityByName.from_dict( + operating_system_identity_by_name_model_json) assert operating_system_identity_by_name_model != False # Construct a model instance of OperatingSystemIdentityByName by calling from_dict on the json representation - operating_system_identity_by_name_model_dict = OperatingSystemIdentityByName.from_dict(operating_system_identity_by_name_model_json).__dict__ - operating_system_identity_by_name_model2 = OperatingSystemIdentityByName(**operating_system_identity_by_name_model_dict) + operating_system_identity_by_name_model_dict = OperatingSystemIdentityByName.from_dict( + operating_system_identity_by_name_model_json).__dict__ + operating_system_identity_by_name_model2 = OperatingSystemIdentityByName( + **operating_system_identity_by_name_model_dict) # Verify the model instances are equivalent assert operating_system_identity_by_name_model == operating_system_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - operating_system_identity_by_name_model_json2 = operating_system_identity_by_name_model.to_dict() + operating_system_identity_by_name_model_json2 = operating_system_identity_by_name_model.to_dict( + ) assert operating_system_identity_by_name_model_json2 == operating_system_identity_by_name_model_json @@ -83790,7 +97935,8 @@ class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext Test Class for PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext """ - def test_public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_serialization(self): + def test_public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_serialization( + self): """ Test serialization/deserialization for PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext """ @@ -83802,22 +97948,32 @@ def test_public_gateway_floating_ip_prototype_floating_ip_prototype_target_conte # Construct a json representation of a PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext model public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json = {} - public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json['name'] = 'my-floating-ip' - public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json['resource_group'] = resource_group_identity_model + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json[ + 'name'] = 'my-floating-ip' + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json[ + 'resource_group'] = resource_group_identity_model # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model = PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.from_dict(public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json) + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model = PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.from_dict( + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json + ) assert public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model != False # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.from_dict(public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json).__dict__ - public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model2 = PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(**public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_dict) + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.from_dict( + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json + ).__dict__ + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model2 = PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext( + ** + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_dict + ) # Verify the model instances are equivalent assert public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model == public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json2 = public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model.to_dict() + public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json2 = public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model.to_dict( + ) assert public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json2 == public_gateway_floating_ip_prototype_floating_ip_prototype_target_context_model_json @@ -83826,28 +97982,35 @@ class TestModel_PublicGatewayIdentityPublicGatewayIdentityByCRN: Test Class for PublicGatewayIdentityPublicGatewayIdentityByCRN """ - def test_public_gateway_identity_public_gateway_identity_by_crn_serialization(self): + def test_public_gateway_identity_public_gateway_identity_by_crn_serialization( + self): """ Test serialization/deserialization for PublicGatewayIdentityPublicGatewayIdentityByCRN """ # Construct a json representation of a PublicGatewayIdentityPublicGatewayIdentityByCRN model public_gateway_identity_public_gateway_identity_by_crn_model_json = {} - public_gateway_identity_public_gateway_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_public_gateway_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a model instance of PublicGatewayIdentityPublicGatewayIdentityByCRN by calling from_dict on the json representation - public_gateway_identity_public_gateway_identity_by_crn_model = PublicGatewayIdentityPublicGatewayIdentityByCRN.from_dict(public_gateway_identity_public_gateway_identity_by_crn_model_json) + public_gateway_identity_public_gateway_identity_by_crn_model = PublicGatewayIdentityPublicGatewayIdentityByCRN.from_dict( + public_gateway_identity_public_gateway_identity_by_crn_model_json) assert public_gateway_identity_public_gateway_identity_by_crn_model != False # Construct a model instance of PublicGatewayIdentityPublicGatewayIdentityByCRN by calling from_dict on the json representation - public_gateway_identity_public_gateway_identity_by_crn_model_dict = PublicGatewayIdentityPublicGatewayIdentityByCRN.from_dict(public_gateway_identity_public_gateway_identity_by_crn_model_json).__dict__ - public_gateway_identity_public_gateway_identity_by_crn_model2 = PublicGatewayIdentityPublicGatewayIdentityByCRN(**public_gateway_identity_public_gateway_identity_by_crn_model_dict) + public_gateway_identity_public_gateway_identity_by_crn_model_dict = PublicGatewayIdentityPublicGatewayIdentityByCRN.from_dict( + public_gateway_identity_public_gateway_identity_by_crn_model_json + ).__dict__ + public_gateway_identity_public_gateway_identity_by_crn_model2 = PublicGatewayIdentityPublicGatewayIdentityByCRN( + **public_gateway_identity_public_gateway_identity_by_crn_model_dict) # Verify the model instances are equivalent assert public_gateway_identity_public_gateway_identity_by_crn_model == public_gateway_identity_public_gateway_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_identity_public_gateway_identity_by_crn_model_json2 = public_gateway_identity_public_gateway_identity_by_crn_model.to_dict() + public_gateway_identity_public_gateway_identity_by_crn_model_json2 = public_gateway_identity_public_gateway_identity_by_crn_model.to_dict( + ) assert public_gateway_identity_public_gateway_identity_by_crn_model_json2 == public_gateway_identity_public_gateway_identity_by_crn_model_json @@ -83856,28 +98019,36 @@ class TestModel_PublicGatewayIdentityPublicGatewayIdentityByHref: Test Class for PublicGatewayIdentityPublicGatewayIdentityByHref """ - def test_public_gateway_identity_public_gateway_identity_by_href_serialization(self): + def test_public_gateway_identity_public_gateway_identity_by_href_serialization( + self): """ Test serialization/deserialization for PublicGatewayIdentityPublicGatewayIdentityByHref """ # Construct a json representation of a PublicGatewayIdentityPublicGatewayIdentityByHref model public_gateway_identity_public_gateway_identity_by_href_model_json = {} - public_gateway_identity_public_gateway_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_public_gateway_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a model instance of PublicGatewayIdentityPublicGatewayIdentityByHref by calling from_dict on the json representation - public_gateway_identity_public_gateway_identity_by_href_model = PublicGatewayIdentityPublicGatewayIdentityByHref.from_dict(public_gateway_identity_public_gateway_identity_by_href_model_json) + public_gateway_identity_public_gateway_identity_by_href_model = PublicGatewayIdentityPublicGatewayIdentityByHref.from_dict( + public_gateway_identity_public_gateway_identity_by_href_model_json) assert public_gateway_identity_public_gateway_identity_by_href_model != False # Construct a model instance of PublicGatewayIdentityPublicGatewayIdentityByHref by calling from_dict on the json representation - public_gateway_identity_public_gateway_identity_by_href_model_dict = PublicGatewayIdentityPublicGatewayIdentityByHref.from_dict(public_gateway_identity_public_gateway_identity_by_href_model_json).__dict__ - public_gateway_identity_public_gateway_identity_by_href_model2 = PublicGatewayIdentityPublicGatewayIdentityByHref(**public_gateway_identity_public_gateway_identity_by_href_model_dict) + public_gateway_identity_public_gateway_identity_by_href_model_dict = PublicGatewayIdentityPublicGatewayIdentityByHref.from_dict( + public_gateway_identity_public_gateway_identity_by_href_model_json + ).__dict__ + public_gateway_identity_public_gateway_identity_by_href_model2 = PublicGatewayIdentityPublicGatewayIdentityByHref( + ** + public_gateway_identity_public_gateway_identity_by_href_model_dict) # Verify the model instances are equivalent assert public_gateway_identity_public_gateway_identity_by_href_model == public_gateway_identity_public_gateway_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_identity_public_gateway_identity_by_href_model_json2 = public_gateway_identity_public_gateway_identity_by_href_model.to_dict() + public_gateway_identity_public_gateway_identity_by_href_model_json2 = public_gateway_identity_public_gateway_identity_by_href_model.to_dict( + ) assert public_gateway_identity_public_gateway_identity_by_href_model_json2 == public_gateway_identity_public_gateway_identity_by_href_model_json @@ -83886,28 +98057,35 @@ class TestModel_PublicGatewayIdentityPublicGatewayIdentityById: Test Class for PublicGatewayIdentityPublicGatewayIdentityById """ - def test_public_gateway_identity_public_gateway_identity_by_id_serialization(self): + def test_public_gateway_identity_public_gateway_identity_by_id_serialization( + self): """ Test serialization/deserialization for PublicGatewayIdentityPublicGatewayIdentityById """ # Construct a json representation of a PublicGatewayIdentityPublicGatewayIdentityById model public_gateway_identity_public_gateway_identity_by_id_model_json = {} - public_gateway_identity_public_gateway_identity_by_id_model_json['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_public_gateway_identity_by_id_model_json[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a model instance of PublicGatewayIdentityPublicGatewayIdentityById by calling from_dict on the json representation - public_gateway_identity_public_gateway_identity_by_id_model = PublicGatewayIdentityPublicGatewayIdentityById.from_dict(public_gateway_identity_public_gateway_identity_by_id_model_json) + public_gateway_identity_public_gateway_identity_by_id_model = PublicGatewayIdentityPublicGatewayIdentityById.from_dict( + public_gateway_identity_public_gateway_identity_by_id_model_json) assert public_gateway_identity_public_gateway_identity_by_id_model != False # Construct a model instance of PublicGatewayIdentityPublicGatewayIdentityById by calling from_dict on the json representation - public_gateway_identity_public_gateway_identity_by_id_model_dict = PublicGatewayIdentityPublicGatewayIdentityById.from_dict(public_gateway_identity_public_gateway_identity_by_id_model_json).__dict__ - public_gateway_identity_public_gateway_identity_by_id_model2 = PublicGatewayIdentityPublicGatewayIdentityById(**public_gateway_identity_public_gateway_identity_by_id_model_dict) + public_gateway_identity_public_gateway_identity_by_id_model_dict = PublicGatewayIdentityPublicGatewayIdentityById.from_dict( + public_gateway_identity_public_gateway_identity_by_id_model_json + ).__dict__ + public_gateway_identity_public_gateway_identity_by_id_model2 = PublicGatewayIdentityPublicGatewayIdentityById( + **public_gateway_identity_public_gateway_identity_by_id_model_dict) # Verify the model instances are equivalent assert public_gateway_identity_public_gateway_identity_by_id_model == public_gateway_identity_public_gateway_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_identity_public_gateway_identity_by_id_model_json2 = public_gateway_identity_public_gateway_identity_by_id_model.to_dict() + public_gateway_identity_public_gateway_identity_by_id_model_json2 = public_gateway_identity_public_gateway_identity_by_id_model.to_dict( + ) assert public_gateway_identity_public_gateway_identity_by_id_model_json2 == public_gateway_identity_public_gateway_identity_by_id_model_json @@ -83923,21 +98101,26 @@ def test_region_identity_by_href_serialization(self): # Construct a json representation of a RegionIdentityByHref model region_identity_by_href_model_json = {} - region_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' # Construct a model instance of RegionIdentityByHref by calling from_dict on the json representation - region_identity_by_href_model = RegionIdentityByHref.from_dict(region_identity_by_href_model_json) + region_identity_by_href_model = RegionIdentityByHref.from_dict( + region_identity_by_href_model_json) assert region_identity_by_href_model != False # Construct a model instance of RegionIdentityByHref by calling from_dict on the json representation - region_identity_by_href_model_dict = RegionIdentityByHref.from_dict(region_identity_by_href_model_json).__dict__ - region_identity_by_href_model2 = RegionIdentityByHref(**region_identity_by_href_model_dict) + region_identity_by_href_model_dict = RegionIdentityByHref.from_dict( + region_identity_by_href_model_json).__dict__ + region_identity_by_href_model2 = RegionIdentityByHref( + **region_identity_by_href_model_dict) # Verify the model instances are equivalent assert region_identity_by_href_model == region_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - region_identity_by_href_model_json2 = region_identity_by_href_model.to_dict() + region_identity_by_href_model_json2 = region_identity_by_href_model.to_dict( + ) assert region_identity_by_href_model_json2 == region_identity_by_href_model_json @@ -83956,18 +98139,22 @@ def test_region_identity_by_name_serialization(self): region_identity_by_name_model_json['name'] = 'us-south' # Construct a model instance of RegionIdentityByName by calling from_dict on the json representation - region_identity_by_name_model = RegionIdentityByName.from_dict(region_identity_by_name_model_json) + region_identity_by_name_model = RegionIdentityByName.from_dict( + region_identity_by_name_model_json) assert region_identity_by_name_model != False # Construct a model instance of RegionIdentityByName by calling from_dict on the json representation - region_identity_by_name_model_dict = RegionIdentityByName.from_dict(region_identity_by_name_model_json).__dict__ - region_identity_by_name_model2 = RegionIdentityByName(**region_identity_by_name_model_dict) + region_identity_by_name_model_dict = RegionIdentityByName.from_dict( + region_identity_by_name_model_json).__dict__ + region_identity_by_name_model2 = RegionIdentityByName( + **region_identity_by_name_model_dict) # Verify the model instances are equivalent assert region_identity_by_name_model == region_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - region_identity_by_name_model_json2 = region_identity_by_name_model.to_dict() + region_identity_by_name_model_json2 = region_identity_by_name_model.to_dict( + ) assert region_identity_by_name_model_json2 == region_identity_by_name_model_json @@ -83983,21 +98170,26 @@ def test_reservation_identity_by_crn_serialization(self): # Construct a json representation of a ReservationIdentityByCRN model reservation_identity_by_crn_model_json = {} - reservation_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a model instance of ReservationIdentityByCRN by calling from_dict on the json representation - reservation_identity_by_crn_model = ReservationIdentityByCRN.from_dict(reservation_identity_by_crn_model_json) + reservation_identity_by_crn_model = ReservationIdentityByCRN.from_dict( + reservation_identity_by_crn_model_json) assert reservation_identity_by_crn_model != False # Construct a model instance of ReservationIdentityByCRN by calling from_dict on the json representation - reservation_identity_by_crn_model_dict = ReservationIdentityByCRN.from_dict(reservation_identity_by_crn_model_json).__dict__ - reservation_identity_by_crn_model2 = ReservationIdentityByCRN(**reservation_identity_by_crn_model_dict) + reservation_identity_by_crn_model_dict = ReservationIdentityByCRN.from_dict( + reservation_identity_by_crn_model_json).__dict__ + reservation_identity_by_crn_model2 = ReservationIdentityByCRN( + **reservation_identity_by_crn_model_dict) # Verify the model instances are equivalent assert reservation_identity_by_crn_model == reservation_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - reservation_identity_by_crn_model_json2 = reservation_identity_by_crn_model.to_dict() + reservation_identity_by_crn_model_json2 = reservation_identity_by_crn_model.to_dict( + ) assert reservation_identity_by_crn_model_json2 == reservation_identity_by_crn_model_json @@ -84013,21 +98205,26 @@ def test_reservation_identity_by_href_serialization(self): # Construct a json representation of a ReservationIdentityByHref model reservation_identity_by_href_model_json = {} - reservation_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a model instance of ReservationIdentityByHref by calling from_dict on the json representation - reservation_identity_by_href_model = ReservationIdentityByHref.from_dict(reservation_identity_by_href_model_json) + reservation_identity_by_href_model = ReservationIdentityByHref.from_dict( + reservation_identity_by_href_model_json) assert reservation_identity_by_href_model != False # Construct a model instance of ReservationIdentityByHref by calling from_dict on the json representation - reservation_identity_by_href_model_dict = ReservationIdentityByHref.from_dict(reservation_identity_by_href_model_json).__dict__ - reservation_identity_by_href_model2 = ReservationIdentityByHref(**reservation_identity_by_href_model_dict) + reservation_identity_by_href_model_dict = ReservationIdentityByHref.from_dict( + reservation_identity_by_href_model_json).__dict__ + reservation_identity_by_href_model2 = ReservationIdentityByHref( + **reservation_identity_by_href_model_dict) # Verify the model instances are equivalent assert reservation_identity_by_href_model == reservation_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - reservation_identity_by_href_model_json2 = reservation_identity_by_href_model.to_dict() + reservation_identity_by_href_model_json2 = reservation_identity_by_href_model.to_dict( + ) assert reservation_identity_by_href_model_json2 == reservation_identity_by_href_model_json @@ -84043,21 +98240,26 @@ def test_reservation_identity_by_id_serialization(self): # Construct a json representation of a ReservationIdentityById model reservation_identity_by_id_model_json = {} - reservation_identity_by_id_model_json['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_by_id_model_json[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' # Construct a model instance of ReservationIdentityById by calling from_dict on the json representation - reservation_identity_by_id_model = ReservationIdentityById.from_dict(reservation_identity_by_id_model_json) + reservation_identity_by_id_model = ReservationIdentityById.from_dict( + reservation_identity_by_id_model_json) assert reservation_identity_by_id_model != False # Construct a model instance of ReservationIdentityById by calling from_dict on the json representation - reservation_identity_by_id_model_dict = ReservationIdentityById.from_dict(reservation_identity_by_id_model_json).__dict__ - reservation_identity_by_id_model2 = ReservationIdentityById(**reservation_identity_by_id_model_dict) + reservation_identity_by_id_model_dict = ReservationIdentityById.from_dict( + reservation_identity_by_id_model_json).__dict__ + reservation_identity_by_id_model2 = ReservationIdentityById( + **reservation_identity_by_id_model_dict) # Verify the model instances are equivalent assert reservation_identity_by_id_model == reservation_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - reservation_identity_by_id_model_json2 = reservation_identity_by_id_model.to_dict() + reservation_identity_by_id_model_json2 = reservation_identity_by_id_model.to_dict( + ) assert reservation_identity_by_id_model_json2 == reservation_identity_by_id_model_json @@ -84066,37 +98268,53 @@ class TestModel_ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetCo Test Class for ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext """ - def test_reserved_ip_target_bare_metal_server_network_interface_reference_target_context_serialization(self): + def test_reserved_ip_target_bare_metal_server_network_interface_reference_target_context_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext """ # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_network_interface_reference_target_context_deleted_model = {} # BareMetalServerNetworkInterfaceReferenceTargetContextDeleted - bare_metal_server_network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_network_interface_reference_target_context_deleted_model = { + } # BareMetalServerNetworkInterfaceReferenceTargetContextDeleted + bare_metal_server_network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext model reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json = {} - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json['deleted'] = bare_metal_server_network_interface_reference_target_context_deleted_model - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json['name'] = 'my-bare-metal-server-network-interface' - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json['resource_type'] = 'network_interface' + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json[ + 'deleted'] = bare_metal_server_network_interface_reference_target_context_deleted_model + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json[ + 'resource_type'] = 'network_interface' # Construct a model instance of ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model = ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict(reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json) + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model = ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict( + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json + ) assert reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model != False # Construct a model instance of ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_dict = ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict(reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json).__dict__ - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model2 = ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext(**reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_dict) + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_dict = ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict( + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json + ).__dict__ + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model2 = ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext( + ** + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model == reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json2 = reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model.to_dict() + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json2 = reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model.to_dict( + ) assert reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json2 == reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json @@ -84112,31 +98330,43 @@ def test_reserved_ip_target_endpoint_gateway_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted - endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + endpoint_gateway_reference_deleted_model = { + } # EndpointGatewayReferenceDeleted + endpoint_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPTargetEndpointGatewayReference model reserved_ip_target_endpoint_gateway_reference_model_json = {} - reserved_ip_target_endpoint_gateway_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_endpoint_gateway_reference_model_json['deleted'] = endpoint_gateway_reference_deleted_model - reserved_ip_target_endpoint_gateway_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_endpoint_gateway_reference_model_json['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_endpoint_gateway_reference_model_json['name'] = 'my-endpoint-gateway' - reserved_ip_target_endpoint_gateway_reference_model_json['resource_type'] = 'endpoint_gateway' + reserved_ip_target_endpoint_gateway_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_endpoint_gateway_reference_model_json[ + 'deleted'] = endpoint_gateway_reference_deleted_model + reserved_ip_target_endpoint_gateway_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_endpoint_gateway_reference_model_json[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_endpoint_gateway_reference_model_json[ + 'name'] = 'my-endpoint-gateway' + reserved_ip_target_endpoint_gateway_reference_model_json[ + 'resource_type'] = 'endpoint_gateway' # Construct a model instance of ReservedIPTargetEndpointGatewayReference by calling from_dict on the json representation - reserved_ip_target_endpoint_gateway_reference_model = ReservedIPTargetEndpointGatewayReference.from_dict(reserved_ip_target_endpoint_gateway_reference_model_json) + reserved_ip_target_endpoint_gateway_reference_model = ReservedIPTargetEndpointGatewayReference.from_dict( + reserved_ip_target_endpoint_gateway_reference_model_json) assert reserved_ip_target_endpoint_gateway_reference_model != False # Construct a model instance of ReservedIPTargetEndpointGatewayReference by calling from_dict on the json representation - reserved_ip_target_endpoint_gateway_reference_model_dict = ReservedIPTargetEndpointGatewayReference.from_dict(reserved_ip_target_endpoint_gateway_reference_model_json).__dict__ - reserved_ip_target_endpoint_gateway_reference_model2 = ReservedIPTargetEndpointGatewayReference(**reserved_ip_target_endpoint_gateway_reference_model_dict) + reserved_ip_target_endpoint_gateway_reference_model_dict = ReservedIPTargetEndpointGatewayReference.from_dict( + reserved_ip_target_endpoint_gateway_reference_model_json).__dict__ + reserved_ip_target_endpoint_gateway_reference_model2 = ReservedIPTargetEndpointGatewayReference( + **reserved_ip_target_endpoint_gateway_reference_model_dict) # Verify the model instances are equivalent assert reserved_ip_target_endpoint_gateway_reference_model == reserved_ip_target_endpoint_gateway_reference_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_endpoint_gateway_reference_model_json2 = reserved_ip_target_endpoint_gateway_reference_model.to_dict() + reserved_ip_target_endpoint_gateway_reference_model_json2 = reserved_ip_target_endpoint_gateway_reference_model.to_dict( + ) assert reserved_ip_target_endpoint_gateway_reference_model_json2 == reserved_ip_target_endpoint_gateway_reference_model_json @@ -84152,28 +98382,37 @@ def test_reserved_ip_target_generic_resource_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - generic_resource_reference_deleted_model = {} # GenericResourceReferenceDeleted - generic_resource_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + generic_resource_reference_deleted_model = { + } # GenericResourceReferenceDeleted + generic_resource_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPTargetGenericResourceReference model reserved_ip_target_generic_resource_reference_model_json = {} - reserved_ip_target_generic_resource_reference_model_json['crn'] = 'crn:v1:bluemix:public:containers-kubernetes:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:9qtrw1peys2spdfs7agb::' - reserved_ip_target_generic_resource_reference_model_json['deleted'] = generic_resource_reference_deleted_model - reserved_ip_target_generic_resource_reference_model_json['resource_type'] = 'cloud_resource' + reserved_ip_target_generic_resource_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:containers-kubernetes:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:9qtrw1peys2spdfs7agb::' + reserved_ip_target_generic_resource_reference_model_json[ + 'deleted'] = generic_resource_reference_deleted_model + reserved_ip_target_generic_resource_reference_model_json[ + 'resource_type'] = 'cloud_resource' # Construct a model instance of ReservedIPTargetGenericResourceReference by calling from_dict on the json representation - reserved_ip_target_generic_resource_reference_model = ReservedIPTargetGenericResourceReference.from_dict(reserved_ip_target_generic_resource_reference_model_json) + reserved_ip_target_generic_resource_reference_model = ReservedIPTargetGenericResourceReference.from_dict( + reserved_ip_target_generic_resource_reference_model_json) assert reserved_ip_target_generic_resource_reference_model != False # Construct a model instance of ReservedIPTargetGenericResourceReference by calling from_dict on the json representation - reserved_ip_target_generic_resource_reference_model_dict = ReservedIPTargetGenericResourceReference.from_dict(reserved_ip_target_generic_resource_reference_model_json).__dict__ - reserved_ip_target_generic_resource_reference_model2 = ReservedIPTargetGenericResourceReference(**reserved_ip_target_generic_resource_reference_model_dict) + reserved_ip_target_generic_resource_reference_model_dict = ReservedIPTargetGenericResourceReference.from_dict( + reserved_ip_target_generic_resource_reference_model_json).__dict__ + reserved_ip_target_generic_resource_reference_model2 = ReservedIPTargetGenericResourceReference( + **reserved_ip_target_generic_resource_reference_model_dict) # Verify the model instances are equivalent assert reserved_ip_target_generic_resource_reference_model == reserved_ip_target_generic_resource_reference_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_generic_resource_reference_model_json2 = reserved_ip_target_generic_resource_reference_model.to_dict() + reserved_ip_target_generic_resource_reference_model_json2 = reserved_ip_target_generic_resource_reference_model.to_dict( + ) assert reserved_ip_target_generic_resource_reference_model_json2 == reserved_ip_target_generic_resource_reference_model_json @@ -84189,31 +98428,43 @@ def test_reserved_ip_target_load_balancer_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - load_balancer_reference_deleted_model = {} # LoadBalancerReferenceDeleted - load_balancer_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_reference_deleted_model = { + } # LoadBalancerReferenceDeleted + load_balancer_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPTargetLoadBalancerReference model reserved_ip_target_load_balancer_reference_model_json = {} - reserved_ip_target_load_balancer_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - reserved_ip_target_load_balancer_reference_model_json['deleted'] = load_balancer_reference_deleted_model - reserved_ip_target_load_balancer_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - reserved_ip_target_load_balancer_reference_model_json['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - reserved_ip_target_load_balancer_reference_model_json['name'] = 'my-load-balancer' - reserved_ip_target_load_balancer_reference_model_json['resource_type'] = 'load_balancer' + reserved_ip_target_load_balancer_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + reserved_ip_target_load_balancer_reference_model_json[ + 'deleted'] = load_balancer_reference_deleted_model + reserved_ip_target_load_balancer_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + reserved_ip_target_load_balancer_reference_model_json[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + reserved_ip_target_load_balancer_reference_model_json[ + 'name'] = 'my-load-balancer' + reserved_ip_target_load_balancer_reference_model_json[ + 'resource_type'] = 'load_balancer' # Construct a model instance of ReservedIPTargetLoadBalancerReference by calling from_dict on the json representation - reserved_ip_target_load_balancer_reference_model = ReservedIPTargetLoadBalancerReference.from_dict(reserved_ip_target_load_balancer_reference_model_json) + reserved_ip_target_load_balancer_reference_model = ReservedIPTargetLoadBalancerReference.from_dict( + reserved_ip_target_load_balancer_reference_model_json) assert reserved_ip_target_load_balancer_reference_model != False # Construct a model instance of ReservedIPTargetLoadBalancerReference by calling from_dict on the json representation - reserved_ip_target_load_balancer_reference_model_dict = ReservedIPTargetLoadBalancerReference.from_dict(reserved_ip_target_load_balancer_reference_model_json).__dict__ - reserved_ip_target_load_balancer_reference_model2 = ReservedIPTargetLoadBalancerReference(**reserved_ip_target_load_balancer_reference_model_dict) + reserved_ip_target_load_balancer_reference_model_dict = ReservedIPTargetLoadBalancerReference.from_dict( + reserved_ip_target_load_balancer_reference_model_json).__dict__ + reserved_ip_target_load_balancer_reference_model2 = ReservedIPTargetLoadBalancerReference( + **reserved_ip_target_load_balancer_reference_model_dict) # Verify the model instances are equivalent assert reserved_ip_target_load_balancer_reference_model == reserved_ip_target_load_balancer_reference_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_load_balancer_reference_model_json2 = reserved_ip_target_load_balancer_reference_model.to_dict() + reserved_ip_target_load_balancer_reference_model_json2 = reserved_ip_target_load_balancer_reference_model.to_dict( + ) assert reserved_ip_target_load_balancer_reference_model_json2 == reserved_ip_target_load_balancer_reference_model_json @@ -84222,37 +98473,53 @@ class TestModel_ReservedIPTargetNetworkInterfaceReferenceTargetContext: Test Class for ReservedIPTargetNetworkInterfaceReferenceTargetContext """ - def test_reserved_ip_target_network_interface_reference_target_context_serialization(self): + def test_reserved_ip_target_network_interface_reference_target_context_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetNetworkInterfaceReferenceTargetContext """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPTargetNetworkInterfaceReferenceTargetContext model reserved_ip_target_network_interface_reference_target_context_model_json = {} - reserved_ip_target_network_interface_reference_target_context_model_json['deleted'] = network_interface_reference_target_context_deleted_model - reserved_ip_target_network_interface_reference_target_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - reserved_ip_target_network_interface_reference_target_context_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - reserved_ip_target_network_interface_reference_target_context_model_json['name'] = 'my-instance-network-interface' - reserved_ip_target_network_interface_reference_target_context_model_json['resource_type'] = 'network_interface' + reserved_ip_target_network_interface_reference_target_context_model_json[ + 'deleted'] = network_interface_reference_target_context_deleted_model + reserved_ip_target_network_interface_reference_target_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + reserved_ip_target_network_interface_reference_target_context_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + reserved_ip_target_network_interface_reference_target_context_model_json[ + 'name'] = 'my-instance-network-interface' + reserved_ip_target_network_interface_reference_target_context_model_json[ + 'resource_type'] = 'network_interface' # Construct a model instance of ReservedIPTargetNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - reserved_ip_target_network_interface_reference_target_context_model = ReservedIPTargetNetworkInterfaceReferenceTargetContext.from_dict(reserved_ip_target_network_interface_reference_target_context_model_json) + reserved_ip_target_network_interface_reference_target_context_model = ReservedIPTargetNetworkInterfaceReferenceTargetContext.from_dict( + reserved_ip_target_network_interface_reference_target_context_model_json + ) assert reserved_ip_target_network_interface_reference_target_context_model != False # Construct a model instance of ReservedIPTargetNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - reserved_ip_target_network_interface_reference_target_context_model_dict = ReservedIPTargetNetworkInterfaceReferenceTargetContext.from_dict(reserved_ip_target_network_interface_reference_target_context_model_json).__dict__ - reserved_ip_target_network_interface_reference_target_context_model2 = ReservedIPTargetNetworkInterfaceReferenceTargetContext(**reserved_ip_target_network_interface_reference_target_context_model_dict) + reserved_ip_target_network_interface_reference_target_context_model_dict = ReservedIPTargetNetworkInterfaceReferenceTargetContext.from_dict( + reserved_ip_target_network_interface_reference_target_context_model_json + ).__dict__ + reserved_ip_target_network_interface_reference_target_context_model2 = ReservedIPTargetNetworkInterfaceReferenceTargetContext( + ** + reserved_ip_target_network_interface_reference_target_context_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_network_interface_reference_target_context_model == reserved_ip_target_network_interface_reference_target_context_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_network_interface_reference_target_context_model_json2 = reserved_ip_target_network_interface_reference_target_context_model.to_dict() + reserved_ip_target_network_interface_reference_target_context_model_json2 = reserved_ip_target_network_interface_reference_target_context_model.to_dict( + ) assert reserved_ip_target_network_interface_reference_target_context_model_json2 == reserved_ip_target_network_interface_reference_target_context_model_json @@ -84269,30 +98536,41 @@ def test_reserved_ip_target_vpn_gateway_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpn_gateway_reference_deleted_model = {} # VPNGatewayReferenceDeleted - vpn_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPTargetVPNGatewayReference model reserved_ip_target_vpn_gateway_reference_model_json = {} - reserved_ip_target_vpn_gateway_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' - reserved_ip_target_vpn_gateway_reference_model_json['deleted'] = vpn_gateway_reference_deleted_model - reserved_ip_target_vpn_gateway_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' - reserved_ip_target_vpn_gateway_reference_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - reserved_ip_target_vpn_gateway_reference_model_json['name'] = 'my-vpn-gateway' - reserved_ip_target_vpn_gateway_reference_model_json['resource_type'] = 'vpn_gateway' + reserved_ip_target_vpn_gateway_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + reserved_ip_target_vpn_gateway_reference_model_json[ + 'deleted'] = vpn_gateway_reference_deleted_model + reserved_ip_target_vpn_gateway_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + reserved_ip_target_vpn_gateway_reference_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + reserved_ip_target_vpn_gateway_reference_model_json[ + 'name'] = 'my-vpn-gateway' + reserved_ip_target_vpn_gateway_reference_model_json[ + 'resource_type'] = 'vpn_gateway' # Construct a model instance of ReservedIPTargetVPNGatewayReference by calling from_dict on the json representation - reserved_ip_target_vpn_gateway_reference_model = ReservedIPTargetVPNGatewayReference.from_dict(reserved_ip_target_vpn_gateway_reference_model_json) + reserved_ip_target_vpn_gateway_reference_model = ReservedIPTargetVPNGatewayReference.from_dict( + reserved_ip_target_vpn_gateway_reference_model_json) assert reserved_ip_target_vpn_gateway_reference_model != False # Construct a model instance of ReservedIPTargetVPNGatewayReference by calling from_dict on the json representation - reserved_ip_target_vpn_gateway_reference_model_dict = ReservedIPTargetVPNGatewayReference.from_dict(reserved_ip_target_vpn_gateway_reference_model_json).__dict__ - reserved_ip_target_vpn_gateway_reference_model2 = ReservedIPTargetVPNGatewayReference(**reserved_ip_target_vpn_gateway_reference_model_dict) + reserved_ip_target_vpn_gateway_reference_model_dict = ReservedIPTargetVPNGatewayReference.from_dict( + reserved_ip_target_vpn_gateway_reference_model_json).__dict__ + reserved_ip_target_vpn_gateway_reference_model2 = ReservedIPTargetVPNGatewayReference( + **reserved_ip_target_vpn_gateway_reference_model_dict) # Verify the model instances are equivalent assert reserved_ip_target_vpn_gateway_reference_model == reserved_ip_target_vpn_gateway_reference_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_vpn_gateway_reference_model_json2 = reserved_ip_target_vpn_gateway_reference_model.to_dict() + reserved_ip_target_vpn_gateway_reference_model_json2 = reserved_ip_target_vpn_gateway_reference_model.to_dict( + ) assert reserved_ip_target_vpn_gateway_reference_model_json2 == reserved_ip_target_vpn_gateway_reference_model_json @@ -84309,30 +98587,41 @@ def test_reserved_ip_target_vpn_server_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted - vpn_server_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_server_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ReservedIPTargetVPNServerReference model reserved_ip_target_vpn_server_reference_model_json = {} - reserved_ip_target_vpn_server_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_vpn_server_reference_model_json['deleted'] = vpn_server_reference_deleted_model - reserved_ip_target_vpn_server_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_vpn_server_reference_model_json['id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - reserved_ip_target_vpn_server_reference_model_json['name'] = 'my-vpn-server' - reserved_ip_target_vpn_server_reference_model_json['resource_type'] = 'vpn_server' + reserved_ip_target_vpn_server_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_vpn_server_reference_model_json[ + 'deleted'] = vpn_server_reference_deleted_model + reserved_ip_target_vpn_server_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_vpn_server_reference_model_json[ + 'id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_vpn_server_reference_model_json[ + 'name'] = 'my-vpn-server' + reserved_ip_target_vpn_server_reference_model_json[ + 'resource_type'] = 'vpn_server' # Construct a model instance of ReservedIPTargetVPNServerReference by calling from_dict on the json representation - reserved_ip_target_vpn_server_reference_model = ReservedIPTargetVPNServerReference.from_dict(reserved_ip_target_vpn_server_reference_model_json) + reserved_ip_target_vpn_server_reference_model = ReservedIPTargetVPNServerReference.from_dict( + reserved_ip_target_vpn_server_reference_model_json) assert reserved_ip_target_vpn_server_reference_model != False # Construct a model instance of ReservedIPTargetVPNServerReference by calling from_dict on the json representation - reserved_ip_target_vpn_server_reference_model_dict = ReservedIPTargetVPNServerReference.from_dict(reserved_ip_target_vpn_server_reference_model_json).__dict__ - reserved_ip_target_vpn_server_reference_model2 = ReservedIPTargetVPNServerReference(**reserved_ip_target_vpn_server_reference_model_dict) + reserved_ip_target_vpn_server_reference_model_dict = ReservedIPTargetVPNServerReference.from_dict( + reserved_ip_target_vpn_server_reference_model_json).__dict__ + reserved_ip_target_vpn_server_reference_model2 = ReservedIPTargetVPNServerReference( + **reserved_ip_target_vpn_server_reference_model_dict) # Verify the model instances are equivalent assert reserved_ip_target_vpn_server_reference_model == reserved_ip_target_vpn_server_reference_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_vpn_server_reference_model_json2 = reserved_ip_target_vpn_server_reference_model.to_dict() + reserved_ip_target_vpn_server_reference_model_json2 = reserved_ip_target_vpn_server_reference_model.to_dict( + ) assert reserved_ip_target_vpn_server_reference_model_json2 == reserved_ip_target_vpn_server_reference_model_json @@ -84341,32 +98630,46 @@ class TestModel_ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTarget Test Class for ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext """ - def test_reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_serialization(self): + def test_reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext """ # Construct a json representation of a ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext model reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json = {} - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json['name'] = 'my-virtual-network-interface' - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json['resource_type'] = 'virtual_network_interface' + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json[ + 'name'] = 'my-virtual-network-interface' + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json[ + 'resource_type'] = 'virtual_network_interface' # Construct a model instance of ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext by calling from_dict on the json representation - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model = ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.from_dict(reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json) + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model = ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.from_dict( + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json + ) assert reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model != False # Construct a model instance of ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext by calling from_dict on the json representation - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_dict = ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.from_dict(reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json).__dict__ - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model2 = ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext(**reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_dict) + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_dict = ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.from_dict( + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json + ).__dict__ + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model2 = ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext( + ** + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model == reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json2 = reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model.to_dict() + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json2 = reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model.to_dict( + ) assert reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json2 == reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json @@ -84382,21 +98685,26 @@ def test_resource_group_identity_by_id_serialization(self): # Construct a json representation of a ResourceGroupIdentityById model resource_group_identity_by_id_model_json = {} - resource_group_identity_by_id_model_json['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_identity_by_id_model_json[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' # Construct a model instance of ResourceGroupIdentityById by calling from_dict on the json representation - resource_group_identity_by_id_model = ResourceGroupIdentityById.from_dict(resource_group_identity_by_id_model_json) + resource_group_identity_by_id_model = ResourceGroupIdentityById.from_dict( + resource_group_identity_by_id_model_json) assert resource_group_identity_by_id_model != False # Construct a model instance of ResourceGroupIdentityById by calling from_dict on the json representation - resource_group_identity_by_id_model_dict = ResourceGroupIdentityById.from_dict(resource_group_identity_by_id_model_json).__dict__ - resource_group_identity_by_id_model2 = ResourceGroupIdentityById(**resource_group_identity_by_id_model_dict) + resource_group_identity_by_id_model_dict = ResourceGroupIdentityById.from_dict( + resource_group_identity_by_id_model_json).__dict__ + resource_group_identity_by_id_model2 = ResourceGroupIdentityById( + **resource_group_identity_by_id_model_dict) # Verify the model instances are equivalent assert resource_group_identity_by_id_model == resource_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - resource_group_identity_by_id_model_json2 = resource_group_identity_by_id_model.to_dict() + resource_group_identity_by_id_model_json2 = resource_group_identity_by_id_model.to_dict( + ) assert resource_group_identity_by_id_model_json2 == resource_group_identity_by_id_model_json @@ -84413,30 +98721,41 @@ def test_route_creator_vpn_gateway_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpn_gateway_reference_deleted_model = {} # VPNGatewayReferenceDeleted - vpn_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a RouteCreatorVPNGatewayReference model route_creator_vpn_gateway_reference_model_json = {} - route_creator_vpn_gateway_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' - route_creator_vpn_gateway_reference_model_json['deleted'] = vpn_gateway_reference_deleted_model - route_creator_vpn_gateway_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' - route_creator_vpn_gateway_reference_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - route_creator_vpn_gateway_reference_model_json['name'] = 'my-vpn-gateway' - route_creator_vpn_gateway_reference_model_json['resource_type'] = 'vpn_gateway' + route_creator_vpn_gateway_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_vpn_gateway_reference_model_json[ + 'deleted'] = vpn_gateway_reference_deleted_model + route_creator_vpn_gateway_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_vpn_gateway_reference_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_vpn_gateway_reference_model_json[ + 'name'] = 'my-vpn-gateway' + route_creator_vpn_gateway_reference_model_json[ + 'resource_type'] = 'vpn_gateway' # Construct a model instance of RouteCreatorVPNGatewayReference by calling from_dict on the json representation - route_creator_vpn_gateway_reference_model = RouteCreatorVPNGatewayReference.from_dict(route_creator_vpn_gateway_reference_model_json) + route_creator_vpn_gateway_reference_model = RouteCreatorVPNGatewayReference.from_dict( + route_creator_vpn_gateway_reference_model_json) assert route_creator_vpn_gateway_reference_model != False # Construct a model instance of RouteCreatorVPNGatewayReference by calling from_dict on the json representation - route_creator_vpn_gateway_reference_model_dict = RouteCreatorVPNGatewayReference.from_dict(route_creator_vpn_gateway_reference_model_json).__dict__ - route_creator_vpn_gateway_reference_model2 = RouteCreatorVPNGatewayReference(**route_creator_vpn_gateway_reference_model_dict) + route_creator_vpn_gateway_reference_model_dict = RouteCreatorVPNGatewayReference.from_dict( + route_creator_vpn_gateway_reference_model_json).__dict__ + route_creator_vpn_gateway_reference_model2 = RouteCreatorVPNGatewayReference( + **route_creator_vpn_gateway_reference_model_dict) # Verify the model instances are equivalent assert route_creator_vpn_gateway_reference_model == route_creator_vpn_gateway_reference_model2 # Convert model instance back to dict and verify no loss of data - route_creator_vpn_gateway_reference_model_json2 = route_creator_vpn_gateway_reference_model.to_dict() + route_creator_vpn_gateway_reference_model_json2 = route_creator_vpn_gateway_reference_model.to_dict( + ) assert route_creator_vpn_gateway_reference_model_json2 == route_creator_vpn_gateway_reference_model_json @@ -84453,30 +98772,40 @@ def test_route_creator_vpn_server_reference_serialization(self): # Construct dict forms of any model objects needed in order to build this model. vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted - vpn_server_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_server_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a RouteCreatorVPNServerReference model route_creator_vpn_server_reference_model_json = {} - route_creator_vpn_server_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - route_creator_vpn_server_reference_model_json['deleted'] = vpn_server_reference_deleted_model - route_creator_vpn_server_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - route_creator_vpn_server_reference_model_json['id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + route_creator_vpn_server_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + route_creator_vpn_server_reference_model_json[ + 'deleted'] = vpn_server_reference_deleted_model + route_creator_vpn_server_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + route_creator_vpn_server_reference_model_json[ + 'id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' route_creator_vpn_server_reference_model_json['name'] = 'my-vpn-server' - route_creator_vpn_server_reference_model_json['resource_type'] = 'vpn_server' + route_creator_vpn_server_reference_model_json[ + 'resource_type'] = 'vpn_server' # Construct a model instance of RouteCreatorVPNServerReference by calling from_dict on the json representation - route_creator_vpn_server_reference_model = RouteCreatorVPNServerReference.from_dict(route_creator_vpn_server_reference_model_json) + route_creator_vpn_server_reference_model = RouteCreatorVPNServerReference.from_dict( + route_creator_vpn_server_reference_model_json) assert route_creator_vpn_server_reference_model != False # Construct a model instance of RouteCreatorVPNServerReference by calling from_dict on the json representation - route_creator_vpn_server_reference_model_dict = RouteCreatorVPNServerReference.from_dict(route_creator_vpn_server_reference_model_json).__dict__ - route_creator_vpn_server_reference_model2 = RouteCreatorVPNServerReference(**route_creator_vpn_server_reference_model_dict) + route_creator_vpn_server_reference_model_dict = RouteCreatorVPNServerReference.from_dict( + route_creator_vpn_server_reference_model_json).__dict__ + route_creator_vpn_server_reference_model2 = RouteCreatorVPNServerReference( + **route_creator_vpn_server_reference_model_dict) # Verify the model instances are equivalent assert route_creator_vpn_server_reference_model == route_creator_vpn_server_reference_model2 # Convert model instance back to dict and verify no loss of data - route_creator_vpn_server_reference_model_json2 = route_creator_vpn_server_reference_model.to_dict() + route_creator_vpn_server_reference_model_json2 = route_creator_vpn_server_reference_model.to_dict( + ) assert route_creator_vpn_server_reference_model_json2 == route_creator_vpn_server_reference_model_json @@ -84495,12 +98824,15 @@ def test_route_next_hop_ip_serialization(self): route_next_hop_ip_model_json['address'] = '192.168.3.4' # Construct a model instance of RouteNextHopIP by calling from_dict on the json representation - route_next_hop_ip_model = RouteNextHopIP.from_dict(route_next_hop_ip_model_json) + route_next_hop_ip_model = RouteNextHopIP.from_dict( + route_next_hop_ip_model_json) assert route_next_hop_ip_model != False # Construct a model instance of RouteNextHopIP by calling from_dict on the json representation - route_next_hop_ip_model_dict = RouteNextHopIP.from_dict(route_next_hop_ip_model_json).__dict__ - route_next_hop_ip_model2 = RouteNextHopIP(**route_next_hop_ip_model_dict) + route_next_hop_ip_model_dict = RouteNextHopIP.from_dict( + route_next_hop_ip_model_json).__dict__ + route_next_hop_ip_model2 = RouteNextHopIP( + **route_next_hop_ip_model_dict) # Verify the model instances are equivalent assert route_next_hop_ip_model == route_next_hop_ip_model2 @@ -84515,37 +98847,49 @@ class TestModel_RouteNextHopVPNGatewayConnectionReference: Test Class for RouteNextHopVPNGatewayConnectionReference """ - def test_route_next_hop_vpn_gateway_connection_reference_serialization(self): + def test_route_next_hop_vpn_gateway_connection_reference_serialization( + self): """ Test serialization/deserialization for RouteNextHopVPNGatewayConnectionReference """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a RouteNextHopVPNGatewayConnectionReference model route_next_hop_vpn_gateway_connection_reference_model_json = {} - route_next_hop_vpn_gateway_connection_reference_model_json['deleted'] = vpn_gateway_connection_reference_deleted_model - route_next_hop_vpn_gateway_connection_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - route_next_hop_vpn_gateway_connection_reference_model_json['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' - route_next_hop_vpn_gateway_connection_reference_model_json['name'] = 'my-vpn-connection' - route_next_hop_vpn_gateway_connection_reference_model_json['resource_type'] = 'vpn_gateway_connection' + route_next_hop_vpn_gateway_connection_reference_model_json[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + route_next_hop_vpn_gateway_connection_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + route_next_hop_vpn_gateway_connection_reference_model_json[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + route_next_hop_vpn_gateway_connection_reference_model_json[ + 'name'] = 'my-vpn-connection' + route_next_hop_vpn_gateway_connection_reference_model_json[ + 'resource_type'] = 'vpn_gateway_connection' # Construct a model instance of RouteNextHopVPNGatewayConnectionReference by calling from_dict on the json representation - route_next_hop_vpn_gateway_connection_reference_model = RouteNextHopVPNGatewayConnectionReference.from_dict(route_next_hop_vpn_gateway_connection_reference_model_json) + route_next_hop_vpn_gateway_connection_reference_model = RouteNextHopVPNGatewayConnectionReference.from_dict( + route_next_hop_vpn_gateway_connection_reference_model_json) assert route_next_hop_vpn_gateway_connection_reference_model != False # Construct a model instance of RouteNextHopVPNGatewayConnectionReference by calling from_dict on the json representation - route_next_hop_vpn_gateway_connection_reference_model_dict = RouteNextHopVPNGatewayConnectionReference.from_dict(route_next_hop_vpn_gateway_connection_reference_model_json).__dict__ - route_next_hop_vpn_gateway_connection_reference_model2 = RouteNextHopVPNGatewayConnectionReference(**route_next_hop_vpn_gateway_connection_reference_model_dict) + route_next_hop_vpn_gateway_connection_reference_model_dict = RouteNextHopVPNGatewayConnectionReference.from_dict( + route_next_hop_vpn_gateway_connection_reference_model_json).__dict__ + route_next_hop_vpn_gateway_connection_reference_model2 = RouteNextHopVPNGatewayConnectionReference( + **route_next_hop_vpn_gateway_connection_reference_model_dict) # Verify the model instances are equivalent assert route_next_hop_vpn_gateway_connection_reference_model == route_next_hop_vpn_gateway_connection_reference_model2 # Convert model instance back to dict and verify no loss of data - route_next_hop_vpn_gateway_connection_reference_model_json2 = route_next_hop_vpn_gateway_connection_reference_model.to_dict() + route_next_hop_vpn_gateway_connection_reference_model_json2 = route_next_hop_vpn_gateway_connection_reference_model.to_dict( + ) assert route_next_hop_vpn_gateway_connection_reference_model_json2 == route_next_hop_vpn_gateway_connection_reference_model_json @@ -84561,21 +98905,26 @@ def test_routing_table_identity_by_href_serialization(self): # Construct a json representation of a RoutingTableIdentityByHref model routing_table_identity_by_href_model_json = {} - routing_table_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a model instance of RoutingTableIdentityByHref by calling from_dict on the json representation - routing_table_identity_by_href_model = RoutingTableIdentityByHref.from_dict(routing_table_identity_by_href_model_json) + routing_table_identity_by_href_model = RoutingTableIdentityByHref.from_dict( + routing_table_identity_by_href_model_json) assert routing_table_identity_by_href_model != False # Construct a model instance of RoutingTableIdentityByHref by calling from_dict on the json representation - routing_table_identity_by_href_model_dict = RoutingTableIdentityByHref.from_dict(routing_table_identity_by_href_model_json).__dict__ - routing_table_identity_by_href_model2 = RoutingTableIdentityByHref(**routing_table_identity_by_href_model_dict) + routing_table_identity_by_href_model_dict = RoutingTableIdentityByHref.from_dict( + routing_table_identity_by_href_model_json).__dict__ + routing_table_identity_by_href_model2 = RoutingTableIdentityByHref( + **routing_table_identity_by_href_model_dict) # Verify the model instances are equivalent assert routing_table_identity_by_href_model == routing_table_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - routing_table_identity_by_href_model_json2 = routing_table_identity_by_href_model.to_dict() + routing_table_identity_by_href_model_json2 = routing_table_identity_by_href_model.to_dict( + ) assert routing_table_identity_by_href_model_json2 == routing_table_identity_by_href_model_json @@ -84591,21 +98940,26 @@ def test_routing_table_identity_by_id_serialization(self): # Construct a json representation of a RoutingTableIdentityById model routing_table_identity_by_id_model_json = {} - routing_table_identity_by_id_model_json['id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_by_id_model_json[ + 'id'] = 'r006-6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a model instance of RoutingTableIdentityById by calling from_dict on the json representation - routing_table_identity_by_id_model = RoutingTableIdentityById.from_dict(routing_table_identity_by_id_model_json) + routing_table_identity_by_id_model = RoutingTableIdentityById.from_dict( + routing_table_identity_by_id_model_json) assert routing_table_identity_by_id_model != False # Construct a model instance of RoutingTableIdentityById by calling from_dict on the json representation - routing_table_identity_by_id_model_dict = RoutingTableIdentityById.from_dict(routing_table_identity_by_id_model_json).__dict__ - routing_table_identity_by_id_model2 = RoutingTableIdentityById(**routing_table_identity_by_id_model_dict) + routing_table_identity_by_id_model_dict = RoutingTableIdentityById.from_dict( + routing_table_identity_by_id_model_json).__dict__ + routing_table_identity_by_id_model2 = RoutingTableIdentityById( + **routing_table_identity_by_id_model_dict) # Verify the model instances are equivalent assert routing_table_identity_by_id_model == routing_table_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - routing_table_identity_by_id_model_json2 = routing_table_identity_by_id_model.to_dict() + routing_table_identity_by_id_model_json2 = routing_table_identity_by_id_model.to_dict( + ) assert routing_table_identity_by_id_model_json2 == routing_table_identity_by_id_model_json @@ -84621,21 +98975,26 @@ def test_security_group_identity_by_crn_serialization(self): # Construct a json representation of a SecurityGroupIdentityByCRN model security_group_identity_by_crn_model_json = {} - security_group_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupIdentityByCRN by calling from_dict on the json representation - security_group_identity_by_crn_model = SecurityGroupIdentityByCRN.from_dict(security_group_identity_by_crn_model_json) + security_group_identity_by_crn_model = SecurityGroupIdentityByCRN.from_dict( + security_group_identity_by_crn_model_json) assert security_group_identity_by_crn_model != False # Construct a model instance of SecurityGroupIdentityByCRN by calling from_dict on the json representation - security_group_identity_by_crn_model_dict = SecurityGroupIdentityByCRN.from_dict(security_group_identity_by_crn_model_json).__dict__ - security_group_identity_by_crn_model2 = SecurityGroupIdentityByCRN(**security_group_identity_by_crn_model_dict) + security_group_identity_by_crn_model_dict = SecurityGroupIdentityByCRN.from_dict( + security_group_identity_by_crn_model_json).__dict__ + security_group_identity_by_crn_model2 = SecurityGroupIdentityByCRN( + **security_group_identity_by_crn_model_dict) # Verify the model instances are equivalent assert security_group_identity_by_crn_model == security_group_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - security_group_identity_by_crn_model_json2 = security_group_identity_by_crn_model.to_dict() + security_group_identity_by_crn_model_json2 = security_group_identity_by_crn_model.to_dict( + ) assert security_group_identity_by_crn_model_json2 == security_group_identity_by_crn_model_json @@ -84651,21 +99010,26 @@ def test_security_group_identity_by_href_serialization(self): # Construct a json representation of a SecurityGroupIdentityByHref model security_group_identity_by_href_model_json = {} - security_group_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupIdentityByHref by calling from_dict on the json representation - security_group_identity_by_href_model = SecurityGroupIdentityByHref.from_dict(security_group_identity_by_href_model_json) + security_group_identity_by_href_model = SecurityGroupIdentityByHref.from_dict( + security_group_identity_by_href_model_json) assert security_group_identity_by_href_model != False # Construct a model instance of SecurityGroupIdentityByHref by calling from_dict on the json representation - security_group_identity_by_href_model_dict = SecurityGroupIdentityByHref.from_dict(security_group_identity_by_href_model_json).__dict__ - security_group_identity_by_href_model2 = SecurityGroupIdentityByHref(**security_group_identity_by_href_model_dict) + security_group_identity_by_href_model_dict = SecurityGroupIdentityByHref.from_dict( + security_group_identity_by_href_model_json).__dict__ + security_group_identity_by_href_model2 = SecurityGroupIdentityByHref( + **security_group_identity_by_href_model_dict) # Verify the model instances are equivalent assert security_group_identity_by_href_model == security_group_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - security_group_identity_by_href_model_json2 = security_group_identity_by_href_model.to_dict() + security_group_identity_by_href_model_json2 = security_group_identity_by_href_model.to_dict( + ) assert security_group_identity_by_href_model_json2 == security_group_identity_by_href_model_json @@ -84681,21 +99045,26 @@ def test_security_group_identity_by_id_serialization(self): # Construct a json representation of a SecurityGroupIdentityById model security_group_identity_by_id_model_json = {} - security_group_identity_by_id_model_json['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_by_id_model_json[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupIdentityById by calling from_dict on the json representation - security_group_identity_by_id_model = SecurityGroupIdentityById.from_dict(security_group_identity_by_id_model_json) + security_group_identity_by_id_model = SecurityGroupIdentityById.from_dict( + security_group_identity_by_id_model_json) assert security_group_identity_by_id_model != False # Construct a model instance of SecurityGroupIdentityById by calling from_dict on the json representation - security_group_identity_by_id_model_dict = SecurityGroupIdentityById.from_dict(security_group_identity_by_id_model_json).__dict__ - security_group_identity_by_id_model2 = SecurityGroupIdentityById(**security_group_identity_by_id_model_dict) + security_group_identity_by_id_model_dict = SecurityGroupIdentityById.from_dict( + security_group_identity_by_id_model_json).__dict__ + security_group_identity_by_id_model2 = SecurityGroupIdentityById( + **security_group_identity_by_id_model_dict) # Verify the model instances are equivalent assert security_group_identity_by_id_model == security_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - security_group_identity_by_id_model_json2 = security_group_identity_by_id_model.to_dict() + security_group_identity_by_id_model_json2 = security_group_identity_by_id_model.to_dict( + ) assert security_group_identity_by_id_model_json2 == security_group_identity_by_id_model_json @@ -84711,21 +99080,26 @@ def test_security_group_rule_local_patch_cidr_serialization(self): # Construct a json representation of a SecurityGroupRuleLocalPatchCIDR model security_group_rule_local_patch_cidr_model_json = {} - security_group_rule_local_patch_cidr_model_json['cidr_block'] = 'testString' + security_group_rule_local_patch_cidr_model_json[ + 'cidr_block'] = '192.168.3.0/24' # Construct a model instance of SecurityGroupRuleLocalPatchCIDR by calling from_dict on the json representation - security_group_rule_local_patch_cidr_model = SecurityGroupRuleLocalPatchCIDR.from_dict(security_group_rule_local_patch_cidr_model_json) + security_group_rule_local_patch_cidr_model = SecurityGroupRuleLocalPatchCIDR.from_dict( + security_group_rule_local_patch_cidr_model_json) assert security_group_rule_local_patch_cidr_model != False # Construct a model instance of SecurityGroupRuleLocalPatchCIDR by calling from_dict on the json representation - security_group_rule_local_patch_cidr_model_dict = SecurityGroupRuleLocalPatchCIDR.from_dict(security_group_rule_local_patch_cidr_model_json).__dict__ - security_group_rule_local_patch_cidr_model2 = SecurityGroupRuleLocalPatchCIDR(**security_group_rule_local_patch_cidr_model_dict) + security_group_rule_local_patch_cidr_model_dict = SecurityGroupRuleLocalPatchCIDR.from_dict( + security_group_rule_local_patch_cidr_model_json).__dict__ + security_group_rule_local_patch_cidr_model2 = SecurityGroupRuleLocalPatchCIDR( + **security_group_rule_local_patch_cidr_model_dict) # Verify the model instances are equivalent assert security_group_rule_local_patch_cidr_model == security_group_rule_local_patch_cidr_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_local_patch_cidr_model_json2 = security_group_rule_local_patch_cidr_model.to_dict() + security_group_rule_local_patch_cidr_model_json2 = security_group_rule_local_patch_cidr_model.to_dict( + ) assert security_group_rule_local_patch_cidr_model_json2 == security_group_rule_local_patch_cidr_model_json @@ -84744,18 +99118,22 @@ def test_security_group_rule_local_patch_ip_serialization(self): security_group_rule_local_patch_ip_model_json['address'] = '192.168.3.4' # Construct a model instance of SecurityGroupRuleLocalPatchIP by calling from_dict on the json representation - security_group_rule_local_patch_ip_model = SecurityGroupRuleLocalPatchIP.from_dict(security_group_rule_local_patch_ip_model_json) + security_group_rule_local_patch_ip_model = SecurityGroupRuleLocalPatchIP.from_dict( + security_group_rule_local_patch_ip_model_json) assert security_group_rule_local_patch_ip_model != False # Construct a model instance of SecurityGroupRuleLocalPatchIP by calling from_dict on the json representation - security_group_rule_local_patch_ip_model_dict = SecurityGroupRuleLocalPatchIP.from_dict(security_group_rule_local_patch_ip_model_json).__dict__ - security_group_rule_local_patch_ip_model2 = SecurityGroupRuleLocalPatchIP(**security_group_rule_local_patch_ip_model_dict) + security_group_rule_local_patch_ip_model_dict = SecurityGroupRuleLocalPatchIP.from_dict( + security_group_rule_local_patch_ip_model_json).__dict__ + security_group_rule_local_patch_ip_model2 = SecurityGroupRuleLocalPatchIP( + **security_group_rule_local_patch_ip_model_dict) # Verify the model instances are equivalent assert security_group_rule_local_patch_ip_model == security_group_rule_local_patch_ip_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_local_patch_ip_model_json2 = security_group_rule_local_patch_ip_model.to_dict() + security_group_rule_local_patch_ip_model_json2 = security_group_rule_local_patch_ip_model.to_dict( + ) assert security_group_rule_local_patch_ip_model_json2 == security_group_rule_local_patch_ip_model_json @@ -84771,21 +99149,26 @@ def test_security_group_rule_local_prototype_cidr_serialization(self): # Construct a json representation of a SecurityGroupRuleLocalPrototypeCIDR model security_group_rule_local_prototype_cidr_model_json = {} - security_group_rule_local_prototype_cidr_model_json['cidr_block'] = 'testString' + security_group_rule_local_prototype_cidr_model_json[ + 'cidr_block'] = '192.168.3.0/24' # Construct a model instance of SecurityGroupRuleLocalPrototypeCIDR by calling from_dict on the json representation - security_group_rule_local_prototype_cidr_model = SecurityGroupRuleLocalPrototypeCIDR.from_dict(security_group_rule_local_prototype_cidr_model_json) + security_group_rule_local_prototype_cidr_model = SecurityGroupRuleLocalPrototypeCIDR.from_dict( + security_group_rule_local_prototype_cidr_model_json) assert security_group_rule_local_prototype_cidr_model != False # Construct a model instance of SecurityGroupRuleLocalPrototypeCIDR by calling from_dict on the json representation - security_group_rule_local_prototype_cidr_model_dict = SecurityGroupRuleLocalPrototypeCIDR.from_dict(security_group_rule_local_prototype_cidr_model_json).__dict__ - security_group_rule_local_prototype_cidr_model2 = SecurityGroupRuleLocalPrototypeCIDR(**security_group_rule_local_prototype_cidr_model_dict) + security_group_rule_local_prototype_cidr_model_dict = SecurityGroupRuleLocalPrototypeCIDR.from_dict( + security_group_rule_local_prototype_cidr_model_json).__dict__ + security_group_rule_local_prototype_cidr_model2 = SecurityGroupRuleLocalPrototypeCIDR( + **security_group_rule_local_prototype_cidr_model_dict) # Verify the model instances are equivalent assert security_group_rule_local_prototype_cidr_model == security_group_rule_local_prototype_cidr_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_local_prototype_cidr_model_json2 = security_group_rule_local_prototype_cidr_model.to_dict() + security_group_rule_local_prototype_cidr_model_json2 = security_group_rule_local_prototype_cidr_model.to_dict( + ) assert security_group_rule_local_prototype_cidr_model_json2 == security_group_rule_local_prototype_cidr_model_json @@ -84801,21 +99184,26 @@ def test_security_group_rule_local_prototype_ip_serialization(self): # Construct a json representation of a SecurityGroupRuleLocalPrototypeIP model security_group_rule_local_prototype_ip_model_json = {} - security_group_rule_local_prototype_ip_model_json['address'] = '192.168.3.4' + security_group_rule_local_prototype_ip_model_json[ + 'address'] = '192.168.3.4' # Construct a model instance of SecurityGroupRuleLocalPrototypeIP by calling from_dict on the json representation - security_group_rule_local_prototype_ip_model = SecurityGroupRuleLocalPrototypeIP.from_dict(security_group_rule_local_prototype_ip_model_json) + security_group_rule_local_prototype_ip_model = SecurityGroupRuleLocalPrototypeIP.from_dict( + security_group_rule_local_prototype_ip_model_json) assert security_group_rule_local_prototype_ip_model != False # Construct a model instance of SecurityGroupRuleLocalPrototypeIP by calling from_dict on the json representation - security_group_rule_local_prototype_ip_model_dict = SecurityGroupRuleLocalPrototypeIP.from_dict(security_group_rule_local_prototype_ip_model_json).__dict__ - security_group_rule_local_prototype_ip_model2 = SecurityGroupRuleLocalPrototypeIP(**security_group_rule_local_prototype_ip_model_dict) + security_group_rule_local_prototype_ip_model_dict = SecurityGroupRuleLocalPrototypeIP.from_dict( + security_group_rule_local_prototype_ip_model_json).__dict__ + security_group_rule_local_prototype_ip_model2 = SecurityGroupRuleLocalPrototypeIP( + **security_group_rule_local_prototype_ip_model_dict) # Verify the model instances are equivalent assert security_group_rule_local_prototype_ip_model == security_group_rule_local_prototype_ip_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_local_prototype_ip_model_json2 = security_group_rule_local_prototype_ip_model.to_dict() + security_group_rule_local_prototype_ip_model_json2 = security_group_rule_local_prototype_ip_model.to_dict( + ) assert security_group_rule_local_prototype_ip_model_json2 == security_group_rule_local_prototype_ip_model_json @@ -84831,21 +99219,26 @@ def test_security_group_rule_local_cidr_serialization(self): # Construct a json representation of a SecurityGroupRuleLocalCIDR model security_group_rule_local_cidr_model_json = {} - security_group_rule_local_cidr_model_json['cidr_block'] = 'testString' + security_group_rule_local_cidr_model_json[ + 'cidr_block'] = '192.168.3.0/24' # Construct a model instance of SecurityGroupRuleLocalCIDR by calling from_dict on the json representation - security_group_rule_local_cidr_model = SecurityGroupRuleLocalCIDR.from_dict(security_group_rule_local_cidr_model_json) + security_group_rule_local_cidr_model = SecurityGroupRuleLocalCIDR.from_dict( + security_group_rule_local_cidr_model_json) assert security_group_rule_local_cidr_model != False # Construct a model instance of SecurityGroupRuleLocalCIDR by calling from_dict on the json representation - security_group_rule_local_cidr_model_dict = SecurityGroupRuleLocalCIDR.from_dict(security_group_rule_local_cidr_model_json).__dict__ - security_group_rule_local_cidr_model2 = SecurityGroupRuleLocalCIDR(**security_group_rule_local_cidr_model_dict) + security_group_rule_local_cidr_model_dict = SecurityGroupRuleLocalCIDR.from_dict( + security_group_rule_local_cidr_model_json).__dict__ + security_group_rule_local_cidr_model2 = SecurityGroupRuleLocalCIDR( + **security_group_rule_local_cidr_model_dict) # Verify the model instances are equivalent assert security_group_rule_local_cidr_model == security_group_rule_local_cidr_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_local_cidr_model_json2 = security_group_rule_local_cidr_model.to_dict() + security_group_rule_local_cidr_model_json2 = security_group_rule_local_cidr_model.to_dict( + ) assert security_group_rule_local_cidr_model_json2 == security_group_rule_local_cidr_model_json @@ -84864,18 +99257,22 @@ def test_security_group_rule_local_ip_serialization(self): security_group_rule_local_ip_model_json['address'] = '192.168.3.4' # Construct a model instance of SecurityGroupRuleLocalIP by calling from_dict on the json representation - security_group_rule_local_ip_model = SecurityGroupRuleLocalIP.from_dict(security_group_rule_local_ip_model_json) + security_group_rule_local_ip_model = SecurityGroupRuleLocalIP.from_dict( + security_group_rule_local_ip_model_json) assert security_group_rule_local_ip_model != False # Construct a model instance of SecurityGroupRuleLocalIP by calling from_dict on the json representation - security_group_rule_local_ip_model_dict = SecurityGroupRuleLocalIP.from_dict(security_group_rule_local_ip_model_json).__dict__ - security_group_rule_local_ip_model2 = SecurityGroupRuleLocalIP(**security_group_rule_local_ip_model_dict) + security_group_rule_local_ip_model_dict = SecurityGroupRuleLocalIP.from_dict( + security_group_rule_local_ip_model_json).__dict__ + security_group_rule_local_ip_model2 = SecurityGroupRuleLocalIP( + **security_group_rule_local_ip_model_dict) # Verify the model instances are equivalent assert security_group_rule_local_ip_model == security_group_rule_local_ip_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_local_ip_model_json2 = security_group_rule_local_ip_model.to_dict() + security_group_rule_local_ip_model_json2 = security_group_rule_local_ip_model.to_dict( + ) assert security_group_rule_local_ip_model_json2 == security_group_rule_local_ip_model_json @@ -84884,40 +99281,56 @@ class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll: Test Class for SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll """ - def test_security_group_rule_prototype_security_group_rule_protocol_all_serialization(self): + def test_security_group_rule_prototype_security_group_rule_protocol_all_serialization( + self): """ Test serialization/deserialization for SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll """ # Construct dict forms of any model objects needed in order to build this model. - security_group_rule_local_prototype_model = {} # SecurityGroupRuleLocalPrototypeIP + security_group_rule_local_prototype_model = { + } # SecurityGroupRuleLocalPrototypeIP security_group_rule_local_prototype_model['address'] = '192.168.3.4' - security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP + security_group_rule_remote_prototype_model = { + } # SecurityGroupRuleRemotePrototypeIP security_group_rule_remote_prototype_model['address'] = '192.168.3.4' # Construct a json representation of a SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll model security_group_rule_prototype_security_group_rule_protocol_all_model_json = {} - security_group_rule_prototype_security_group_rule_protocol_all_model_json['direction'] = 'inbound' - security_group_rule_prototype_security_group_rule_protocol_all_model_json['ip_version'] = 'ipv4' - security_group_rule_prototype_security_group_rule_protocol_all_model_json['local'] = security_group_rule_local_prototype_model - security_group_rule_prototype_security_group_rule_protocol_all_model_json['protocol'] = 'all' - security_group_rule_prototype_security_group_rule_protocol_all_model_json['remote'] = security_group_rule_remote_prototype_model + security_group_rule_prototype_security_group_rule_protocol_all_model_json[ + 'direction'] = 'inbound' + security_group_rule_prototype_security_group_rule_protocol_all_model_json[ + 'ip_version'] = 'ipv4' + security_group_rule_prototype_security_group_rule_protocol_all_model_json[ + 'local'] = security_group_rule_local_prototype_model + security_group_rule_prototype_security_group_rule_protocol_all_model_json[ + 'protocol'] = 'all' + security_group_rule_prototype_security_group_rule_protocol_all_model_json[ + 'remote'] = security_group_rule_remote_prototype_model # Construct a model instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll by calling from_dict on the json representation - security_group_rule_prototype_security_group_rule_protocol_all_model = SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.from_dict(security_group_rule_prototype_security_group_rule_protocol_all_model_json) + security_group_rule_prototype_security_group_rule_protocol_all_model = SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.from_dict( + security_group_rule_prototype_security_group_rule_protocol_all_model_json + ) assert security_group_rule_prototype_security_group_rule_protocol_all_model != False # Construct a model instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll by calling from_dict on the json representation - security_group_rule_prototype_security_group_rule_protocol_all_model_dict = SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.from_dict(security_group_rule_prototype_security_group_rule_protocol_all_model_json).__dict__ - security_group_rule_prototype_security_group_rule_protocol_all_model2 = SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(**security_group_rule_prototype_security_group_rule_protocol_all_model_dict) + security_group_rule_prototype_security_group_rule_protocol_all_model_dict = SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.from_dict( + security_group_rule_prototype_security_group_rule_protocol_all_model_json + ).__dict__ + security_group_rule_prototype_security_group_rule_protocol_all_model2 = SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll( + ** + security_group_rule_prototype_security_group_rule_protocol_all_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_prototype_security_group_rule_protocol_all_model == security_group_rule_prototype_security_group_rule_protocol_all_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_prototype_security_group_rule_protocol_all_model_json2 = security_group_rule_prototype_security_group_rule_protocol_all_model.to_dict() + security_group_rule_prototype_security_group_rule_protocol_all_model_json2 = security_group_rule_prototype_security_group_rule_protocol_all_model.to_dict( + ) assert security_group_rule_prototype_security_group_rule_protocol_all_model_json2 == security_group_rule_prototype_security_group_rule_protocol_all_model_json @@ -84926,42 +99339,60 @@ class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP: Test Class for SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP """ - def test_security_group_rule_prototype_security_group_rule_protocol_icmp_serialization(self): + def test_security_group_rule_prototype_security_group_rule_protocol_icmp_serialization( + self): """ Test serialization/deserialization for SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP """ # Construct dict forms of any model objects needed in order to build this model. - security_group_rule_local_prototype_model = {} # SecurityGroupRuleLocalPrototypeIP + security_group_rule_local_prototype_model = { + } # SecurityGroupRuleLocalPrototypeIP security_group_rule_local_prototype_model['address'] = '192.168.3.4' - security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP + security_group_rule_remote_prototype_model = { + } # SecurityGroupRuleRemotePrototypeIP security_group_rule_remote_prototype_model['address'] = '192.168.3.4' # Construct a json representation of a SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP model security_group_rule_prototype_security_group_rule_protocol_icmp_model_json = {} - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json['code'] = 0 - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json['direction'] = 'inbound' - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json['ip_version'] = 'ipv4' - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json['local'] = security_group_rule_local_prototype_model - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json['protocol'] = 'icmp' - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json['remote'] = security_group_rule_remote_prototype_model - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json['type'] = 8 + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json[ + 'code'] = 0 + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json[ + 'direction'] = 'inbound' + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json[ + 'ip_version'] = 'ipv4' + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json[ + 'local'] = security_group_rule_local_prototype_model + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json[ + 'protocol'] = 'icmp' + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json[ + 'remote'] = security_group_rule_remote_prototype_model + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json[ + 'type'] = 8 # Construct a model instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP by calling from_dict on the json representation - security_group_rule_prototype_security_group_rule_protocol_icmp_model = SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.from_dict(security_group_rule_prototype_security_group_rule_protocol_icmp_model_json) + security_group_rule_prototype_security_group_rule_protocol_icmp_model = SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.from_dict( + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json + ) assert security_group_rule_prototype_security_group_rule_protocol_icmp_model != False # Construct a model instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP by calling from_dict on the json representation - security_group_rule_prototype_security_group_rule_protocol_icmp_model_dict = SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.from_dict(security_group_rule_prototype_security_group_rule_protocol_icmp_model_json).__dict__ - security_group_rule_prototype_security_group_rule_protocol_icmp_model2 = SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP(**security_group_rule_prototype_security_group_rule_protocol_icmp_model_dict) + security_group_rule_prototype_security_group_rule_protocol_icmp_model_dict = SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP.from_dict( + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json + ).__dict__ + security_group_rule_prototype_security_group_rule_protocol_icmp_model2 = SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP( + ** + security_group_rule_prototype_security_group_rule_protocol_icmp_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_prototype_security_group_rule_protocol_icmp_model == security_group_rule_prototype_security_group_rule_protocol_icmp_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json2 = security_group_rule_prototype_security_group_rule_protocol_icmp_model.to_dict() + security_group_rule_prototype_security_group_rule_protocol_icmp_model_json2 = security_group_rule_prototype_security_group_rule_protocol_icmp_model.to_dict( + ) assert security_group_rule_prototype_security_group_rule_protocol_icmp_model_json2 == security_group_rule_prototype_security_group_rule_protocol_icmp_model_json @@ -84970,42 +99401,60 @@ class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP: Test Class for SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP """ - def test_security_group_rule_prototype_security_group_rule_protocol_tcpudp_serialization(self): + def test_security_group_rule_prototype_security_group_rule_protocol_tcpudp_serialization( + self): """ Test serialization/deserialization for SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP """ # Construct dict forms of any model objects needed in order to build this model. - security_group_rule_local_prototype_model = {} # SecurityGroupRuleLocalPrototypeIP + security_group_rule_local_prototype_model = { + } # SecurityGroupRuleLocalPrototypeIP security_group_rule_local_prototype_model['address'] = '192.168.3.4' - security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP + security_group_rule_remote_prototype_model = { + } # SecurityGroupRuleRemotePrototypeIP security_group_rule_remote_prototype_model['address'] = '192.168.3.4' # Construct a json representation of a SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP model security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json = {} - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json['direction'] = 'inbound' - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json['ip_version'] = 'ipv4' - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json['local'] = security_group_rule_local_prototype_model - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json['port_max'] = 22 - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json['port_min'] = 22 - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json['protocol'] = 'udp' - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json['remote'] = security_group_rule_remote_prototype_model + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json[ + 'direction'] = 'inbound' + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json[ + 'ip_version'] = 'ipv4' + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json[ + 'local'] = security_group_rule_local_prototype_model + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json[ + 'port_max'] = 22 + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json[ + 'port_min'] = 22 + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json[ + 'protocol'] = 'udp' + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json[ + 'remote'] = security_group_rule_remote_prototype_model # Construct a model instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP by calling from_dict on the json representation - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model = SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.from_dict(security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json) + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model = SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.from_dict( + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json + ) assert security_group_rule_prototype_security_group_rule_protocol_tcpudp_model != False # Construct a model instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP by calling from_dict on the json representation - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_dict = SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.from_dict(security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json).__dict__ - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model2 = SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP(**security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_dict) + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_dict = SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP.from_dict( + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json + ).__dict__ + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model2 = SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP( + ** + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_prototype_security_group_rule_protocol_tcpudp_model == security_group_rule_prototype_security_group_rule_protocol_tcpudp_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json2 = security_group_rule_prototype_security_group_rule_protocol_tcpudp_model.to_dict() + security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json2 = security_group_rule_prototype_security_group_rule_protocol_tcpudp_model.to_dict( + ) assert security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json2 == security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json @@ -85021,21 +99470,26 @@ def test_security_group_rule_remote_patch_cidr_serialization(self): # Construct a json representation of a SecurityGroupRuleRemotePatchCIDR model security_group_rule_remote_patch_cidr_model_json = {} - security_group_rule_remote_patch_cidr_model_json['cidr_block'] = 'testString' + security_group_rule_remote_patch_cidr_model_json[ + 'cidr_block'] = '192.168.3.0/24' # Construct a model instance of SecurityGroupRuleRemotePatchCIDR by calling from_dict on the json representation - security_group_rule_remote_patch_cidr_model = SecurityGroupRuleRemotePatchCIDR.from_dict(security_group_rule_remote_patch_cidr_model_json) + security_group_rule_remote_patch_cidr_model = SecurityGroupRuleRemotePatchCIDR.from_dict( + security_group_rule_remote_patch_cidr_model_json) assert security_group_rule_remote_patch_cidr_model != False # Construct a model instance of SecurityGroupRuleRemotePatchCIDR by calling from_dict on the json representation - security_group_rule_remote_patch_cidr_model_dict = SecurityGroupRuleRemotePatchCIDR.from_dict(security_group_rule_remote_patch_cidr_model_json).__dict__ - security_group_rule_remote_patch_cidr_model2 = SecurityGroupRuleRemotePatchCIDR(**security_group_rule_remote_patch_cidr_model_dict) + security_group_rule_remote_patch_cidr_model_dict = SecurityGroupRuleRemotePatchCIDR.from_dict( + security_group_rule_remote_patch_cidr_model_json).__dict__ + security_group_rule_remote_patch_cidr_model2 = SecurityGroupRuleRemotePatchCIDR( + **security_group_rule_remote_patch_cidr_model_dict) # Verify the model instances are equivalent assert security_group_rule_remote_patch_cidr_model == security_group_rule_remote_patch_cidr_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_patch_cidr_model_json2 = security_group_rule_remote_patch_cidr_model.to_dict() + security_group_rule_remote_patch_cidr_model_json2 = security_group_rule_remote_patch_cidr_model.to_dict( + ) assert security_group_rule_remote_patch_cidr_model_json2 == security_group_rule_remote_patch_cidr_model_json @@ -85051,21 +99505,26 @@ def test_security_group_rule_remote_patch_ip_serialization(self): # Construct a json representation of a SecurityGroupRuleRemotePatchIP model security_group_rule_remote_patch_ip_model_json = {} - security_group_rule_remote_patch_ip_model_json['address'] = '192.168.3.4' + security_group_rule_remote_patch_ip_model_json[ + 'address'] = '192.168.3.4' # Construct a model instance of SecurityGroupRuleRemotePatchIP by calling from_dict on the json representation - security_group_rule_remote_patch_ip_model = SecurityGroupRuleRemotePatchIP.from_dict(security_group_rule_remote_patch_ip_model_json) + security_group_rule_remote_patch_ip_model = SecurityGroupRuleRemotePatchIP.from_dict( + security_group_rule_remote_patch_ip_model_json) assert security_group_rule_remote_patch_ip_model != False # Construct a model instance of SecurityGroupRuleRemotePatchIP by calling from_dict on the json representation - security_group_rule_remote_patch_ip_model_dict = SecurityGroupRuleRemotePatchIP.from_dict(security_group_rule_remote_patch_ip_model_json).__dict__ - security_group_rule_remote_patch_ip_model2 = SecurityGroupRuleRemotePatchIP(**security_group_rule_remote_patch_ip_model_dict) + security_group_rule_remote_patch_ip_model_dict = SecurityGroupRuleRemotePatchIP.from_dict( + security_group_rule_remote_patch_ip_model_json).__dict__ + security_group_rule_remote_patch_ip_model2 = SecurityGroupRuleRemotePatchIP( + **security_group_rule_remote_patch_ip_model_dict) # Verify the model instances are equivalent assert security_group_rule_remote_patch_ip_model == security_group_rule_remote_patch_ip_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_patch_ip_model_json2 = security_group_rule_remote_patch_ip_model.to_dict() + security_group_rule_remote_patch_ip_model_json2 = security_group_rule_remote_patch_ip_model.to_dict( + ) assert security_group_rule_remote_patch_ip_model_json2 == security_group_rule_remote_patch_ip_model_json @@ -85081,21 +99540,26 @@ def test_security_group_rule_remote_prototype_cidr_serialization(self): # Construct a json representation of a SecurityGroupRuleRemotePrototypeCIDR model security_group_rule_remote_prototype_cidr_model_json = {} - security_group_rule_remote_prototype_cidr_model_json['cidr_block'] = 'testString' + security_group_rule_remote_prototype_cidr_model_json[ + 'cidr_block'] = '192.168.3.0/24' # Construct a model instance of SecurityGroupRuleRemotePrototypeCIDR by calling from_dict on the json representation - security_group_rule_remote_prototype_cidr_model = SecurityGroupRuleRemotePrototypeCIDR.from_dict(security_group_rule_remote_prototype_cidr_model_json) + security_group_rule_remote_prototype_cidr_model = SecurityGroupRuleRemotePrototypeCIDR.from_dict( + security_group_rule_remote_prototype_cidr_model_json) assert security_group_rule_remote_prototype_cidr_model != False # Construct a model instance of SecurityGroupRuleRemotePrototypeCIDR by calling from_dict on the json representation - security_group_rule_remote_prototype_cidr_model_dict = SecurityGroupRuleRemotePrototypeCIDR.from_dict(security_group_rule_remote_prototype_cidr_model_json).__dict__ - security_group_rule_remote_prototype_cidr_model2 = SecurityGroupRuleRemotePrototypeCIDR(**security_group_rule_remote_prototype_cidr_model_dict) + security_group_rule_remote_prototype_cidr_model_dict = SecurityGroupRuleRemotePrototypeCIDR.from_dict( + security_group_rule_remote_prototype_cidr_model_json).__dict__ + security_group_rule_remote_prototype_cidr_model2 = SecurityGroupRuleRemotePrototypeCIDR( + **security_group_rule_remote_prototype_cidr_model_dict) # Verify the model instances are equivalent assert security_group_rule_remote_prototype_cidr_model == security_group_rule_remote_prototype_cidr_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_prototype_cidr_model_json2 = security_group_rule_remote_prototype_cidr_model.to_dict() + security_group_rule_remote_prototype_cidr_model_json2 = security_group_rule_remote_prototype_cidr_model.to_dict( + ) assert security_group_rule_remote_prototype_cidr_model_json2 == security_group_rule_remote_prototype_cidr_model_json @@ -85111,21 +99575,26 @@ def test_security_group_rule_remote_prototype_ip_serialization(self): # Construct a json representation of a SecurityGroupRuleRemotePrototypeIP model security_group_rule_remote_prototype_ip_model_json = {} - security_group_rule_remote_prototype_ip_model_json['address'] = '192.168.3.4' + security_group_rule_remote_prototype_ip_model_json[ + 'address'] = '192.168.3.4' # Construct a model instance of SecurityGroupRuleRemotePrototypeIP by calling from_dict on the json representation - security_group_rule_remote_prototype_ip_model = SecurityGroupRuleRemotePrototypeIP.from_dict(security_group_rule_remote_prototype_ip_model_json) + security_group_rule_remote_prototype_ip_model = SecurityGroupRuleRemotePrototypeIP.from_dict( + security_group_rule_remote_prototype_ip_model_json) assert security_group_rule_remote_prototype_ip_model != False # Construct a model instance of SecurityGroupRuleRemotePrototypeIP by calling from_dict on the json representation - security_group_rule_remote_prototype_ip_model_dict = SecurityGroupRuleRemotePrototypeIP.from_dict(security_group_rule_remote_prototype_ip_model_json).__dict__ - security_group_rule_remote_prototype_ip_model2 = SecurityGroupRuleRemotePrototypeIP(**security_group_rule_remote_prototype_ip_model_dict) + security_group_rule_remote_prototype_ip_model_dict = SecurityGroupRuleRemotePrototypeIP.from_dict( + security_group_rule_remote_prototype_ip_model_json).__dict__ + security_group_rule_remote_prototype_ip_model2 = SecurityGroupRuleRemotePrototypeIP( + **security_group_rule_remote_prototype_ip_model_dict) # Verify the model instances are equivalent assert security_group_rule_remote_prototype_ip_model == security_group_rule_remote_prototype_ip_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_prototype_ip_model_json2 = security_group_rule_remote_prototype_ip_model.to_dict() + security_group_rule_remote_prototype_ip_model_json2 = security_group_rule_remote_prototype_ip_model.to_dict( + ) assert security_group_rule_remote_prototype_ip_model_json2 == security_group_rule_remote_prototype_ip_model_json @@ -85141,21 +99610,26 @@ def test_security_group_rule_remote_cidr_serialization(self): # Construct a json representation of a SecurityGroupRuleRemoteCIDR model security_group_rule_remote_cidr_model_json = {} - security_group_rule_remote_cidr_model_json['cidr_block'] = 'testString' + security_group_rule_remote_cidr_model_json[ + 'cidr_block'] = '192.168.3.0/24' # Construct a model instance of SecurityGroupRuleRemoteCIDR by calling from_dict on the json representation - security_group_rule_remote_cidr_model = SecurityGroupRuleRemoteCIDR.from_dict(security_group_rule_remote_cidr_model_json) + security_group_rule_remote_cidr_model = SecurityGroupRuleRemoteCIDR.from_dict( + security_group_rule_remote_cidr_model_json) assert security_group_rule_remote_cidr_model != False # Construct a model instance of SecurityGroupRuleRemoteCIDR by calling from_dict on the json representation - security_group_rule_remote_cidr_model_dict = SecurityGroupRuleRemoteCIDR.from_dict(security_group_rule_remote_cidr_model_json).__dict__ - security_group_rule_remote_cidr_model2 = SecurityGroupRuleRemoteCIDR(**security_group_rule_remote_cidr_model_dict) + security_group_rule_remote_cidr_model_dict = SecurityGroupRuleRemoteCIDR.from_dict( + security_group_rule_remote_cidr_model_json).__dict__ + security_group_rule_remote_cidr_model2 = SecurityGroupRuleRemoteCIDR( + **security_group_rule_remote_cidr_model_dict) # Verify the model instances are equivalent assert security_group_rule_remote_cidr_model == security_group_rule_remote_cidr_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_cidr_model_json2 = security_group_rule_remote_cidr_model.to_dict() + security_group_rule_remote_cidr_model_json2 = security_group_rule_remote_cidr_model.to_dict( + ) assert security_group_rule_remote_cidr_model_json2 == security_group_rule_remote_cidr_model_json @@ -85174,18 +99648,22 @@ def test_security_group_rule_remote_ip_serialization(self): security_group_rule_remote_ip_model_json['address'] = '192.168.3.4' # Construct a model instance of SecurityGroupRuleRemoteIP by calling from_dict on the json representation - security_group_rule_remote_ip_model = SecurityGroupRuleRemoteIP.from_dict(security_group_rule_remote_ip_model_json) + security_group_rule_remote_ip_model = SecurityGroupRuleRemoteIP.from_dict( + security_group_rule_remote_ip_model_json) assert security_group_rule_remote_ip_model != False # Construct a model instance of SecurityGroupRuleRemoteIP by calling from_dict on the json representation - security_group_rule_remote_ip_model_dict = SecurityGroupRuleRemoteIP.from_dict(security_group_rule_remote_ip_model_json).__dict__ - security_group_rule_remote_ip_model2 = SecurityGroupRuleRemoteIP(**security_group_rule_remote_ip_model_dict) + security_group_rule_remote_ip_model_dict = SecurityGroupRuleRemoteIP.from_dict( + security_group_rule_remote_ip_model_json).__dict__ + security_group_rule_remote_ip_model2 = SecurityGroupRuleRemoteIP( + **security_group_rule_remote_ip_model_dict) # Verify the model instances are equivalent assert security_group_rule_remote_ip_model == security_group_rule_remote_ip_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_ip_model_json2 = security_group_rule_remote_ip_model.to_dict() + security_group_rule_remote_ip_model_json2 = security_group_rule_remote_ip_model.to_dict( + ) assert security_group_rule_remote_ip_model_json2 == security_group_rule_remote_ip_model_json @@ -85194,37 +99672,50 @@ class TestModel_SecurityGroupRuleRemoteSecurityGroupReference: Test Class for SecurityGroupRuleRemoteSecurityGroupReference """ - def test_security_group_rule_remote_security_group_reference_serialization(self): + def test_security_group_rule_remote_security_group_reference_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleRemoteSecurityGroupReference """ # Construct dict forms of any model objects needed in order to build this model. - security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted - security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + security_group_reference_deleted_model = { + } # SecurityGroupReferenceDeleted + security_group_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SecurityGroupRuleRemoteSecurityGroupReference model security_group_rule_remote_security_group_reference_model_json = {} - security_group_rule_remote_security_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_rule_remote_security_group_reference_model_json['deleted'] = security_group_reference_deleted_model - security_group_rule_remote_security_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_rule_remote_security_group_reference_model_json['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - security_group_rule_remote_security_group_reference_model_json['name'] = 'my-security-group' + security_group_rule_remote_security_group_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_security_group_reference_model_json[ + 'deleted'] = security_group_reference_deleted_model + security_group_rule_remote_security_group_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_security_group_reference_model_json[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_security_group_reference_model_json[ + 'name'] = 'my-security-group' # Construct a model instance of SecurityGroupRuleRemoteSecurityGroupReference by calling from_dict on the json representation - security_group_rule_remote_security_group_reference_model = SecurityGroupRuleRemoteSecurityGroupReference.from_dict(security_group_rule_remote_security_group_reference_model_json) + security_group_rule_remote_security_group_reference_model = SecurityGroupRuleRemoteSecurityGroupReference.from_dict( + security_group_rule_remote_security_group_reference_model_json) assert security_group_rule_remote_security_group_reference_model != False # Construct a model instance of SecurityGroupRuleRemoteSecurityGroupReference by calling from_dict on the json representation - security_group_rule_remote_security_group_reference_model_dict = SecurityGroupRuleRemoteSecurityGroupReference.from_dict(security_group_rule_remote_security_group_reference_model_json).__dict__ - security_group_rule_remote_security_group_reference_model2 = SecurityGroupRuleRemoteSecurityGroupReference(**security_group_rule_remote_security_group_reference_model_dict) + security_group_rule_remote_security_group_reference_model_dict = SecurityGroupRuleRemoteSecurityGroupReference.from_dict( + security_group_rule_remote_security_group_reference_model_json + ).__dict__ + security_group_rule_remote_security_group_reference_model2 = SecurityGroupRuleRemoteSecurityGroupReference( + **security_group_rule_remote_security_group_reference_model_dict) # Verify the model instances are equivalent assert security_group_rule_remote_security_group_reference_model == security_group_rule_remote_security_group_reference_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_security_group_reference_model_json2 = security_group_rule_remote_security_group_reference_model.to_dict() + security_group_rule_remote_security_group_reference_model_json2 = security_group_rule_remote_security_group_reference_model.to_dict( + ) assert security_group_rule_remote_security_group_reference_model_json2 == security_group_rule_remote_security_group_reference_model_json @@ -85233,7 +99724,8 @@ class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolAll: Test Class for SecurityGroupRuleSecurityGroupRuleProtocolAll """ - def test_security_group_rule_security_group_rule_protocol_all_serialization(self): + def test_security_group_rule_security_group_rule_protocol_all_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleSecurityGroupRuleProtocolAll """ @@ -85248,27 +99740,39 @@ def test_security_group_rule_security_group_rule_protocol_all_serialization(self # Construct a json representation of a SecurityGroupRuleSecurityGroupRuleProtocolAll model security_group_rule_security_group_rule_protocol_all_model_json = {} - security_group_rule_security_group_rule_protocol_all_model_json['direction'] = 'inbound' - security_group_rule_security_group_rule_protocol_all_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' - security_group_rule_security_group_rule_protocol_all_model_json['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' - security_group_rule_security_group_rule_protocol_all_model_json['ip_version'] = 'ipv4' - security_group_rule_security_group_rule_protocol_all_model_json['local'] = security_group_rule_local_model - security_group_rule_security_group_rule_protocol_all_model_json['remote'] = security_group_rule_remote_model - security_group_rule_security_group_rule_protocol_all_model_json['protocol'] = 'all' + security_group_rule_security_group_rule_protocol_all_model_json[ + 'direction'] = 'inbound' + security_group_rule_security_group_rule_protocol_all_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_all_model_json[ + 'id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_all_model_json[ + 'ip_version'] = 'ipv4' + security_group_rule_security_group_rule_protocol_all_model_json[ + 'local'] = security_group_rule_local_model + security_group_rule_security_group_rule_protocol_all_model_json[ + 'remote'] = security_group_rule_remote_model + security_group_rule_security_group_rule_protocol_all_model_json[ + 'protocol'] = 'all' # Construct a model instance of SecurityGroupRuleSecurityGroupRuleProtocolAll by calling from_dict on the json representation - security_group_rule_security_group_rule_protocol_all_model = SecurityGroupRuleSecurityGroupRuleProtocolAll.from_dict(security_group_rule_security_group_rule_protocol_all_model_json) + security_group_rule_security_group_rule_protocol_all_model = SecurityGroupRuleSecurityGroupRuleProtocolAll.from_dict( + security_group_rule_security_group_rule_protocol_all_model_json) assert security_group_rule_security_group_rule_protocol_all_model != False # Construct a model instance of SecurityGroupRuleSecurityGroupRuleProtocolAll by calling from_dict on the json representation - security_group_rule_security_group_rule_protocol_all_model_dict = SecurityGroupRuleSecurityGroupRuleProtocolAll.from_dict(security_group_rule_security_group_rule_protocol_all_model_json).__dict__ - security_group_rule_security_group_rule_protocol_all_model2 = SecurityGroupRuleSecurityGroupRuleProtocolAll(**security_group_rule_security_group_rule_protocol_all_model_dict) + security_group_rule_security_group_rule_protocol_all_model_dict = SecurityGroupRuleSecurityGroupRuleProtocolAll.from_dict( + security_group_rule_security_group_rule_protocol_all_model_json + ).__dict__ + security_group_rule_security_group_rule_protocol_all_model2 = SecurityGroupRuleSecurityGroupRuleProtocolAll( + **security_group_rule_security_group_rule_protocol_all_model_dict) # Verify the model instances are equivalent assert security_group_rule_security_group_rule_protocol_all_model == security_group_rule_security_group_rule_protocol_all_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_security_group_rule_protocol_all_model_json2 = security_group_rule_security_group_rule_protocol_all_model.to_dict() + security_group_rule_security_group_rule_protocol_all_model_json2 = security_group_rule_security_group_rule_protocol_all_model.to_dict( + ) assert security_group_rule_security_group_rule_protocol_all_model_json2 == security_group_rule_security_group_rule_protocol_all_model_json @@ -85277,7 +99781,8 @@ class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolICMP: Test Class for SecurityGroupRuleSecurityGroupRuleProtocolICMP """ - def test_security_group_rule_security_group_rule_protocol_icmp_serialization(self): + def test_security_group_rule_security_group_rule_protocol_icmp_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleSecurityGroupRuleProtocolICMP """ @@ -85292,29 +99797,43 @@ def test_security_group_rule_security_group_rule_protocol_icmp_serialization(sel # Construct a json representation of a SecurityGroupRuleSecurityGroupRuleProtocolICMP model security_group_rule_security_group_rule_protocol_icmp_model_json = {} - security_group_rule_security_group_rule_protocol_icmp_model_json['direction'] = 'inbound' - security_group_rule_security_group_rule_protocol_icmp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' - security_group_rule_security_group_rule_protocol_icmp_model_json['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' - security_group_rule_security_group_rule_protocol_icmp_model_json['ip_version'] = 'ipv4' - security_group_rule_security_group_rule_protocol_icmp_model_json['local'] = security_group_rule_local_model - security_group_rule_security_group_rule_protocol_icmp_model_json['remote'] = security_group_rule_remote_model - security_group_rule_security_group_rule_protocol_icmp_model_json['code'] = 0 - security_group_rule_security_group_rule_protocol_icmp_model_json['protocol'] = 'icmp' - security_group_rule_security_group_rule_protocol_icmp_model_json['type'] = 8 + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'direction'] = 'inbound' + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'ip_version'] = 'ipv4' + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'local'] = security_group_rule_local_model + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'remote'] = security_group_rule_remote_model + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'code'] = 0 + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'protocol'] = 'icmp' + security_group_rule_security_group_rule_protocol_icmp_model_json[ + 'type'] = 8 # Construct a model instance of SecurityGroupRuleSecurityGroupRuleProtocolICMP by calling from_dict on the json representation - security_group_rule_security_group_rule_protocol_icmp_model = SecurityGroupRuleSecurityGroupRuleProtocolICMP.from_dict(security_group_rule_security_group_rule_protocol_icmp_model_json) + security_group_rule_security_group_rule_protocol_icmp_model = SecurityGroupRuleSecurityGroupRuleProtocolICMP.from_dict( + security_group_rule_security_group_rule_protocol_icmp_model_json) assert security_group_rule_security_group_rule_protocol_icmp_model != False # Construct a model instance of SecurityGroupRuleSecurityGroupRuleProtocolICMP by calling from_dict on the json representation - security_group_rule_security_group_rule_protocol_icmp_model_dict = SecurityGroupRuleSecurityGroupRuleProtocolICMP.from_dict(security_group_rule_security_group_rule_protocol_icmp_model_json).__dict__ - security_group_rule_security_group_rule_protocol_icmp_model2 = SecurityGroupRuleSecurityGroupRuleProtocolICMP(**security_group_rule_security_group_rule_protocol_icmp_model_dict) + security_group_rule_security_group_rule_protocol_icmp_model_dict = SecurityGroupRuleSecurityGroupRuleProtocolICMP.from_dict( + security_group_rule_security_group_rule_protocol_icmp_model_json + ).__dict__ + security_group_rule_security_group_rule_protocol_icmp_model2 = SecurityGroupRuleSecurityGroupRuleProtocolICMP( + **security_group_rule_security_group_rule_protocol_icmp_model_dict) # Verify the model instances are equivalent assert security_group_rule_security_group_rule_protocol_icmp_model == security_group_rule_security_group_rule_protocol_icmp_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_security_group_rule_protocol_icmp_model_json2 = security_group_rule_security_group_rule_protocol_icmp_model.to_dict() + security_group_rule_security_group_rule_protocol_icmp_model_json2 = security_group_rule_security_group_rule_protocol_icmp_model.to_dict( + ) assert security_group_rule_security_group_rule_protocol_icmp_model_json2 == security_group_rule_security_group_rule_protocol_icmp_model_json @@ -85323,7 +99842,8 @@ class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP: Test Class for SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP """ - def test_security_group_rule_security_group_rule_protocol_tcpudp_serialization(self): + def test_security_group_rule_security_group_rule_protocol_tcpudp_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP """ @@ -85338,29 +99858,44 @@ def test_security_group_rule_security_group_rule_protocol_tcpudp_serialization(s # Construct a json representation of a SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP model security_group_rule_security_group_rule_protocol_tcpudp_model_json = {} - security_group_rule_security_group_rule_protocol_tcpudp_model_json['direction'] = 'inbound' - security_group_rule_security_group_rule_protocol_tcpudp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' - security_group_rule_security_group_rule_protocol_tcpudp_model_json['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' - security_group_rule_security_group_rule_protocol_tcpudp_model_json['ip_version'] = 'ipv4' - security_group_rule_security_group_rule_protocol_tcpudp_model_json['local'] = security_group_rule_local_model - security_group_rule_security_group_rule_protocol_tcpudp_model_json['remote'] = security_group_rule_remote_model - security_group_rule_security_group_rule_protocol_tcpudp_model_json['port_max'] = 22 - security_group_rule_security_group_rule_protocol_tcpudp_model_json['port_min'] = 22 - security_group_rule_security_group_rule_protocol_tcpudp_model_json['protocol'] = 'udp' + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'direction'] = 'inbound' + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'ip_version'] = 'ipv4' + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'local'] = security_group_rule_local_model + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'remote'] = security_group_rule_remote_model + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'port_max'] = 22 + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'port_min'] = 22 + security_group_rule_security_group_rule_protocol_tcpudp_model_json[ + 'protocol'] = 'udp' # Construct a model instance of SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP by calling from_dict on the json representation - security_group_rule_security_group_rule_protocol_tcpudp_model = SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.from_dict(security_group_rule_security_group_rule_protocol_tcpudp_model_json) + security_group_rule_security_group_rule_protocol_tcpudp_model = SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.from_dict( + security_group_rule_security_group_rule_protocol_tcpudp_model_json) assert security_group_rule_security_group_rule_protocol_tcpudp_model != False # Construct a model instance of SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP by calling from_dict on the json representation - security_group_rule_security_group_rule_protocol_tcpudp_model_dict = SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.from_dict(security_group_rule_security_group_rule_protocol_tcpudp_model_json).__dict__ - security_group_rule_security_group_rule_protocol_tcpudp_model2 = SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP(**security_group_rule_security_group_rule_protocol_tcpudp_model_dict) + security_group_rule_security_group_rule_protocol_tcpudp_model_dict = SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP.from_dict( + security_group_rule_security_group_rule_protocol_tcpudp_model_json + ).__dict__ + security_group_rule_security_group_rule_protocol_tcpudp_model2 = SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP( + ** + security_group_rule_security_group_rule_protocol_tcpudp_model_dict) # Verify the model instances are equivalent assert security_group_rule_security_group_rule_protocol_tcpudp_model == security_group_rule_security_group_rule_protocol_tcpudp_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_security_group_rule_protocol_tcpudp_model_json2 = security_group_rule_security_group_rule_protocol_tcpudp_model.to_dict() + security_group_rule_security_group_rule_protocol_tcpudp_model_json2 = security_group_rule_security_group_rule_protocol_tcpudp_model.to_dict( + ) assert security_group_rule_security_group_rule_protocol_tcpudp_model_json2 == security_group_rule_security_group_rule_protocol_tcpudp_model_json @@ -85369,37 +99904,53 @@ class TestModel_SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceRefer Test Class for SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext """ - def test_security_group_target_reference_bare_metal_server_network_interface_reference_target_context_serialization(self): + def test_security_group_target_reference_bare_metal_server_network_interface_reference_target_context_serialization( + self): """ Test serialization/deserialization for SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext """ # Construct dict forms of any model objects needed in order to build this model. - bare_metal_server_network_interface_reference_target_context_deleted_model = {} # BareMetalServerNetworkInterfaceReferenceTargetContextDeleted - bare_metal_server_network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + bare_metal_server_network_interface_reference_target_context_deleted_model = { + } # BareMetalServerNetworkInterfaceReferenceTargetContextDeleted + bare_metal_server_network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext model security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json = {} - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json['deleted'] = bare_metal_server_network_interface_reference_target_context_deleted_model - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json['name'] = 'my-bare-metal-server-network-interface' - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json['resource_type'] = 'network_interface' + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json[ + 'deleted'] = bare_metal_server_network_interface_reference_target_context_deleted_model + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json[ + 'name'] = 'my-bare-metal-server-network-interface' + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json[ + 'resource_type'] = 'network_interface' # Construct a model instance of SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model = SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict(security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json) + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model = SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict( + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json + ) assert security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model != False # Construct a model instance of SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_dict = SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict(security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json).__dict__ - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model2 = SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext(**security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_dict) + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_dict = SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.from_dict( + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json + ).__dict__ + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model2 = SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext( + ** + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_dict + ) # Verify the model instances are equivalent assert security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model == security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json2 = security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model.to_dict() + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json2 = security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model.to_dict( + ) assert security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json2 == security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json @@ -85408,38 +99959,55 @@ class TestModel_SecurityGroupTargetReferenceEndpointGatewayReference: Test Class for SecurityGroupTargetReferenceEndpointGatewayReference """ - def test_security_group_target_reference_endpoint_gateway_reference_serialization(self): + def test_security_group_target_reference_endpoint_gateway_reference_serialization( + self): """ Test serialization/deserialization for SecurityGroupTargetReferenceEndpointGatewayReference """ # Construct dict forms of any model objects needed in order to build this model. - endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted - endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + endpoint_gateway_reference_deleted_model = { + } # EndpointGatewayReferenceDeleted + endpoint_gateway_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SecurityGroupTargetReferenceEndpointGatewayReference model security_group_target_reference_endpoint_gateway_reference_model_json = {} - security_group_target_reference_endpoint_gateway_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - security_group_target_reference_endpoint_gateway_reference_model_json['deleted'] = endpoint_gateway_reference_deleted_model - security_group_target_reference_endpoint_gateway_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - security_group_target_reference_endpoint_gateway_reference_model_json['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - security_group_target_reference_endpoint_gateway_reference_model_json['name'] = 'my-endpoint-gateway' - security_group_target_reference_endpoint_gateway_reference_model_json['resource_type'] = 'endpoint_gateway' + security_group_target_reference_endpoint_gateway_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + security_group_target_reference_endpoint_gateway_reference_model_json[ + 'deleted'] = endpoint_gateway_reference_deleted_model + security_group_target_reference_endpoint_gateway_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + security_group_target_reference_endpoint_gateway_reference_model_json[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + security_group_target_reference_endpoint_gateway_reference_model_json[ + 'name'] = 'my-endpoint-gateway' + security_group_target_reference_endpoint_gateway_reference_model_json[ + 'resource_type'] = 'endpoint_gateway' # Construct a model instance of SecurityGroupTargetReferenceEndpointGatewayReference by calling from_dict on the json representation - security_group_target_reference_endpoint_gateway_reference_model = SecurityGroupTargetReferenceEndpointGatewayReference.from_dict(security_group_target_reference_endpoint_gateway_reference_model_json) + security_group_target_reference_endpoint_gateway_reference_model = SecurityGroupTargetReferenceEndpointGatewayReference.from_dict( + security_group_target_reference_endpoint_gateway_reference_model_json + ) assert security_group_target_reference_endpoint_gateway_reference_model != False # Construct a model instance of SecurityGroupTargetReferenceEndpointGatewayReference by calling from_dict on the json representation - security_group_target_reference_endpoint_gateway_reference_model_dict = SecurityGroupTargetReferenceEndpointGatewayReference.from_dict(security_group_target_reference_endpoint_gateway_reference_model_json).__dict__ - security_group_target_reference_endpoint_gateway_reference_model2 = SecurityGroupTargetReferenceEndpointGatewayReference(**security_group_target_reference_endpoint_gateway_reference_model_dict) + security_group_target_reference_endpoint_gateway_reference_model_dict = SecurityGroupTargetReferenceEndpointGatewayReference.from_dict( + security_group_target_reference_endpoint_gateway_reference_model_json + ).__dict__ + security_group_target_reference_endpoint_gateway_reference_model2 = SecurityGroupTargetReferenceEndpointGatewayReference( + ** + security_group_target_reference_endpoint_gateway_reference_model_dict + ) # Verify the model instances are equivalent assert security_group_target_reference_endpoint_gateway_reference_model == security_group_target_reference_endpoint_gateway_reference_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_reference_endpoint_gateway_reference_model_json2 = security_group_target_reference_endpoint_gateway_reference_model.to_dict() + security_group_target_reference_endpoint_gateway_reference_model_json2 = security_group_target_reference_endpoint_gateway_reference_model.to_dict( + ) assert security_group_target_reference_endpoint_gateway_reference_model_json2 == security_group_target_reference_endpoint_gateway_reference_model_json @@ -85448,38 +100016,53 @@ class TestModel_SecurityGroupTargetReferenceLoadBalancerReference: Test Class for SecurityGroupTargetReferenceLoadBalancerReference """ - def test_security_group_target_reference_load_balancer_reference_serialization(self): + def test_security_group_target_reference_load_balancer_reference_serialization( + self): """ Test serialization/deserialization for SecurityGroupTargetReferenceLoadBalancerReference """ # Construct dict forms of any model objects needed in order to build this model. - load_balancer_reference_deleted_model = {} # LoadBalancerReferenceDeleted - load_balancer_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + load_balancer_reference_deleted_model = { + } # LoadBalancerReferenceDeleted + load_balancer_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SecurityGroupTargetReferenceLoadBalancerReference model security_group_target_reference_load_balancer_reference_model_json = {} - security_group_target_reference_load_balancer_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - security_group_target_reference_load_balancer_reference_model_json['deleted'] = load_balancer_reference_deleted_model - security_group_target_reference_load_balancer_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - security_group_target_reference_load_balancer_reference_model_json['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - security_group_target_reference_load_balancer_reference_model_json['name'] = 'my-load-balancer' - security_group_target_reference_load_balancer_reference_model_json['resource_type'] = 'load_balancer' + security_group_target_reference_load_balancer_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + security_group_target_reference_load_balancer_reference_model_json[ + 'deleted'] = load_balancer_reference_deleted_model + security_group_target_reference_load_balancer_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + security_group_target_reference_load_balancer_reference_model_json[ + 'id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + security_group_target_reference_load_balancer_reference_model_json[ + 'name'] = 'my-load-balancer' + security_group_target_reference_load_balancer_reference_model_json[ + 'resource_type'] = 'load_balancer' # Construct a model instance of SecurityGroupTargetReferenceLoadBalancerReference by calling from_dict on the json representation - security_group_target_reference_load_balancer_reference_model = SecurityGroupTargetReferenceLoadBalancerReference.from_dict(security_group_target_reference_load_balancer_reference_model_json) + security_group_target_reference_load_balancer_reference_model = SecurityGroupTargetReferenceLoadBalancerReference.from_dict( + security_group_target_reference_load_balancer_reference_model_json) assert security_group_target_reference_load_balancer_reference_model != False # Construct a model instance of SecurityGroupTargetReferenceLoadBalancerReference by calling from_dict on the json representation - security_group_target_reference_load_balancer_reference_model_dict = SecurityGroupTargetReferenceLoadBalancerReference.from_dict(security_group_target_reference_load_balancer_reference_model_json).__dict__ - security_group_target_reference_load_balancer_reference_model2 = SecurityGroupTargetReferenceLoadBalancerReference(**security_group_target_reference_load_balancer_reference_model_dict) + security_group_target_reference_load_balancer_reference_model_dict = SecurityGroupTargetReferenceLoadBalancerReference.from_dict( + security_group_target_reference_load_balancer_reference_model_json + ).__dict__ + security_group_target_reference_load_balancer_reference_model2 = SecurityGroupTargetReferenceLoadBalancerReference( + ** + security_group_target_reference_load_balancer_reference_model_dict) # Verify the model instances are equivalent assert security_group_target_reference_load_balancer_reference_model == security_group_target_reference_load_balancer_reference_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_reference_load_balancer_reference_model_json2 = security_group_target_reference_load_balancer_reference_model.to_dict() + security_group_target_reference_load_balancer_reference_model_json2 = security_group_target_reference_load_balancer_reference_model.to_dict( + ) assert security_group_target_reference_load_balancer_reference_model_json2 == security_group_target_reference_load_balancer_reference_model_json @@ -85488,37 +100071,53 @@ class TestModel_SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetConte Test Class for SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext """ - def test_security_group_target_reference_network_interface_reference_target_context_serialization(self): + def test_security_group_target_reference_network_interface_reference_target_context_serialization( + self): """ Test serialization/deserialization for SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext """ # Construct dict forms of any model objects needed in order to build this model. - network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted - network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + network_interface_reference_target_context_deleted_model = { + } # NetworkInterfaceReferenceTargetContextDeleted + network_interface_reference_target_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext model security_group_target_reference_network_interface_reference_target_context_model_json = {} - security_group_target_reference_network_interface_reference_target_context_model_json['deleted'] = network_interface_reference_target_context_deleted_model - security_group_target_reference_network_interface_reference_target_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_network_interface_reference_target_context_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' - security_group_target_reference_network_interface_reference_target_context_model_json['name'] = 'my-instance-network-interface' - security_group_target_reference_network_interface_reference_target_context_model_json['resource_type'] = 'network_interface' + security_group_target_reference_network_interface_reference_target_context_model_json[ + 'deleted'] = network_interface_reference_target_context_deleted_model + security_group_target_reference_network_interface_reference_target_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_network_interface_reference_target_context_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + security_group_target_reference_network_interface_reference_target_context_model_json[ + 'name'] = 'my-instance-network-interface' + security_group_target_reference_network_interface_reference_target_context_model_json[ + 'resource_type'] = 'network_interface' # Construct a model instance of SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - security_group_target_reference_network_interface_reference_target_context_model = SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.from_dict(security_group_target_reference_network_interface_reference_target_context_model_json) + security_group_target_reference_network_interface_reference_target_context_model = SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.from_dict( + security_group_target_reference_network_interface_reference_target_context_model_json + ) assert security_group_target_reference_network_interface_reference_target_context_model != False # Construct a model instance of SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext by calling from_dict on the json representation - security_group_target_reference_network_interface_reference_target_context_model_dict = SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.from_dict(security_group_target_reference_network_interface_reference_target_context_model_json).__dict__ - security_group_target_reference_network_interface_reference_target_context_model2 = SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(**security_group_target_reference_network_interface_reference_target_context_model_dict) + security_group_target_reference_network_interface_reference_target_context_model_dict = SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.from_dict( + security_group_target_reference_network_interface_reference_target_context_model_json + ).__dict__ + security_group_target_reference_network_interface_reference_target_context_model2 = SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext( + ** + security_group_target_reference_network_interface_reference_target_context_model_dict + ) # Verify the model instances are equivalent assert security_group_target_reference_network_interface_reference_target_context_model == security_group_target_reference_network_interface_reference_target_context_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_reference_network_interface_reference_target_context_model_json2 = security_group_target_reference_network_interface_reference_target_context_model.to_dict() + security_group_target_reference_network_interface_reference_target_context_model_json2 = security_group_target_reference_network_interface_reference_target_context_model.to_dict( + ) assert security_group_target_reference_network_interface_reference_target_context_model_json2 == security_group_target_reference_network_interface_reference_target_context_model_json @@ -85527,7 +100126,8 @@ class TestModel_SecurityGroupTargetReferenceVPNServerReference: Test Class for SecurityGroupTargetReferenceVPNServerReference """ - def test_security_group_target_reference_vpn_server_reference_serialization(self): + def test_security_group_target_reference_vpn_server_reference_serialization( + self): """ Test serialization/deserialization for SecurityGroupTargetReferenceVPNServerReference """ @@ -85535,30 +100135,42 @@ def test_security_group_target_reference_vpn_server_reference_serialization(self # Construct dict forms of any model objects needed in order to build this model. vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted - vpn_server_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpn_server_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a SecurityGroupTargetReferenceVPNServerReference model security_group_target_reference_vpn_server_reference_model_json = {} - security_group_target_reference_vpn_server_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - security_group_target_reference_vpn_server_reference_model_json['deleted'] = vpn_server_reference_deleted_model - security_group_target_reference_vpn_server_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - security_group_target_reference_vpn_server_reference_model_json['id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' - security_group_target_reference_vpn_server_reference_model_json['name'] = 'my-vpn-server' - security_group_target_reference_vpn_server_reference_model_json['resource_type'] = 'vpn_server' + security_group_target_reference_vpn_server_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + security_group_target_reference_vpn_server_reference_model_json[ + 'deleted'] = vpn_server_reference_deleted_model + security_group_target_reference_vpn_server_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + security_group_target_reference_vpn_server_reference_model_json[ + 'id'] = 'r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + security_group_target_reference_vpn_server_reference_model_json[ + 'name'] = 'my-vpn-server' + security_group_target_reference_vpn_server_reference_model_json[ + 'resource_type'] = 'vpn_server' # Construct a model instance of SecurityGroupTargetReferenceVPNServerReference by calling from_dict on the json representation - security_group_target_reference_vpn_server_reference_model = SecurityGroupTargetReferenceVPNServerReference.from_dict(security_group_target_reference_vpn_server_reference_model_json) + security_group_target_reference_vpn_server_reference_model = SecurityGroupTargetReferenceVPNServerReference.from_dict( + security_group_target_reference_vpn_server_reference_model_json) assert security_group_target_reference_vpn_server_reference_model != False # Construct a model instance of SecurityGroupTargetReferenceVPNServerReference by calling from_dict on the json representation - security_group_target_reference_vpn_server_reference_model_dict = SecurityGroupTargetReferenceVPNServerReference.from_dict(security_group_target_reference_vpn_server_reference_model_json).__dict__ - security_group_target_reference_vpn_server_reference_model2 = SecurityGroupTargetReferenceVPNServerReference(**security_group_target_reference_vpn_server_reference_model_dict) + security_group_target_reference_vpn_server_reference_model_dict = SecurityGroupTargetReferenceVPNServerReference.from_dict( + security_group_target_reference_vpn_server_reference_model_json + ).__dict__ + security_group_target_reference_vpn_server_reference_model2 = SecurityGroupTargetReferenceVPNServerReference( + **security_group_target_reference_vpn_server_reference_model_dict) # Verify the model instances are equivalent assert security_group_target_reference_vpn_server_reference_model == security_group_target_reference_vpn_server_reference_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_reference_vpn_server_reference_model_json2 = security_group_target_reference_vpn_server_reference_model.to_dict() + security_group_target_reference_vpn_server_reference_model_json2 = security_group_target_reference_vpn_server_reference_model.to_dict( + ) assert security_group_target_reference_vpn_server_reference_model_json2 == security_group_target_reference_vpn_server_reference_model_json @@ -85567,65 +100179,201 @@ class TestModel_SecurityGroupTargetReferenceVirtualNetworkInterfaceReference: Test Class for SecurityGroupTargetReferenceVirtualNetworkInterfaceReference """ - def test_security_group_target_reference_virtual_network_interface_reference_serialization(self): + def test_security_group_target_reference_virtual_network_interface_reference_serialization( + self): """ Test serialization/deserialization for SecurityGroupTargetReferenceVirtualNetworkInterfaceReference """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_reference_deleted_model = {} # VirtualNetworkInterfaceReferenceDeleted - virtual_network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + virtual_network_interface_reference_deleted_model = { + } # VirtualNetworkInterfaceReferenceDeleted + virtual_network_interface_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a SecurityGroupTargetReferenceVirtualNetworkInterfaceReference model security_group_target_reference_virtual_network_interface_reference_model_json = {} - security_group_target_reference_virtual_network_interface_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - security_group_target_reference_virtual_network_interface_reference_model_json['deleted'] = virtual_network_interface_reference_deleted_model - security_group_target_reference_virtual_network_interface_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - security_group_target_reference_virtual_network_interface_reference_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' - security_group_target_reference_virtual_network_interface_reference_model_json['name'] = 'my-virtual-network-interface' - security_group_target_reference_virtual_network_interface_reference_model_json['primary_ip'] = reserved_ip_reference_model - security_group_target_reference_virtual_network_interface_reference_model_json['resource_type'] = 'virtual_network_interface' - security_group_target_reference_virtual_network_interface_reference_model_json['subnet'] = subnet_reference_model + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'deleted'] = virtual_network_interface_reference_deleted_model + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'name'] = 'my-virtual-network-interface' + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'primary_ip'] = reserved_ip_reference_model + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'resource_type'] = 'virtual_network_interface' + security_group_target_reference_virtual_network_interface_reference_model_json[ + 'subnet'] = subnet_reference_model # Construct a model instance of SecurityGroupTargetReferenceVirtualNetworkInterfaceReference by calling from_dict on the json representation - security_group_target_reference_virtual_network_interface_reference_model = SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.from_dict(security_group_target_reference_virtual_network_interface_reference_model_json) + security_group_target_reference_virtual_network_interface_reference_model = SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.from_dict( + security_group_target_reference_virtual_network_interface_reference_model_json + ) assert security_group_target_reference_virtual_network_interface_reference_model != False # Construct a model instance of SecurityGroupTargetReferenceVirtualNetworkInterfaceReference by calling from_dict on the json representation - security_group_target_reference_virtual_network_interface_reference_model_dict = SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.from_dict(security_group_target_reference_virtual_network_interface_reference_model_json).__dict__ - security_group_target_reference_virtual_network_interface_reference_model2 = SecurityGroupTargetReferenceVirtualNetworkInterfaceReference(**security_group_target_reference_virtual_network_interface_reference_model_dict) + security_group_target_reference_virtual_network_interface_reference_model_dict = SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.from_dict( + security_group_target_reference_virtual_network_interface_reference_model_json + ).__dict__ + security_group_target_reference_virtual_network_interface_reference_model2 = SecurityGroupTargetReferenceVirtualNetworkInterfaceReference( + ** + security_group_target_reference_virtual_network_interface_reference_model_dict + ) # Verify the model instances are equivalent assert security_group_target_reference_virtual_network_interface_reference_model == security_group_target_reference_virtual_network_interface_reference_model2 # Convert model instance back to dict and verify no loss of data - security_group_target_reference_virtual_network_interface_reference_model_json2 = security_group_target_reference_virtual_network_interface_reference_model.to_dict() + security_group_target_reference_virtual_network_interface_reference_model_json2 = security_group_target_reference_virtual_network_interface_reference_model.to_dict( + ) assert security_group_target_reference_virtual_network_interface_reference_model_json2 == security_group_target_reference_virtual_network_interface_reference_model_json +class TestModel_ShareAccessorBindingAccessorShareReference: + """ + Test Class for ShareAccessorBindingAccessorShareReference + """ + + def test_share_accessor_binding_accessor_share_reference_serialization( + self): + """ + Test serialization/deserialization for ShareAccessorBindingAccessorShareReference + """ + + # Construct dict forms of any model objects needed in order to build this model. + + share_reference_deleted_model = {} # ShareReferenceDeleted + share_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + account_reference_model = {} # AccountReference + account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' + account_reference_model['resource_type'] = 'account' + + region_reference_model = {} # RegionReference + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model['name'] = 'us-south' + + share_remote_model = {} # ShareRemote + share_remote_model['account'] = account_reference_model + share_remote_model['region'] = region_reference_model + + # Construct a json representation of a ShareAccessorBindingAccessorShareReference model + share_accessor_binding_accessor_share_reference_model_json = {} + share_accessor_binding_accessor_share_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_share_reference_model_json[ + 'deleted'] = share_reference_deleted_model + share_accessor_binding_accessor_share_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_share_reference_model_json[ + 'id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_accessor_binding_accessor_share_reference_model_json[ + 'name'] = 'my-share' + share_accessor_binding_accessor_share_reference_model_json[ + 'remote'] = share_remote_model + share_accessor_binding_accessor_share_reference_model_json[ + 'resource_type'] = 'share' + + # Construct a model instance of ShareAccessorBindingAccessorShareReference by calling from_dict on the json representation + share_accessor_binding_accessor_share_reference_model = ShareAccessorBindingAccessorShareReference.from_dict( + share_accessor_binding_accessor_share_reference_model_json) + assert share_accessor_binding_accessor_share_reference_model != False + + # Construct a model instance of ShareAccessorBindingAccessorShareReference by calling from_dict on the json representation + share_accessor_binding_accessor_share_reference_model_dict = ShareAccessorBindingAccessorShareReference.from_dict( + share_accessor_binding_accessor_share_reference_model_json).__dict__ + share_accessor_binding_accessor_share_reference_model2 = ShareAccessorBindingAccessorShareReference( + **share_accessor_binding_accessor_share_reference_model_dict) + + # Verify the model instances are equivalent + assert share_accessor_binding_accessor_share_reference_model == share_accessor_binding_accessor_share_reference_model2 + + # Convert model instance back to dict and verify no loss of data + share_accessor_binding_accessor_share_reference_model_json2 = share_accessor_binding_accessor_share_reference_model.to_dict( + ) + assert share_accessor_binding_accessor_share_reference_model_json2 == share_accessor_binding_accessor_share_reference_model_json + + +class TestModel_ShareAccessorBindingAccessorWatsonxMachineLearningReference: + """ + Test Class for ShareAccessorBindingAccessorWatsonxMachineLearningReference + """ + + def test_share_accessor_binding_accessor_watsonx_machine_learning_reference_serialization( + self): + """ + Test serialization/deserialization for ShareAccessorBindingAccessorWatsonxMachineLearningReference + """ + + # Construct a json representation of a ShareAccessorBindingAccessorWatsonxMachineLearningReference model + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json = {} + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json[ + 'crn'] = 'crn:v1:bluemix:public:pm-20:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:6500f05d-a5b5-4ecf-91ba-0d12b9dee607::' + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json[ + 'resource_type'] = 'watsonx_machine_learning' + + # Construct a model instance of ShareAccessorBindingAccessorWatsonxMachineLearningReference by calling from_dict on the json representation + share_accessor_binding_accessor_watsonx_machine_learning_reference_model = ShareAccessorBindingAccessorWatsonxMachineLearningReference.from_dict( + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json + ) + assert share_accessor_binding_accessor_watsonx_machine_learning_reference_model != False + + # Construct a model instance of ShareAccessorBindingAccessorWatsonxMachineLearningReference by calling from_dict on the json representation + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_dict = ShareAccessorBindingAccessorWatsonxMachineLearningReference.from_dict( + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json + ).__dict__ + share_accessor_binding_accessor_watsonx_machine_learning_reference_model2 = ShareAccessorBindingAccessorWatsonxMachineLearningReference( + ** + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_dict + ) + + # Verify the model instances are equivalent + assert share_accessor_binding_accessor_watsonx_machine_learning_reference_model == share_accessor_binding_accessor_watsonx_machine_learning_reference_model2 + + # Convert model instance back to dict and verify no loss of data + share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json2 = share_accessor_binding_accessor_watsonx_machine_learning_reference_model.to_dict( + ) + assert share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json2 == share_accessor_binding_accessor_watsonx_machine_learning_reference_model_json + + class TestModel_ShareIdentityByCRN: """ Test Class for ShareIdentityByCRN @@ -85638,21 +100386,26 @@ def test_share_identity_by_crn_serialization(self): # Construct a json representation of a ShareIdentityByCRN model share_identity_by_crn_model_json = {} - share_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:0fe9e5d8-0a4d-4818-96ec-e99708644a58' # Construct a model instance of ShareIdentityByCRN by calling from_dict on the json representation - share_identity_by_crn_model = ShareIdentityByCRN.from_dict(share_identity_by_crn_model_json) + share_identity_by_crn_model = ShareIdentityByCRN.from_dict( + share_identity_by_crn_model_json) assert share_identity_by_crn_model != False # Construct a model instance of ShareIdentityByCRN by calling from_dict on the json representation - share_identity_by_crn_model_dict = ShareIdentityByCRN.from_dict(share_identity_by_crn_model_json).__dict__ - share_identity_by_crn_model2 = ShareIdentityByCRN(**share_identity_by_crn_model_dict) + share_identity_by_crn_model_dict = ShareIdentityByCRN.from_dict( + share_identity_by_crn_model_json).__dict__ + share_identity_by_crn_model2 = ShareIdentityByCRN( + **share_identity_by_crn_model_dict) # Verify the model instances are equivalent assert share_identity_by_crn_model == share_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - share_identity_by_crn_model_json2 = share_identity_by_crn_model.to_dict() + share_identity_by_crn_model_json2 = share_identity_by_crn_model.to_dict( + ) assert share_identity_by_crn_model_json2 == share_identity_by_crn_model_json @@ -85668,21 +100421,26 @@ def test_share_identity_by_href_serialization(self): # Construct a json representation of a ShareIdentityByHref model share_identity_by_href_model_json = {} - share_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58' # Construct a model instance of ShareIdentityByHref by calling from_dict on the json representation - share_identity_by_href_model = ShareIdentityByHref.from_dict(share_identity_by_href_model_json) + share_identity_by_href_model = ShareIdentityByHref.from_dict( + share_identity_by_href_model_json) assert share_identity_by_href_model != False # Construct a model instance of ShareIdentityByHref by calling from_dict on the json representation - share_identity_by_href_model_dict = ShareIdentityByHref.from_dict(share_identity_by_href_model_json).__dict__ - share_identity_by_href_model2 = ShareIdentityByHref(**share_identity_by_href_model_dict) + share_identity_by_href_model_dict = ShareIdentityByHref.from_dict( + share_identity_by_href_model_json).__dict__ + share_identity_by_href_model2 = ShareIdentityByHref( + **share_identity_by_href_model_dict) # Verify the model instances are equivalent assert share_identity_by_href_model == share_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - share_identity_by_href_model_json2 = share_identity_by_href_model.to_dict() + share_identity_by_href_model_json2 = share_identity_by_href_model.to_dict( + ) assert share_identity_by_href_model_json2 == share_identity_by_href_model_json @@ -85698,15 +100456,19 @@ def test_share_identity_by_id_serialization(self): # Construct a json representation of a ShareIdentityById model share_identity_by_id_model_json = {} - share_identity_by_id_model_json['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' + share_identity_by_id_model_json[ + 'id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' # Construct a model instance of ShareIdentityById by calling from_dict on the json representation - share_identity_by_id_model = ShareIdentityById.from_dict(share_identity_by_id_model_json) + share_identity_by_id_model = ShareIdentityById.from_dict( + share_identity_by_id_model_json) assert share_identity_by_id_model != False # Construct a model instance of ShareIdentityById by calling from_dict on the json representation - share_identity_by_id_model_dict = ShareIdentityById.from_dict(share_identity_by_id_model_json).__dict__ - share_identity_by_id_model2 = ShareIdentityById(**share_identity_by_id_model_dict) + share_identity_by_id_model_dict = ShareIdentityById.from_dict( + share_identity_by_id_model_json).__dict__ + share_identity_by_id_model2 = ShareIdentityById( + **share_identity_by_id_model_dict) # Verify the model instances are equivalent assert share_identity_by_id_model == share_identity_by_id_model2 @@ -85721,62 +100483,94 @@ class TestModel_ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecu Test Class for ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup """ - def test_share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_serialization(self): + def test_share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_serialization( + self): """ Test serialization/deserialization for ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' - - share_mount_target_virtual_network_interface_prototype_model = {} # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model + subnet_identity_model[ + 'id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + + share_mount_target_virtual_network_interface_prototype_model = { + } # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model # Construct a json representation of a ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup model share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json = {} - share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json['name'] = 'my-share-mount-target' - share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json['transit_encryption'] = 'none' - share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json[ + 'name'] = 'my-share-mount-target' + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json[ + 'transit_encryption'] = 'none' + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model # Construct a model instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup by calling from_dict on the json representation - share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model = ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.from_dict(share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json) + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model = ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.from_dict( + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json + ) assert share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model != False # Construct a model instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup by calling from_dict on the json representation - share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_dict = ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.from_dict(share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json).__dict__ - share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model2 = ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(**share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_dict) + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_dict = ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.from_dict( + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json + ).__dict__ + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model2 = ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup( + ** + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_dict + ) # Verify the model instances are equivalent assert share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model == share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json2 = share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model.to_dict() + share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json2 = share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model.to_dict( + ) assert share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json2 == share_mount_target_prototype_share_mount_target_by_access_control_mode_security_group_model_json @@ -85785,7 +100579,8 @@ class TestModel_ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC: Test Class for ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC """ - def test_share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_serialization(self): + def test_share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_serialization( + self): """ Test serialization/deserialization for ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC """ @@ -85797,23 +100592,34 @@ def test_share_mount_target_prototype_share_mount_target_by_access_control_mode_ # Construct a json representation of a ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC model share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json = {} - share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json['name'] = 'my-share-mount-target' - share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json['transit_encryption'] = 'none' - share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json['vpc'] = vpc_identity_model + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json[ + 'name'] = 'my-share-mount-target' + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json[ + 'transit_encryption'] = 'none' + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json[ + 'vpc'] = vpc_identity_model # Construct a model instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC by calling from_dict on the json representation - share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model = ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.from_dict(share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json) + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model = ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.from_dict( + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json + ) assert share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model != False # Construct a model instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC by calling from_dict on the json representation - share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_dict = ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.from_dict(share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json).__dict__ - share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model2 = ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(**share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_dict) + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_dict = ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.from_dict( + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json + ).__dict__ + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model2 = ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC( + ** + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_dict + ) # Verify the model instances are equivalent assert share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model == share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json2 = share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model.to_dict() + share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json2 = share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model.to_dict( + ) assert share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json2 == share_mount_target_prototype_share_mount_target_by_access_control_mode_vpc_model_json @@ -85822,57 +100628,84 @@ class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkIn Test Class for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext """ - def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_serialization(self): + def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_serialization( + self): """ Test serialization/deserialization for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext """ # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' + subnet_identity_model[ + 'id'] = '2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5' # Construct a json representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext model share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json = {} - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json['subnet'] = subnet_identity_model + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json[ + 'subnet'] = subnet_identity_model # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model != False # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json).__dict__ - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext(**share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_dict) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json + ).__dict__ + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext( + ** + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_dict + ) # Verify the model instances are equivalent assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model.to_dict() + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model.to_dict( + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json2 == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model_json @@ -85894,18 +100727,22 @@ def test_share_profile_capacity_dependent_range_serialization(self): share_profile_capacity_dependent_range_model_json['type'] = 'dependent' # Construct a model instance of ShareProfileCapacityDependentRange by calling from_dict on the json representation - share_profile_capacity_dependent_range_model = ShareProfileCapacityDependentRange.from_dict(share_profile_capacity_dependent_range_model_json) + share_profile_capacity_dependent_range_model = ShareProfileCapacityDependentRange.from_dict( + share_profile_capacity_dependent_range_model_json) assert share_profile_capacity_dependent_range_model != False # Construct a model instance of ShareProfileCapacityDependentRange by calling from_dict on the json representation - share_profile_capacity_dependent_range_model_dict = ShareProfileCapacityDependentRange.from_dict(share_profile_capacity_dependent_range_model_json).__dict__ - share_profile_capacity_dependent_range_model2 = ShareProfileCapacityDependentRange(**share_profile_capacity_dependent_range_model_dict) + share_profile_capacity_dependent_range_model_dict = ShareProfileCapacityDependentRange.from_dict( + share_profile_capacity_dependent_range_model_json).__dict__ + share_profile_capacity_dependent_range_model2 = ShareProfileCapacityDependentRange( + **share_profile_capacity_dependent_range_model_dict) # Verify the model instances are equivalent assert share_profile_capacity_dependent_range_model == share_profile_capacity_dependent_range_model2 # Convert model instance back to dict and verify no loss of data - share_profile_capacity_dependent_range_model_json2 = share_profile_capacity_dependent_range_model.to_dict() + share_profile_capacity_dependent_range_model_json2 = share_profile_capacity_dependent_range_model.to_dict( + ) assert share_profile_capacity_dependent_range_model_json2 == share_profile_capacity_dependent_range_model_json @@ -85923,21 +100760,27 @@ def test_share_profile_capacity_enum_serialization(self): share_profile_capacity_enum_model_json = {} share_profile_capacity_enum_model_json['default'] = 38 share_profile_capacity_enum_model_json['type'] = 'enum' - share_profile_capacity_enum_model_json['values'] = [4800, 9600, 16000, 32000] + share_profile_capacity_enum_model_json['values'] = [ + 4800, 9600, 16000, 32000 + ] # Construct a model instance of ShareProfileCapacityEnum by calling from_dict on the json representation - share_profile_capacity_enum_model = ShareProfileCapacityEnum.from_dict(share_profile_capacity_enum_model_json) + share_profile_capacity_enum_model = ShareProfileCapacityEnum.from_dict( + share_profile_capacity_enum_model_json) assert share_profile_capacity_enum_model != False # Construct a model instance of ShareProfileCapacityEnum by calling from_dict on the json representation - share_profile_capacity_enum_model_dict = ShareProfileCapacityEnum.from_dict(share_profile_capacity_enum_model_json).__dict__ - share_profile_capacity_enum_model2 = ShareProfileCapacityEnum(**share_profile_capacity_enum_model_dict) + share_profile_capacity_enum_model_dict = ShareProfileCapacityEnum.from_dict( + share_profile_capacity_enum_model_json).__dict__ + share_profile_capacity_enum_model2 = ShareProfileCapacityEnum( + **share_profile_capacity_enum_model_dict) # Verify the model instances are equivalent assert share_profile_capacity_enum_model == share_profile_capacity_enum_model2 # Convert model instance back to dict and verify no loss of data - share_profile_capacity_enum_model_json2 = share_profile_capacity_enum_model.to_dict() + share_profile_capacity_enum_model_json2 = share_profile_capacity_enum_model.to_dict( + ) assert share_profile_capacity_enum_model_json2 == share_profile_capacity_enum_model_json @@ -85957,18 +100800,22 @@ def test_share_profile_capacity_fixed_serialization(self): share_profile_capacity_fixed_model_json['value'] = 4800 # Construct a model instance of ShareProfileCapacityFixed by calling from_dict on the json representation - share_profile_capacity_fixed_model = ShareProfileCapacityFixed.from_dict(share_profile_capacity_fixed_model_json) + share_profile_capacity_fixed_model = ShareProfileCapacityFixed.from_dict( + share_profile_capacity_fixed_model_json) assert share_profile_capacity_fixed_model != False # Construct a model instance of ShareProfileCapacityFixed by calling from_dict on the json representation - share_profile_capacity_fixed_model_dict = ShareProfileCapacityFixed.from_dict(share_profile_capacity_fixed_model_json).__dict__ - share_profile_capacity_fixed_model2 = ShareProfileCapacityFixed(**share_profile_capacity_fixed_model_dict) + share_profile_capacity_fixed_model_dict = ShareProfileCapacityFixed.from_dict( + share_profile_capacity_fixed_model_json).__dict__ + share_profile_capacity_fixed_model2 = ShareProfileCapacityFixed( + **share_profile_capacity_fixed_model_dict) # Verify the model instances are equivalent assert share_profile_capacity_fixed_model == share_profile_capacity_fixed_model2 # Convert model instance back to dict and verify no loss of data - share_profile_capacity_fixed_model_json2 = share_profile_capacity_fixed_model.to_dict() + share_profile_capacity_fixed_model_json2 = share_profile_capacity_fixed_model.to_dict( + ) assert share_profile_capacity_fixed_model_json2 == share_profile_capacity_fixed_model_json @@ -85991,18 +100838,22 @@ def test_share_profile_capacity_range_serialization(self): share_profile_capacity_range_model_json['type'] = 'range' # Construct a model instance of ShareProfileCapacityRange by calling from_dict on the json representation - share_profile_capacity_range_model = ShareProfileCapacityRange.from_dict(share_profile_capacity_range_model_json) + share_profile_capacity_range_model = ShareProfileCapacityRange.from_dict( + share_profile_capacity_range_model_json) assert share_profile_capacity_range_model != False # Construct a model instance of ShareProfileCapacityRange by calling from_dict on the json representation - share_profile_capacity_range_model_dict = ShareProfileCapacityRange.from_dict(share_profile_capacity_range_model_json).__dict__ - share_profile_capacity_range_model2 = ShareProfileCapacityRange(**share_profile_capacity_range_model_dict) + share_profile_capacity_range_model_dict = ShareProfileCapacityRange.from_dict( + share_profile_capacity_range_model_json).__dict__ + share_profile_capacity_range_model2 = ShareProfileCapacityRange( + **share_profile_capacity_range_model_dict) # Verify the model instances are equivalent assert share_profile_capacity_range_model == share_profile_capacity_range_model2 # Convert model instance back to dict and verify no loss of data - share_profile_capacity_range_model_json2 = share_profile_capacity_range_model.to_dict() + share_profile_capacity_range_model_json2 = share_profile_capacity_range_model.to_dict( + ) assert share_profile_capacity_range_model_json2 == share_profile_capacity_range_model_json @@ -86024,18 +100875,22 @@ def test_share_profile_iops_dependent_range_serialization(self): share_profile_iops_dependent_range_model_json['type'] = 'dependent' # Construct a model instance of ShareProfileIOPSDependentRange by calling from_dict on the json representation - share_profile_iops_dependent_range_model = ShareProfileIOPSDependentRange.from_dict(share_profile_iops_dependent_range_model_json) + share_profile_iops_dependent_range_model = ShareProfileIOPSDependentRange.from_dict( + share_profile_iops_dependent_range_model_json) assert share_profile_iops_dependent_range_model != False # Construct a model instance of ShareProfileIOPSDependentRange by calling from_dict on the json representation - share_profile_iops_dependent_range_model_dict = ShareProfileIOPSDependentRange.from_dict(share_profile_iops_dependent_range_model_json).__dict__ - share_profile_iops_dependent_range_model2 = ShareProfileIOPSDependentRange(**share_profile_iops_dependent_range_model_dict) + share_profile_iops_dependent_range_model_dict = ShareProfileIOPSDependentRange.from_dict( + share_profile_iops_dependent_range_model_json).__dict__ + share_profile_iops_dependent_range_model2 = ShareProfileIOPSDependentRange( + **share_profile_iops_dependent_range_model_dict) # Verify the model instances are equivalent assert share_profile_iops_dependent_range_model == share_profile_iops_dependent_range_model2 # Convert model instance back to dict and verify no loss of data - share_profile_iops_dependent_range_model_json2 = share_profile_iops_dependent_range_model.to_dict() + share_profile_iops_dependent_range_model_json2 = share_profile_iops_dependent_range_model.to_dict( + ) assert share_profile_iops_dependent_range_model_json2 == share_profile_iops_dependent_range_model_json @@ -86056,18 +100911,22 @@ def test_share_profile_iops_enum_serialization(self): share_profile_iops_enum_model_json['values'] = [1000, 2000, 4000] # Construct a model instance of ShareProfileIOPSEnum by calling from_dict on the json representation - share_profile_iops_enum_model = ShareProfileIOPSEnum.from_dict(share_profile_iops_enum_model_json) + share_profile_iops_enum_model = ShareProfileIOPSEnum.from_dict( + share_profile_iops_enum_model_json) assert share_profile_iops_enum_model != False # Construct a model instance of ShareProfileIOPSEnum by calling from_dict on the json representation - share_profile_iops_enum_model_dict = ShareProfileIOPSEnum.from_dict(share_profile_iops_enum_model_json).__dict__ - share_profile_iops_enum_model2 = ShareProfileIOPSEnum(**share_profile_iops_enum_model_dict) + share_profile_iops_enum_model_dict = ShareProfileIOPSEnum.from_dict( + share_profile_iops_enum_model_json).__dict__ + share_profile_iops_enum_model2 = ShareProfileIOPSEnum( + **share_profile_iops_enum_model_dict) # Verify the model instances are equivalent assert share_profile_iops_enum_model == share_profile_iops_enum_model2 # Convert model instance back to dict and verify no loss of data - share_profile_iops_enum_model_json2 = share_profile_iops_enum_model.to_dict() + share_profile_iops_enum_model_json2 = share_profile_iops_enum_model.to_dict( + ) assert share_profile_iops_enum_model_json2 == share_profile_iops_enum_model_json @@ -86087,18 +100946,22 @@ def test_share_profile_iops_fixed_serialization(self): share_profile_iops_fixed_model_json['value'] = 4000 # Construct a model instance of ShareProfileIOPSFixed by calling from_dict on the json representation - share_profile_iops_fixed_model = ShareProfileIOPSFixed.from_dict(share_profile_iops_fixed_model_json) + share_profile_iops_fixed_model = ShareProfileIOPSFixed.from_dict( + share_profile_iops_fixed_model_json) assert share_profile_iops_fixed_model != False # Construct a model instance of ShareProfileIOPSFixed by calling from_dict on the json representation - share_profile_iops_fixed_model_dict = ShareProfileIOPSFixed.from_dict(share_profile_iops_fixed_model_json).__dict__ - share_profile_iops_fixed_model2 = ShareProfileIOPSFixed(**share_profile_iops_fixed_model_dict) + share_profile_iops_fixed_model_dict = ShareProfileIOPSFixed.from_dict( + share_profile_iops_fixed_model_json).__dict__ + share_profile_iops_fixed_model2 = ShareProfileIOPSFixed( + **share_profile_iops_fixed_model_dict) # Verify the model instances are equivalent assert share_profile_iops_fixed_model == share_profile_iops_fixed_model2 # Convert model instance back to dict and verify no loss of data - share_profile_iops_fixed_model_json2 = share_profile_iops_fixed_model.to_dict() + share_profile_iops_fixed_model_json2 = share_profile_iops_fixed_model.to_dict( + ) assert share_profile_iops_fixed_model_json2 == share_profile_iops_fixed_model_json @@ -86121,18 +100984,22 @@ def test_share_profile_iops_range_serialization(self): share_profile_iops_range_model_json['type'] = 'range' # Construct a model instance of ShareProfileIOPSRange by calling from_dict on the json representation - share_profile_iops_range_model = ShareProfileIOPSRange.from_dict(share_profile_iops_range_model_json) + share_profile_iops_range_model = ShareProfileIOPSRange.from_dict( + share_profile_iops_range_model_json) assert share_profile_iops_range_model != False # Construct a model instance of ShareProfileIOPSRange by calling from_dict on the json representation - share_profile_iops_range_model_dict = ShareProfileIOPSRange.from_dict(share_profile_iops_range_model_json).__dict__ - share_profile_iops_range_model2 = ShareProfileIOPSRange(**share_profile_iops_range_model_dict) + share_profile_iops_range_model_dict = ShareProfileIOPSRange.from_dict( + share_profile_iops_range_model_json).__dict__ + share_profile_iops_range_model2 = ShareProfileIOPSRange( + **share_profile_iops_range_model_dict) # Verify the model instances are equivalent assert share_profile_iops_range_model == share_profile_iops_range_model2 # Convert model instance back to dict and verify no loss of data - share_profile_iops_range_model_json2 = share_profile_iops_range_model.to_dict() + share_profile_iops_range_model_json2 = share_profile_iops_range_model.to_dict( + ) assert share_profile_iops_range_model_json2 == share_profile_iops_range_model_json @@ -86148,21 +101015,26 @@ def test_share_profile_identity_by_href_serialization(self): # Construct a json representation of a ShareProfileIdentityByHref model share_profile_identity_by_href_model_json = {} - share_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' + share_profile_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/share/profiles/tier-3iops' # Construct a model instance of ShareProfileIdentityByHref by calling from_dict on the json representation - share_profile_identity_by_href_model = ShareProfileIdentityByHref.from_dict(share_profile_identity_by_href_model_json) + share_profile_identity_by_href_model = ShareProfileIdentityByHref.from_dict( + share_profile_identity_by_href_model_json) assert share_profile_identity_by_href_model != False # Construct a model instance of ShareProfileIdentityByHref by calling from_dict on the json representation - share_profile_identity_by_href_model_dict = ShareProfileIdentityByHref.from_dict(share_profile_identity_by_href_model_json).__dict__ - share_profile_identity_by_href_model2 = ShareProfileIdentityByHref(**share_profile_identity_by_href_model_dict) + share_profile_identity_by_href_model_dict = ShareProfileIdentityByHref.from_dict( + share_profile_identity_by_href_model_json).__dict__ + share_profile_identity_by_href_model2 = ShareProfileIdentityByHref( + **share_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert share_profile_identity_by_href_model == share_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - share_profile_identity_by_href_model_json2 = share_profile_identity_by_href_model.to_dict() + share_profile_identity_by_href_model_json2 = share_profile_identity_by_href_model.to_dict( + ) assert share_profile_identity_by_href_model_json2 == share_profile_identity_by_href_model_json @@ -86181,21 +101053,153 @@ def test_share_profile_identity_by_name_serialization(self): share_profile_identity_by_name_model_json['name'] = 'tier-3iops' # Construct a model instance of ShareProfileIdentityByName by calling from_dict on the json representation - share_profile_identity_by_name_model = ShareProfileIdentityByName.from_dict(share_profile_identity_by_name_model_json) + share_profile_identity_by_name_model = ShareProfileIdentityByName.from_dict( + share_profile_identity_by_name_model_json) assert share_profile_identity_by_name_model != False # Construct a model instance of ShareProfileIdentityByName by calling from_dict on the json representation - share_profile_identity_by_name_model_dict = ShareProfileIdentityByName.from_dict(share_profile_identity_by_name_model_json).__dict__ - share_profile_identity_by_name_model2 = ShareProfileIdentityByName(**share_profile_identity_by_name_model_dict) + share_profile_identity_by_name_model_dict = ShareProfileIdentityByName.from_dict( + share_profile_identity_by_name_model_json).__dict__ + share_profile_identity_by_name_model2 = ShareProfileIdentityByName( + **share_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert share_profile_identity_by_name_model == share_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - share_profile_identity_by_name_model_json2 = share_profile_identity_by_name_model.to_dict() + share_profile_identity_by_name_model_json2 = share_profile_identity_by_name_model.to_dict( + ) assert share_profile_identity_by_name_model_json2 == share_profile_identity_by_name_model_json +class TestModel_SharePrototypeShareByOriginShare: + """ + Test Class for SharePrototypeShareByOriginShare + """ + + def test_share_prototype_share_by_origin_share_serialization(self): + """ + Test serialization/deserialization for SharePrototypeShareByOriginShare + """ + + # Construct dict forms of any model objects needed in order to build this model. + + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' + virtual_network_interface_ip_prototype_model['auto_delete'] = False + virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' + + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' + + resource_group_identity_model = {} # ResourceGroupIdentityById + resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + + security_group_identity_model = {} # SecurityGroupIdentityById + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + + subnet_identity_model = {} # SubnetIdentityById + subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + + share_mount_target_virtual_network_interface_prototype_model = { + } # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model + + share_mount_target_prototype_model = { + } # ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup + share_mount_target_prototype_model['name'] = 'my-share-mount-target' + share_mount_target_prototype_model['transit_encryption'] = 'none' + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + + share_profile_identity_model = {} # ShareProfileIdentityByName + share_profile_identity_model['name'] = 'tier-3iops' + + zone_identity_model = {} # ZoneIdentityByName + zone_identity_model['name'] = 'us-south-1' + + share_prototype_share_context_model = {} # SharePrototypeShareContext + share_prototype_share_context_model[ + 'allowed_transit_encryption_modes'] = ['none'] + share_prototype_share_context_model['iops'] = 100 + share_prototype_share_context_model['mount_targets'] = [ + share_mount_target_prototype_model + ] + share_prototype_share_context_model['name'] = 'my-share' + share_prototype_share_context_model[ + 'profile'] = share_profile_identity_model + share_prototype_share_context_model[ + 'replication_cron_spec'] = '0 */5 * * *' + share_prototype_share_context_model[ + 'resource_group'] = resource_group_identity_model + share_prototype_share_context_model['user_tags'] = [] + share_prototype_share_context_model['zone'] = zone_identity_model + + share_identity_model = {} # ShareIdentityById + share_identity_model['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' + + # Construct a json representation of a SharePrototypeShareByOriginShare model + share_prototype_share_by_origin_share_model_json = {} + share_prototype_share_by_origin_share_model_json[ + 'allowed_transit_encryption_modes'] = ['none'] + share_prototype_share_by_origin_share_model_json['mount_targets'] = [ + share_mount_target_prototype_model + ] + share_prototype_share_by_origin_share_model_json['name'] = 'my-share' + share_prototype_share_by_origin_share_model_json[ + 'replica_share'] = share_prototype_share_context_model + share_prototype_share_by_origin_share_model_json['user_tags'] = [] + share_prototype_share_by_origin_share_model_json[ + 'origin_share'] = share_identity_model + + # Construct a model instance of SharePrototypeShareByOriginShare by calling from_dict on the json representation + share_prototype_share_by_origin_share_model = SharePrototypeShareByOriginShare.from_dict( + share_prototype_share_by_origin_share_model_json) + assert share_prototype_share_by_origin_share_model != False + + # Construct a model instance of SharePrototypeShareByOriginShare by calling from_dict on the json representation + share_prototype_share_by_origin_share_model_dict = SharePrototypeShareByOriginShare.from_dict( + share_prototype_share_by_origin_share_model_json).__dict__ + share_prototype_share_by_origin_share_model2 = SharePrototypeShareByOriginShare( + **share_prototype_share_by_origin_share_model_dict) + + # Verify the model instances are equivalent + assert share_prototype_share_by_origin_share_model == share_prototype_share_by_origin_share_model2 + + # Convert model instance back to dict and verify no loss of data + share_prototype_share_by_origin_share_model_json2 = share_prototype_share_by_origin_share_model.to_dict( + ) + assert share_prototype_share_by_origin_share_model_json2 == share_prototype_share_by_origin_share_model_json + + class TestModel_SharePrototypeShareBySize: """ Test Class for SharePrototypeShareBySize @@ -86208,40 +101212,61 @@ def test_share_prototype_share_by_size_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - share_mount_target_virtual_network_interface_prototype_model = {} # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model - - share_mount_target_prototype_model = {} # ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup + share_mount_target_virtual_network_interface_prototype_model = { + } # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model + + share_mount_target_prototype_model = { + } # ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup share_mount_target_prototype_model['name'] = 'my-share-mount-target' share_mount_target_prototype_model['transit_encryption'] = 'none' - share_mount_target_prototype_model['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model share_profile_identity_model = {} # ShareProfileIdentityByName share_profile_identity_model['name'] = 'tier-3iops' @@ -86250,17 +101275,25 @@ def test_share_prototype_share_by_size_serialization(self): zone_identity_model['name'] = 'us-south-1' share_prototype_share_context_model = {} # SharePrototypeShareContext + share_prototype_share_context_model[ + 'allowed_transit_encryption_modes'] = ['none'] share_prototype_share_context_model['iops'] = 100 - share_prototype_share_context_model['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_context_model['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_share_context_model['name'] = 'my-share' - share_prototype_share_context_model['profile'] = share_profile_identity_model - share_prototype_share_context_model['replication_cron_spec'] = '0 */5 * * *' - share_prototype_share_context_model['resource_group'] = resource_group_identity_model + share_prototype_share_context_model[ + 'profile'] = share_profile_identity_model + share_prototype_share_context_model[ + 'replication_cron_spec'] = '0 */5 * * *' + share_prototype_share_context_model[ + 'resource_group'] = resource_group_identity_model share_prototype_share_context_model['user_tags'] = [] share_prototype_share_context_model['zone'] = zone_identity_model encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' share_initial_owner_model = {} # ShareInitialOwner share_initial_owner_model['gid'] = 50 @@ -86268,32 +101301,46 @@ def test_share_prototype_share_by_size_serialization(self): # Construct a json representation of a SharePrototypeShareBySize model share_prototype_share_by_size_model_json = {} - share_prototype_share_by_size_model_json['iops'] = 100 - share_prototype_share_by_size_model_json['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_by_size_model_json[ + 'allowed_transit_encryption_modes'] = ['none'] + share_prototype_share_by_size_model_json['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_share_by_size_model_json['name'] = 'my-share' - share_prototype_share_by_size_model_json['profile'] = share_profile_identity_model - share_prototype_share_by_size_model_json['replica_share'] = share_prototype_share_context_model + share_prototype_share_by_size_model_json[ + 'replica_share'] = share_prototype_share_context_model share_prototype_share_by_size_model_json['user_tags'] = [] - share_prototype_share_by_size_model_json['zone'] = zone_identity_model - share_prototype_share_by_size_model_json['access_control_mode'] = 'security_group' - share_prototype_share_by_size_model_json['encryption_key'] = encryption_key_identity_model - share_prototype_share_by_size_model_json['initial_owner'] = share_initial_owner_model - share_prototype_share_by_size_model_json['resource_group'] = resource_group_identity_model + share_prototype_share_by_size_model_json[ + 'access_control_mode'] = 'security_group' + share_prototype_share_by_size_model_json[ + 'encryption_key'] = encryption_key_identity_model + share_prototype_share_by_size_model_json[ + 'initial_owner'] = share_initial_owner_model + share_prototype_share_by_size_model_json['iops'] = 100 + share_prototype_share_by_size_model_json[ + 'profile'] = share_profile_identity_model + share_prototype_share_by_size_model_json[ + 'resource_group'] = resource_group_identity_model share_prototype_share_by_size_model_json['size'] = 200 + share_prototype_share_by_size_model_json['zone'] = zone_identity_model # Construct a model instance of SharePrototypeShareBySize by calling from_dict on the json representation - share_prototype_share_by_size_model = SharePrototypeShareBySize.from_dict(share_prototype_share_by_size_model_json) + share_prototype_share_by_size_model = SharePrototypeShareBySize.from_dict( + share_prototype_share_by_size_model_json) assert share_prototype_share_by_size_model != False # Construct a model instance of SharePrototypeShareBySize by calling from_dict on the json representation - share_prototype_share_by_size_model_dict = SharePrototypeShareBySize.from_dict(share_prototype_share_by_size_model_json).__dict__ - share_prototype_share_by_size_model2 = SharePrototypeShareBySize(**share_prototype_share_by_size_model_dict) + share_prototype_share_by_size_model_dict = SharePrototypeShareBySize.from_dict( + share_prototype_share_by_size_model_json).__dict__ + share_prototype_share_by_size_model2 = SharePrototypeShareBySize( + **share_prototype_share_by_size_model_dict) # Verify the model instances are equivalent assert share_prototype_share_by_size_model == share_prototype_share_by_size_model2 # Convert model instance back to dict and verify no loss of data - share_prototype_share_by_size_model_json2 = share_prototype_share_by_size_model.to_dict() + share_prototype_share_by_size_model_json2 = share_prototype_share_by_size_model.to_dict( + ) assert share_prototype_share_by_size_model_json2 == share_prototype_share_by_size_model_json @@ -86309,40 +101356,61 @@ def test_share_prototype_share_by_source_share_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - share_mount_target_virtual_network_interface_prototype_model = {} # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext - share_mount_target_virtual_network_interface_prototype_model['allow_ip_spoofing'] = True - share_mount_target_virtual_network_interface_prototype_model['auto_delete'] = False - share_mount_target_virtual_network_interface_prototype_model['enable_infrastructure_nat'] = True - share_mount_target_virtual_network_interface_prototype_model['ips'] = [virtual_network_interface_ip_prototype_model] - share_mount_target_virtual_network_interface_prototype_model['name'] = 'my-virtual-network-interface' - share_mount_target_virtual_network_interface_prototype_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - share_mount_target_virtual_network_interface_prototype_model['resource_group'] = resource_group_identity_model - share_mount_target_virtual_network_interface_prototype_model['security_groups'] = [security_group_identity_model] - share_mount_target_virtual_network_interface_prototype_model['subnet'] = subnet_identity_model - - share_mount_target_prototype_model = {} # ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup + share_mount_target_virtual_network_interface_prototype_model = { + } # ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext + share_mount_target_virtual_network_interface_prototype_model[ + 'allow_ip_spoofing'] = True + share_mount_target_virtual_network_interface_prototype_model[ + 'auto_delete'] = False + share_mount_target_virtual_network_interface_prototype_model[ + 'enable_infrastructure_nat'] = True + share_mount_target_virtual_network_interface_prototype_model['ips'] = [ + virtual_network_interface_ip_prototype_model + ] + share_mount_target_virtual_network_interface_prototype_model[ + 'name'] = 'my-virtual-network-interface' + share_mount_target_virtual_network_interface_prototype_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + share_mount_target_virtual_network_interface_prototype_model[ + 'protocol_state_filtering_mode'] = 'auto' + share_mount_target_virtual_network_interface_prototype_model[ + 'resource_group'] = resource_group_identity_model + share_mount_target_virtual_network_interface_prototype_model[ + 'security_groups'] = [security_group_identity_model] + share_mount_target_virtual_network_interface_prototype_model[ + 'subnet'] = subnet_identity_model + + share_mount_target_prototype_model = { + } # ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup share_mount_target_prototype_model['name'] = 'my-share-mount-target' share_mount_target_prototype_model['transit_encryption'] = 'none' - share_mount_target_prototype_model['virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model + share_mount_target_prototype_model[ + 'virtual_network_interface'] = share_mount_target_virtual_network_interface_prototype_model share_profile_identity_model = {} # ShareProfileIdentityByName share_profile_identity_model['name'] = 'tier-3iops' @@ -86351,48 +101419,71 @@ def test_share_prototype_share_by_source_share_serialization(self): zone_identity_model['name'] = 'us-south-1' share_prototype_share_context_model = {} # SharePrototypeShareContext + share_prototype_share_context_model[ + 'allowed_transit_encryption_modes'] = ['none'] share_prototype_share_context_model['iops'] = 100 - share_prototype_share_context_model['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_context_model['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_share_context_model['name'] = 'my-share' - share_prototype_share_context_model['profile'] = share_profile_identity_model - share_prototype_share_context_model['replication_cron_spec'] = '0 */5 * * *' - share_prototype_share_context_model['resource_group'] = resource_group_identity_model + share_prototype_share_context_model[ + 'profile'] = share_profile_identity_model + share_prototype_share_context_model[ + 'replication_cron_spec'] = '0 */5 * * *' + share_prototype_share_context_model[ + 'resource_group'] = resource_group_identity_model share_prototype_share_context_model['user_tags'] = [] share_prototype_share_context_model['zone'] = zone_identity_model encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' share_identity_model = {} # ShareIdentityById share_identity_model['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' # Construct a json representation of a SharePrototypeShareBySourceShare model share_prototype_share_by_source_share_model_json = {} - share_prototype_share_by_source_share_model_json['iops'] = 100 - share_prototype_share_by_source_share_model_json['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_by_source_share_model_json[ + 'allowed_transit_encryption_modes'] = ['none'] + share_prototype_share_by_source_share_model_json['mount_targets'] = [ + share_mount_target_prototype_model + ] share_prototype_share_by_source_share_model_json['name'] = 'my-share' - share_prototype_share_by_source_share_model_json['profile'] = share_profile_identity_model - share_prototype_share_by_source_share_model_json['replica_share'] = share_prototype_share_context_model + share_prototype_share_by_source_share_model_json[ + 'replica_share'] = share_prototype_share_context_model share_prototype_share_by_source_share_model_json['user_tags'] = [] - share_prototype_share_by_source_share_model_json['zone'] = zone_identity_model - share_prototype_share_by_source_share_model_json['encryption_key'] = encryption_key_identity_model - share_prototype_share_by_source_share_model_json['replication_cron_spec'] = '0 */5 * * *' - share_prototype_share_by_source_share_model_json['resource_group'] = resource_group_identity_model - share_prototype_share_by_source_share_model_json['source_share'] = share_identity_model + share_prototype_share_by_source_share_model_json[ + 'encryption_key'] = encryption_key_identity_model + share_prototype_share_by_source_share_model_json['iops'] = 100 + share_prototype_share_by_source_share_model_json[ + 'profile'] = share_profile_identity_model + share_prototype_share_by_source_share_model_json[ + 'replication_cron_spec'] = '0 */5 * * *' + share_prototype_share_by_source_share_model_json[ + 'resource_group'] = resource_group_identity_model + share_prototype_share_by_source_share_model_json[ + 'source_share'] = share_identity_model + share_prototype_share_by_source_share_model_json[ + 'zone'] = zone_identity_model # Construct a model instance of SharePrototypeShareBySourceShare by calling from_dict on the json representation - share_prototype_share_by_source_share_model = SharePrototypeShareBySourceShare.from_dict(share_prototype_share_by_source_share_model_json) + share_prototype_share_by_source_share_model = SharePrototypeShareBySourceShare.from_dict( + share_prototype_share_by_source_share_model_json) assert share_prototype_share_by_source_share_model != False # Construct a model instance of SharePrototypeShareBySourceShare by calling from_dict on the json representation - share_prototype_share_by_source_share_model_dict = SharePrototypeShareBySourceShare.from_dict(share_prototype_share_by_source_share_model_json).__dict__ - share_prototype_share_by_source_share_model2 = SharePrototypeShareBySourceShare(**share_prototype_share_by_source_share_model_dict) + share_prototype_share_by_source_share_model_dict = SharePrototypeShareBySourceShare.from_dict( + share_prototype_share_by_source_share_model_json).__dict__ + share_prototype_share_by_source_share_model2 = SharePrototypeShareBySourceShare( + **share_prototype_share_by_source_share_model_dict) # Verify the model instances are equivalent assert share_prototype_share_by_source_share_model == share_prototype_share_by_source_share_model2 # Convert model instance back to dict and verify no loss of data - share_prototype_share_by_source_share_model_json2 = share_prototype_share_by_source_share_model.to_dict() + share_prototype_share_by_source_share_model_json2 = share_prototype_share_by_source_share_model.to_dict( + ) assert share_prototype_share_by_source_share_model_json2 == share_prototype_share_by_source_share_model_json @@ -86401,7 +101492,8 @@ class TestModel_SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnaps Test Class for SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots """ - def test_snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_serialization(self): + def test_snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_serialization( + self): """ Test serialization/deserialization for SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots """ @@ -86412,33 +101504,52 @@ def test_snapshot_consistency_group_prototype_snapshot_consistency_group_by_snap resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' volume_identity_model = {} # VolumeIdentityById - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - - snapshot_prototype_snapshot_consistency_group_context_model = {} # SnapshotPrototypeSnapshotConsistencyGroupContext - snapshot_prototype_snapshot_consistency_group_context_model['name'] = 'my-snapshot' - snapshot_prototype_snapshot_consistency_group_context_model['source_volume'] = volume_identity_model - snapshot_prototype_snapshot_consistency_group_context_model['user_tags'] = ['testString'] + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + + snapshot_prototype_snapshot_consistency_group_context_model = { + } # SnapshotPrototypeSnapshotConsistencyGroupContext + snapshot_prototype_snapshot_consistency_group_context_model[ + 'name'] = 'my-snapshot' + snapshot_prototype_snapshot_consistency_group_context_model[ + 'source_volume'] = volume_identity_model + snapshot_prototype_snapshot_consistency_group_context_model[ + 'user_tags'] = ['testString'] # Construct a json representation of a SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots model snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json = {} - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json['delete_snapshots_on_delete'] = True - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json['name'] = 'my-snapshot-consistency-group' - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json['resource_group'] = resource_group_identity_model - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json['snapshots'] = [snapshot_prototype_snapshot_consistency_group_context_model] + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json[ + 'delete_snapshots_on_delete'] = True + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json[ + 'name'] = 'my-snapshot-consistency-group' + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json[ + 'resource_group'] = resource_group_identity_model + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json[ + 'snapshots'] = [ + snapshot_prototype_snapshot_consistency_group_context_model + ] # Construct a model instance of SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots by calling from_dict on the json representation - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model = SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.from_dict(snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json) + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model = SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.from_dict( + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json + ) assert snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model != False # Construct a model instance of SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots by calling from_dict on the json representation - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_dict = SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.from_dict(snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json).__dict__ - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model2 = SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots(**snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_dict) + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_dict = SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots.from_dict( + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json + ).__dict__ + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model2 = SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots( + ** + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_dict + ) # Verify the model instances are equivalent assert snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model == snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model2 # Convert model instance back to dict and verify no loss of data - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json2 = snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model.to_dict() + snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json2 = snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model.to_dict( + ) assert snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json2 == snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json @@ -86454,21 +101565,26 @@ def test_snapshot_identity_by_crn_serialization(self): # Construct a json representation of a SnapshotIdentityByCRN model snapshot_identity_by_crn_model_json = {} - snapshot_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' # Construct a model instance of SnapshotIdentityByCRN by calling from_dict on the json representation - snapshot_identity_by_crn_model = SnapshotIdentityByCRN.from_dict(snapshot_identity_by_crn_model_json) + snapshot_identity_by_crn_model = SnapshotIdentityByCRN.from_dict( + snapshot_identity_by_crn_model_json) assert snapshot_identity_by_crn_model != False # Construct a model instance of SnapshotIdentityByCRN by calling from_dict on the json representation - snapshot_identity_by_crn_model_dict = SnapshotIdentityByCRN.from_dict(snapshot_identity_by_crn_model_json).__dict__ - snapshot_identity_by_crn_model2 = SnapshotIdentityByCRN(**snapshot_identity_by_crn_model_dict) + snapshot_identity_by_crn_model_dict = SnapshotIdentityByCRN.from_dict( + snapshot_identity_by_crn_model_json).__dict__ + snapshot_identity_by_crn_model2 = SnapshotIdentityByCRN( + **snapshot_identity_by_crn_model_dict) # Verify the model instances are equivalent assert snapshot_identity_by_crn_model == snapshot_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - snapshot_identity_by_crn_model_json2 = snapshot_identity_by_crn_model.to_dict() + snapshot_identity_by_crn_model_json2 = snapshot_identity_by_crn_model.to_dict( + ) assert snapshot_identity_by_crn_model_json2 == snapshot_identity_by_crn_model_json @@ -86484,21 +101600,26 @@ def test_snapshot_identity_by_href_serialization(self): # Construct a json representation of a SnapshotIdentityByHref model snapshot_identity_by_href_model_json = {} - snapshot_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' # Construct a model instance of SnapshotIdentityByHref by calling from_dict on the json representation - snapshot_identity_by_href_model = SnapshotIdentityByHref.from_dict(snapshot_identity_by_href_model_json) + snapshot_identity_by_href_model = SnapshotIdentityByHref.from_dict( + snapshot_identity_by_href_model_json) assert snapshot_identity_by_href_model != False # Construct a model instance of SnapshotIdentityByHref by calling from_dict on the json representation - snapshot_identity_by_href_model_dict = SnapshotIdentityByHref.from_dict(snapshot_identity_by_href_model_json).__dict__ - snapshot_identity_by_href_model2 = SnapshotIdentityByHref(**snapshot_identity_by_href_model_dict) + snapshot_identity_by_href_model_dict = SnapshotIdentityByHref.from_dict( + snapshot_identity_by_href_model_json).__dict__ + snapshot_identity_by_href_model2 = SnapshotIdentityByHref( + **snapshot_identity_by_href_model_dict) # Verify the model instances are equivalent assert snapshot_identity_by_href_model == snapshot_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - snapshot_identity_by_href_model_json2 = snapshot_identity_by_href_model.to_dict() + snapshot_identity_by_href_model_json2 = snapshot_identity_by_href_model.to_dict( + ) assert snapshot_identity_by_href_model_json2 == snapshot_identity_by_href_model_json @@ -86514,21 +101635,26 @@ def test_snapshot_identity_by_id_serialization(self): # Construct a json representation of a SnapshotIdentityById model snapshot_identity_by_id_model_json = {} - snapshot_identity_by_id_model_json['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_identity_by_id_model_json[ + 'id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' # Construct a model instance of SnapshotIdentityById by calling from_dict on the json representation - snapshot_identity_by_id_model = SnapshotIdentityById.from_dict(snapshot_identity_by_id_model_json) + snapshot_identity_by_id_model = SnapshotIdentityById.from_dict( + snapshot_identity_by_id_model_json) assert snapshot_identity_by_id_model != False # Construct a model instance of SnapshotIdentityById by calling from_dict on the json representation - snapshot_identity_by_id_model_dict = SnapshotIdentityById.from_dict(snapshot_identity_by_id_model_json).__dict__ - snapshot_identity_by_id_model2 = SnapshotIdentityById(**snapshot_identity_by_id_model_dict) + snapshot_identity_by_id_model_dict = SnapshotIdentityById.from_dict( + snapshot_identity_by_id_model_json).__dict__ + snapshot_identity_by_id_model2 = SnapshotIdentityById( + **snapshot_identity_by_id_model_dict) # Verify the model instances are equivalent assert snapshot_identity_by_id_model == snapshot_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - snapshot_identity_by_id_model_json2 = snapshot_identity_by_id_model.to_dict() + snapshot_identity_by_id_model_json2 = snapshot_identity_by_id_model.to_dict( + ) assert snapshot_identity_by_id_model_json2 == snapshot_identity_by_id_model_json @@ -86554,33 +101680,46 @@ def test_snapshot_prototype_snapshot_by_source_snapshot_serialization(self): resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' snapshot_identity_by_crn_model = {} # SnapshotIdentityByCRN - snapshot_identity_by_crn_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + snapshot_identity_by_crn_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' # Construct a json representation of a SnapshotPrototypeSnapshotBySourceSnapshot model snapshot_prototype_snapshot_by_source_snapshot_model_json = {} - snapshot_prototype_snapshot_by_source_snapshot_model_json['clones'] = [snapshot_clone_prototype_model] - snapshot_prototype_snapshot_by_source_snapshot_model_json['name'] = 'my-snapshot' - snapshot_prototype_snapshot_by_source_snapshot_model_json['resource_group'] = resource_group_identity_model - snapshot_prototype_snapshot_by_source_snapshot_model_json['user_tags'] = [] - snapshot_prototype_snapshot_by_source_snapshot_model_json['encryption_key'] = encryption_key_identity_model - snapshot_prototype_snapshot_by_source_snapshot_model_json['source_snapshot'] = snapshot_identity_by_crn_model + snapshot_prototype_snapshot_by_source_snapshot_model_json['clones'] = [ + snapshot_clone_prototype_model + ] + snapshot_prototype_snapshot_by_source_snapshot_model_json[ + 'name'] = 'my-snapshot' + snapshot_prototype_snapshot_by_source_snapshot_model_json[ + 'resource_group'] = resource_group_identity_model + snapshot_prototype_snapshot_by_source_snapshot_model_json[ + 'user_tags'] = [] + snapshot_prototype_snapshot_by_source_snapshot_model_json[ + 'encryption_key'] = encryption_key_identity_model + snapshot_prototype_snapshot_by_source_snapshot_model_json[ + 'source_snapshot'] = snapshot_identity_by_crn_model # Construct a model instance of SnapshotPrototypeSnapshotBySourceSnapshot by calling from_dict on the json representation - snapshot_prototype_snapshot_by_source_snapshot_model = SnapshotPrototypeSnapshotBySourceSnapshot.from_dict(snapshot_prototype_snapshot_by_source_snapshot_model_json) + snapshot_prototype_snapshot_by_source_snapshot_model = SnapshotPrototypeSnapshotBySourceSnapshot.from_dict( + snapshot_prototype_snapshot_by_source_snapshot_model_json) assert snapshot_prototype_snapshot_by_source_snapshot_model != False # Construct a model instance of SnapshotPrototypeSnapshotBySourceSnapshot by calling from_dict on the json representation - snapshot_prototype_snapshot_by_source_snapshot_model_dict = SnapshotPrototypeSnapshotBySourceSnapshot.from_dict(snapshot_prototype_snapshot_by_source_snapshot_model_json).__dict__ - snapshot_prototype_snapshot_by_source_snapshot_model2 = SnapshotPrototypeSnapshotBySourceSnapshot(**snapshot_prototype_snapshot_by_source_snapshot_model_dict) + snapshot_prototype_snapshot_by_source_snapshot_model_dict = SnapshotPrototypeSnapshotBySourceSnapshot.from_dict( + snapshot_prototype_snapshot_by_source_snapshot_model_json).__dict__ + snapshot_prototype_snapshot_by_source_snapshot_model2 = SnapshotPrototypeSnapshotBySourceSnapshot( + **snapshot_prototype_snapshot_by_source_snapshot_model_dict) # Verify the model instances are equivalent assert snapshot_prototype_snapshot_by_source_snapshot_model == snapshot_prototype_snapshot_by_source_snapshot_model2 # Convert model instance back to dict and verify no loss of data - snapshot_prototype_snapshot_by_source_snapshot_model_json2 = snapshot_prototype_snapshot_by_source_snapshot_model.to_dict() + snapshot_prototype_snapshot_by_source_snapshot_model_json2 = snapshot_prototype_snapshot_by_source_snapshot_model.to_dict( + ) assert snapshot_prototype_snapshot_by_source_snapshot_model_json2 == snapshot_prototype_snapshot_by_source_snapshot_model_json @@ -86606,29 +101745,40 @@ def test_snapshot_prototype_snapshot_by_source_volume_serialization(self): resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' volume_identity_model = {} # VolumeIdentityById - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a json representation of a SnapshotPrototypeSnapshotBySourceVolume model snapshot_prototype_snapshot_by_source_volume_model_json = {} - snapshot_prototype_snapshot_by_source_volume_model_json['clones'] = [snapshot_clone_prototype_model] - snapshot_prototype_snapshot_by_source_volume_model_json['name'] = 'my-snapshot' - snapshot_prototype_snapshot_by_source_volume_model_json['resource_group'] = resource_group_identity_model - snapshot_prototype_snapshot_by_source_volume_model_json['user_tags'] = [] - snapshot_prototype_snapshot_by_source_volume_model_json['source_volume'] = volume_identity_model + snapshot_prototype_snapshot_by_source_volume_model_json['clones'] = [ + snapshot_clone_prototype_model + ] + snapshot_prototype_snapshot_by_source_volume_model_json[ + 'name'] = 'my-snapshot' + snapshot_prototype_snapshot_by_source_volume_model_json[ + 'resource_group'] = resource_group_identity_model + snapshot_prototype_snapshot_by_source_volume_model_json[ + 'user_tags'] = [] + snapshot_prototype_snapshot_by_source_volume_model_json[ + 'source_volume'] = volume_identity_model # Construct a model instance of SnapshotPrototypeSnapshotBySourceVolume by calling from_dict on the json representation - snapshot_prototype_snapshot_by_source_volume_model = SnapshotPrototypeSnapshotBySourceVolume.from_dict(snapshot_prototype_snapshot_by_source_volume_model_json) + snapshot_prototype_snapshot_by_source_volume_model = SnapshotPrototypeSnapshotBySourceVolume.from_dict( + snapshot_prototype_snapshot_by_source_volume_model_json) assert snapshot_prototype_snapshot_by_source_volume_model != False # Construct a model instance of SnapshotPrototypeSnapshotBySourceVolume by calling from_dict on the json representation - snapshot_prototype_snapshot_by_source_volume_model_dict = SnapshotPrototypeSnapshotBySourceVolume.from_dict(snapshot_prototype_snapshot_by_source_volume_model_json).__dict__ - snapshot_prototype_snapshot_by_source_volume_model2 = SnapshotPrototypeSnapshotBySourceVolume(**snapshot_prototype_snapshot_by_source_volume_model_dict) + snapshot_prototype_snapshot_by_source_volume_model_dict = SnapshotPrototypeSnapshotBySourceVolume.from_dict( + snapshot_prototype_snapshot_by_source_volume_model_json).__dict__ + snapshot_prototype_snapshot_by_source_volume_model2 = SnapshotPrototypeSnapshotBySourceVolume( + **snapshot_prototype_snapshot_by_source_volume_model_dict) # Verify the model instances are equivalent assert snapshot_prototype_snapshot_by_source_volume_model == snapshot_prototype_snapshot_by_source_volume_model2 # Convert model instance back to dict and verify no loss of data - snapshot_prototype_snapshot_by_source_volume_model_json2 = snapshot_prototype_snapshot_by_source_volume_model.to_dict() + snapshot_prototype_snapshot_by_source_volume_model_json2 = snapshot_prototype_snapshot_by_source_volume_model.to_dict( + ) assert snapshot_prototype_snapshot_by_source_volume_model_json2 == snapshot_prototype_snapshot_by_source_volume_model_json @@ -86644,21 +101794,26 @@ def test_subnet_identity_by_crn_serialization(self): # Construct a json representation of a SubnetIdentityByCRN model subnet_identity_by_crn_model_json = {} - subnet_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a model instance of SubnetIdentityByCRN by calling from_dict on the json representation - subnet_identity_by_crn_model = SubnetIdentityByCRN.from_dict(subnet_identity_by_crn_model_json) + subnet_identity_by_crn_model = SubnetIdentityByCRN.from_dict( + subnet_identity_by_crn_model_json) assert subnet_identity_by_crn_model != False # Construct a model instance of SubnetIdentityByCRN by calling from_dict on the json representation - subnet_identity_by_crn_model_dict = SubnetIdentityByCRN.from_dict(subnet_identity_by_crn_model_json).__dict__ - subnet_identity_by_crn_model2 = SubnetIdentityByCRN(**subnet_identity_by_crn_model_dict) + subnet_identity_by_crn_model_dict = SubnetIdentityByCRN.from_dict( + subnet_identity_by_crn_model_json).__dict__ + subnet_identity_by_crn_model2 = SubnetIdentityByCRN( + **subnet_identity_by_crn_model_dict) # Verify the model instances are equivalent assert subnet_identity_by_crn_model == subnet_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - subnet_identity_by_crn_model_json2 = subnet_identity_by_crn_model.to_dict() + subnet_identity_by_crn_model_json2 = subnet_identity_by_crn_model.to_dict( + ) assert subnet_identity_by_crn_model_json2 == subnet_identity_by_crn_model_json @@ -86674,21 +101829,26 @@ def test_subnet_identity_by_href_serialization(self): # Construct a json representation of a SubnetIdentityByHref model subnet_identity_by_href_model_json = {} - subnet_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a model instance of SubnetIdentityByHref by calling from_dict on the json representation - subnet_identity_by_href_model = SubnetIdentityByHref.from_dict(subnet_identity_by_href_model_json) + subnet_identity_by_href_model = SubnetIdentityByHref.from_dict( + subnet_identity_by_href_model_json) assert subnet_identity_by_href_model != False # Construct a model instance of SubnetIdentityByHref by calling from_dict on the json representation - subnet_identity_by_href_model_dict = SubnetIdentityByHref.from_dict(subnet_identity_by_href_model_json).__dict__ - subnet_identity_by_href_model2 = SubnetIdentityByHref(**subnet_identity_by_href_model_dict) + subnet_identity_by_href_model_dict = SubnetIdentityByHref.from_dict( + subnet_identity_by_href_model_json).__dict__ + subnet_identity_by_href_model2 = SubnetIdentityByHref( + **subnet_identity_by_href_model_dict) # Verify the model instances are equivalent assert subnet_identity_by_href_model == subnet_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - subnet_identity_by_href_model_json2 = subnet_identity_by_href_model.to_dict() + subnet_identity_by_href_model_json2 = subnet_identity_by_href_model.to_dict( + ) assert subnet_identity_by_href_model_json2 == subnet_identity_by_href_model_json @@ -86704,21 +101864,26 @@ def test_subnet_identity_by_id_serialization(self): # Construct a json representation of a SubnetIdentityById model subnet_identity_by_id_model_json = {} - subnet_identity_by_id_model_json['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_by_id_model_json[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a model instance of SubnetIdentityById by calling from_dict on the json representation - subnet_identity_by_id_model = SubnetIdentityById.from_dict(subnet_identity_by_id_model_json) + subnet_identity_by_id_model = SubnetIdentityById.from_dict( + subnet_identity_by_id_model_json) assert subnet_identity_by_id_model != False # Construct a model instance of SubnetIdentityById by calling from_dict on the json representation - subnet_identity_by_id_model_dict = SubnetIdentityById.from_dict(subnet_identity_by_id_model_json).__dict__ - subnet_identity_by_id_model2 = SubnetIdentityById(**subnet_identity_by_id_model_dict) + subnet_identity_by_id_model_dict = SubnetIdentityById.from_dict( + subnet_identity_by_id_model_json).__dict__ + subnet_identity_by_id_model2 = SubnetIdentityById( + **subnet_identity_by_id_model_dict) # Verify the model instances are equivalent assert subnet_identity_by_id_model == subnet_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - subnet_identity_by_id_model_json2 = subnet_identity_by_id_model.to_dict() + subnet_identity_by_id_model_json2 = subnet_identity_by_id_model.to_dict( + ) assert subnet_identity_by_id_model_json2 == subnet_identity_by_id_model_json @@ -86735,16 +101900,20 @@ def test_subnet_prototype_subnet_by_cidr_serialization(self): # Construct dict forms of any model objects needed in order to build this model. network_acl_identity_model = {} # NetworkACLIdentityById - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' - public_gateway_identity_model = {} # PublicGatewayIdentityPublicGatewayIdentityById - public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_model = { + } # PublicGatewayIdentityPublicGatewayIdentityById + public_gateway_identity_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' routing_table_identity_model = {} # RoutingTableIdentityById - routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' @@ -86756,27 +101925,36 @@ def test_subnet_prototype_subnet_by_cidr_serialization(self): subnet_prototype_subnet_by_cidr_model_json = {} subnet_prototype_subnet_by_cidr_model_json['ip_version'] = 'ipv4' subnet_prototype_subnet_by_cidr_model_json['name'] = 'my-subnet' - subnet_prototype_subnet_by_cidr_model_json['network_acl'] = network_acl_identity_model - subnet_prototype_subnet_by_cidr_model_json['public_gateway'] = public_gateway_identity_model - subnet_prototype_subnet_by_cidr_model_json['resource_group'] = resource_group_identity_model - subnet_prototype_subnet_by_cidr_model_json['routing_table'] = routing_table_identity_model + subnet_prototype_subnet_by_cidr_model_json[ + 'network_acl'] = network_acl_identity_model + subnet_prototype_subnet_by_cidr_model_json[ + 'public_gateway'] = public_gateway_identity_model + subnet_prototype_subnet_by_cidr_model_json[ + 'resource_group'] = resource_group_identity_model + subnet_prototype_subnet_by_cidr_model_json[ + 'routing_table'] = routing_table_identity_model subnet_prototype_subnet_by_cidr_model_json['vpc'] = vpc_identity_model - subnet_prototype_subnet_by_cidr_model_json['ipv4_cidr_block'] = '10.0.0.0/24' + subnet_prototype_subnet_by_cidr_model_json[ + 'ipv4_cidr_block'] = '10.0.0.0/24' subnet_prototype_subnet_by_cidr_model_json['zone'] = zone_identity_model # Construct a model instance of SubnetPrototypeSubnetByCIDR by calling from_dict on the json representation - subnet_prototype_subnet_by_cidr_model = SubnetPrototypeSubnetByCIDR.from_dict(subnet_prototype_subnet_by_cidr_model_json) + subnet_prototype_subnet_by_cidr_model = SubnetPrototypeSubnetByCIDR.from_dict( + subnet_prototype_subnet_by_cidr_model_json) assert subnet_prototype_subnet_by_cidr_model != False # Construct a model instance of SubnetPrototypeSubnetByCIDR by calling from_dict on the json representation - subnet_prototype_subnet_by_cidr_model_dict = SubnetPrototypeSubnetByCIDR.from_dict(subnet_prototype_subnet_by_cidr_model_json).__dict__ - subnet_prototype_subnet_by_cidr_model2 = SubnetPrototypeSubnetByCIDR(**subnet_prototype_subnet_by_cidr_model_dict) + subnet_prototype_subnet_by_cidr_model_dict = SubnetPrototypeSubnetByCIDR.from_dict( + subnet_prototype_subnet_by_cidr_model_json).__dict__ + subnet_prototype_subnet_by_cidr_model2 = SubnetPrototypeSubnetByCIDR( + **subnet_prototype_subnet_by_cidr_model_dict) # Verify the model instances are equivalent assert subnet_prototype_subnet_by_cidr_model == subnet_prototype_subnet_by_cidr_model2 # Convert model instance back to dict and verify no loss of data - subnet_prototype_subnet_by_cidr_model_json2 = subnet_prototype_subnet_by_cidr_model.to_dict() + subnet_prototype_subnet_by_cidr_model_json2 = subnet_prototype_subnet_by_cidr_model.to_dict( + ) assert subnet_prototype_subnet_by_cidr_model_json2 == subnet_prototype_subnet_by_cidr_model_json @@ -86793,16 +101971,20 @@ def test_subnet_prototype_subnet_by_total_count_serialization(self): # Construct dict forms of any model objects needed in order to build this model. network_acl_identity_model = {} # NetworkACLIdentityById - network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' + network_acl_identity_model[ + 'id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' - public_gateway_identity_model = {} # PublicGatewayIdentityPublicGatewayIdentityById - public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_identity_model = { + } # PublicGatewayIdentityPublicGatewayIdentityById + public_gateway_identity_model[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' routing_table_identity_model = {} # RoutingTableIdentityById - routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' + routing_table_identity_model[ + 'id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' @@ -86814,27 +101996,38 @@ def test_subnet_prototype_subnet_by_total_count_serialization(self): subnet_prototype_subnet_by_total_count_model_json = {} subnet_prototype_subnet_by_total_count_model_json['ip_version'] = 'ipv4' subnet_prototype_subnet_by_total_count_model_json['name'] = 'my-subnet' - subnet_prototype_subnet_by_total_count_model_json['network_acl'] = network_acl_identity_model - subnet_prototype_subnet_by_total_count_model_json['public_gateway'] = public_gateway_identity_model - subnet_prototype_subnet_by_total_count_model_json['resource_group'] = resource_group_identity_model - subnet_prototype_subnet_by_total_count_model_json['routing_table'] = routing_table_identity_model - subnet_prototype_subnet_by_total_count_model_json['vpc'] = vpc_identity_model - subnet_prototype_subnet_by_total_count_model_json['total_ipv4_address_count'] = 256 - subnet_prototype_subnet_by_total_count_model_json['zone'] = zone_identity_model + subnet_prototype_subnet_by_total_count_model_json[ + 'network_acl'] = network_acl_identity_model + subnet_prototype_subnet_by_total_count_model_json[ + 'public_gateway'] = public_gateway_identity_model + subnet_prototype_subnet_by_total_count_model_json[ + 'resource_group'] = resource_group_identity_model + subnet_prototype_subnet_by_total_count_model_json[ + 'routing_table'] = routing_table_identity_model + subnet_prototype_subnet_by_total_count_model_json[ + 'vpc'] = vpc_identity_model + subnet_prototype_subnet_by_total_count_model_json[ + 'total_ipv4_address_count'] = 256 + subnet_prototype_subnet_by_total_count_model_json[ + 'zone'] = zone_identity_model # Construct a model instance of SubnetPrototypeSubnetByTotalCount by calling from_dict on the json representation - subnet_prototype_subnet_by_total_count_model = SubnetPrototypeSubnetByTotalCount.from_dict(subnet_prototype_subnet_by_total_count_model_json) + subnet_prototype_subnet_by_total_count_model = SubnetPrototypeSubnetByTotalCount.from_dict( + subnet_prototype_subnet_by_total_count_model_json) assert subnet_prototype_subnet_by_total_count_model != False # Construct a model instance of SubnetPrototypeSubnetByTotalCount by calling from_dict on the json representation - subnet_prototype_subnet_by_total_count_model_dict = SubnetPrototypeSubnetByTotalCount.from_dict(subnet_prototype_subnet_by_total_count_model_json).__dict__ - subnet_prototype_subnet_by_total_count_model2 = SubnetPrototypeSubnetByTotalCount(**subnet_prototype_subnet_by_total_count_model_dict) + subnet_prototype_subnet_by_total_count_model_dict = SubnetPrototypeSubnetByTotalCount.from_dict( + subnet_prototype_subnet_by_total_count_model_json).__dict__ + subnet_prototype_subnet_by_total_count_model2 = SubnetPrototypeSubnetByTotalCount( + **subnet_prototype_subnet_by_total_count_model_dict) # Verify the model instances are equivalent assert subnet_prototype_subnet_by_total_count_model == subnet_prototype_subnet_by_total_count_model2 # Convert model instance back to dict and verify no loss of data - subnet_prototype_subnet_by_total_count_model_json2 = subnet_prototype_subnet_by_total_count_model.to_dict() + subnet_prototype_subnet_by_total_count_model_json2 = subnet_prototype_subnet_by_total_count_model.to_dict( + ) assert subnet_prototype_subnet_by_total_count_model_json2 == subnet_prototype_subnet_by_total_count_model_json @@ -86843,28 +102036,38 @@ class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityByCRN: Test Class for SubnetPublicGatewayPatchPublicGatewayIdentityByCRN """ - def test_subnet_public_gateway_patch_public_gateway_identity_by_crn_serialization(self): + def test_subnet_public_gateway_patch_public_gateway_identity_by_crn_serialization( + self): """ Test serialization/deserialization for SubnetPublicGatewayPatchPublicGatewayIdentityByCRN """ # Construct a json representation of a SubnetPublicGatewayPatchPublicGatewayIdentityByCRN model subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json = {} - subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' + subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a model instance of SubnetPublicGatewayPatchPublicGatewayIdentityByCRN by calling from_dict on the json representation - subnet_public_gateway_patch_public_gateway_identity_by_crn_model = SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.from_dict(subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json) + subnet_public_gateway_patch_public_gateway_identity_by_crn_model = SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.from_dict( + subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json + ) assert subnet_public_gateway_patch_public_gateway_identity_by_crn_model != False # Construct a model instance of SubnetPublicGatewayPatchPublicGatewayIdentityByCRN by calling from_dict on the json representation - subnet_public_gateway_patch_public_gateway_identity_by_crn_model_dict = SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.from_dict(subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json).__dict__ - subnet_public_gateway_patch_public_gateway_identity_by_crn_model2 = SubnetPublicGatewayPatchPublicGatewayIdentityByCRN(**subnet_public_gateway_patch_public_gateway_identity_by_crn_model_dict) + subnet_public_gateway_patch_public_gateway_identity_by_crn_model_dict = SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.from_dict( + subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json + ).__dict__ + subnet_public_gateway_patch_public_gateway_identity_by_crn_model2 = SubnetPublicGatewayPatchPublicGatewayIdentityByCRN( + ** + subnet_public_gateway_patch_public_gateway_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert subnet_public_gateway_patch_public_gateway_identity_by_crn_model == subnet_public_gateway_patch_public_gateway_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json2 = subnet_public_gateway_patch_public_gateway_identity_by_crn_model.to_dict() + subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json2 = subnet_public_gateway_patch_public_gateway_identity_by_crn_model.to_dict( + ) assert subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json2 == subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json @@ -86873,28 +102076,38 @@ class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityByHref: Test Class for SubnetPublicGatewayPatchPublicGatewayIdentityByHref """ - def test_subnet_public_gateway_patch_public_gateway_identity_by_href_serialization(self): + def test_subnet_public_gateway_patch_public_gateway_identity_by_href_serialization( + self): """ Test serialization/deserialization for SubnetPublicGatewayPatchPublicGatewayIdentityByHref """ # Construct a json representation of a SubnetPublicGatewayPatchPublicGatewayIdentityByHref model subnet_public_gateway_patch_public_gateway_identity_by_href_model_json = {} - subnet_public_gateway_patch_public_gateway_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' + subnet_public_gateway_patch_public_gateway_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a model instance of SubnetPublicGatewayPatchPublicGatewayIdentityByHref by calling from_dict on the json representation - subnet_public_gateway_patch_public_gateway_identity_by_href_model = SubnetPublicGatewayPatchPublicGatewayIdentityByHref.from_dict(subnet_public_gateway_patch_public_gateway_identity_by_href_model_json) + subnet_public_gateway_patch_public_gateway_identity_by_href_model = SubnetPublicGatewayPatchPublicGatewayIdentityByHref.from_dict( + subnet_public_gateway_patch_public_gateway_identity_by_href_model_json + ) assert subnet_public_gateway_patch_public_gateway_identity_by_href_model != False # Construct a model instance of SubnetPublicGatewayPatchPublicGatewayIdentityByHref by calling from_dict on the json representation - subnet_public_gateway_patch_public_gateway_identity_by_href_model_dict = SubnetPublicGatewayPatchPublicGatewayIdentityByHref.from_dict(subnet_public_gateway_patch_public_gateway_identity_by_href_model_json).__dict__ - subnet_public_gateway_patch_public_gateway_identity_by_href_model2 = SubnetPublicGatewayPatchPublicGatewayIdentityByHref(**subnet_public_gateway_patch_public_gateway_identity_by_href_model_dict) + subnet_public_gateway_patch_public_gateway_identity_by_href_model_dict = SubnetPublicGatewayPatchPublicGatewayIdentityByHref.from_dict( + subnet_public_gateway_patch_public_gateway_identity_by_href_model_json + ).__dict__ + subnet_public_gateway_patch_public_gateway_identity_by_href_model2 = SubnetPublicGatewayPatchPublicGatewayIdentityByHref( + ** + subnet_public_gateway_patch_public_gateway_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert subnet_public_gateway_patch_public_gateway_identity_by_href_model == subnet_public_gateway_patch_public_gateway_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - subnet_public_gateway_patch_public_gateway_identity_by_href_model_json2 = subnet_public_gateway_patch_public_gateway_identity_by_href_model.to_dict() + subnet_public_gateway_patch_public_gateway_identity_by_href_model_json2 = subnet_public_gateway_patch_public_gateway_identity_by_href_model.to_dict( + ) assert subnet_public_gateway_patch_public_gateway_identity_by_href_model_json2 == subnet_public_gateway_patch_public_gateway_identity_by_href_model_json @@ -86903,28 +102116,38 @@ class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityById: Test Class for SubnetPublicGatewayPatchPublicGatewayIdentityById """ - def test_subnet_public_gateway_patch_public_gateway_identity_by_id_serialization(self): + def test_subnet_public_gateway_patch_public_gateway_identity_by_id_serialization( + self): """ Test serialization/deserialization for SubnetPublicGatewayPatchPublicGatewayIdentityById """ # Construct a json representation of a SubnetPublicGatewayPatchPublicGatewayIdentityById model subnet_public_gateway_patch_public_gateway_identity_by_id_model_json = {} - subnet_public_gateway_patch_public_gateway_identity_by_id_model_json['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + subnet_public_gateway_patch_public_gateway_identity_by_id_model_json[ + 'id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a model instance of SubnetPublicGatewayPatchPublicGatewayIdentityById by calling from_dict on the json representation - subnet_public_gateway_patch_public_gateway_identity_by_id_model = SubnetPublicGatewayPatchPublicGatewayIdentityById.from_dict(subnet_public_gateway_patch_public_gateway_identity_by_id_model_json) + subnet_public_gateway_patch_public_gateway_identity_by_id_model = SubnetPublicGatewayPatchPublicGatewayIdentityById.from_dict( + subnet_public_gateway_patch_public_gateway_identity_by_id_model_json + ) assert subnet_public_gateway_patch_public_gateway_identity_by_id_model != False # Construct a model instance of SubnetPublicGatewayPatchPublicGatewayIdentityById by calling from_dict on the json representation - subnet_public_gateway_patch_public_gateway_identity_by_id_model_dict = SubnetPublicGatewayPatchPublicGatewayIdentityById.from_dict(subnet_public_gateway_patch_public_gateway_identity_by_id_model_json).__dict__ - subnet_public_gateway_patch_public_gateway_identity_by_id_model2 = SubnetPublicGatewayPatchPublicGatewayIdentityById(**subnet_public_gateway_patch_public_gateway_identity_by_id_model_dict) + subnet_public_gateway_patch_public_gateway_identity_by_id_model_dict = SubnetPublicGatewayPatchPublicGatewayIdentityById.from_dict( + subnet_public_gateway_patch_public_gateway_identity_by_id_model_json + ).__dict__ + subnet_public_gateway_patch_public_gateway_identity_by_id_model2 = SubnetPublicGatewayPatchPublicGatewayIdentityById( + ** + subnet_public_gateway_patch_public_gateway_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert subnet_public_gateway_patch_public_gateway_identity_by_id_model == subnet_public_gateway_patch_public_gateway_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - subnet_public_gateway_patch_public_gateway_identity_by_id_model_json2 = subnet_public_gateway_patch_public_gateway_identity_by_id_model.to_dict() + subnet_public_gateway_patch_public_gateway_identity_by_id_model_json2 = subnet_public_gateway_patch_public_gateway_identity_by_id_model.to_dict( + ) assert subnet_public_gateway_patch_public_gateway_identity_by_id_model_json2 == subnet_public_gateway_patch_public_gateway_identity_by_id_model_json @@ -86933,28 +102156,34 @@ class TestModel_TrustedProfileIdentityTrustedProfileByCRN: Test Class for TrustedProfileIdentityTrustedProfileByCRN """ - def test_trusted_profile_identity_trusted_profile_by_crn_serialization(self): + def test_trusted_profile_identity_trusted_profile_by_crn_serialization( + self): """ Test serialization/deserialization for TrustedProfileIdentityTrustedProfileByCRN """ # Construct a json representation of a TrustedProfileIdentityTrustedProfileByCRN model trusted_profile_identity_trusted_profile_by_crn_model_json = {} - trusted_profile_identity_trusted_profile_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_trusted_profile_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a model instance of TrustedProfileIdentityTrustedProfileByCRN by calling from_dict on the json representation - trusted_profile_identity_trusted_profile_by_crn_model = TrustedProfileIdentityTrustedProfileByCRN.from_dict(trusted_profile_identity_trusted_profile_by_crn_model_json) + trusted_profile_identity_trusted_profile_by_crn_model = TrustedProfileIdentityTrustedProfileByCRN.from_dict( + trusted_profile_identity_trusted_profile_by_crn_model_json) assert trusted_profile_identity_trusted_profile_by_crn_model != False # Construct a model instance of TrustedProfileIdentityTrustedProfileByCRN by calling from_dict on the json representation - trusted_profile_identity_trusted_profile_by_crn_model_dict = TrustedProfileIdentityTrustedProfileByCRN.from_dict(trusted_profile_identity_trusted_profile_by_crn_model_json).__dict__ - trusted_profile_identity_trusted_profile_by_crn_model2 = TrustedProfileIdentityTrustedProfileByCRN(**trusted_profile_identity_trusted_profile_by_crn_model_dict) + trusted_profile_identity_trusted_profile_by_crn_model_dict = TrustedProfileIdentityTrustedProfileByCRN.from_dict( + trusted_profile_identity_trusted_profile_by_crn_model_json).__dict__ + trusted_profile_identity_trusted_profile_by_crn_model2 = TrustedProfileIdentityTrustedProfileByCRN( + **trusted_profile_identity_trusted_profile_by_crn_model_dict) # Verify the model instances are equivalent assert trusted_profile_identity_trusted_profile_by_crn_model == trusted_profile_identity_trusted_profile_by_crn_model2 # Convert model instance back to dict and verify no loss of data - trusted_profile_identity_trusted_profile_by_crn_model_json2 = trusted_profile_identity_trusted_profile_by_crn_model.to_dict() + trusted_profile_identity_trusted_profile_by_crn_model_json2 = trusted_profile_identity_trusted_profile_by_crn_model.to_dict( + ) assert trusted_profile_identity_trusted_profile_by_crn_model_json2 == trusted_profile_identity_trusted_profile_by_crn_model_json @@ -86970,21 +102199,26 @@ def test_trusted_profile_identity_trusted_profile_by_id_serialization(self): # Construct a json representation of a TrustedProfileIdentityTrustedProfileById model trusted_profile_identity_trusted_profile_by_id_model_json = {} - trusted_profile_identity_trusted_profile_by_id_model_json['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_trusted_profile_by_id_model_json[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a model instance of TrustedProfileIdentityTrustedProfileById by calling from_dict on the json representation - trusted_profile_identity_trusted_profile_by_id_model = TrustedProfileIdentityTrustedProfileById.from_dict(trusted_profile_identity_trusted_profile_by_id_model_json) + trusted_profile_identity_trusted_profile_by_id_model = TrustedProfileIdentityTrustedProfileById.from_dict( + trusted_profile_identity_trusted_profile_by_id_model_json) assert trusted_profile_identity_trusted_profile_by_id_model != False # Construct a model instance of TrustedProfileIdentityTrustedProfileById by calling from_dict on the json representation - trusted_profile_identity_trusted_profile_by_id_model_dict = TrustedProfileIdentityTrustedProfileById.from_dict(trusted_profile_identity_trusted_profile_by_id_model_json).__dict__ - trusted_profile_identity_trusted_profile_by_id_model2 = TrustedProfileIdentityTrustedProfileById(**trusted_profile_identity_trusted_profile_by_id_model_dict) + trusted_profile_identity_trusted_profile_by_id_model_dict = TrustedProfileIdentityTrustedProfileById.from_dict( + trusted_profile_identity_trusted_profile_by_id_model_json).__dict__ + trusted_profile_identity_trusted_profile_by_id_model2 = TrustedProfileIdentityTrustedProfileById( + **trusted_profile_identity_trusted_profile_by_id_model_dict) # Verify the model instances are equivalent assert trusted_profile_identity_trusted_profile_by_id_model == trusted_profile_identity_trusted_profile_by_id_model2 # Convert model instance back to dict and verify no loss of data - trusted_profile_identity_trusted_profile_by_id_model_json2 = trusted_profile_identity_trusted_profile_by_id_model.to_dict() + trusted_profile_identity_trusted_profile_by_id_model_json2 = trusted_profile_identity_trusted_profile_by_id_model.to_dict( + ) assert trusted_profile_identity_trusted_profile_by_id_model_json2 == trusted_profile_identity_trusted_profile_by_id_model_json @@ -86993,7 +102227,8 @@ class TestModel_VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype: Test Class for VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype """ - def test_vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_serialization(self): + def test_vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_serialization( + self): """ Test serialization/deserialization for VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype """ @@ -87009,22 +102244,32 @@ def test_vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_seriali # Construct a json representation of a VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype model vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json = {} - vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json['manual_servers'] = [dns_server_prototype_model] - vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json['type'] = 'manual' + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json[ + 'manual_servers'] = [dns_server_prototype_model] + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json[ + 'type'] = 'manual' # Construct a model instance of VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype by calling from_dict on the json representation - vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model = VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.from_dict(vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json) + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model = VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.from_dict( + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json + ) assert vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model != False # Construct a model instance of VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype by calling from_dict on the json representation - vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_dict = VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.from_dict(vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json).__dict__ - vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model2 = VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype(**vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_dict) + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_dict = VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype.from_dict( + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json + ).__dict__ + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model2 = VPCDNSResolverPrototypeVPCDNSResolverTypeManualPrototype( + ** + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_dict + ) # Verify the model instances are equivalent assert vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model == vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json2 = vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model.to_dict() + vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json2 = vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model.to_dict( + ) assert vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json2 == vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json @@ -87033,28 +102278,38 @@ class TestModel_VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype: Test Class for VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype """ - def test_vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_serialization(self): + def test_vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_serialization( + self): """ Test serialization/deserialization for VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype """ # Construct a json representation of a VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype model vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json = {} - vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json['type'] = 'system' + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json[ + 'type'] = 'system' # Construct a model instance of VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype by calling from_dict on the json representation - vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model = VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.from_dict(vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json) + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model = VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.from_dict( + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json + ) assert vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model != False # Construct a model instance of VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype by calling from_dict on the json representation - vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_dict = VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.from_dict(vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json).__dict__ - vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model2 = VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype(**vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_dict) + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_dict = VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype.from_dict( + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json + ).__dict__ + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model2 = VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype( + ** + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_dict + ) # Verify the model instances are equivalent assert vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model == vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json2 = vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model.to_dict() + vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json2 = vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model.to_dict( + ) assert vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json2 == vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json @@ -87071,56 +102326,72 @@ def test_vpcdns_resolver_type_delegated_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' dns_server_model = {} # DNSServer dns_server_model['address'] = '192.168.3.4' dns_server_model['zone_affinity'] = zone_reference_model - vpc_reference_dns_resolver_context_deleted_model = {} # VPCReferenceDNSResolverContextDeleted - vpc_reference_dns_resolver_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_dns_resolver_context_deleted_model = { + } # VPCReferenceDNSResolverContextDeleted + vpc_reference_dns_resolver_context_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' account_reference_model['resource_type'] = 'account' region_reference_model = {} # RegionReference - region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' + region_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south' region_reference_model['name'] = 'us-south' vpc_remote_model = {} # VPCRemote vpc_remote_model['account'] = account_reference_model vpc_remote_model['region'] = region_reference_model - vpc_reference_dns_resolver_context_model = {} # VPCReferenceDNSResolverContext - vpc_reference_dns_resolver_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_dns_resolver_context_model['deleted'] = vpc_reference_dns_resolver_context_deleted_model - vpc_reference_dns_resolver_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - vpc_reference_dns_resolver_context_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model = { + } # VPCReferenceDNSResolverContext + vpc_reference_dns_resolver_context_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model[ + 'deleted'] = vpc_reference_dns_resolver_context_deleted_model + vpc_reference_dns_resolver_context_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_dns_resolver_context_model[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_dns_resolver_context_model['name'] = 'my-vpc' vpc_reference_dns_resolver_context_model['remote'] = vpc_remote_model vpc_reference_dns_resolver_context_model['resource_type'] = 'vpc' # Construct a json representation of a VPCDNSResolverTypeDelegated model vpcdns_resolver_type_delegated_model_json = {} - vpcdns_resolver_type_delegated_model_json['servers'] = [dns_server_model] + vpcdns_resolver_type_delegated_model_json['servers'] = [ + dns_server_model + ] vpcdns_resolver_type_delegated_model_json['type'] = 'delegated' - vpcdns_resolver_type_delegated_model_json['vpc'] = vpc_reference_dns_resolver_context_model + vpcdns_resolver_type_delegated_model_json[ + 'vpc'] = vpc_reference_dns_resolver_context_model # Construct a model instance of VPCDNSResolverTypeDelegated by calling from_dict on the json representation - vpcdns_resolver_type_delegated_model = VPCDNSResolverTypeDelegated.from_dict(vpcdns_resolver_type_delegated_model_json) + vpcdns_resolver_type_delegated_model = VPCDNSResolverTypeDelegated.from_dict( + vpcdns_resolver_type_delegated_model_json) assert vpcdns_resolver_type_delegated_model != False # Construct a model instance of VPCDNSResolverTypeDelegated by calling from_dict on the json representation - vpcdns_resolver_type_delegated_model_dict = VPCDNSResolverTypeDelegated.from_dict(vpcdns_resolver_type_delegated_model_json).__dict__ - vpcdns_resolver_type_delegated_model2 = VPCDNSResolverTypeDelegated(**vpcdns_resolver_type_delegated_model_dict) + vpcdns_resolver_type_delegated_model_dict = VPCDNSResolverTypeDelegated.from_dict( + vpcdns_resolver_type_delegated_model_json).__dict__ + vpcdns_resolver_type_delegated_model2 = VPCDNSResolverTypeDelegated( + **vpcdns_resolver_type_delegated_model_dict) # Verify the model instances are equivalent assert vpcdns_resolver_type_delegated_model == vpcdns_resolver_type_delegated_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_type_delegated_model_json2 = vpcdns_resolver_type_delegated_model.to_dict() + vpcdns_resolver_type_delegated_model_json2 = vpcdns_resolver_type_delegated_model.to_dict( + ) assert vpcdns_resolver_type_delegated_model_json2 == vpcdns_resolver_type_delegated_model_json @@ -87137,7 +102408,8 @@ def test_vpcdns_resolver_type_manual_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' dns_server_model = {} # DNSServer @@ -87147,22 +102419,28 @@ def test_vpcdns_resolver_type_manual_serialization(self): # Construct a json representation of a VPCDNSResolverTypeManual model vpcdns_resolver_type_manual_model_json = {} vpcdns_resolver_type_manual_model_json['servers'] = [dns_server_model] - vpcdns_resolver_type_manual_model_json['manual_servers'] = [dns_server_model] + vpcdns_resolver_type_manual_model_json['manual_servers'] = [ + dns_server_model + ] vpcdns_resolver_type_manual_model_json['type'] = 'manual' # Construct a model instance of VPCDNSResolverTypeManual by calling from_dict on the json representation - vpcdns_resolver_type_manual_model = VPCDNSResolverTypeManual.from_dict(vpcdns_resolver_type_manual_model_json) + vpcdns_resolver_type_manual_model = VPCDNSResolverTypeManual.from_dict( + vpcdns_resolver_type_manual_model_json) assert vpcdns_resolver_type_manual_model != False # Construct a model instance of VPCDNSResolverTypeManual by calling from_dict on the json representation - vpcdns_resolver_type_manual_model_dict = VPCDNSResolverTypeManual.from_dict(vpcdns_resolver_type_manual_model_json).__dict__ - vpcdns_resolver_type_manual_model2 = VPCDNSResolverTypeManual(**vpcdns_resolver_type_manual_model_dict) + vpcdns_resolver_type_manual_model_dict = VPCDNSResolverTypeManual.from_dict( + vpcdns_resolver_type_manual_model_json).__dict__ + vpcdns_resolver_type_manual_model2 = VPCDNSResolverTypeManual( + **vpcdns_resolver_type_manual_model_dict) # Verify the model instances are equivalent assert vpcdns_resolver_type_manual_model == vpcdns_resolver_type_manual_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_type_manual_model_json2 = vpcdns_resolver_type_manual_model.to_dict() + vpcdns_resolver_type_manual_model_json2 = vpcdns_resolver_type_manual_model.to_dict( + ) assert vpcdns_resolver_type_manual_model_json2 == vpcdns_resolver_type_manual_model_json @@ -87179,7 +102457,8 @@ def test_vpcdns_resolver_type_system_serialization(self): # Construct dict forms of any model objects needed in order to build this model. zone_reference_model = {} # ZoneReference - zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' zone_reference_model['name'] = 'us-south-1' dns_server_model = {} # DNSServer @@ -87189,22 +102468,27 @@ def test_vpcdns_resolver_type_system_serialization(self): # Construct a json representation of a VPCDNSResolverTypeSystem model vpcdns_resolver_type_system_model_json = {} vpcdns_resolver_type_system_model_json['servers'] = [dns_server_model] - vpcdns_resolver_type_system_model_json['configuration'] = 'custom_resolver' + vpcdns_resolver_type_system_model_json[ + 'configuration'] = 'custom_resolver' vpcdns_resolver_type_system_model_json['type'] = 'system' # Construct a model instance of VPCDNSResolverTypeSystem by calling from_dict on the json representation - vpcdns_resolver_type_system_model = VPCDNSResolverTypeSystem.from_dict(vpcdns_resolver_type_system_model_json) + vpcdns_resolver_type_system_model = VPCDNSResolverTypeSystem.from_dict( + vpcdns_resolver_type_system_model_json) assert vpcdns_resolver_type_system_model != False # Construct a model instance of VPCDNSResolverTypeSystem by calling from_dict on the json representation - vpcdns_resolver_type_system_model_dict = VPCDNSResolverTypeSystem.from_dict(vpcdns_resolver_type_system_model_json).__dict__ - vpcdns_resolver_type_system_model2 = VPCDNSResolverTypeSystem(**vpcdns_resolver_type_system_model_dict) + vpcdns_resolver_type_system_model_dict = VPCDNSResolverTypeSystem.from_dict( + vpcdns_resolver_type_system_model_json).__dict__ + vpcdns_resolver_type_system_model2 = VPCDNSResolverTypeSystem( + **vpcdns_resolver_type_system_model_dict) # Verify the model instances are equivalent assert vpcdns_resolver_type_system_model == vpcdns_resolver_type_system_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_type_system_model_json2 = vpcdns_resolver_type_system_model.to_dict() + vpcdns_resolver_type_system_model_json2 = vpcdns_resolver_type_system_model.to_dict( + ) assert vpcdns_resolver_type_system_model_json2 == vpcdns_resolver_type_system_model_json @@ -87220,21 +102504,26 @@ def test_vpcdns_resolver_vpc_patch_vpc_identity_by_crn_serialization(self): # Construct a json representation of a VPCDNSResolverVPCPatchVPCIdentityByCRN model vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json = {} - vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of VPCDNSResolverVPCPatchVPCIdentityByCRN by calling from_dict on the json representation - vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model = VPCDNSResolverVPCPatchVPCIdentityByCRN.from_dict(vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json) + vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model = VPCDNSResolverVPCPatchVPCIdentityByCRN.from_dict( + vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json) assert vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model != False # Construct a model instance of VPCDNSResolverVPCPatchVPCIdentityByCRN by calling from_dict on the json representation - vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_dict = VPCDNSResolverVPCPatchVPCIdentityByCRN.from_dict(vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json).__dict__ - vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model2 = VPCDNSResolverVPCPatchVPCIdentityByCRN(**vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_dict) + vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_dict = VPCDNSResolverVPCPatchVPCIdentityByCRN.from_dict( + vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json).__dict__ + vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model2 = VPCDNSResolverVPCPatchVPCIdentityByCRN( + **vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_dict) # Verify the model instances are equivalent assert vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model == vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json2 = vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model.to_dict() + vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json2 = vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model.to_dict( + ) assert vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json2 == vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json @@ -87250,21 +102539,26 @@ def test_vpcdns_resolver_vpc_patch_vpc_identity_by_href_serialization(self): # Construct a json representation of a VPCDNSResolverVPCPatchVPCIdentityByHref model vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json = {} - vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of VPCDNSResolverVPCPatchVPCIdentityByHref by calling from_dict on the json representation - vpcdns_resolver_vpc_patch_vpc_identity_by_href_model = VPCDNSResolverVPCPatchVPCIdentityByHref.from_dict(vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json) + vpcdns_resolver_vpc_patch_vpc_identity_by_href_model = VPCDNSResolverVPCPatchVPCIdentityByHref.from_dict( + vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json) assert vpcdns_resolver_vpc_patch_vpc_identity_by_href_model != False # Construct a model instance of VPCDNSResolverVPCPatchVPCIdentityByHref by calling from_dict on the json representation - vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_dict = VPCDNSResolverVPCPatchVPCIdentityByHref.from_dict(vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json).__dict__ - vpcdns_resolver_vpc_patch_vpc_identity_by_href_model2 = VPCDNSResolverVPCPatchVPCIdentityByHref(**vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_dict) + vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_dict = VPCDNSResolverVPCPatchVPCIdentityByHref.from_dict( + vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json).__dict__ + vpcdns_resolver_vpc_patch_vpc_identity_by_href_model2 = VPCDNSResolverVPCPatchVPCIdentityByHref( + **vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_dict) # Verify the model instances are equivalent assert vpcdns_resolver_vpc_patch_vpc_identity_by_href_model == vpcdns_resolver_vpc_patch_vpc_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json2 = vpcdns_resolver_vpc_patch_vpc_identity_by_href_model.to_dict() + vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json2 = vpcdns_resolver_vpc_patch_vpc_identity_by_href_model.to_dict( + ) assert vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json2 == vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json @@ -87280,21 +102574,26 @@ def test_vpcdns_resolver_vpc_patch_vpc_identity_by_id_serialization(self): # Construct a json representation of a VPCDNSResolverVPCPatchVPCIdentityById model vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json = {} - vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of VPCDNSResolverVPCPatchVPCIdentityById by calling from_dict on the json representation - vpcdns_resolver_vpc_patch_vpc_identity_by_id_model = VPCDNSResolverVPCPatchVPCIdentityById.from_dict(vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json) + vpcdns_resolver_vpc_patch_vpc_identity_by_id_model = VPCDNSResolverVPCPatchVPCIdentityById.from_dict( + vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json) assert vpcdns_resolver_vpc_patch_vpc_identity_by_id_model != False # Construct a model instance of VPCDNSResolverVPCPatchVPCIdentityById by calling from_dict on the json representation - vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_dict = VPCDNSResolverVPCPatchVPCIdentityById.from_dict(vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json).__dict__ - vpcdns_resolver_vpc_patch_vpc_identity_by_id_model2 = VPCDNSResolverVPCPatchVPCIdentityById(**vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_dict) + vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_dict = VPCDNSResolverVPCPatchVPCIdentityById.from_dict( + vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json).__dict__ + vpcdns_resolver_vpc_patch_vpc_identity_by_id_model2 = VPCDNSResolverVPCPatchVPCIdentityById( + **vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_dict) # Verify the model instances are equivalent assert vpcdns_resolver_vpc_patch_vpc_identity_by_id_model == vpcdns_resolver_vpc_patch_vpc_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json2 = vpcdns_resolver_vpc_patch_vpc_identity_by_id_model.to_dict() + vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json2 = vpcdns_resolver_vpc_patch_vpc_identity_by_id_model.to_dict( + ) assert vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json2 == vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json @@ -87310,15 +102609,19 @@ def test_vpc_identity_by_crn_serialization(self): # Construct a json representation of a VPCIdentityByCRN model vpc_identity_by_crn_model_json = {} - vpc_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of VPCIdentityByCRN by calling from_dict on the json representation - vpc_identity_by_crn_model = VPCIdentityByCRN.from_dict(vpc_identity_by_crn_model_json) + vpc_identity_by_crn_model = VPCIdentityByCRN.from_dict( + vpc_identity_by_crn_model_json) assert vpc_identity_by_crn_model != False # Construct a model instance of VPCIdentityByCRN by calling from_dict on the json representation - vpc_identity_by_crn_model_dict = VPCIdentityByCRN.from_dict(vpc_identity_by_crn_model_json).__dict__ - vpc_identity_by_crn_model2 = VPCIdentityByCRN(**vpc_identity_by_crn_model_dict) + vpc_identity_by_crn_model_dict = VPCIdentityByCRN.from_dict( + vpc_identity_by_crn_model_json).__dict__ + vpc_identity_by_crn_model2 = VPCIdentityByCRN( + **vpc_identity_by_crn_model_dict) # Verify the model instances are equivalent assert vpc_identity_by_crn_model == vpc_identity_by_crn_model2 @@ -87340,15 +102643,19 @@ def test_vpc_identity_by_href_serialization(self): # Construct a json representation of a VPCIdentityByHref model vpc_identity_by_href_model_json = {} - vpc_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of VPCIdentityByHref by calling from_dict on the json representation - vpc_identity_by_href_model = VPCIdentityByHref.from_dict(vpc_identity_by_href_model_json) + vpc_identity_by_href_model = VPCIdentityByHref.from_dict( + vpc_identity_by_href_model_json) assert vpc_identity_by_href_model != False # Construct a model instance of VPCIdentityByHref by calling from_dict on the json representation - vpc_identity_by_href_model_dict = VPCIdentityByHref.from_dict(vpc_identity_by_href_model_json).__dict__ - vpc_identity_by_href_model2 = VPCIdentityByHref(**vpc_identity_by_href_model_dict) + vpc_identity_by_href_model_dict = VPCIdentityByHref.from_dict( + vpc_identity_by_href_model_json).__dict__ + vpc_identity_by_href_model2 = VPCIdentityByHref( + **vpc_identity_by_href_model_dict) # Verify the model instances are equivalent assert vpc_identity_by_href_model == vpc_identity_by_href_model2 @@ -87370,15 +102677,19 @@ def test_vpc_identity_by_id_serialization(self): # Construct a json representation of a VPCIdentityById model vpc_identity_by_id_model_json = {} - vpc_identity_by_id_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_identity_by_id_model_json[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of VPCIdentityById by calling from_dict on the json representation - vpc_identity_by_id_model = VPCIdentityById.from_dict(vpc_identity_by_id_model_json) + vpc_identity_by_id_model = VPCIdentityById.from_dict( + vpc_identity_by_id_model_json) assert vpc_identity_by_id_model != False # Construct a model instance of VPCIdentityById by calling from_dict on the json representation - vpc_identity_by_id_model_dict = VPCIdentityById.from_dict(vpc_identity_by_id_model_json).__dict__ - vpc_identity_by_id_model2 = VPCIdentityById(**vpc_identity_by_id_model_dict) + vpc_identity_by_id_model_dict = VPCIdentityById.from_dict( + vpc_identity_by_id_model_json).__dict__ + vpc_identity_by_id_model2 = VPCIdentityById( + **vpc_identity_by_id_model_dict) # Verify the model instances are equivalent assert vpc_identity_by_id_model == vpc_identity_by_id_model2 @@ -87393,29 +102704,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEI Test Class for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN """ - def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_serialization(self): + def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN model vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json = {} - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json[ + 'value'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json).__dict__ - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN(**vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_dict) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN( + ** + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model.to_dict() + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json2 == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_fqdn_model_json @@ -87424,29 +102746,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEI Test Class for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname """ - def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_serialization(self): + def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname model vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json = {} - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json['value'] = 'my-hostname' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json[ + 'value'] = 'my-hostname' # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json).__dict__ - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname(**vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_dict) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname( + ** + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model.to_dict() + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json2 == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_hostname_model_json @@ -87455,29 +102788,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEI Test Class for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 """ - def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_serialization(self): + def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 model vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json = {} - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json['value'] = '192.168.3.4' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json[ + 'value'] = '192.168.3.4' # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4 by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json).__dict__ - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4(**vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_dict) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4( + ** + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model.to_dict() + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json2 == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_i_pv4_model_json @@ -87486,29 +102830,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEI Test Class for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID """ - def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_serialization(self): + def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID model vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json = {} - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json['value'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json[ + 'value'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.from_dict(vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json).__dict__ - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID(**vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_dict) + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_dict = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID.from_dict( + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model2 = VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID( + ** + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model.to_dict() + vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json2 = vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json2 == vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ike_identity_key_id_model_json @@ -87517,29 +102872,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQ Test Class for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN """ - def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_serialization(self): + def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN model vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json = {} - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json[ + 'value'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json).__dict__ - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN(**vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_dict) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN( + ** + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model.to_dict() + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json2 == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_fqdn_model_json @@ -87548,29 +102914,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHo Test Class for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname """ - def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_serialization(self): + def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname model vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json = {} - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json['value'] = 'my-hostname' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json[ + 'value'] = 'my-hostname' # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json).__dict__ - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname(**vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_dict) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname( + ** + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model.to_dict() + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json2 == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_hostname_model_json @@ -87579,29 +102956,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIP Test Class for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 """ - def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_serialization(self): + def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 model vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json = {} - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json['value'] = '192.168.3.4' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json[ + 'value'] = '192.168.3.4' # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4 by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json).__dict__ - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4(**vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_dict) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4( + ** + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model.to_dict() + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json2 == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_i_pv4_model_json @@ -87610,29 +102998,40 @@ class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKe Test Class for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID """ - def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_serialization(self): + def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID """ # Construct a json representation of a VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID model vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json = {} - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json['value'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json[ + 'type'] = 'fqdn' + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json[ + 'value'] = 'qQ+/YEApnl1ZtEgIrfprzb065307thTkzlnLqL5ICpesdbBN03dyCQ==' # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model != False # Construct a model instance of VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID by calling from_dict on the json representation - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.from_dict(vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json).__dict__ - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID(**vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_dict) + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_dict = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID.from_dict( + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json + ).__dict__ + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model2 = VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID( + ** + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model.to_dict() + vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json2 = vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model.to_dict( + ) assert vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json2 == vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity_key_id_model_json @@ -87641,28 +103040,38 @@ class TestModel_VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref: Test Class for VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref """ - def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_serialization(self): + def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref """ # Construct a json representation of a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref model vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json = {} - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.from_dict(vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json) + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.from_dict( + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json + ) assert vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model != False # Construct a model instance of VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_dict = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.from_dict(vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json).__dict__ - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model2 = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref(**vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_dict) + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_dict = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.from_dict( + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json + ).__dict__ + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model2 = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref( + ** + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model == vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json2 = vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model.to_dict() + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json2 = vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model.to_dict( + ) assert vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json2 == vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_model_json @@ -87671,28 +103080,38 @@ class TestModel_VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById: Test Class for VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById """ - def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_serialization(self): + def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById """ # Construct a json representation of a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById model vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json = {} - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.from_dict(vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json) + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.from_dict( + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json + ) assert vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model != False # Construct a model instance of VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_dict = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.from_dict(vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json).__dict__ - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model2 = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById(**vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_dict) + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_dict = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.from_dict( + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json + ).__dict__ + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model2 = VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById( + ** + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model == vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json2 = vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model.to_dict() + vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json2 = vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model.to_dict( + ) assert vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json2 == vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_model_json @@ -87701,28 +103120,38 @@ class TestModel_VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref: Test Class for VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref """ - def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_serialization(self): + def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref """ # Construct a json representation of a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref model vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json = {} - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.from_dict(vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json) + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.from_dict( + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json + ) assert vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model != False # Construct a model instance of VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_dict = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.from_dict(vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json).__dict__ - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model2 = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref(**vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_dict) + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_dict = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.from_dict( + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json + ).__dict__ + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model2 = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref( + ** + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model == vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json2 = vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model.to_dict() + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json2 = vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model.to_dict( + ) assert vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json2 == vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href_model_json @@ -87731,28 +103160,38 @@ class TestModel_VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById: Test Class for VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById """ - def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_serialization(self): + def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById """ # Construct a json representation of a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById model vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json = {} - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.from_dict(vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json) + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.from_dict( + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json + ) assert vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model != False # Construct a model instance of VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_dict = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.from_dict(vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json).__dict__ - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model2 = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById(**vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_dict) + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_dict = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.from_dict( + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json + ).__dict__ + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model2 = VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById( + ** + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model == vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json2 = vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model.to_dict() + vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json2 = vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model.to_dict( + ) assert vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json2 == vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_model_json @@ -87761,28 +103200,38 @@ class TestModel_VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref: Test Class for VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref """ - def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_serialization(self): + def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref """ # Construct a json representation of a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref model vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json = {} - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.from_dict(vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json) + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.from_dict( + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json + ) assert vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model != False # Construct a model instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_dict = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.from_dict(vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json).__dict__ - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model2 = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(**vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_dict) + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_dict = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.from_dict( + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json + ).__dict__ + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model2 = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref( + ** + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model == vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json2 = vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model.to_dict() + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json2 = vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model.to_dict( + ) assert vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json2 == vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_href_model_json @@ -87791,28 +103240,38 @@ class TestModel_VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById: Test Class for VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById """ - def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_serialization(self): + def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById """ # Construct a json representation of a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById model vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json = {} - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.from_dict(vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json) + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.from_dict( + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json + ) assert vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model != False # Construct a model instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_dict = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.from_dict(vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json).__dict__ - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model2 = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById(**vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_dict) + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_dict = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.from_dict( + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json + ).__dict__ + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model2 = VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById( + ** + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model == vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json2 = vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model.to_dict() + vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json2 = vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model.to_dict( + ) assert vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json2 == vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id_model_json @@ -87821,28 +103280,38 @@ class TestModel_VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHre Test Class for VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref """ - def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_serialization(self): + def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref """ # Construct a json representation of a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref model vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json = {} - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.from_dict(vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json) + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.from_dict( + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json + ) assert vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model != False # Construct a model instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_dict = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.from_dict(vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json).__dict__ - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model2 = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(**vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_dict) + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_dict = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.from_dict( + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json + ).__dict__ + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model2 = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref( + ** + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model == vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json2 = vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model.to_dict() + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json2 = vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model.to_dict( + ) assert vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json2 == vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_href_model_json @@ -87851,28 +103320,38 @@ class TestModel_VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById: Test Class for VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById """ - def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_serialization(self): + def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById """ # Construct a json representation of a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById model vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json = {} - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' # Construct a model instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.from_dict(vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json) + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.from_dict( + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json + ) assert vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model != False # Construct a model instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById by calling from_dict on the json representation - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_dict = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.from_dict(vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json).__dict__ - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model2 = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById(**vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_dict) + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_dict = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.from_dict( + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json + ).__dict__ + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model2 = VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById( + ** + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model == vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json2 = vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model.to_dict() + vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json2 = vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model.to_dict( + ) assert vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json2 == vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_by_id_model_json @@ -87894,77 +103373,120 @@ def test_vpn_gateway_connection_policy_mode_serialization(self): vpn_gateway_connection_dpd_model['timeout'] = 120 ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted - ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + ike_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' ike_policy_reference_model = {} # IKEPolicyReference - ike_policy_reference_model['deleted'] = ike_policy_reference_deleted_model - ike_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - ike_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'deleted'] = ike_policy_reference_deleted_model + ike_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_reference_model['name'] = 'my-ike-policy' ike_policy_reference_model['resource_type'] = 'ike_policy' - i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted - i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + i_psec_policy_reference_deleted_model = { + } # IPsecPolicyReferenceDeleted + i_psec_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' i_psec_policy_reference_model = {} # IPsecPolicyReference - i_psec_policy_reference_model['deleted'] = i_psec_policy_reference_deleted_model - i_psec_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - i_psec_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'deleted'] = i_psec_policy_reference_deleted_model + i_psec_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_reference_model['name'] = 'my-ipsec-policy' i_psec_policy_reference_model['resource_type'] = 'ipsec_policy' - vpn_gateway_connection_status_reason_model = {} # VPNGatewayConnectionStatusReason - vpn_gateway_connection_status_reason_model['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_status_reason_model['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' - - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_status_reason_model = { + } # VPNGatewayConnectionStatusReason + vpn_gateway_connection_status_reason_model[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_status_reason_model[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' - - vpn_gateway_connection_policy_mode_local_model = {} # VPNGatewayConnectionPolicyModeLocal - vpn_gateway_connection_policy_mode_local_model['cidrs'] = ['testString'] - vpn_gateway_connection_policy_mode_local_model['ike_identities'] = [vpn_gateway_connection_ike_identity_model] - - vpn_gateway_connection_policy_mode_peer_model = {} # VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress - vpn_gateway_connection_policy_mode_peer_model['cidrs'] = ['10.45.1.0/24'] - vpn_gateway_connection_policy_mode_peer_model['ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' + + vpn_gateway_connection_policy_mode_local_model = { + } # VPNGatewayConnectionPolicyModeLocal + vpn_gateway_connection_policy_mode_local_model['cidrs'] = [ + '192.168.1.0/24' + ] + vpn_gateway_connection_policy_mode_local_model['ike_identities'] = [ + vpn_gateway_connection_ike_identity_model + ] + + vpn_gateway_connection_policy_mode_peer_model = { + } # VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress + vpn_gateway_connection_policy_mode_peer_model['cidrs'] = [ + '10.45.1.0/24' + ] + vpn_gateway_connection_policy_mode_peer_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model vpn_gateway_connection_policy_mode_peer_model['type'] = 'address' vpn_gateway_connection_policy_mode_peer_model['address'] = '169.21.50.5' # Construct a json representation of a VPNGatewayConnectionPolicyMode model vpn_gateway_connection_policy_mode_model_json = {} vpn_gateway_connection_policy_mode_model_json['admin_state_up'] = True - vpn_gateway_connection_policy_mode_model_json['authentication_mode'] = 'psk' - vpn_gateway_connection_policy_mode_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpn_gateway_connection_policy_mode_model_json['dead_peer_detection'] = vpn_gateway_connection_dpd_model - vpn_gateway_connection_policy_mode_model_json['establish_mode'] = 'bidirectional' - vpn_gateway_connection_policy_mode_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_policy_mode_model_json['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' - vpn_gateway_connection_policy_mode_model_json['ike_policy'] = ike_policy_reference_model - vpn_gateway_connection_policy_mode_model_json['ipsec_policy'] = i_psec_policy_reference_model + vpn_gateway_connection_policy_mode_model_json[ + 'authentication_mode'] = 'psk' + vpn_gateway_connection_policy_mode_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + vpn_gateway_connection_policy_mode_model_json[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_model + vpn_gateway_connection_policy_mode_model_json[ + 'establish_mode'] = 'bidirectional' + vpn_gateway_connection_policy_mode_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_policy_mode_model_json[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_policy_mode_model_json[ + 'ike_policy'] = ike_policy_reference_model + vpn_gateway_connection_policy_mode_model_json[ + 'ipsec_policy'] = i_psec_policy_reference_model vpn_gateway_connection_policy_mode_model_json['mode'] = 'policy' - vpn_gateway_connection_policy_mode_model_json['name'] = 'my-vpn-connection' - vpn_gateway_connection_policy_mode_model_json['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_policy_mode_model_json['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_policy_mode_model_json[ + 'name'] = 'my-vpn-connection' + vpn_gateway_connection_policy_mode_model_json[ + 'psk'] = 'lkj14b1oi0alcniejkso' + vpn_gateway_connection_policy_mode_model_json[ + 'resource_type'] = 'vpn_gateway_connection' vpn_gateway_connection_policy_mode_model_json['status'] = 'down' - vpn_gateway_connection_policy_mode_model_json['status_reasons'] = [vpn_gateway_connection_status_reason_model] - vpn_gateway_connection_policy_mode_model_json['local'] = vpn_gateway_connection_policy_mode_local_model - vpn_gateway_connection_policy_mode_model_json['peer'] = vpn_gateway_connection_policy_mode_peer_model + vpn_gateway_connection_policy_mode_model_json['status_reasons'] = [ + vpn_gateway_connection_status_reason_model + ] + vpn_gateway_connection_policy_mode_model_json[ + 'local'] = vpn_gateway_connection_policy_mode_local_model + vpn_gateway_connection_policy_mode_model_json[ + 'peer'] = vpn_gateway_connection_policy_mode_peer_model # Construct a model instance of VPNGatewayConnectionPolicyMode by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_model = VPNGatewayConnectionPolicyMode.from_dict(vpn_gateway_connection_policy_mode_model_json) + vpn_gateway_connection_policy_mode_model = VPNGatewayConnectionPolicyMode.from_dict( + vpn_gateway_connection_policy_mode_model_json) assert vpn_gateway_connection_policy_mode_model != False # Construct a model instance of VPNGatewayConnectionPolicyMode by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_model_dict = VPNGatewayConnectionPolicyMode.from_dict(vpn_gateway_connection_policy_mode_model_json).__dict__ - vpn_gateway_connection_policy_mode_model2 = VPNGatewayConnectionPolicyMode(**vpn_gateway_connection_policy_mode_model_dict) + vpn_gateway_connection_policy_mode_model_dict = VPNGatewayConnectionPolicyMode.from_dict( + vpn_gateway_connection_policy_mode_model_json).__dict__ + vpn_gateway_connection_policy_mode_model2 = VPNGatewayConnectionPolicyMode( + **vpn_gateway_connection_policy_mode_model_dict) # Verify the model instances are equivalent assert vpn_gateway_connection_policy_mode_model == vpn_gateway_connection_policy_mode_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_policy_mode_model_json2 = vpn_gateway_connection_policy_mode_model.to_dict() + vpn_gateway_connection_policy_mode_model_json2 = vpn_gateway_connection_policy_mode_model.to_dict( + ) assert vpn_gateway_connection_policy_mode_model_json2 == vpn_gateway_connection_policy_mode_model_json @@ -87973,36 +103495,50 @@ class TestModel_VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionP Test Class for VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress """ - def test_vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_serialization(self): + def test_vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress model vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json = {} - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json['cidrs'] = ['10.45.1.0/24'] - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json['address'] = '169.21.50.5' + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json[ + 'cidrs'] = ['10.45.1.0/24'] + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json[ + 'address'] = '169.21.50.5' # Construct a model instance of VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json) + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json + ) assert vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model != False # Construct a model instance of VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json).__dict__ - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress(**vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict) + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json + ).__dict__ + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress( + ** + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model == vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model.to_dict() + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model.to_dict( + ) assert vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json2 == vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json @@ -88011,36 +103547,50 @@ class TestModel_VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionP Test Class for VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN """ - def test_vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_serialization(self): + def test_vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN model vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json = {} - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json['cidrs'] = ['10.45.1.0/24'] - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json['fqdn'] = 'my-service.example.com' + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'cidrs'] = ['10.45.1.0/24'] + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'fqdn'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json) + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json + ) assert vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model != False # Construct a model instance of VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json).__dict__ - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN(**vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict) + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json + ).__dict__ + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN( + ** + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model == vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model.to_dict() + vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model.to_dict( + ) assert vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json2 == vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json @@ -88049,37 +103599,52 @@ class TestModel_VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddr Test Class for VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress """ - def test_vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_serialization(self): + def test_vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress model vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json = {} - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json['cidrs'] = ['10.45.1.0/24'] - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_model - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json['type'] = 'address' - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json['address'] = '169.21.50.5' + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json[ + 'cidrs'] = ['10.45.1.0/24'] + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json[ + 'type'] = 'address' + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json[ + 'address'] = '169.21.50.5' # Construct a model instance of VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json) + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json + ) assert vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model != False # Construct a model instance of VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json).__dict__ - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress(**vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_dict) + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json + ).__dict__ + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress( + ** + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model == vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model.to_dict() + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model.to_dict( + ) assert vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json2 == vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_address_model_json @@ -88088,37 +103653,52 @@ class TestModel_VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN Test Class for VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN """ - def test_vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_serialization(self): + def test_vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN model vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json = {} - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json['cidrs'] = ['10.45.1.0/24'] - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_model - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json['type'] = 'address' - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json['fqdn'] = 'my-service.example.com' + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'cidrs'] = ['10.45.1.0/24'] + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'type'] = 'address' + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'fqdn'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json) + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json + ) assert vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model != False # Construct a model instance of VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json).__dict__ - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN(**vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict) + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json + ).__dict__ + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN( + ** + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model == vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model.to_dict() + vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model.to_dict( + ) assert vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json2 == vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json @@ -88127,62 +103707,98 @@ class TestModel_VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModeProto Test Class for VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype """ - def test_vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_serialization(self): + def test_vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_dpd_prototype_model = {} # VPNGatewayConnectionDPDPrototype + vpn_gateway_connection_dpd_prototype_model = { + } # VPNGatewayConnectionDPDPrototype vpn_gateway_connection_dpd_prototype_model['action'] = 'restart' vpn_gateway_connection_dpd_prototype_model['interval'] = 30 vpn_gateway_connection_dpd_prototype_model['timeout'] = 120 - vpn_gateway_connection_ike_policy_prototype_model = {} # VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById - vpn_gateway_connection_ike_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_prototype_model = { + } # VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById + vpn_gateway_connection_ike_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_connection_i_psec_policy_prototype_model = {} # VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById - vpn_gateway_connection_i_psec_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_prototype_model = { + } # VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById + vpn_gateway_connection_i_psec_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' - - vpn_gateway_connection_policy_mode_local_prototype_model = {} # VPNGatewayConnectionPolicyModeLocalPrototype - vpn_gateway_connection_policy_mode_local_prototype_model['cidrs'] = ['testString'] - vpn_gateway_connection_policy_mode_local_prototype_model['ike_identities'] = [vpn_gateway_connection_ike_identity_prototype_model] - - vpn_gateway_connection_policy_mode_peer_prototype_model = {} # VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress - vpn_gateway_connection_policy_mode_peer_prototype_model['cidrs'] = ['10.45.1.0/24'] - vpn_gateway_connection_policy_mode_peer_prototype_model['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_policy_mode_peer_prototype_model['address'] = '169.21.50.5' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' + + vpn_gateway_connection_policy_mode_local_prototype_model = { + } # VPNGatewayConnectionPolicyModeLocalPrototype + vpn_gateway_connection_policy_mode_local_prototype_model['cidrs'] = [ + '192.168.1.0/24' + ] + vpn_gateway_connection_policy_mode_local_prototype_model[ + 'ike_identities'] = [ + vpn_gateway_connection_ike_identity_prototype_model + ] + + vpn_gateway_connection_policy_mode_peer_prototype_model = { + } # VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress + vpn_gateway_connection_policy_mode_peer_prototype_model['cidrs'] = [ + '10.45.1.0/24' + ] + vpn_gateway_connection_policy_mode_peer_prototype_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_policy_mode_peer_prototype_model[ + 'address'] = '169.21.50.5' # Construct a json representation of a VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype model vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json = {} - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['admin_state_up'] = True - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['establish_mode'] = 'bidirectional' - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['name'] = 'my-vpn-connection' - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['local'] = vpn_gateway_connection_policy_mode_local_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json['peer'] = vpn_gateway_connection_policy_mode_peer_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'admin_state_up'] = True + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'establish_mode'] = 'bidirectional' + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'name'] = 'my-vpn-connection' + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'psk'] = 'lkj14b1oi0alcniejkso' + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'local'] = vpn_gateway_connection_policy_mode_local_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json[ + 'peer'] = vpn_gateway_connection_policy_mode_peer_prototype_model # Construct a model instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype by calling from_dict on the json representation - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model = VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.from_dict(vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json) + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model = VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.from_dict( + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json + ) assert vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model != False # Construct a model instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype by calling from_dict on the json representation - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_dict = VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.from_dict(vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json).__dict__ - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model2 = VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(**vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_dict) + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_dict = VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.from_dict( + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json + ).__dict__ + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model2 = VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype( + ** + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model == vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json2 = vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model.to_dict() + vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json2 = vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model.to_dict( + ) assert vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json2 == vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_prototype_model_json @@ -88191,61 +103807,94 @@ class TestModel_VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteMode Test Class for VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype """ - def test_vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_serialization(self): + def test_vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_dpd_prototype_model = {} # VPNGatewayConnectionDPDPrototype + vpn_gateway_connection_dpd_prototype_model = { + } # VPNGatewayConnectionDPDPrototype vpn_gateway_connection_dpd_prototype_model['action'] = 'restart' vpn_gateway_connection_dpd_prototype_model['interval'] = 30 vpn_gateway_connection_dpd_prototype_model['timeout'] = 120 - vpn_gateway_connection_ike_policy_prototype_model = {} # VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById - vpn_gateway_connection_ike_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_ike_policy_prototype_model = { + } # VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById + vpn_gateway_connection_ike_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_connection_i_psec_policy_prototype_model = {} # VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById - vpn_gateway_connection_i_psec_policy_prototype_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_connection_i_psec_policy_prototype_model = { + } # VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById + vpn_gateway_connection_i_psec_policy_prototype_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' - - vpn_gateway_connection_static_route_mode_local_prototype_model = {} # VPNGatewayConnectionStaticRouteModeLocalPrototype - vpn_gateway_connection_static_route_mode_local_prototype_model['ike_identities'] = [vpn_gateway_connection_ike_identity_prototype_model] - - vpn_gateway_connection_static_route_mode_peer_prototype_model = {} # VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress - vpn_gateway_connection_static_route_mode_peer_prototype_model['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_static_route_mode_peer_prototype_model['address'] = '169.21.50.5' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' + + vpn_gateway_connection_static_route_mode_local_prototype_model = { + } # VPNGatewayConnectionStaticRouteModeLocalPrototype + vpn_gateway_connection_static_route_mode_local_prototype_model[ + 'ike_identities'] = [ + vpn_gateway_connection_ike_identity_prototype_model + ] + + vpn_gateway_connection_static_route_mode_peer_prototype_model = { + } # VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress + vpn_gateway_connection_static_route_mode_peer_prototype_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_static_route_mode_peer_prototype_model[ + 'address'] = '169.21.50.5' # Construct a json representation of a VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json = {} - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['admin_state_up'] = True - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['establish_mode'] = 'bidirectional' - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['name'] = 'my-vpn-connection' - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['local'] = vpn_gateway_connection_static_route_mode_local_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['peer'] = vpn_gateway_connection_static_route_mode_peer_prototype_model - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json['routing_protocol'] = 'none' + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'admin_state_up'] = True + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'establish_mode'] = 'bidirectional' + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'ike_policy'] = vpn_gateway_connection_ike_policy_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'ipsec_policy'] = vpn_gateway_connection_i_psec_policy_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'name'] = 'my-vpn-connection' + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'psk'] = 'lkj14b1oi0alcniejkso' + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'local'] = vpn_gateway_connection_static_route_mode_local_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'peer'] = vpn_gateway_connection_static_route_mode_peer_prototype_model + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json[ + 'routing_protocol'] = 'none' # Construct a model instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype by calling from_dict on the json representation - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model = VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.from_dict(vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json) + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model = VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.from_dict( + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json + ) assert vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model != False # Construct a model instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype by calling from_dict on the json representation - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_dict = VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.from_dict(vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json).__dict__ - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model2 = VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(**vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_dict) + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_dict = VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.from_dict( + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json + ).__dict__ + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model2 = VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype( + ** + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model == vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json2 = vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model.to_dict() + vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json2 = vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model.to_dict( + ) assert vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json2 == vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mode_prototype_model_json @@ -88254,35 +103903,48 @@ class TestModel_VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnec Test Class for VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress """ - def test_vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_serialization(self): + def test_vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json = {} - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json['address'] = '169.21.50.5' + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json[ + 'address'] = '169.21.50.5' # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json) + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json + ) assert vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model != False # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json).__dict__ - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(**vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict) + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json + ).__dict__ + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress( + ** + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model == vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model.to_dict() + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model.to_dict( + ) assert vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json2 == vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model_json @@ -88291,35 +103953,48 @@ class TestModel_VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnec Test Class for VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN """ - def test_vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_serialization(self): + def test_vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_prototype_model = {} # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_prototype_model = { + } # VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_prototype_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_prototype_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_prototype_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN model vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json = {} - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json['fqdn'] = 'my-service.example.com' + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_prototype_model + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'fqdn'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json) + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json + ) assert vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model != False # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json).__dict__ - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN(**vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict) + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json + ).__dict__ + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN( + ** + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model == vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model.to_dict() + vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model.to_dict( + ) assert vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json2 == vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model_json @@ -88328,36 +104003,50 @@ class TestModel_VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerB Test Class for VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress """ - def test_vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_serialization(self): + def test_vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress model vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json = {} - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_model - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json['type'] = 'address' - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json['address'] = '169.21.50.5' + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json[ + 'type'] = 'address' + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json[ + 'address'] = '169.21.50.5' # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json) + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json + ) assert vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model != False # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.from_dict(vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json).__dict__ - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress(**vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_dict) + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_dict = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress.from_dict( + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json + ).__dict__ + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model2 = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress( + ** + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model == vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model.to_dict() + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json2 = vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model.to_dict( + ) assert vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json2 == vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_address_model_json @@ -88366,36 +104055,50 @@ class TestModel_VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerB Test Class for VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN """ - def test_vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_serialization(self): + def test_vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN """ # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' # Construct a json representation of a VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN model vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json = {} - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json['ike_identity'] = vpn_gateway_connection_ike_identity_model - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json['type'] = 'address' - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json['fqdn'] = 'my-service.example.com' + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'type'] = 'address' + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json[ + 'fqdn'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json) + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json + ) assert vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model != False # Construct a model instance of VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN by calling from_dict on the json representation - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.from_dict(vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json).__dict__ - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN(**vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict) + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN.from_dict( + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json + ).__dict__ + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model2 = VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN( + ** + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model == vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model.to_dict() + vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json2 = vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model.to_dict( + ) assert vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json2 == vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_peer_by_fqdn_model_json @@ -88411,44 +104114,68 @@ def test_vpn_gateway_policy_mode_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference - vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + vpn_gateway_connection_reference_model = { + } # VPNGatewayConnectionReference + vpn_gateway_connection_reference_model[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model[ + 'resource_type'] = 'vpn_gateway_connection' vpn_gateway_health_reason_model = {} # VPNGatewayHealthReason vpn_gateway_health_reason_model['code'] = 'cannot_reserve_ip_address' - vpn_gateway_health_reason_model['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + vpn_gateway_health_reason_model[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' vpn_gateway_lifecycle_reason_model = {} # VPNGatewayLifecycleReason - vpn_gateway_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_gateway_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - - vpn_gateway_member_health_reason_model = {} # VPNGatewayMemberHealthReason - vpn_gateway_member_health_reason_model['code'] = 'cannot_reserve_ip_address' - vpn_gateway_member_health_reason_model['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_member_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' - - vpn_gateway_member_lifecycle_reason_model = {} # VPNGatewayMemberLifecycleReason - vpn_gateway_member_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_gateway_member_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_member_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_gateway_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + vpn_gateway_member_health_reason_model = { + } # VPNGatewayMemberHealthReason + vpn_gateway_member_health_reason_model[ + 'code'] = 'cannot_reserve_ip_address' + vpn_gateway_member_health_reason_model[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_member_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + + vpn_gateway_member_lifecycle_reason_model = { + } # VPNGatewayMemberLifecycleReason + vpn_gateway_member_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_member_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_member_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' @@ -88456,73 +104183,103 @@ def test_vpn_gateway_policy_mode_serialization(self): ip_model['address'] = '192.168.3.4' vpn_gateway_member_model = {} # VPNGatewayMember - vpn_gateway_member_model['health_reasons'] = [vpn_gateway_member_health_reason_model] + vpn_gateway_member_model['health_reasons'] = [ + vpn_gateway_member_health_reason_model + ] vpn_gateway_member_model['health_state'] = 'ok' - vpn_gateway_member_model['lifecycle_reasons'] = [vpn_gateway_member_lifecycle_reason_model] + vpn_gateway_member_model['lifecycle_reasons'] = [ + vpn_gateway_member_lifecycle_reason_model + ] vpn_gateway_member_model['lifecycle_state'] = 'stable' vpn_gateway_member_model['private_ip'] = reserved_ip_reference_model vpn_gateway_member_model['public_ip'] = ip_model vpn_gateway_member_model['role'] = 'active' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' # Construct a json representation of a VPNGatewayPolicyMode model vpn_gateway_policy_mode_model_json = {} - vpn_gateway_policy_mode_model_json['connections'] = [vpn_gateway_connection_reference_model] - vpn_gateway_policy_mode_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpn_gateway_policy_mode_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_policy_mode_model_json['health_reasons'] = [vpn_gateway_health_reason_model] + vpn_gateway_policy_mode_model_json['connections'] = [ + vpn_gateway_connection_reference_model + ] + vpn_gateway_policy_mode_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + vpn_gateway_policy_mode_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_policy_mode_model_json['health_reasons'] = [ + vpn_gateway_health_reason_model + ] vpn_gateway_policy_mode_model_json['health_state'] = 'ok' - vpn_gateway_policy_mode_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_policy_mode_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_policy_mode_model_json['lifecycle_reasons'] = [vpn_gateway_lifecycle_reason_model] + vpn_gateway_policy_mode_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_policy_mode_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_policy_mode_model_json['lifecycle_reasons'] = [ + vpn_gateway_lifecycle_reason_model + ] vpn_gateway_policy_mode_model_json['lifecycle_state'] = 'stable' - vpn_gateway_policy_mode_model_json['members'] = [vpn_gateway_member_model] + vpn_gateway_policy_mode_model_json['members'] = [ + vpn_gateway_member_model + ] vpn_gateway_policy_mode_model_json['name'] = 'my-vpn-gateway' - vpn_gateway_policy_mode_model_json['resource_group'] = resource_group_reference_model + vpn_gateway_policy_mode_model_json[ + 'resource_group'] = resource_group_reference_model vpn_gateway_policy_mode_model_json['resource_type'] = 'vpn_gateway' vpn_gateway_policy_mode_model_json['subnet'] = subnet_reference_model vpn_gateway_policy_mode_model_json['vpc'] = vpc_reference_model vpn_gateway_policy_mode_model_json['mode'] = 'policy' # Construct a model instance of VPNGatewayPolicyMode by calling from_dict on the json representation - vpn_gateway_policy_mode_model = VPNGatewayPolicyMode.from_dict(vpn_gateway_policy_mode_model_json) + vpn_gateway_policy_mode_model = VPNGatewayPolicyMode.from_dict( + vpn_gateway_policy_mode_model_json) assert vpn_gateway_policy_mode_model != False # Construct a model instance of VPNGatewayPolicyMode by calling from_dict on the json representation - vpn_gateway_policy_mode_model_dict = VPNGatewayPolicyMode.from_dict(vpn_gateway_policy_mode_model_json).__dict__ - vpn_gateway_policy_mode_model2 = VPNGatewayPolicyMode(**vpn_gateway_policy_mode_model_dict) + vpn_gateway_policy_mode_model_dict = VPNGatewayPolicyMode.from_dict( + vpn_gateway_policy_mode_model_json).__dict__ + vpn_gateway_policy_mode_model2 = VPNGatewayPolicyMode( + **vpn_gateway_policy_mode_model_dict) # Verify the model instances are equivalent assert vpn_gateway_policy_mode_model == vpn_gateway_policy_mode_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_policy_mode_model_json2 = vpn_gateway_policy_mode_model.to_dict() + vpn_gateway_policy_mode_model_json2 = vpn_gateway_policy_mode_model.to_dict( + ) assert vpn_gateway_policy_mode_model_json2 == vpn_gateway_policy_mode_model_json @@ -88531,7 +104288,8 @@ class TestModel_VPNGatewayPrototypeVPNGatewayPolicyModePrototype: Test Class for VPNGatewayPrototypeVPNGatewayPolicyModePrototype """ - def test_vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_serialization(self): + def test_vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_serialization( + self): """ Test serialization/deserialization for VPNGatewayPrototypeVPNGatewayPolicyModePrototype """ @@ -88542,28 +104300,39 @@ def test_vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_serialization(s resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a VPNGatewayPrototypeVPNGatewayPolicyModePrototype model vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json = {} - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json['name'] = 'my-vpn-gateway' - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json['resource_group'] = resource_group_identity_model - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json['subnet'] = subnet_identity_model - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json['mode'] = 'policy' + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json[ + 'name'] = 'my-vpn-gateway' + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json[ + 'resource_group'] = resource_group_identity_model + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json[ + 'subnet'] = subnet_identity_model + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json[ + 'mode'] = 'policy' # Construct a model instance of VPNGatewayPrototypeVPNGatewayPolicyModePrototype by calling from_dict on the json representation - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model = VPNGatewayPrototypeVPNGatewayPolicyModePrototype.from_dict(vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json) + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model = VPNGatewayPrototypeVPNGatewayPolicyModePrototype.from_dict( + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json) assert vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model != False # Construct a model instance of VPNGatewayPrototypeVPNGatewayPolicyModePrototype by calling from_dict on the json representation - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_dict = VPNGatewayPrototypeVPNGatewayPolicyModePrototype.from_dict(vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json).__dict__ - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model2 = VPNGatewayPrototypeVPNGatewayPolicyModePrototype(**vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_dict) + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_dict = VPNGatewayPrototypeVPNGatewayPolicyModePrototype.from_dict( + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json + ).__dict__ + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model2 = VPNGatewayPrototypeVPNGatewayPolicyModePrototype( + ** + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_dict) # Verify the model instances are equivalent assert vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model == vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json2 = vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model.to_dict() + vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json2 = vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model.to_dict( + ) assert vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json2 == vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json @@ -88572,7 +104341,8 @@ class TestModel_VPNGatewayPrototypeVPNGatewayRouteModePrototype: Test Class for VPNGatewayPrototypeVPNGatewayRouteModePrototype """ - def test_vpn_gateway_prototype_vpn_gateway_route_mode_prototype_serialization(self): + def test_vpn_gateway_prototype_vpn_gateway_route_mode_prototype_serialization( + self): """ Test serialization/deserialization for VPNGatewayPrototypeVPNGatewayRouteModePrototype """ @@ -88583,28 +104353,38 @@ def test_vpn_gateway_prototype_vpn_gateway_route_mode_prototype_serialization(se resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_identity_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a json representation of a VPNGatewayPrototypeVPNGatewayRouteModePrototype model vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json = {} - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json['name'] = 'my-vpn-gateway' - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json['resource_group'] = resource_group_identity_model - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json['subnet'] = subnet_identity_model - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json['mode'] = 'route' + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json[ + 'name'] = 'my-vpn-gateway' + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json[ + 'resource_group'] = resource_group_identity_model + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json[ + 'subnet'] = subnet_identity_model + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json[ + 'mode'] = 'route' # Construct a model instance of VPNGatewayPrototypeVPNGatewayRouteModePrototype by calling from_dict on the json representation - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model = VPNGatewayPrototypeVPNGatewayRouteModePrototype.from_dict(vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json) + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model = VPNGatewayPrototypeVPNGatewayRouteModePrototype.from_dict( + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json) assert vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model != False # Construct a model instance of VPNGatewayPrototypeVPNGatewayRouteModePrototype by calling from_dict on the json representation - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_dict = VPNGatewayPrototypeVPNGatewayRouteModePrototype.from_dict(vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json).__dict__ - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model2 = VPNGatewayPrototypeVPNGatewayRouteModePrototype(**vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_dict) + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_dict = VPNGatewayPrototypeVPNGatewayRouteModePrototype.from_dict( + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json + ).__dict__ + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model2 = VPNGatewayPrototypeVPNGatewayRouteModePrototype( + **vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_dict) # Verify the model instances are equivalent assert vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model == vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json2 = vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model.to_dict() + vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json2 = vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model.to_dict( + ) assert vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json2 == vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json @@ -88620,44 +104400,68 @@ def test_vpn_gateway_route_mode_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted - vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference - vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model - vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_reference_deleted_model = { + } # VPNGatewayConnectionReferenceDeleted + vpn_gateway_connection_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + vpn_gateway_connection_reference_model = { + } # VPNGatewayConnectionReference + vpn_gateway_connection_reference_model[ + 'deleted'] = vpn_gateway_connection_reference_deleted_model + vpn_gateway_connection_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_reference_model[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection' - vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_reference_model[ + 'resource_type'] = 'vpn_gateway_connection' vpn_gateway_health_reason_model = {} # VPNGatewayHealthReason vpn_gateway_health_reason_model['code'] = 'cannot_reserve_ip_address' - vpn_gateway_health_reason_model['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + vpn_gateway_health_reason_model[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' vpn_gateway_lifecycle_reason_model = {} # VPNGatewayLifecycleReason - vpn_gateway_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_gateway_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - - vpn_gateway_member_health_reason_model = {} # VPNGatewayMemberHealthReason - vpn_gateway_member_health_reason_model['code'] = 'cannot_reserve_ip_address' - vpn_gateway_member_health_reason_model['message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' - vpn_gateway_member_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' - - vpn_gateway_member_lifecycle_reason_model = {} # VPNGatewayMemberLifecycleReason - vpn_gateway_member_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - vpn_gateway_member_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - vpn_gateway_member_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + vpn_gateway_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + vpn_gateway_member_health_reason_model = { + } # VPNGatewayMemberHealthReason + vpn_gateway_member_health_reason_model[ + 'code'] = 'cannot_reserve_ip_address' + vpn_gateway_member_health_reason_model[ + 'message'] = 'IP address exhaustion (release addresses on the VPN\'s subnet).' + vpn_gateway_member_health_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health' + + vpn_gateway_member_lifecycle_reason_model = { + } # VPNGatewayMemberLifecycleReason + vpn_gateway_member_lifecycle_reason_model[ + 'code'] = 'resource_suspended_by_provider' + vpn_gateway_member_lifecycle_reason_model[ + 'message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + vpn_gateway_member_lifecycle_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted - reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + reserved_ip_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' - reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model - reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - reserved_ip_reference_model['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'deleted'] = reserved_ip_reference_deleted_model + reserved_ip_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + reserved_ip_reference_model[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' reserved_ip_reference_model['name'] = 'my-reserved-ip' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' @@ -88665,73 +104469,102 @@ def test_vpn_gateway_route_mode_serialization(self): ip_model['address'] = '192.168.3.4' vpn_gateway_member_model = {} # VPNGatewayMember - vpn_gateway_member_model['health_reasons'] = [vpn_gateway_member_health_reason_model] + vpn_gateway_member_model['health_reasons'] = [ + vpn_gateway_member_health_reason_model + ] vpn_gateway_member_model['health_state'] = 'ok' - vpn_gateway_member_model['lifecycle_reasons'] = [vpn_gateway_member_lifecycle_reason_model] + vpn_gateway_member_model['lifecycle_reasons'] = [ + vpn_gateway_member_lifecycle_reason_model + ] vpn_gateway_member_model['lifecycle_state'] = 'stable' vpn_gateway_member_model['private_ip'] = reserved_ip_reference_model vpn_gateway_member_model['public_ip'] = ip_model vpn_gateway_member_model['role'] = 'active' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' subnet_reference_deleted_model = {} # SubnetReferenceDeleted - subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + subnet_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['deleted'] = subnet_reference_deleted_model - subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - subnet_reference_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + subnet_reference_model[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' subnet_reference_model['name'] = 'my-subnet' subnet_reference_model['resource_type'] = 'subnet' vpc_reference_deleted_model = {} # VPCReferenceDeleted - vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + vpc_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' vpc_reference_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = vpc_reference_deleted_model - vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + vpc_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['name'] = 'my-vpc' vpc_reference_model['resource_type'] = 'vpc' # Construct a json representation of a VPNGatewayRouteMode model vpn_gateway_route_mode_model_json = {} - vpn_gateway_route_mode_model_json['connections'] = [vpn_gateway_connection_reference_model] + vpn_gateway_route_mode_model_json['connections'] = [ + vpn_gateway_connection_reference_model + ] vpn_gateway_route_mode_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpn_gateway_route_mode_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_route_mode_model_json['health_reasons'] = [vpn_gateway_health_reason_model] + vpn_gateway_route_mode_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_route_mode_model_json['health_reasons'] = [ + vpn_gateway_health_reason_model + ] vpn_gateway_route_mode_model_json['health_state'] = 'ok' - vpn_gateway_route_mode_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_route_mode_model_json['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' - vpn_gateway_route_mode_model_json['lifecycle_reasons'] = [vpn_gateway_lifecycle_reason_model] + vpn_gateway_route_mode_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_route_mode_model_json[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + vpn_gateway_route_mode_model_json['lifecycle_reasons'] = [ + vpn_gateway_lifecycle_reason_model + ] vpn_gateway_route_mode_model_json['lifecycle_state'] = 'stable' - vpn_gateway_route_mode_model_json['members'] = [vpn_gateway_member_model] + vpn_gateway_route_mode_model_json['members'] = [ + vpn_gateway_member_model + ] vpn_gateway_route_mode_model_json['name'] = 'my-vpn-gateway' - vpn_gateway_route_mode_model_json['resource_group'] = resource_group_reference_model + vpn_gateway_route_mode_model_json[ + 'resource_group'] = resource_group_reference_model vpn_gateway_route_mode_model_json['resource_type'] = 'vpn_gateway' vpn_gateway_route_mode_model_json['subnet'] = subnet_reference_model vpn_gateway_route_mode_model_json['vpc'] = vpc_reference_model vpn_gateway_route_mode_model_json['mode'] = 'route' # Construct a model instance of VPNGatewayRouteMode by calling from_dict on the json representation - vpn_gateway_route_mode_model = VPNGatewayRouteMode.from_dict(vpn_gateway_route_mode_model_json) + vpn_gateway_route_mode_model = VPNGatewayRouteMode.from_dict( + vpn_gateway_route_mode_model_json) assert vpn_gateway_route_mode_model != False # Construct a model instance of VPNGatewayRouteMode by calling from_dict on the json representation - vpn_gateway_route_mode_model_dict = VPNGatewayRouteMode.from_dict(vpn_gateway_route_mode_model_json).__dict__ - vpn_gateway_route_mode_model2 = VPNGatewayRouteMode(**vpn_gateway_route_mode_model_dict) + vpn_gateway_route_mode_model_dict = VPNGatewayRouteMode.from_dict( + vpn_gateway_route_mode_model_json).__dict__ + vpn_gateway_route_mode_model2 = VPNGatewayRouteMode( + **vpn_gateway_route_mode_model_dict) # Verify the model instances are equivalent assert vpn_gateway_route_mode_model == vpn_gateway_route_mode_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_route_mode_model_json2 = vpn_gateway_route_mode_model.to_dict() + vpn_gateway_route_mode_model_json2 = vpn_gateway_route_mode_model.to_dict( + ) assert vpn_gateway_route_mode_model_json2 == vpn_gateway_route_mode_model_json @@ -88747,28 +104580,37 @@ def test_vpn_server_authentication_by_certificate_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_reference_model = {} # CertificateInstanceReference - certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_reference_model = { + } # CertificateInstanceReference + certificate_instance_reference_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a json representation of a VPNServerAuthenticationByCertificate model vpn_server_authentication_by_certificate_model_json = {} - vpn_server_authentication_by_certificate_model_json['method'] = 'certificate' - vpn_server_authentication_by_certificate_model_json['client_ca'] = certificate_instance_reference_model - vpn_server_authentication_by_certificate_model_json['crl'] = 'testString' + vpn_server_authentication_by_certificate_model_json[ + 'method'] = 'certificate' + vpn_server_authentication_by_certificate_model_json[ + 'client_ca'] = certificate_instance_reference_model + vpn_server_authentication_by_certificate_model_json[ + 'crl'] = 'testString' # Construct a model instance of VPNServerAuthenticationByCertificate by calling from_dict on the json representation - vpn_server_authentication_by_certificate_model = VPNServerAuthenticationByCertificate.from_dict(vpn_server_authentication_by_certificate_model_json) + vpn_server_authentication_by_certificate_model = VPNServerAuthenticationByCertificate.from_dict( + vpn_server_authentication_by_certificate_model_json) assert vpn_server_authentication_by_certificate_model != False # Construct a model instance of VPNServerAuthenticationByCertificate by calling from_dict on the json representation - vpn_server_authentication_by_certificate_model_dict = VPNServerAuthenticationByCertificate.from_dict(vpn_server_authentication_by_certificate_model_json).__dict__ - vpn_server_authentication_by_certificate_model2 = VPNServerAuthenticationByCertificate(**vpn_server_authentication_by_certificate_model_dict) + vpn_server_authentication_by_certificate_model_dict = VPNServerAuthenticationByCertificate.from_dict( + vpn_server_authentication_by_certificate_model_json).__dict__ + vpn_server_authentication_by_certificate_model2 = VPNServerAuthenticationByCertificate( + **vpn_server_authentication_by_certificate_model_dict) # Verify the model instances are equivalent assert vpn_server_authentication_by_certificate_model == vpn_server_authentication_by_certificate_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_authentication_by_certificate_model_json2 = vpn_server_authentication_by_certificate_model.to_dict() + vpn_server_authentication_by_certificate_model_json2 = vpn_server_authentication_by_certificate_model.to_dict( + ) assert vpn_server_authentication_by_certificate_model_json2 == vpn_server_authentication_by_certificate_model_json @@ -88784,27 +104626,35 @@ def test_vpn_server_authentication_by_username_serialization(self): # Construct dict forms of any model objects needed in order to build this model. - vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model = { + } # VPNServerAuthenticationByUsernameIdProviderByIAM + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' # Construct a json representation of a VPNServerAuthenticationByUsername model vpn_server_authentication_by_username_model_json = {} - vpn_server_authentication_by_username_model_json['method'] = 'certificate' - vpn_server_authentication_by_username_model_json['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_by_username_model_json[ + 'method'] = 'certificate' + vpn_server_authentication_by_username_model_json[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model # Construct a model instance of VPNServerAuthenticationByUsername by calling from_dict on the json representation - vpn_server_authentication_by_username_model = VPNServerAuthenticationByUsername.from_dict(vpn_server_authentication_by_username_model_json) + vpn_server_authentication_by_username_model = VPNServerAuthenticationByUsername.from_dict( + vpn_server_authentication_by_username_model_json) assert vpn_server_authentication_by_username_model != False # Construct a model instance of VPNServerAuthenticationByUsername by calling from_dict on the json representation - vpn_server_authentication_by_username_model_dict = VPNServerAuthenticationByUsername.from_dict(vpn_server_authentication_by_username_model_json).__dict__ - vpn_server_authentication_by_username_model2 = VPNServerAuthenticationByUsername(**vpn_server_authentication_by_username_model_dict) + vpn_server_authentication_by_username_model_dict = VPNServerAuthenticationByUsername.from_dict( + vpn_server_authentication_by_username_model_json).__dict__ + vpn_server_authentication_by_username_model2 = VPNServerAuthenticationByUsername( + **vpn_server_authentication_by_username_model_dict) # Verify the model instances are equivalent assert vpn_server_authentication_by_username_model == vpn_server_authentication_by_username_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_authentication_by_username_model_json2 = vpn_server_authentication_by_username_model.to_dict() + vpn_server_authentication_by_username_model_json2 = vpn_server_authentication_by_username_model.to_dict( + ) assert vpn_server_authentication_by_username_model_json2 == vpn_server_authentication_by_username_model_json @@ -88813,28 +104663,36 @@ class TestModel_VPNServerAuthenticationByUsernameIdProviderByIAM: Test Class for VPNServerAuthenticationByUsernameIdProviderByIAM """ - def test_vpn_server_authentication_by_username_id_provider_by_iam_serialization(self): + def test_vpn_server_authentication_by_username_id_provider_by_iam_serialization( + self): """ Test serialization/deserialization for VPNServerAuthenticationByUsernameIdProviderByIAM """ # Construct a json representation of a VPNServerAuthenticationByUsernameIdProviderByIAM model vpn_server_authentication_by_username_id_provider_by_iam_model_json = {} - vpn_server_authentication_by_username_id_provider_by_iam_model_json['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_by_iam_model_json[ + 'provider_type'] = 'iam' # Construct a model instance of VPNServerAuthenticationByUsernameIdProviderByIAM by calling from_dict on the json representation - vpn_server_authentication_by_username_id_provider_by_iam_model = VPNServerAuthenticationByUsernameIdProviderByIAM.from_dict(vpn_server_authentication_by_username_id_provider_by_iam_model_json) + vpn_server_authentication_by_username_id_provider_by_iam_model = VPNServerAuthenticationByUsernameIdProviderByIAM.from_dict( + vpn_server_authentication_by_username_id_provider_by_iam_model_json) assert vpn_server_authentication_by_username_id_provider_by_iam_model != False # Construct a model instance of VPNServerAuthenticationByUsernameIdProviderByIAM by calling from_dict on the json representation - vpn_server_authentication_by_username_id_provider_by_iam_model_dict = VPNServerAuthenticationByUsernameIdProviderByIAM.from_dict(vpn_server_authentication_by_username_id_provider_by_iam_model_json).__dict__ - vpn_server_authentication_by_username_id_provider_by_iam_model2 = VPNServerAuthenticationByUsernameIdProviderByIAM(**vpn_server_authentication_by_username_id_provider_by_iam_model_dict) + vpn_server_authentication_by_username_id_provider_by_iam_model_dict = VPNServerAuthenticationByUsernameIdProviderByIAM.from_dict( + vpn_server_authentication_by_username_id_provider_by_iam_model_json + ).__dict__ + vpn_server_authentication_by_username_id_provider_by_iam_model2 = VPNServerAuthenticationByUsernameIdProviderByIAM( + ** + vpn_server_authentication_by_username_id_provider_by_iam_model_dict) # Verify the model instances are equivalent assert vpn_server_authentication_by_username_id_provider_by_iam_model == vpn_server_authentication_by_username_id_provider_by_iam_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_authentication_by_username_id_provider_by_iam_model_json2 = vpn_server_authentication_by_username_id_provider_by_iam_model.to_dict() + vpn_server_authentication_by_username_id_provider_by_iam_model_json2 = vpn_server_authentication_by_username_id_provider_by_iam_model.to_dict( + ) assert vpn_server_authentication_by_username_id_provider_by_iam_model_json2 == vpn_server_authentication_by_username_id_provider_by_iam_model_json @@ -88843,35 +104701,49 @@ class TestModel_VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertifi Test Class for VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype """ - def test_vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_serialization(self): + def test_vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_serialization( + self): """ Test serialization/deserialization for VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype """ # Construct dict forms of any model objects needed in order to build this model. - certificate_instance_identity_model = {} # CertificateInstanceIdentityByCRN - certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' + certificate_instance_identity_model = { + } # CertificateInstanceIdentityByCRN + certificate_instance_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' # Construct a json representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype model vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json = {} - vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json['method'] = 'certificate' - vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json['client_ca'] = certificate_instance_identity_model - vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json['crl'] = 'testString' + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json[ + 'method'] = 'certificate' + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json[ + 'client_ca'] = certificate_instance_identity_model + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json[ + 'crl'] = 'testString' # Construct a model instance of VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype by calling from_dict on the json representation - vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model = VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.from_dict(vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json) + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model = VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.from_dict( + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json + ) assert vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model != False # Construct a model instance of VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype by calling from_dict on the json representation - vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_dict = VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.from_dict(vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json).__dict__ - vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model2 = VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype(**vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_dict) + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_dict = VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.from_dict( + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json + ).__dict__ + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model2 = VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype( + ** + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_dict + ) # Verify the model instances are equivalent assert vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model == vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json2 = vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model.to_dict() + vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json2 = vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model.to_dict( + ) assert vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json2 == vpn_server_authentication_prototype_vpn_server_authentication_by_certificate_prototype_model_json @@ -88880,34 +104752,47 @@ class TestModel_VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernam Test Class for VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype """ - def test_vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_serialization(self): + def test_vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_serialization( + self): """ Test serialization/deserialization for VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype """ # Construct dict forms of any model objects needed in order to build this model. - vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM - vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam' + vpn_server_authentication_by_username_id_provider_model = { + } # VPNServerAuthenticationByUsernameIdProviderByIAM + vpn_server_authentication_by_username_id_provider_model[ + 'provider_type'] = 'iam' # Construct a json representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json = {} - vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json['method'] = 'username' - vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json['identity_provider'] = vpn_server_authentication_by_username_id_provider_model + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json[ + 'method'] = 'username' + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json[ + 'identity_provider'] = vpn_server_authentication_by_username_id_provider_model # Construct a model instance of VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype by calling from_dict on the json representation - vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model = VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.from_dict(vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json) + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model = VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.from_dict( + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json + ) assert vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model != False # Construct a model instance of VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype by calling from_dict on the json representation - vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_dict = VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.from_dict(vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json).__dict__ - vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model2 = VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype(**vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_dict) + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_dict = VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.from_dict( + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json + ).__dict__ + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model2 = VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype( + ** + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_dict + ) # Verify the model instances are equivalent assert vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model == vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model2 # Convert model instance back to dict and verify no loss of data - vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json2 = vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model.to_dict() + vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json2 = vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model.to_dict( + ) assert vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json2 == vpn_server_authentication_prototype_vpn_server_authentication_by_username_prototype_model_json @@ -88916,30 +104801,42 @@ class TestModel_VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetw Test Class for VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext """ - def test_virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_serialization(self): + def test_virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext """ # Construct a json representation of a VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json = {} - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json['address'] = '192.168.3.4' - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json['auto_delete'] = False - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json['name'] = 'my-reserved-ip' + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json[ + 'address'] = '192.168.3.4' + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json[ + 'auto_delete'] = False + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json[ + 'name'] = 'my-reserved-ip' # Construct a model instance of VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext by calling from_dict on the json representation - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model = VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.from_dict(virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json) + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model = VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.from_dict( + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json + ) assert virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model != False # Construct a model instance of VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext by calling from_dict on the json representation - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_dict = VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.from_dict(virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json).__dict__ - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model2 = VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext(**virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_dict) + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_dict = VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext.from_dict( + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json + ).__dict__ + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model2 = VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext( + ** + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model == virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json2 = virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model.to_dict() + virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json2 = virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model.to_dict( + ) assert virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json2 == virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model_json @@ -88948,30 +104845,42 @@ class TestModel_VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirt Test Class for VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext """ - def test_virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_serialization(self): + def test_virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext """ # Construct a json representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext model virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json = {} - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json['address'] = '192.168.3.4' - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json[ + 'address'] = '192.168.3.4' + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json[ + 'name'] = 'my-reserved-ip' # Construct a model instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext by calling from_dict on the json representation - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.from_dict(virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json) + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.from_dict( + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json + ) assert virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model != False # Construct a model instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext by calling from_dict on the json representation - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_dict = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.from_dict(virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json).__dict__ - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model2 = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext(**virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_dict) + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_dict = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext.from_dict( + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json + ).__dict__ + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model2 = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext( + ** + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model == virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json2 = virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model.to_dict() + virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json2 = virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model.to_dict( + ) assert virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json2 == virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model_json @@ -88980,31 +104889,44 @@ class TestModel_VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentRef Test Class for VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext """ - def test_virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_serialization(self): + def test_virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext """ # Construct a json representation of a VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext model virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json = {} - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json['id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json['name'] = 'my-bare-metal-server-network-attachment' - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json['resource_type'] = 'bare_metal_server_network_attachment' + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-f7a2bf57-af7c-49d9-b599-b2c91293d30c/network_attachments/2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json[ + 'id'] = '2302-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json[ + 'name'] = 'my-bare-metal-server-network-attachment' + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json[ + 'resource_type'] = 'bare_metal_server_network_attachment' # Construct a model instance of VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext by calling from_dict on the json representation - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model = VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict(virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json) + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model = VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict( + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json + ) assert virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model != False # Construct a model instance of VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext by calling from_dict on the json representation - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_dict = VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict(virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json).__dict__ - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model2 = VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext(**virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_dict) + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_dict = VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict( + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json + ).__dict__ + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model2 = VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext( + ** + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model == virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json2 = virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model.to_dict() + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json2 = virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model.to_dict( + ) assert virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json2 == virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json @@ -89013,31 +104935,44 @@ class TestModel_VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceV Test Class for VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext """ - def test_virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_serialization(self): + def test_virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext """ # Construct a json representation of a VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext model virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json = {} - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json['name'] = 'my-instance-network-attachment' - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json['resource_type'] = 'instance_network_attachment' + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json[ + 'id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json[ + 'name'] = 'my-instance-network-attachment' + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json[ + 'resource_type'] = 'instance_network_attachment' # Construct a model instance of VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext by calling from_dict on the json representation - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model = VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict(virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json) + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model = VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict( + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json + ) assert virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model != False # Construct a model instance of VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext by calling from_dict on the json representation - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_dict = VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict(virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json).__dict__ - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model2 = VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext(**virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_dict) + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_dict = VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext.from_dict( + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json + ).__dict__ + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model2 = VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext( + ** + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model == virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json2 = virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model.to_dict() + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json2 = virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model.to_dict( + ) assert virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json2 == virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json @@ -89046,37 +104981,53 @@ class TestModel_VirtualNetworkInterfaceTargetShareMountTargetReference: Test Class for VirtualNetworkInterfaceTargetShareMountTargetReference """ - def test_virtual_network_interface_target_share_mount_target_reference_serialization(self): + def test_virtual_network_interface_target_share_mount_target_reference_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfaceTargetShareMountTargetReference """ # Construct dict forms of any model objects needed in order to build this model. - share_mount_target_reference_deleted_model = {} # ShareMountTargetReferenceDeleted - share_mount_target_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + share_mount_target_reference_deleted_model = { + } # ShareMountTargetReferenceDeleted + share_mount_target_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a VirtualNetworkInterfaceTargetShareMountTargetReference model virtual_network_interface_target_share_mount_target_reference_model_json = {} - virtual_network_interface_target_share_mount_target_reference_model_json['deleted'] = share_mount_target_reference_deleted_model - virtual_network_interface_target_share_mount_target_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - virtual_network_interface_target_share_mount_target_reference_model_json['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' - virtual_network_interface_target_share_mount_target_reference_model_json['name'] = 'my-share-mount-target' - virtual_network_interface_target_share_mount_target_reference_model_json['resource_type'] = 'share_mount_target' + virtual_network_interface_target_share_mount_target_reference_model_json[ + 'deleted'] = share_mount_target_reference_deleted_model + virtual_network_interface_target_share_mount_target_reference_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' + virtual_network_interface_target_share_mount_target_reference_model_json[ + 'id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + virtual_network_interface_target_share_mount_target_reference_model_json[ + 'name'] = 'my-share-mount-target' + virtual_network_interface_target_share_mount_target_reference_model_json[ + 'resource_type'] = 'share_mount_target' # Construct a model instance of VirtualNetworkInterfaceTargetShareMountTargetReference by calling from_dict on the json representation - virtual_network_interface_target_share_mount_target_reference_model = VirtualNetworkInterfaceTargetShareMountTargetReference.from_dict(virtual_network_interface_target_share_mount_target_reference_model_json) + virtual_network_interface_target_share_mount_target_reference_model = VirtualNetworkInterfaceTargetShareMountTargetReference.from_dict( + virtual_network_interface_target_share_mount_target_reference_model_json + ) assert virtual_network_interface_target_share_mount_target_reference_model != False # Construct a model instance of VirtualNetworkInterfaceTargetShareMountTargetReference by calling from_dict on the json representation - virtual_network_interface_target_share_mount_target_reference_model_dict = VirtualNetworkInterfaceTargetShareMountTargetReference.from_dict(virtual_network_interface_target_share_mount_target_reference_model_json).__dict__ - virtual_network_interface_target_share_mount_target_reference_model2 = VirtualNetworkInterfaceTargetShareMountTargetReference(**virtual_network_interface_target_share_mount_target_reference_model_dict) + virtual_network_interface_target_share_mount_target_reference_model_dict = VirtualNetworkInterfaceTargetShareMountTargetReference.from_dict( + virtual_network_interface_target_share_mount_target_reference_model_json + ).__dict__ + virtual_network_interface_target_share_mount_target_reference_model2 = VirtualNetworkInterfaceTargetShareMountTargetReference( + ** + virtual_network_interface_target_share_mount_target_reference_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_target_share_mount_target_reference_model == virtual_network_interface_target_share_mount_target_reference_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_target_share_mount_target_reference_model_json2 = virtual_network_interface_target_share_mount_target_reference_model.to_dict() + virtual_network_interface_target_share_mount_target_reference_model_json2 = virtual_network_interface_target_share_mount_target_reference_model.to_dict( + ) assert virtual_network_interface_target_share_mount_target_reference_model_json2 == virtual_network_interface_target_share_mount_target_reference_model_json @@ -89092,21 +105043,26 @@ def test_volume_identity_by_crn_serialization(self): # Construct a json representation of a VolumeIdentityByCRN model volume_identity_by_crn_model_json = {} - volume_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a model instance of VolumeIdentityByCRN by calling from_dict on the json representation - volume_identity_by_crn_model = VolumeIdentityByCRN.from_dict(volume_identity_by_crn_model_json) + volume_identity_by_crn_model = VolumeIdentityByCRN.from_dict( + volume_identity_by_crn_model_json) assert volume_identity_by_crn_model != False # Construct a model instance of VolumeIdentityByCRN by calling from_dict on the json representation - volume_identity_by_crn_model_dict = VolumeIdentityByCRN.from_dict(volume_identity_by_crn_model_json).__dict__ - volume_identity_by_crn_model2 = VolumeIdentityByCRN(**volume_identity_by_crn_model_dict) + volume_identity_by_crn_model_dict = VolumeIdentityByCRN.from_dict( + volume_identity_by_crn_model_json).__dict__ + volume_identity_by_crn_model2 = VolumeIdentityByCRN( + **volume_identity_by_crn_model_dict) # Verify the model instances are equivalent assert volume_identity_by_crn_model == volume_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - volume_identity_by_crn_model_json2 = volume_identity_by_crn_model.to_dict() + volume_identity_by_crn_model_json2 = volume_identity_by_crn_model.to_dict( + ) assert volume_identity_by_crn_model_json2 == volume_identity_by_crn_model_json @@ -89122,21 +105078,26 @@ def test_volume_identity_by_href_serialization(self): # Construct a json representation of a VolumeIdentityByHref model volume_identity_by_href_model_json = {} - volume_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a model instance of VolumeIdentityByHref by calling from_dict on the json representation - volume_identity_by_href_model = VolumeIdentityByHref.from_dict(volume_identity_by_href_model_json) + volume_identity_by_href_model = VolumeIdentityByHref.from_dict( + volume_identity_by_href_model_json) assert volume_identity_by_href_model != False # Construct a model instance of VolumeIdentityByHref by calling from_dict on the json representation - volume_identity_by_href_model_dict = VolumeIdentityByHref.from_dict(volume_identity_by_href_model_json).__dict__ - volume_identity_by_href_model2 = VolumeIdentityByHref(**volume_identity_by_href_model_dict) + volume_identity_by_href_model_dict = VolumeIdentityByHref.from_dict( + volume_identity_by_href_model_json).__dict__ + volume_identity_by_href_model2 = VolumeIdentityByHref( + **volume_identity_by_href_model_dict) # Verify the model instances are equivalent assert volume_identity_by_href_model == volume_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - volume_identity_by_href_model_json2 = volume_identity_by_href_model.to_dict() + volume_identity_by_href_model_json2 = volume_identity_by_href_model.to_dict( + ) assert volume_identity_by_href_model_json2 == volume_identity_by_href_model_json @@ -89152,21 +105113,26 @@ def test_volume_identity_by_id_serialization(self): # Construct a json representation of a VolumeIdentityById model volume_identity_by_id_model_json = {} - volume_identity_by_id_model_json['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_identity_by_id_model_json[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a model instance of VolumeIdentityById by calling from_dict on the json representation - volume_identity_by_id_model = VolumeIdentityById.from_dict(volume_identity_by_id_model_json) + volume_identity_by_id_model = VolumeIdentityById.from_dict( + volume_identity_by_id_model_json) assert volume_identity_by_id_model != False # Construct a model instance of VolumeIdentityById by calling from_dict on the json representation - volume_identity_by_id_model_dict = VolumeIdentityById.from_dict(volume_identity_by_id_model_json).__dict__ - volume_identity_by_id_model2 = VolumeIdentityById(**volume_identity_by_id_model_dict) + volume_identity_by_id_model_dict = VolumeIdentityById.from_dict( + volume_identity_by_id_model_json).__dict__ + volume_identity_by_id_model2 = VolumeIdentityById( + **volume_identity_by_id_model_dict) # Verify the model instances are equivalent assert volume_identity_by_id_model == volume_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - volume_identity_by_id_model_json2 = volume_identity_by_id_model.to_dict() + volume_identity_by_id_model_json2 = volume_identity_by_id_model.to_dict( + ) assert volume_identity_by_id_model_json2 == volume_identity_by_id_model_json @@ -89182,21 +105148,26 @@ def test_volume_profile_identity_by_href_serialization(self): # Construct a json representation of a VolumeProfileIdentityByHref model volume_profile_identity_by_href_model_json = {} - volume_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' + volume_profile_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose' # Construct a model instance of VolumeProfileIdentityByHref by calling from_dict on the json representation - volume_profile_identity_by_href_model = VolumeProfileIdentityByHref.from_dict(volume_profile_identity_by_href_model_json) + volume_profile_identity_by_href_model = VolumeProfileIdentityByHref.from_dict( + volume_profile_identity_by_href_model_json) assert volume_profile_identity_by_href_model != False # Construct a model instance of VolumeProfileIdentityByHref by calling from_dict on the json representation - volume_profile_identity_by_href_model_dict = VolumeProfileIdentityByHref.from_dict(volume_profile_identity_by_href_model_json).__dict__ - volume_profile_identity_by_href_model2 = VolumeProfileIdentityByHref(**volume_profile_identity_by_href_model_dict) + volume_profile_identity_by_href_model_dict = VolumeProfileIdentityByHref.from_dict( + volume_profile_identity_by_href_model_json).__dict__ + volume_profile_identity_by_href_model2 = VolumeProfileIdentityByHref( + **volume_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert volume_profile_identity_by_href_model == volume_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_identity_by_href_model_json2 = volume_profile_identity_by_href_model.to_dict() + volume_profile_identity_by_href_model_json2 = volume_profile_identity_by_href_model.to_dict( + ) assert volume_profile_identity_by_href_model_json2 == volume_profile_identity_by_href_model_json @@ -89215,18 +105186,22 @@ def test_volume_profile_identity_by_name_serialization(self): volume_profile_identity_by_name_model_json['name'] = 'general-purpose' # Construct a model instance of VolumeProfileIdentityByName by calling from_dict on the json representation - volume_profile_identity_by_name_model = VolumeProfileIdentityByName.from_dict(volume_profile_identity_by_name_model_json) + volume_profile_identity_by_name_model = VolumeProfileIdentityByName.from_dict( + volume_profile_identity_by_name_model_json) assert volume_profile_identity_by_name_model != False # Construct a model instance of VolumeProfileIdentityByName by calling from_dict on the json representation - volume_profile_identity_by_name_model_dict = VolumeProfileIdentityByName.from_dict(volume_profile_identity_by_name_model_json).__dict__ - volume_profile_identity_by_name_model2 = VolumeProfileIdentityByName(**volume_profile_identity_by_name_model_dict) + volume_profile_identity_by_name_model_dict = VolumeProfileIdentityByName.from_dict( + volume_profile_identity_by_name_model_json).__dict__ + volume_profile_identity_by_name_model2 = VolumeProfileIdentityByName( + **volume_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert volume_profile_identity_by_name_model == volume_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_identity_by_name_model_json2 = volume_profile_identity_by_name_model.to_dict() + volume_profile_identity_by_name_model_json2 = volume_profile_identity_by_name_model.to_dict( + ) assert volume_profile_identity_by_name_model_json2 == volume_profile_identity_by_name_model_json @@ -89252,32 +105227,41 @@ def test_volume_prototype_volume_by_capacity_serialization(self): zone_identity_model['name'] = 'us-south-1' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a json representation of a VolumePrototypeVolumeByCapacity model volume_prototype_volume_by_capacity_model_json = {} volume_prototype_volume_by_capacity_model_json['iops'] = 10000 volume_prototype_volume_by_capacity_model_json['name'] = 'my-volume' - volume_prototype_volume_by_capacity_model_json['profile'] = volume_profile_identity_model - volume_prototype_volume_by_capacity_model_json['resource_group'] = resource_group_identity_model + volume_prototype_volume_by_capacity_model_json[ + 'profile'] = volume_profile_identity_model + volume_prototype_volume_by_capacity_model_json[ + 'resource_group'] = resource_group_identity_model volume_prototype_volume_by_capacity_model_json['user_tags'] = [] - volume_prototype_volume_by_capacity_model_json['zone'] = zone_identity_model + volume_prototype_volume_by_capacity_model_json[ + 'zone'] = zone_identity_model volume_prototype_volume_by_capacity_model_json['capacity'] = 100 - volume_prototype_volume_by_capacity_model_json['encryption_key'] = encryption_key_identity_model + volume_prototype_volume_by_capacity_model_json[ + 'encryption_key'] = encryption_key_identity_model # Construct a model instance of VolumePrototypeVolumeByCapacity by calling from_dict on the json representation - volume_prototype_volume_by_capacity_model = VolumePrototypeVolumeByCapacity.from_dict(volume_prototype_volume_by_capacity_model_json) + volume_prototype_volume_by_capacity_model = VolumePrototypeVolumeByCapacity.from_dict( + volume_prototype_volume_by_capacity_model_json) assert volume_prototype_volume_by_capacity_model != False # Construct a model instance of VolumePrototypeVolumeByCapacity by calling from_dict on the json representation - volume_prototype_volume_by_capacity_model_dict = VolumePrototypeVolumeByCapacity.from_dict(volume_prototype_volume_by_capacity_model_json).__dict__ - volume_prototype_volume_by_capacity_model2 = VolumePrototypeVolumeByCapacity(**volume_prototype_volume_by_capacity_model_dict) + volume_prototype_volume_by_capacity_model_dict = VolumePrototypeVolumeByCapacity.from_dict( + volume_prototype_volume_by_capacity_model_json).__dict__ + volume_prototype_volume_by_capacity_model2 = VolumePrototypeVolumeByCapacity( + **volume_prototype_volume_by_capacity_model_dict) # Verify the model instances are equivalent assert volume_prototype_volume_by_capacity_model == volume_prototype_volume_by_capacity_model2 # Convert model instance back to dict and verify no loss of data - volume_prototype_volume_by_capacity_model_json2 = volume_prototype_volume_by_capacity_model.to_dict() + volume_prototype_volume_by_capacity_model_json2 = volume_prototype_volume_by_capacity_model.to_dict( + ) assert volume_prototype_volume_by_capacity_model_json2 == volume_prototype_volume_by_capacity_model_json @@ -89303,7 +105287,8 @@ def test_volume_prototype_volume_by_source_snapshot_serialization(self): zone_identity_model['name'] = 'us-south-1' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' @@ -89311,28 +105296,38 @@ def test_volume_prototype_volume_by_source_snapshot_serialization(self): # Construct a json representation of a VolumePrototypeVolumeBySourceSnapshot model volume_prototype_volume_by_source_snapshot_model_json = {} volume_prototype_volume_by_source_snapshot_model_json['iops'] = 10000 - volume_prototype_volume_by_source_snapshot_model_json['name'] = 'my-volume' - volume_prototype_volume_by_source_snapshot_model_json['profile'] = volume_profile_identity_model - volume_prototype_volume_by_source_snapshot_model_json['resource_group'] = resource_group_identity_model + volume_prototype_volume_by_source_snapshot_model_json[ + 'name'] = 'my-volume' + volume_prototype_volume_by_source_snapshot_model_json[ + 'profile'] = volume_profile_identity_model + volume_prototype_volume_by_source_snapshot_model_json[ + 'resource_group'] = resource_group_identity_model volume_prototype_volume_by_source_snapshot_model_json['user_tags'] = [] - volume_prototype_volume_by_source_snapshot_model_json['zone'] = zone_identity_model + volume_prototype_volume_by_source_snapshot_model_json[ + 'zone'] = zone_identity_model volume_prototype_volume_by_source_snapshot_model_json['capacity'] = 100 - volume_prototype_volume_by_source_snapshot_model_json['encryption_key'] = encryption_key_identity_model - volume_prototype_volume_by_source_snapshot_model_json['source_snapshot'] = snapshot_identity_model + volume_prototype_volume_by_source_snapshot_model_json[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_volume_by_source_snapshot_model_json[ + 'source_snapshot'] = snapshot_identity_model # Construct a model instance of VolumePrototypeVolumeBySourceSnapshot by calling from_dict on the json representation - volume_prototype_volume_by_source_snapshot_model = VolumePrototypeVolumeBySourceSnapshot.from_dict(volume_prototype_volume_by_source_snapshot_model_json) + volume_prototype_volume_by_source_snapshot_model = VolumePrototypeVolumeBySourceSnapshot.from_dict( + volume_prototype_volume_by_source_snapshot_model_json) assert volume_prototype_volume_by_source_snapshot_model != False # Construct a model instance of VolumePrototypeVolumeBySourceSnapshot by calling from_dict on the json representation - volume_prototype_volume_by_source_snapshot_model_dict = VolumePrototypeVolumeBySourceSnapshot.from_dict(volume_prototype_volume_by_source_snapshot_model_json).__dict__ - volume_prototype_volume_by_source_snapshot_model2 = VolumePrototypeVolumeBySourceSnapshot(**volume_prototype_volume_by_source_snapshot_model_dict) + volume_prototype_volume_by_source_snapshot_model_dict = VolumePrototypeVolumeBySourceSnapshot.from_dict( + volume_prototype_volume_by_source_snapshot_model_json).__dict__ + volume_prototype_volume_by_source_snapshot_model2 = VolumePrototypeVolumeBySourceSnapshot( + **volume_prototype_volume_by_source_snapshot_model_dict) # Verify the model instances are equivalent assert volume_prototype_volume_by_source_snapshot_model == volume_prototype_volume_by_source_snapshot_model2 # Convert model instance back to dict and verify no loss of data - volume_prototype_volume_by_source_snapshot_model_json2 = volume_prototype_volume_by_source_snapshot_model.to_dict() + volume_prototype_volume_by_source_snapshot_model_json2 = volume_prototype_volume_by_source_snapshot_model.to_dict( + ) assert volume_prototype_volume_by_source_snapshot_model_json2 == volume_prototype_volume_by_source_snapshot_model_json @@ -89348,21 +105343,26 @@ def test_zone_identity_by_href_serialization(self): # Construct a json representation of a ZoneIdentityByHref model zone_identity_by_href_model_json = {} - zone_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' + zone_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' # Construct a model instance of ZoneIdentityByHref by calling from_dict on the json representation - zone_identity_by_href_model = ZoneIdentityByHref.from_dict(zone_identity_by_href_model_json) + zone_identity_by_href_model = ZoneIdentityByHref.from_dict( + zone_identity_by_href_model_json) assert zone_identity_by_href_model != False # Construct a model instance of ZoneIdentityByHref by calling from_dict on the json representation - zone_identity_by_href_model_dict = ZoneIdentityByHref.from_dict(zone_identity_by_href_model_json).__dict__ - zone_identity_by_href_model2 = ZoneIdentityByHref(**zone_identity_by_href_model_dict) + zone_identity_by_href_model_dict = ZoneIdentityByHref.from_dict( + zone_identity_by_href_model_json).__dict__ + zone_identity_by_href_model2 = ZoneIdentityByHref( + **zone_identity_by_href_model_dict) # Verify the model instances are equivalent assert zone_identity_by_href_model == zone_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - zone_identity_by_href_model_json2 = zone_identity_by_href_model.to_dict() + zone_identity_by_href_model_json2 = zone_identity_by_href_model.to_dict( + ) assert zone_identity_by_href_model_json2 == zone_identity_by_href_model_json @@ -89381,18 +105381,22 @@ def test_zone_identity_by_name_serialization(self): zone_identity_by_name_model_json['name'] = 'us-south-1' # Construct a model instance of ZoneIdentityByName by calling from_dict on the json representation - zone_identity_by_name_model = ZoneIdentityByName.from_dict(zone_identity_by_name_model_json) + zone_identity_by_name_model = ZoneIdentityByName.from_dict( + zone_identity_by_name_model_json) assert zone_identity_by_name_model != False # Construct a model instance of ZoneIdentityByName by calling from_dict on the json representation - zone_identity_by_name_model_dict = ZoneIdentityByName.from_dict(zone_identity_by_name_model_json).__dict__ - zone_identity_by_name_model2 = ZoneIdentityByName(**zone_identity_by_name_model_dict) + zone_identity_by_name_model_dict = ZoneIdentityByName.from_dict( + zone_identity_by_name_model_json).__dict__ + zone_identity_by_name_model2 = ZoneIdentityByName( + **zone_identity_by_name_model_dict) # Verify the model instances are equivalent assert zone_identity_by_name_model == zone_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - zone_identity_by_name_model_json2 = zone_identity_by_name_model.to_dict() + zone_identity_by_name_model_json2 = zone_identity_by_name_model.to_dict( + ) assert zone_identity_by_name_model_json2 == zone_identity_by_name_model_json @@ -89401,28 +105405,38 @@ class TestModel_BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityBy Test Class for BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN """ - def test_backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_serialization(self): + def test_backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_serialization( + self): """ Test serialization/deserialization for BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN """ # Construct a json representation of a BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN model backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json = {} - backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' # Construct a model instance of BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN by calling from_dict on the json representation - backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model = BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.from_dict(backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json) + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model = BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.from_dict( + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json + ) assert backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model != False # Construct a model instance of BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN by calling from_dict on the json representation - backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_dict = BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.from_dict(backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json).__dict__ - backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model2 = BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN(**backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_dict) + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_dict = BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN.from_dict( + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json + ).__dict__ + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model2 = BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseIdentityByCRN( + ** + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model == backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json2 = backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model.to_dict() + backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json2 = backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model.to_dict( + ) assert backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json2 == backup_policy_scope_prototype_enterprise_identity_enterprise_identity_by_crn_model_json @@ -89431,28 +105445,38 @@ class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface Test Class for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ - def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization(self): + def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ # Construct a json representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN model bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model != False # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json).__dict__ - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(**bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ).__dict__ + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ** + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict() + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict( + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json @@ -89461,28 +105485,38 @@ class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface Test Class for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ - def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization(self): + def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ # Construct a json representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref model bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model != False # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json).__dict__ - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(**bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ).__dict__ + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ** + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict() + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict( + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json @@ -89491,28 +105525,38 @@ class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface Test Class for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ - def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization(self): + def test_bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ # Construct a json representation of a BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById model bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json = {} - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model != False # Construct a model instance of BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json).__dict__ - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(**bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict) + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ).__dict__ + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ** + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict() + bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict( + ) assert bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 == bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json @@ -89521,28 +105565,38 @@ class TestModel_EndpointGatewayReservedIPReservedIPIdentityByHref: Test Class for EndpointGatewayReservedIPReservedIPIdentityByHref """ - def test_endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_serialization(self): + def test_endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_serialization( + self): """ Test serialization/deserialization for EndpointGatewayReservedIPReservedIPIdentityByHref """ # Construct a json representation of a EndpointGatewayReservedIPReservedIPIdentityByHref model endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json = {} - endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of EndpointGatewayReservedIPReservedIPIdentityByHref by calling from_dict on the json representation - endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model = EndpointGatewayReservedIPReservedIPIdentityByHref.from_dict(endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json) + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model = EndpointGatewayReservedIPReservedIPIdentityByHref.from_dict( + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json + ) assert endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model != False # Construct a model instance of EndpointGatewayReservedIPReservedIPIdentityByHref by calling from_dict on the json representation - endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_dict = EndpointGatewayReservedIPReservedIPIdentityByHref.from_dict(endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json).__dict__ - endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model2 = EndpointGatewayReservedIPReservedIPIdentityByHref(**endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_dict) + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_dict = EndpointGatewayReservedIPReservedIPIdentityByHref.from_dict( + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json + ).__dict__ + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model2 = EndpointGatewayReservedIPReservedIPIdentityByHref( + ** + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model == endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model.to_dict() + endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model.to_dict( + ) assert endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json2 == endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json @@ -89551,28 +105605,36 @@ class TestModel_EndpointGatewayReservedIPReservedIPIdentityById: Test Class for EndpointGatewayReservedIPReservedIPIdentityById """ - def test_endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_serialization(self): + def test_endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_serialization( + self): """ Test serialization/deserialization for EndpointGatewayReservedIPReservedIPIdentityById """ # Construct a json representation of a EndpointGatewayReservedIPReservedIPIdentityById model endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json = {} - endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of EndpointGatewayReservedIPReservedIPIdentityById by calling from_dict on the json representation - endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model = EndpointGatewayReservedIPReservedIPIdentityById.from_dict(endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json) + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model = EndpointGatewayReservedIPReservedIPIdentityById.from_dict( + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json) assert endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model != False # Construct a model instance of EndpointGatewayReservedIPReservedIPIdentityById by calling from_dict on the json representation - endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_dict = EndpointGatewayReservedIPReservedIPIdentityById.from_dict(endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json).__dict__ - endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model2 = EndpointGatewayReservedIPReservedIPIdentityById(**endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_dict) + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_dict = EndpointGatewayReservedIPReservedIPIdentityById.from_dict( + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json + ).__dict__ + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model2 = EndpointGatewayReservedIPReservedIPIdentityById( + ** + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_dict) # Verify the model instances are equivalent assert endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model == endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model.to_dict() + endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model.to_dict( + ) assert endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json2 == endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json @@ -89581,29 +105643,40 @@ class TestModel_EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProvid Test Class for EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN """ - def test_endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_serialization(self): + def test_endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_serialization( + self): """ Test serialization/deserialization for EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN """ # Construct a json representation of a EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN model endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json = {} - endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json['resource_type'] = 'provider_cloud_service' - endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json[ + 'resource_type'] = 'provider_cloud_service' + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' # Construct a model instance of EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN by calling from_dict on the json representation - endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model = EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN.from_dict(endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json) + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model = EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN.from_dict( + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json + ) assert endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model != False # Construct a model instance of EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN by calling from_dict on the json representation - endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_dict = EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN.from_dict(endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json).__dict__ - endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model2 = EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(**endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_dict) + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_dict = EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN.from_dict( + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json + ).__dict__ + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model2 = EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN( + ** + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model == endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json2 = endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model.to_dict() + endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json2 = endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model.to_dict( + ) assert endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json2 == endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json @@ -89612,29 +105685,40 @@ class TestModel_EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdent Test Class for EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName """ - def test_endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_serialization(self): + def test_endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_serialization( + self): """ Test serialization/deserialization for EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName """ # Construct a json representation of a EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName model endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json = {} - endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json['resource_type'] = 'provider_cloud_service' - endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json['name'] = 'ibm-ntp-server' + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json[ + 'resource_type'] = 'provider_cloud_service' + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json[ + 'name'] = 'ibm-ntp-server' # Construct a model instance of EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName by calling from_dict on the json representation - endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model = EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName.from_dict(endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json) + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model = EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName.from_dict( + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json + ) assert endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model != False # Construct a model instance of EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName by calling from_dict on the json representation - endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_dict = EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName.from_dict(endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json).__dict__ - endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model2 = EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(**endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_dict) + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_dict = EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName.from_dict( + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json + ).__dict__ + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model2 = EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName( + ** + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_dict + ) # Verify the model instances are equivalent assert endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model == endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json2 = endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model.to_dict() + endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json2 = endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model.to_dict( + ) assert endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json2 == endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json @@ -89643,28 +105727,38 @@ class TestModel_FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBare Test Class for FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref """ - def test_floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_serialization(self): + def test_floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref """ # Construct a json representation of a FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref model floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json = {} - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json) + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json + ) assert floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model != False # Construct a model instance of FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json).__dict__ - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model2 = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref(**floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict) + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json + ).__dict__ + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model2 = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref( + ** + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model == floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json2 = floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model.to_dict() + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json2 = floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model.to_dict( + ) assert floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json2 == floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json @@ -89673,28 +105767,38 @@ class TestModel_FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBare Test Class for FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById """ - def test_floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_serialization(self): + def test_floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById """ # Construct a json representation of a FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json = {} - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json) + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict( + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json + ) assert floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model != False # Construct a model instance of FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json).__dict__ - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model2 = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById(**floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict) + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict( + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json + ).__dict__ + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model2 = FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById( + ** + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model == floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json2 = floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model.to_dict() + floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json2 = floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model.to_dict( + ) assert floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json2 == floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json @@ -89703,28 +105807,38 @@ class TestModel_FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIde Test Class for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref """ - def test_floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_serialization(self): + def test_floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref """ # Construct a json representation of a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json = {} - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json) + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json + ) assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model != False # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_dict = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json).__dict__ - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model2 = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(**floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_dict) + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_dict = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json + ).__dict__ + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model2 = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref( + ** + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model == floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json2 = floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model.to_dict() + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json2 = floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model.to_dict( + ) assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json2 == floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json @@ -89733,28 +105847,38 @@ class TestModel_FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIde Test Class for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById """ - def test_floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_serialization(self): + def test_floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById """ # Construct a json representation of a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById model floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json = {} - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json) + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict( + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json + ) assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model != False # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_dict = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json).__dict__ - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model2 = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById(**floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_dict) + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_dict = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict( + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json + ).__dict__ + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model2 = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById( + ** + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model == floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json2 = floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model.to_dict() + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json2 = floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model.to_dict( + ) assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json2 == floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json @@ -89763,28 +105887,38 @@ class TestModel_FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetwo Test Class for FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ - def test_floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization(self): + def test_floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ # Construct a json representation of a FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN model floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json = {} - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json) + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ) assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model != False # Construct a model instance of FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json).__dict__ - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(**floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict) + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ).__dict__ + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ** + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model == floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict() + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict( + ) assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 == floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json @@ -89793,28 +105927,38 @@ class TestModel_FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetwo Test Class for FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ - def test_floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization(self): + def test_floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ # Construct a json representation of a FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref model floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json = {} - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json) + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ) assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model != False # Construct a model instance of FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json).__dict__ - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(**floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict) + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ).__dict__ + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ** + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model == floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict() + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict( + ) assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 == floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json @@ -89823,28 +105967,38 @@ class TestModel_FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetwo Test Class for FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ - def test_floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization(self): + def test_floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ # Construct a json representation of a FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById model floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json = {} - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json) + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ) assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model != False # Construct a model instance of FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json).__dict__ - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(**floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict) + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ).__dict__ + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ** + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model == floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict() + floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict( + ) assert floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 == floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json @@ -89853,28 +106007,38 @@ class TestModel_FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity Test Class for FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref """ - def test_floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_serialization(self): + def test_floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref """ # Construct a json representation of a FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref model floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json = {} - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json) + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json + ) assert floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model != False # Construct a model instance of FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json).__dict__ - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model2 = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref(**floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict) + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json + ).__dict__ + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model2 = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref( + ** + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model == floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json2 = floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model.to_dict() + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json2 = floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model.to_dict( + ) assert floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json2 == floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model_json @@ -89883,28 +106047,38 @@ class TestModel_FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentity Test Class for FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById """ - def test_floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_serialization(self): + def test_floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById """ # Construct a json representation of a FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById model floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json = {} - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json[ + 'id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict(floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json) + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict( + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json + ) assert floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model != False # Construct a model instance of FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict(floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json).__dict__ - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model2 = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById(**floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict) + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById.from_dict( + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json + ).__dict__ + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model2 = FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById( + ** + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model == floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json2 = floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model.to_dict() + floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json2 = floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model.to_dict( + ) assert floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json2 == floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model_json @@ -89913,28 +106087,38 @@ class TestModel_FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfac Test Class for FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref """ - def test_floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_serialization(self): + def test_floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref """ # Construct a json representation of a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json = {} - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json) + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json + ) assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model != False # Construct a model instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json).__dict__ - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model2 = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(**floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict) + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json + ).__dict__ + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model2 = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref( + ** + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model == floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json2 = floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model.to_dict() + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json2 = floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model.to_dict( + ) assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json2 == floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json @@ -89943,28 +106127,38 @@ class TestModel_FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfac Test Class for FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById """ - def test_floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_serialization(self): + def test_floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById """ # Construct a json representation of a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json = {} - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json) + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict( + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json + ) assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model != False # Construct a model instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json).__dict__ - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model2 = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById(**floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict) + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict( + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json + ).__dict__ + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model2 = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById( + ** + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model == floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json2 = floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model.to_dict() + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json2 = floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model.to_dict( + ) assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json2 == floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json @@ -89973,28 +106167,38 @@ class TestModel_FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualN Test Class for FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ - def test_floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization(self): + def test_floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ # Construct a json representation of a FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN model floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json = {} - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json) + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ) assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model != False # Construct a model instance of FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json).__dict__ - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(**floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict) + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ).__dict__ + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ** + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model == floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict() + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict( + ) assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 == floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json @@ -90003,28 +106207,38 @@ class TestModel_FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualN Test Class for FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ - def test_floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization(self): + def test_floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ # Construct a json representation of a FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref model floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json = {} - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json) + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ) assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model != False # Construct a model instance of FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json).__dict__ - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(**floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict) + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ).__dict__ + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ** + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model == floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict() + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict( + ) assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 == floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json @@ -90033,28 +106247,38 @@ class TestModel_FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualN Test Class for FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ - def test_floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization(self): + def test_floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ # Construct a json representation of a FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById model floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json = {} - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json) + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ) assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model != False # Construct a model instance of FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json).__dict__ - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(**floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict) + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ).__dict__ + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ** + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model == floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict() + floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict( + ) assert floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 == floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json @@ -90063,28 +106287,38 @@ class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityB Test Class for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN """ - def test_flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_serialization(self): + def test_flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN """ # Construct a json representation of a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN model flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json = {} - flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict(flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict( + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json + ) assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict(flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json).__dict__ - flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(**flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_dict) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict( + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json + ).__dict__ + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN( + ** + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model == flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json2 = flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model.to_dict() + flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json2 = flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model.to_dict( + ) assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json2 == flow_log_collector_target_prototype_instance_identity_instance_identity_by_crn_model_json @@ -90093,28 +106327,38 @@ class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityB Test Class for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref """ - def test_flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_serialization(self): + def test_flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref """ # Construct a json representation of a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref model flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json = {} - flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict(flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict( + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json + ) assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict(flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json).__dict__ - flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model2 = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(**flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_dict) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict( + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json + ).__dict__ + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model2 = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref( + ** + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model == flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json2 = flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model.to_dict() + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json2 = flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model.to_dict( + ) assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json2 == flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json @@ -90123,28 +106367,38 @@ class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityB Test Class for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById """ - def test_flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_serialization(self): + def test_flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById """ # Construct a json representation of a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById model flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json = {} - flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict(flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict( + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json + ) assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict(flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json).__dict__ - flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model2 = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById(**flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_dict) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict( + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json + ).__dict__ + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model2 = FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById( + ** + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model == flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json2 = flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model.to_dict() + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json2 = flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model.to_dict( + ) assert flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json2 == flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json @@ -90153,28 +106407,38 @@ class TestModel_FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity Test Class for FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref """ - def test_flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_serialization(self): + def test_flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref """ # Construct a json representation of a FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref model flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json = {} - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/5dd61d72-acaa-47c2-a336-3d849660d010/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.from_dict(flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json) + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.from_dict( + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json + ) assert flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.from_dict(flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json).__dict__ - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model2 = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref(**flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_dict) + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref.from_dict( + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json + ).__dict__ + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model2 = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref( + ** + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model == flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json2 = flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model.to_dict() + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json2 = flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model.to_dict( + ) assert flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json2 == flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model_json @@ -90183,28 +106447,38 @@ class TestModel_FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity Test Class for FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById """ - def test_flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_serialization(self): + def test_flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById """ # Construct a json representation of a FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById model flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json = {} - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json[ + 'id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.from_dict(flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json) + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.from_dict( + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json + ) assert flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.from_dict(flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json).__dict__ - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model2 = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById(**flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_dict) + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById.from_dict( + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json + ).__dict__ + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model2 = FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById( + ** + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model == flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json2 = flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model.to_dict() + flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json2 = flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model.to_dict( + ) assert flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json2 == flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model_json @@ -90213,28 +106487,38 @@ class TestModel_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkIn Test Class for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref """ - def test_flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_serialization(self): + def test_flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref """ # Construct a json representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json = {} - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json) + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict( + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json + ) assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json).__dict__ - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model2 = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(**flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict) + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict( + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json + ).__dict__ + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model2 = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref( + ** + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model == flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json2 = flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model.to_dict() + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json2 = flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model.to_dict( + ) assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json2 == flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json @@ -90243,28 +106527,38 @@ class TestModel_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkIn Test Class for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById """ - def test_flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_serialization(self): + def test_flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById """ # Construct a json representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json = {} - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json[ + 'id'] = '0717-10c02d81-0ecb-4dc5-897d-28392913b81e' # Construct a model instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json) + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict( + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json + ) assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json).__dict__ - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model2 = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById(**flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict) + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict( + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json + ).__dict__ + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model2 = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById( + ** + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model == flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json2 = flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model.to_dict() + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json2 = flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model.to_dict( + ) assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json2 == flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json @@ -90273,28 +106567,38 @@ class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN Test Class for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN """ - def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_serialization(self): + def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN """ # Construct a json representation of a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN model flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json = {} - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a model instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.from_dict(flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json) + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.from_dict( + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json + ) assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.from_dict(flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json).__dict__ - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(**flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_dict) + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.from_dict( + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json + ).__dict__ + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN( + ** + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model == flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json2 = flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model.to_dict() + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json2 = flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model.to_dict( + ) assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json2 == flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_crn_model_json @@ -90303,28 +106607,38 @@ class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHre Test Class for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref """ - def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_serialization(self): + def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref """ # Construct a json representation of a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref model flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json = {} - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a model instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.from_dict(flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json) + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.from_dict( + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json + ) assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.from_dict(flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json).__dict__ - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model2 = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(**flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_dict) + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.from_dict( + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json + ).__dict__ + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model2 = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref( + ** + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model == flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json2 = flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model.to_dict() + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json2 = flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model.to_dict( + ) assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json2 == flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_href_model_json @@ -90333,28 +106647,38 @@ class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById: Test Class for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById """ - def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_serialization(self): + def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById """ # Construct a json representation of a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById model flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json = {} - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json[ + 'id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' # Construct a model instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.from_dict(flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json) + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.from_dict( + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json + ) assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.from_dict(flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json).__dict__ - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model2 = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById(**flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_dict) + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.from_dict( + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json + ).__dict__ + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model2 = FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById( + ** + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model == flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json2 = flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model.to_dict() + flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json2 = flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model.to_dict( + ) assert flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json2 == flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_id_model_json @@ -90363,28 +106687,38 @@ class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN: Test Class for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN """ - def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_serialization(self): + def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN """ # Construct a json representation of a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN model flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json = {} - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.from_dict(flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json) + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.from_dict( + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json + ) assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.from_dict(flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json).__dict__ - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(**flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_dict) + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.from_dict( + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json + ).__dict__ + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN( + ** + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model == flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json2 = flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model.to_dict() + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json2 = flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model.to_dict( + ) assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json2 == flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_model_json @@ -90393,28 +106727,38 @@ class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref: Test Class for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref """ - def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_serialization(self): + def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref """ # Construct a json representation of a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref model flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json = {} - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.from_dict(flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json) + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.from_dict( + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json + ) assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.from_dict(flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json).__dict__ - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model2 = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(**flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_dict) + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.from_dict( + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json + ).__dict__ + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model2 = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref( + ** + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model == flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json2 = flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model.to_dict() + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json2 = flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model.to_dict( + ) assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json2 == flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_model_json @@ -90423,28 +106767,38 @@ class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById: Test Class for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById """ - def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_serialization(self): + def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById """ # Construct a json representation of a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById model flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json = {} - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json[ + 'id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a model instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.from_dict(flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json) + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.from_dict( + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json + ) assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.from_dict(flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json).__dict__ - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model2 = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById(**flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_dict) + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.from_dict( + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json + ).__dict__ + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model2 = FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById( + ** + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model == flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json2 = flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model.to_dict() + flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json2 = flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model.to_dict( + ) assert flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json2 == flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_model_json @@ -90453,28 +106807,38 @@ class TestModel_FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVi Test Class for FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ - def test_flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization(self): + def test_flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ # Construct a json representation of a FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN model flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json = {} - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json) + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ) assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json).__dict__ - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(**flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict) + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ).__dict__ + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ** + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model == flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict() + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict( + ) assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 == flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json @@ -90483,28 +106847,38 @@ class TestModel_FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVi Test Class for FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ - def test_flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization(self): + def test_flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ # Construct a json representation of a FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref model flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json = {} - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json) + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ) assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json).__dict__ - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(**flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict) + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ).__dict__ + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ** + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model == flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict() + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict( + ) assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 == flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json @@ -90513,28 +106887,38 @@ class TestModel_FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVi Test Class for FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ - def test_flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization(self): + def test_flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ # Construct a json representation of a FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById model flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json = {} - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json) + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ) assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model != False # Construct a model instance of FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json).__dict__ - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(**flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict) + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ).__dict__ + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ** + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model == flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict() + flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict( + ) assert flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 == flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json @@ -90543,46 +106927,71 @@ class TestModel_InstanceGroupManagerActionScheduledActionGroupTarget: Test Class for InstanceGroupManagerActionScheduledActionGroupTarget """ - def test_instance_group_manager_action_scheduled_action_group_target_serialization(self): + def test_instance_group_manager_action_scheduled_action_group_target_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionScheduledActionGroupTarget """ # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_scheduled_action_group_model = {} # InstanceGroupManagerScheduledActionGroup - instance_group_manager_scheduled_action_group_model['membership_count'] = 10 + instance_group_manager_scheduled_action_group_model = { + } # InstanceGroupManagerScheduledActionGroup + instance_group_manager_scheduled_action_group_model[ + 'membership_count'] = 10 # Construct a json representation of a InstanceGroupManagerActionScheduledActionGroupTarget model instance_group_manager_action_scheduled_action_group_target_model_json = {} - instance_group_manager_action_scheduled_action_group_target_model_json['auto_delete'] = True - instance_group_manager_action_scheduled_action_group_target_model_json['auto_delete_timeout'] = 24 - instance_group_manager_action_scheduled_action_group_target_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_group_target_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_scheduled_action_group_target_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_scheduled_action_group_target_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_scheduled_action_group_target_model_json['resource_type'] = 'instance_group_manager_action' - instance_group_manager_action_scheduled_action_group_target_model_json['status'] = 'active' - instance_group_manager_action_scheduled_action_group_target_model_json['updated_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_group_target_model_json['action_type'] = 'scheduled' - instance_group_manager_action_scheduled_action_group_target_model_json['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_scheduled_action_group_target_model_json['last_applied_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_group_target_model_json['next_run_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_group_target_model_json['group'] = instance_group_manager_scheduled_action_group_model + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'auto_delete'] = True + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'auto_delete_timeout'] = 24 + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'resource_type'] = 'instance_group_manager_action' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'status'] = 'active' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'updated_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'action_type'] = 'scheduled' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'cron_spec'] = '30 */2 * * 1-5' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'last_applied_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'next_run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_group_target_model_json[ + 'group'] = instance_group_manager_scheduled_action_group_model # Construct a model instance of InstanceGroupManagerActionScheduledActionGroupTarget by calling from_dict on the json representation - instance_group_manager_action_scheduled_action_group_target_model = InstanceGroupManagerActionScheduledActionGroupTarget.from_dict(instance_group_manager_action_scheduled_action_group_target_model_json) + instance_group_manager_action_scheduled_action_group_target_model = InstanceGroupManagerActionScheduledActionGroupTarget.from_dict( + instance_group_manager_action_scheduled_action_group_target_model_json + ) assert instance_group_manager_action_scheduled_action_group_target_model != False # Construct a model instance of InstanceGroupManagerActionScheduledActionGroupTarget by calling from_dict on the json representation - instance_group_manager_action_scheduled_action_group_target_model_dict = InstanceGroupManagerActionScheduledActionGroupTarget.from_dict(instance_group_manager_action_scheduled_action_group_target_model_json).__dict__ - instance_group_manager_action_scheduled_action_group_target_model2 = InstanceGroupManagerActionScheduledActionGroupTarget(**instance_group_manager_action_scheduled_action_group_target_model_dict) + instance_group_manager_action_scheduled_action_group_target_model_dict = InstanceGroupManagerActionScheduledActionGroupTarget.from_dict( + instance_group_manager_action_scheduled_action_group_target_model_json + ).__dict__ + instance_group_manager_action_scheduled_action_group_target_model2 = InstanceGroupManagerActionScheduledActionGroupTarget( + ** + instance_group_manager_action_scheduled_action_group_target_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_action_scheduled_action_group_target_model == instance_group_manager_action_scheduled_action_group_target_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_scheduled_action_group_target_model_json2 = instance_group_manager_action_scheduled_action_group_target_model.to_dict() + instance_group_manager_action_scheduled_action_group_target_model_json2 = instance_group_manager_action_scheduled_action_group_target_model.to_dict( + ) assert instance_group_manager_action_scheduled_action_group_target_model_json2 == instance_group_manager_action_scheduled_action_group_target_model_json @@ -90591,54 +107000,86 @@ class TestModel_InstanceGroupManagerActionScheduledActionManagerTarget: Test Class for InstanceGroupManagerActionScheduledActionManagerTarget """ - def test_instance_group_manager_action_scheduled_action_manager_target_serialization(self): + def test_instance_group_manager_action_scheduled_action_manager_target_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionScheduledActionManagerTarget """ # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted - instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - - instance_group_manager_scheduled_action_manager_model = {} # InstanceGroupManagerScheduledActionManagerAutoScale - instance_group_manager_scheduled_action_manager_model['deleted'] = instance_group_manager_reference_deleted_model - instance_group_manager_scheduled_action_manager_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - instance_group_manager_scheduled_action_manager_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_scheduled_action_manager_model['name'] = 'my-instance-group-manager' - instance_group_manager_scheduled_action_manager_model['max_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_model['min_membership_count'] = 10 + instance_group_manager_reference_deleted_model = { + } # InstanceGroupManagerReferenceDeleted + instance_group_manager_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + instance_group_manager_scheduled_action_manager_model = { + } # InstanceGroupManagerScheduledActionManagerAutoScale + instance_group_manager_scheduled_action_manager_model[ + 'deleted'] = instance_group_manager_reference_deleted_model + instance_group_manager_scheduled_action_manager_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_scheduled_action_manager_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_scheduled_action_manager_model[ + 'name'] = 'my-instance-group-manager' + instance_group_manager_scheduled_action_manager_model[ + 'max_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_model[ + 'min_membership_count'] = 10 # Construct a json representation of a InstanceGroupManagerActionScheduledActionManagerTarget model instance_group_manager_action_scheduled_action_manager_target_model_json = {} - instance_group_manager_action_scheduled_action_manager_target_model_json['auto_delete'] = True - instance_group_manager_action_scheduled_action_manager_target_model_json['auto_delete_timeout'] = 24 - instance_group_manager_action_scheduled_action_manager_target_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_manager_target_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_scheduled_action_manager_target_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_group_manager_action_scheduled_action_manager_target_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_scheduled_action_manager_target_model_json['resource_type'] = 'instance_group_manager_action' - instance_group_manager_action_scheduled_action_manager_target_model_json['status'] = 'active' - instance_group_manager_action_scheduled_action_manager_target_model_json['updated_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_manager_target_model_json['action_type'] = 'scheduled' - instance_group_manager_action_scheduled_action_manager_target_model_json['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_scheduled_action_manager_target_model_json['last_applied_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_manager_target_model_json['next_run_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_scheduled_action_manager_target_model_json['manager'] = instance_group_manager_scheduled_action_manager_model + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'auto_delete'] = True + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'auto_delete_timeout'] = 24 + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'resource_type'] = 'instance_group_manager_action' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'status'] = 'active' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'updated_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'action_type'] = 'scheduled' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'cron_spec'] = '30 */2 * * 1-5' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'last_applied_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'next_run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_scheduled_action_manager_target_model_json[ + 'manager'] = instance_group_manager_scheduled_action_manager_model # Construct a model instance of InstanceGroupManagerActionScheduledActionManagerTarget by calling from_dict on the json representation - instance_group_manager_action_scheduled_action_manager_target_model = InstanceGroupManagerActionScheduledActionManagerTarget.from_dict(instance_group_manager_action_scheduled_action_manager_target_model_json) + instance_group_manager_action_scheduled_action_manager_target_model = InstanceGroupManagerActionScheduledActionManagerTarget.from_dict( + instance_group_manager_action_scheduled_action_manager_target_model_json + ) assert instance_group_manager_action_scheduled_action_manager_target_model != False # Construct a model instance of InstanceGroupManagerActionScheduledActionManagerTarget by calling from_dict on the json representation - instance_group_manager_action_scheduled_action_manager_target_model_dict = InstanceGroupManagerActionScheduledActionManagerTarget.from_dict(instance_group_manager_action_scheduled_action_manager_target_model_json).__dict__ - instance_group_manager_action_scheduled_action_manager_target_model2 = InstanceGroupManagerActionScheduledActionManagerTarget(**instance_group_manager_action_scheduled_action_manager_target_model_dict) + instance_group_manager_action_scheduled_action_manager_target_model_dict = InstanceGroupManagerActionScheduledActionManagerTarget.from_dict( + instance_group_manager_action_scheduled_action_manager_target_model_json + ).__dict__ + instance_group_manager_action_scheduled_action_manager_target_model2 = InstanceGroupManagerActionScheduledActionManagerTarget( + ** + instance_group_manager_action_scheduled_action_manager_target_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_action_scheduled_action_manager_target_model == instance_group_manager_action_scheduled_action_manager_target_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_scheduled_action_manager_target_model_json2 = instance_group_manager_action_scheduled_action_manager_target_model.to_dict() + instance_group_manager_action_scheduled_action_manager_target_model_json2 = instance_group_manager_action_scheduled_action_manager_target_model.to_dict( + ) assert instance_group_manager_action_scheduled_action_manager_target_model_json2 == instance_group_manager_action_scheduled_action_manager_target_model_json @@ -90647,30 +107088,42 @@ class TestModel_InstanceGroupManagerScheduledActionManagerPrototypeAutoScaleProt Test Class for InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref """ - def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_serialization(self): + def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref """ # Construct a json representation of a InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref model instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json = {} - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json['max_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json['min_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json[ + 'max_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json[ + 'min_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a model instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref by calling from_dict on the json representation - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.from_dict(instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json) + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.from_dict( + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json + ) assert instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model != False # Construct a model instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref by calling from_dict on the json representation - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_dict = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.from_dict(instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json).__dict__ - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model2 = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(**instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_dict) + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_dict = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.from_dict( + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json + ).__dict__ + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model2 = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref( + ** + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model == instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json2 = instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model.to_dict() + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json2 = instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model.to_dict( + ) assert instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json2 == instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_href_model_json @@ -90679,30 +107132,42 @@ class TestModel_InstanceGroupManagerScheduledActionManagerPrototypeAutoScaleProt Test Class for InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById """ - def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_serialization(self): + def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById """ # Construct a json representation of a InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById model instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json = {} - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json['max_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json['min_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json[ + 'max_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json[ + 'min_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById by calling from_dict on the json representation - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.from_dict(instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json) + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.from_dict( + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json + ) assert instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model != False # Construct a model instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById by calling from_dict on the json representation - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_dict = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.from_dict(instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json).__dict__ - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model2 = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById(**instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_dict) + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_dict = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.from_dict( + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json + ).__dict__ + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model2 = InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById( + ** + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model == instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json2 = instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model.to_dict() + instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json2 = instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model.to_dict( + ) assert instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json2 == instance_group_manager_scheduled_action_manager_prototype_auto_scale_prototype_by_id_model_json @@ -90711,28 +107176,38 @@ class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtual Test Class for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ - def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization(self): + def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization( + self): """ Test serialization/deserialization for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ # Construct a json representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN model instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json = {} - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model != False # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json).__dict__ - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(**instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ).__dict__ + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ** + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict() + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict( + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json @@ -90741,28 +107216,38 @@ class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtual Test Class for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ - def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization(self): + def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ # Construct a json representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref model instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json = {} - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model != False # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json).__dict__ - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(**instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ).__dict__ + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ** + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict() + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict( + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json @@ -90771,28 +107256,38 @@ class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtual Test Class for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ - def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization(self): + def test_instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ # Construct a json representation of a InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById model instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json = {} - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model != False # Construct a model instance of InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json).__dict__ - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(**instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict) + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ).__dict__ + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ** + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict() + instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict( + ) assert instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 == instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json @@ -90801,28 +107296,38 @@ class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedH Test Class for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN """ - def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_serialization(self): + def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN """ # Construct a json representation of a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN model instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json = {} - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict(instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json) + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict( + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json + ) assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model != False # Construct a model instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict(instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json).__dict__ - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model2 = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(**instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict) + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict( + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json + ).__dict__ + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model2 = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN( + ** + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model == instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json2 = instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model.to_dict() + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json2 = instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model.to_dict( + ) assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json2 == instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json @@ -90831,28 +107336,38 @@ class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedH Test Class for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref """ - def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_serialization(self): + def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref """ # Construct a json representation of a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref model instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json = {} - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict(instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json) + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict( + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json + ) assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model != False # Construct a model instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict(instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json).__dict__ - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model2 = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(**instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict) + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict( + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json + ).__dict__ + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model2 = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref( + ** + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model == instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json2 = instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model.to_dict() + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json2 = instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model.to_dict( + ) assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json2 == instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json @@ -90861,28 +107376,38 @@ class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedH Test Class for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById """ - def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_serialization(self): + def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById """ # Construct a json representation of a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById model instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json = {} - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict(instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json) + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict( + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json + ) assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model != False # Construct a model instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict(instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json).__dict__ - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model2 = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById(**instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict) + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict( + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json + ).__dict__ + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model2 = InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById( + ** + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model == instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json2 = instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model.to_dict() + instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json2 = instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model.to_dict( + ) assert instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json2 == instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json @@ -90891,28 +107416,38 @@ class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostId Test Class for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN """ - def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_serialization(self): + def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN """ # Construct a json representation of a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN model instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json = {} - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict(instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json) + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict( + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json + ) assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model != False # Construct a model instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict(instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json).__dict__ - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model2 = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(**instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict) + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict( + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json + ).__dict__ + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model2 = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN( + ** + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model == instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json2 = instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model.to_dict() + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json2 = instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model.to_dict( + ) assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json2 == instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_crn_model_json @@ -90921,28 +107456,38 @@ class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostId Test Class for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref """ - def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_serialization(self): + def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref """ # Construct a json representation of a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref model instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json = {} - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict(instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json) + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict( + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json + ) assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model != False # Construct a model instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_dict = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict(instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json).__dict__ - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model2 = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(**instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_dict) + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_dict = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict( + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json + ).__dict__ + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model2 = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref( + ** + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model == instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json2 = instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model.to_dict() + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json2 = instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model.to_dict( + ) assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json2 == instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_href_model_json @@ -90951,28 +107496,38 @@ class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostId Test Class for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById """ - def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_serialization(self): + def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById """ # Construct a json representation of a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json = {} - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.from_dict(instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json) + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.from_dict( + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json + ) assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model != False # Construct a model instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById by calling from_dict on the json representation - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_dict = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.from_dict(instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json).__dict__ - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model2 = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById(**instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_dict) + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_dict = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.from_dict( + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json + ).__dict__ + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model2 = InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById( + ** + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model == instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json2 = instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model.to_dict() + instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json2 = instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model.to_dict( + ) assert instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json2 == instance_placement_target_patch_dedicated_host_identity_dedicated_host_identity_by_id_model_json @@ -90981,28 +107536,38 @@ class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedica Test Class for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN """ - def test_instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_serialization(self): + def test_instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN """ # Construct a json representation of a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN model instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json = {} - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict(instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json) + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict( + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json + ) assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model != False # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict(instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json).__dict__ - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model2 = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(**instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict) + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.from_dict( + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json + ).__dict__ + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model2 = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN( + ** + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model == instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json2 = instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model.to_dict() + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json2 = instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model.to_dict( + ) assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json2 == instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model_json @@ -91011,28 +107576,38 @@ class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedica Test Class for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref """ - def test_instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_serialization(self): + def test_instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref """ # Construct a json representation of a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref model instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json = {} - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict(instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json) + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict( + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json + ) assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model != False # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict(instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json).__dict__ - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model2 = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(**instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict) + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.from_dict( + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json + ).__dict__ + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model2 = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref( + ** + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model == instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json2 = instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model.to_dict() + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json2 = instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model.to_dict( + ) assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json2 == instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model_json @@ -91041,28 +107616,38 @@ class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedica Test Class for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById """ - def test_instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_serialization(self): + def test_instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById """ # Construct a json representation of a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById model instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json = {} - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json[ + 'id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict(instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json) + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict( + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json + ) assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model != False # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict(instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json).__dict__ - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model2 = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById(**instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict) + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.from_dict( + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json + ).__dict__ + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model2 = InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById( + ** + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model == instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json2 = instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model.to_dict() + instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json2 = instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model.to_dict( + ) assert instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json2 == instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model_json @@ -91071,28 +107656,38 @@ class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHo Test Class for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN """ - def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_serialization(self): + def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN """ # Construct a json representation of a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN model instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json = {} - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict(instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json) + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict( + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json + ) assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model != False # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict(instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json).__dict__ - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model2 = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(**instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict) + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.from_dict( + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json + ).__dict__ + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model2 = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN( + ** + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model == instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json2 = instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model.to_dict() + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json2 = instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model.to_dict( + ) assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json2 == instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_crn_model_json @@ -91101,28 +107696,38 @@ class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHo Test Class for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref """ - def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_serialization(self): + def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref """ # Construct a json representation of a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref model instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json = {} - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict(instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json) + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict( + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json + ) assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model != False # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_dict = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict(instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json).__dict__ - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model2 = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(**instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_dict) + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_dict = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.from_dict( + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json + ).__dict__ + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model2 = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref( + ** + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model == instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json2 = instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model.to_dict() + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json2 = instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model.to_dict( + ) assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json2 == instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model_json @@ -91131,28 +107736,38 @@ class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHo Test Class for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById """ - def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_serialization(self): + def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById """ # Construct a json representation of a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json = {} - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.from_dict(instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json) + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.from_dict( + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json + ) assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model != False # Construct a model instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById by calling from_dict on the json representation - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_dict = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.from_dict(instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json).__dict__ - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model2 = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById(**instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_dict) + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_dict = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.from_dict( + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json + ).__dict__ + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model2 = InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById( + ** + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model == instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json2 = instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model.to_dict() + instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json2 = instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model.to_dict( + ) assert instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json2 == instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_id_model_json @@ -91161,28 +107776,38 @@ class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementG Test Class for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN """ - def test_instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_serialization(self): + def test_instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN """ # Construct a json representation of a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN model instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json = {} - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871' # Construct a model instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN by calling from_dict on the json representation - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.from_dict(instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json) + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.from_dict( + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json + ) assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model != False # Construct a model instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN by calling from_dict on the json representation - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_dict = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.from_dict(instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json).__dict__ - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model2 = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(**instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_dict) + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_dict = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.from_dict( + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json + ).__dict__ + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model2 = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN( + ** + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model == instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json2 = instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model.to_dict() + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json2 = instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model.to_dict( + ) assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json2 == instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model_json @@ -91191,28 +107816,38 @@ class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementG Test Class for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref """ - def test_instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_serialization(self): + def test_instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref """ # Construct a json representation of a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref model instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json = {} - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871' # Construct a model instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref by calling from_dict on the json representation - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.from_dict(instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json) + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.from_dict( + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json + ) assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model != False # Construct a model instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref by calling from_dict on the json representation - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_dict = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.from_dict(instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json).__dict__ - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model2 = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(**instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_dict) + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_dict = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.from_dict( + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json + ).__dict__ + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model2 = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref( + ** + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model == instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json2 = instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model.to_dict() + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json2 = instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model.to_dict( + ) assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json2 == instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model_json @@ -91221,28 +107856,38 @@ class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementG Test Class for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById """ - def test_instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_serialization(self): + def test_instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_serialization( + self): """ Test serialization/deserialization for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById """ # Construct a json representation of a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById model instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json = {} - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json['id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json[ + 'id'] = 'r018-418fe842-a3e9-47b9-a938-1aa5bd632871' # Construct a model instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById by calling from_dict on the json representation - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.from_dict(instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json) + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.from_dict( + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json + ) assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model != False # Construct a model instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById by calling from_dict on the json representation - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_dict = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.from_dict(instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json).__dict__ - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model2 = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById(**instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_dict) + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_dict = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.from_dict( + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json + ).__dict__ + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model2 = InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById( + ** + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model == instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json2 = instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model.to_dict() + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json2 = instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model.to_dict( + ) assert instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json2 == instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json @@ -91251,152 +107896,242 @@ class TestModel_InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer Test Class for InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment """ - def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_serialization(self): + def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model - - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' - - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment model instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json = {} - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['name'] = 'my-instance' - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json) + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json + ) assert instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model != False # Construct a model instance of InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_dict = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json).__dict__ - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model2 = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment(**instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_dict) + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_dict = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json + ).__dict__ + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model2 = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment( + ** + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model == instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model.to_dict() + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model.to_dict( + ) assert instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json2 == instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model_json @@ -91405,139 +108140,212 @@ class TestModel_InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOffer Test Class for InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface """ - def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_serialization(self): + def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model - - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' - - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface model instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json = {} - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['name'] = 'my-instance' - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json) + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json + ) assert instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model != False # Construct a model instance of InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_dict = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json).__dict__ - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model2 = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface(**instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_dict) + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_dict = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json + ).__dict__ + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model2 = InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface( + ** + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model == instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json2 = instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model.to_dict() + instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json2 = instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model.to_dict( + ) assert instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json2 == instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model_json @@ -91546,77 +108354,103 @@ class TestModel_InstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork Test Class for InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment """ - def test_instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_serialization(self): + def test_instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -91624,71 +108458,124 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment model instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json = {} - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['name'] = 'my-instance' - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['image'] = image_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'image'] = image_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json) + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json + ) assert instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model != False # Construct a model instance of InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_dict = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json).__dict__ - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model2 = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment(**instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_dict) + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_dict = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json + ).__dict__ + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model2 = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment( + ** + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model == instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model.to_dict() + instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model.to_dict( + ) assert instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json2 == instance_prototype_instance_by_image_instance_by_image_instance_by_network_attachment_model_json @@ -91697,77 +108584,103 @@ class TestModel_InstancePrototypeInstanceByImageInstanceByImageInstanceByNetwork Test Class for InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface """ - def test_instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_serialization(self): + def test_instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -91775,58 +108688,94 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface model instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json = {} - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['name'] = 'my-instance' - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['image'] = image_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'image'] = image_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json) + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json + ) assert instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model != False # Construct a model instance of InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_dict = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json).__dict__ - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model2 = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface(**instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_dict) + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_dict = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json + ).__dict__ + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model2 = InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface( + ** + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model == instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json2 = instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model.to_dict() + instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json2 = instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model.to_dict( + ) assert instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json2 == instance_prototype_instance_by_image_instance_by_image_instance_by_network_interface_model_json @@ -91835,60 +108784,78 @@ class TestModel_InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho Test Class for InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment """ - def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_serialization(self): + def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -91896,88 +108863,153 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' - volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext - volume_prototype_instance_by_source_snapshot_context_model['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = [] - - volume_attachment_prototype_instance_by_source_snapshot_context_model = {} # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext - volume_attachment_prototype_instance_by_source_snapshot_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_source_snapshot_context_model['volume'] = volume_prototype_instance_by_source_snapshot_context_model + volume_prototype_instance_by_source_snapshot_context_model = { + } # VolumePrototypeInstanceBySourceSnapshotContext + volume_prototype_instance_by_source_snapshot_context_model[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'user_tags'] = [] + + volume_attachment_prototype_instance_by_source_snapshot_context_model = { + } # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'volume'] = volume_prototype_instance_by_source_snapshot_context_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment model instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json = {} - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['name'] = 'my-instance' - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json) + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json + ) assert instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model != False # Construct a model instance of InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_dict = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json).__dict__ - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model2 = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment(**instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_dict) + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_dict = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json + ).__dict__ + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model2 = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment( + ** + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model == instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model.to_dict() + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model.to_dict( + ) assert instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json2 == instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model_json @@ -91986,60 +109018,78 @@ class TestModel_InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapsho Test Class for InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface """ - def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_serialization(self): + def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -92047,75 +109097,123 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' - volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext - volume_prototype_instance_by_source_snapshot_context_model['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = [] - - volume_attachment_prototype_instance_by_source_snapshot_context_model = {} # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext - volume_attachment_prototype_instance_by_source_snapshot_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_source_snapshot_context_model['volume'] = volume_prototype_instance_by_source_snapshot_context_model + volume_prototype_instance_by_source_snapshot_context_model = { + } # VolumePrototypeInstanceBySourceSnapshotContext + volume_prototype_instance_by_source_snapshot_context_model[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'user_tags'] = [] + + volume_attachment_prototype_instance_by_source_snapshot_context_model = { + } # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'volume'] = volume_prototype_instance_by_source_snapshot_context_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface model instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json = {} - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['name'] = 'my-instance' - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json) + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json + ) assert instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model != False # Construct a model instance of InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_dict = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json).__dict__ - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model2 = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface(**instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_dict) + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_dict = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json + ).__dict__ + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model2 = InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface( + ** + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model == instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json2 = instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model.to_dict() + instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json2 = instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model.to_dict( + ) assert instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json2 == instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model_json @@ -92124,133 +109222,207 @@ class TestModel_InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo Test Class for InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment """ - def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_serialization(self): + def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' volume_identity_model = {} # VolumeIdentityById - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - - volume_attachment_prototype_instance_by_volume_context_model = {} # VolumeAttachmentPrototypeInstanceByVolumeContext - volume_attachment_prototype_instance_by_volume_context_model['delete_volume_on_instance_delete'] = False - volume_attachment_prototype_instance_by_volume_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_volume_context_model['volume'] = volume_identity_model + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + + volume_attachment_prototype_instance_by_volume_context_model = { + } # VolumeAttachmentPrototypeInstanceByVolumeContext + volume_attachment_prototype_instance_by_volume_context_model[ + 'delete_volume_on_instance_delete'] = False + volume_attachment_prototype_instance_by_volume_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_volume_context_model[ + 'volume'] = volume_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment model instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json = {} - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['name'] = 'my-instance' - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_volume_context_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_volume_context_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json) + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json + ) assert instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model != False # Construct a model instance of InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment by calling from_dict on the json representation - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_dict = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.from_dict(instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json).__dict__ - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model2 = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment(**instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_dict) + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_dict = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.from_dict( + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json + ).__dict__ + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model2 = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment( + ** + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model == instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model.to_dict() + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json2 = instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model.to_dict( + ) assert instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json2 == instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_attachment_model_json @@ -92259,120 +109431,177 @@ class TestModel_InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwo Test Class for InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface """ - def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_serialization(self): + def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' volume_identity_model = {} # VolumeIdentityById - volume_identity_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - - volume_attachment_prototype_instance_by_volume_context_model = {} # VolumeAttachmentPrototypeInstanceByVolumeContext - volume_attachment_prototype_instance_by_volume_context_model['delete_volume_on_instance_delete'] = False - volume_attachment_prototype_instance_by_volume_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_volume_context_model['volume'] = volume_identity_model + volume_identity_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + + volume_attachment_prototype_instance_by_volume_context_model = { + } # VolumeAttachmentPrototypeInstanceByVolumeContext + volume_attachment_prototype_instance_by_volume_context_model[ + 'delete_volume_on_instance_delete'] = False + volume_attachment_prototype_instance_by_volume_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_volume_context_model[ + 'volume'] = volume_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface model instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json = {} - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['name'] = 'my-instance' - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['resource_group'] = resource_group_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_volume_context_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'name'] = 'my-instance' + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_volume_context_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json) + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json + ) assert instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model != False # Construct a model instance of InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface by calling from_dict on the json representation - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_dict = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.from_dict(instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json).__dict__ - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model2 = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface(**instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_dict) + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_dict = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.from_dict( + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json + ).__dict__ + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model2 = InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface( + ** + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model == instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json2 = instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model.to_dict() + instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json2 = instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model.to_dict( + ) assert instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json2 == instance_prototype_instance_by_volume_instance_by_volume_instance_by_network_interface_model_json @@ -92381,152 +109610,242 @@ class TestModel_InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan Test Class for InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment """ - def test_instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_serialization(self): + def test_instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model - - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' - - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment model instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json = {} - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['name'] = 'my-instance' - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance' + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.from_dict(instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json) + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.from_dict( + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json + ) assert instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model != False # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_dict = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.from_dict(instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json).__dict__ - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model2 = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment(**instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_dict) + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_dict = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.from_dict( + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json + ).__dict__ + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model2 = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment( + ** + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model == instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json2 = instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model.to_dict() + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json2 = instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model.to_dict( + ) assert instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json2 == instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model_json @@ -92535,139 +109854,212 @@ class TestModel_InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstan Test Class for InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface """ - def test_instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_serialization(self): + def test_instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model - - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' - - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface model instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json = {} - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['name'] = 'my-instance' - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['resource_group'] = resource_group_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'name'] = 'my-instance' + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.from_dict(instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json) + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.from_dict( + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json + ) assert instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model != False # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_dict = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.from_dict(instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json).__dict__ - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model2 = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface(**instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_dict) + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_dict = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.from_dict( + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json + ).__dict__ + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model2 = InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface( + ** + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model == instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json2 = instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model.to_dict() + instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json2 = instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model.to_dict( + ) assert instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json2 == instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model_json @@ -92676,77 +110068,103 @@ class TestModel_InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate Test Class for InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment """ - def test_instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_serialization(self): + def test_instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -92754,71 +110172,124 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment model instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json = {} - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['name'] = 'my-instance' - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['image'] = image_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance' + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'image'] = image_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.from_dict(instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json) + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.from_dict( + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json + ) assert instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model != False # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_dict = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.from_dict(instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json).__dict__ - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model2 = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment(**instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_dict) + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_dict = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.from_dict( + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json + ).__dict__ + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model2 = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment( + ** + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model == instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json2 = instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model.to_dict() + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json2 = instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model.to_dict( + ) assert instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json2 == instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model_json @@ -92827,77 +110298,103 @@ class TestModel_InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplate Test Class for InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface """ - def test_instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_serialization(self): + def test_instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -92905,58 +110402,94 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface model instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json = {} - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['name'] = 'my-instance' - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['resource_group'] = resource_group_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['image'] = image_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'name'] = 'my-instance' + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'image'] = image_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.from_dict(instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json) + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.from_dict( + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json + ) assert instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model != False # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_dict = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.from_dict(instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json).__dict__ - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model2 = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface(**instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_dict) + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_dict = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.from_dict( + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json + ).__dict__ + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model2 = InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface( + ** + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model == instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json2 = instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model.to_dict() + instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json2 = instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model.to_dict( + ) assert instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json2 == instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model_json @@ -92965,60 +110498,78 @@ class TestModel_InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc Test Class for InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment """ - def test_instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_serialization(self): + def test_instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -93026,88 +110577,153 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' - volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext - volume_prototype_instance_by_source_snapshot_context_model['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = [] - - volume_attachment_prototype_instance_by_source_snapshot_context_model = {} # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext - volume_attachment_prototype_instance_by_source_snapshot_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_source_snapshot_context_model['volume'] = volume_prototype_instance_by_source_snapshot_context_model + volume_prototype_instance_by_source_snapshot_context_model = { + } # VolumePrototypeInstanceBySourceSnapshotContext + volume_prototype_instance_by_source_snapshot_context_model[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'user_tags'] = [] + + volume_attachment_prototype_instance_by_source_snapshot_context_model = { + } # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'volume'] = volume_prototype_instance_by_source_snapshot_context_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment model instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json = {} - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['name'] = 'my-instance' - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['resource_group'] = resource_group_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance' + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.from_dict(instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json) + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.from_dict( + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json + ) assert instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model != False # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_dict = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.from_dict(instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json).__dict__ - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model2 = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment(**instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_dict) + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_dict = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.from_dict( + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json + ).__dict__ + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model2 = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment( + ** + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model == instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json2 = instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model.to_dict() + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json2 = instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model.to_dict( + ) assert instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json2 == instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model_json @@ -93116,60 +110732,78 @@ class TestModel_InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanc Test Class for InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface """ - def test_instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_serialization(self): + def test_instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -93177,75 +110811,123 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' - volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext - volume_prototype_instance_by_source_snapshot_context_model['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = [] - - volume_attachment_prototype_instance_by_source_snapshot_context_model = {} # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext - volume_attachment_prototype_instance_by_source_snapshot_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_source_snapshot_context_model['volume'] = volume_prototype_instance_by_source_snapshot_context_model + volume_prototype_instance_by_source_snapshot_context_model = { + } # VolumePrototypeInstanceBySourceSnapshotContext + volume_prototype_instance_by_source_snapshot_context_model[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'user_tags'] = [] + + volume_attachment_prototype_instance_by_source_snapshot_context_model = { + } # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'volume'] = volume_prototype_instance_by_source_snapshot_context_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface model instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json = {} - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['name'] = 'my-instance' - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['resource_group'] = resource_group_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'name'] = 'my-instance' + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.from_dict(instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json) + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.from_dict( + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json + ) assert instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model != False # Construct a model instance of InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_dict = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.from_dict(instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json).__dict__ - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model2 = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface(**instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_dict) + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_dict = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.from_dict( + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json + ).__dict__ + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model2 = InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface( + ** + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model == instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json2 = instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model.to_dict() + instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json2 = instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model.to_dict( + ) assert instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json2 == instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model_json @@ -93254,225 +110936,82 @@ class TestModel_InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext Test Class for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment """ - def test_instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_serialization(self): + def test_instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype - instance_availability_policy_prototype_model['host_failure'] = 'restart' - - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype - instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model - - key_identity_model = {} # KeyIdentityById - key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype - instance_metadata_service_prototype_model['enabled'] = False - instance_metadata_service_prototype_model['protocol'] = 'https' - instance_metadata_service_prototype_model['response_hop_limit'] = 2 - - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' - - instance_profile_identity_model = {} # InstanceProfileIdentityByName - instance_profile_identity_model['name'] = 'cx2-16x32' - - reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] - - resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['name'] = 'my-resource-group' - - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' - - volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False - volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model - - vpc_identity_model = {} # VPCIdentityById - vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - - encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' - - volume_profile_identity_model = {} # VolumeProfileIdentityByName - volume_profile_identity_model['name'] = 'general-purpose' - - resource_group_identity_model = {} # ResourceGroupIdentityById - resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext - volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_image_context_model['iops'] = 10000 - volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_image_context_model['user_tags'] = [] - - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model - - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' - - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model - - zone_identity_model = {} # ZoneIdentityByName - zone_identity_model['name'] = 'us-south-1' - - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext - virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_ip_prototype_model['auto_delete'] = False - virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' - - security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' - - subnet_identity_model = {} # SubnetIdentityById - subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model - - # Construct a json representation of a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json = {} - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['name'] = 'my-instance-template' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['resource_group'] = resource_group_reference_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model - - # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.from_dict(instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json) - assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model != False - - # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_dict = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.from_dict(instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json).__dict__ - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model2 = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment(**instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_dict) - - # Verify the model instances are equivalent - assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model == instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model2 - - # Convert model instance back to dict and verify no loss of data - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json2 = instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model.to_dict() - assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json2 == instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json - - -class TestModel_InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface: - """ - Test Class for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface - """ - - def test_instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_serialization(self): - """ - Test serialization/deserialization for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface - """ - - # Construct dict forms of any model objects needed in order to build this model. - - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -93480,85 +111019,403 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model - catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN - catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + zone_identity_model = {} # ZoneIdentityByName + zone_identity_model['name'] = 'us-south-1' + + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' + virtual_network_interface_ip_prototype_model['auto_delete'] = False + virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' + + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' + + security_group_identity_model = {} # SecurityGroupIdentityById + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + + subnet_identity_model = {} # SubnetIdentityById + subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + + # Construct a json representation of a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json = {} + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance-template' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_reference_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + + # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.from_dict( + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json + ) + assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model != False - instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering - instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model + # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_dict = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.from_dict( + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json + ).__dict__ + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model2 = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment( + ** + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_dict + ) + + # Verify the model instances are equivalent + assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model == instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model2 + + # Convert model instance back to dict and verify no loss of data + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json2 = instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model.to_dict( + ) + assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json2 == instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json + + +class TestModel_InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface: + """ + Test Class for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface + """ + + def test_instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_serialization( + self): + """ + Test serialization/deserialization for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface + """ + + # Construct dict forms of any model objects needed in order to build this model. + + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model['host_failure'] = 'restart' + + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model['auto_link'] = False + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model + + key_identity_model = {} # KeyIdentityById + key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model['enabled'] = False + instance_metadata_service_prototype_model['protocol'] = 'https' + instance_metadata_service_prototype_model['response_hop_limit'] = 2 + + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + + instance_profile_identity_model = {} # InstanceProfileIdentityByName + instance_profile_identity_model['name'] = 'cx2-16x32' + + reservation_identity_model = {} # ReservationIdentityById + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] + + resource_group_reference_model = {} # ResourceGroupReference + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model['name'] = 'my-resource-group' + + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + + volume_attachment_prototype_model = {} # VolumeAttachmentPrototype + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model['name'] = 'my-volume-attachment' + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model + + vpc_identity_model = {} # VPCIdentityById + vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' + + encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + + volume_profile_identity_model = {} # VolumeProfileIdentityByName + volume_profile_identity_model['name'] = 'general-purpose' + + resource_group_identity_model = {} # ResourceGroupIdentityById + resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model['capacity'] = 100 + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model['iops'] = 10000 + volume_prototype_instance_by_image_context_model['name'] = 'my-volume' + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model['user_tags'] = [] + + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model + + catalog_offering_version_plan_identity_model = { + } # CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + catalog_offering_version_plan_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e' + + catalog_offering_identity_model = { + } # CatalogOfferingIdentityCatalogOfferingByCRN + catalog_offering_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442' + + instance_catalog_offering_prototype_model = { + } # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering + instance_catalog_offering_prototype_model[ + 'plan'] = catalog_offering_version_plan_identity_model + instance_catalog_offering_prototype_model[ + 'offering'] = catalog_offering_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface model instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json = {} - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['name'] = 'my-instance-template' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['resource_group'] = resource_group_reference_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['catalog_offering'] = instance_catalog_offering_prototype_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'name'] = 'my-instance-template' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_reference_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'catalog_offering'] = instance_catalog_offering_prototype_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.from_dict(instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json) + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.from_dict( + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json + ) assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model != False # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_dict = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.from_dict(instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json).__dict__ - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model2 = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface(**instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_dict) + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_dict = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.from_dict( + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json + ).__dict__ + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model2 = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface( + ** + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model == instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json2 = instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model.to_dict() + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json2 = instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model.to_dict( + ) assert instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json2 == instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json @@ -93567,62 +111424,82 @@ class TestModel_InstanceTemplateInstanceByImageInstanceTemplateContextInstanceBy Test Class for InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment """ - def test_instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_serialization(self): + def test_instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -93630,19 +111507,27 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -93650,75 +111535,132 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment model instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json = {} - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['name'] = 'my-instance-template' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['resource_group'] = resource_group_reference_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['image'] = image_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance-template' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_reference_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'image'] = image_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.from_dict(instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json) + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.from_dict( + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json + ) assert instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model != False # Construct a model instance of InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_dict = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.from_dict(instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json).__dict__ - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model2 = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment(**instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_dict) + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_dict = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.from_dict( + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json + ).__dict__ + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model2 = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment( + ** + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model == instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json2 = instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model.to_dict() + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json2 = instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model.to_dict( + ) assert instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json2 == instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json @@ -93727,62 +111669,82 @@ class TestModel_InstanceTemplateInstanceByImageInstanceTemplateContextInstanceBy Test Class for InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface """ - def test_instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_serialization(self): + def test_instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -93790,19 +111752,27 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext + volume_prototype_instance_by_image_context_model = { + } # VolumePrototypeInstanceByImageContext volume_prototype_instance_by_image_context_model['capacity'] = 100 - volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_image_context_model[ + 'encryption_key'] = encryption_key_identity_model volume_prototype_instance_by_image_context_model['iops'] = 10000 volume_prototype_instance_by_image_context_model['name'] = 'my-volume' - volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_image_context_model['resource_group'] = resource_group_identity_model + volume_prototype_instance_by_image_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_image_context_model[ + 'resource_group'] = resource_group_identity_model volume_prototype_instance_by_image_context_model['user_tags'] = [] - volume_attachment_prototype_instance_by_image_context_model = {} # VolumeAttachmentPrototypeInstanceByImageContext - volume_attachment_prototype_instance_by_image_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_image_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_image_context_model['volume'] = volume_prototype_instance_by_image_context_model + volume_attachment_prototype_instance_by_image_context_model = { + } # VolumeAttachmentPrototypeInstanceByImageContext + volume_attachment_prototype_instance_by_image_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_image_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_image_context_model[ + 'volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -93810,62 +111780,102 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface model instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json = {} - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['name'] = 'my-instance-template' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['resource_group'] = resource_group_reference_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['image'] = image_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'name'] = 'my-instance-template' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_reference_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'image'] = image_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.from_dict(instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json) + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.from_dict( + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json + ) assert instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model != False # Construct a model instance of InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_dict = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.from_dict(instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json).__dict__ - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model2 = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface(**instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_dict) + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_dict = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.from_dict( + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json + ).__dict__ + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model2 = InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface( + ** + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model == instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json2 = instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model.to_dict() + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json2 = instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model.to_dict( + ) assert instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json2 == instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json @@ -93874,62 +111884,82 @@ class TestModel_InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextI Test Class for InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment """ - def test_instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_serialization(self): + def test_instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_serialization( + self): """ Test serialization/deserialization for InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -93940,105 +111970,180 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' - volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext - volume_prototype_instance_by_source_snapshot_context_model['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = [] - - volume_attachment_prototype_instance_by_source_snapshot_context_model = {} # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext - volume_attachment_prototype_instance_by_source_snapshot_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_source_snapshot_context_model['volume'] = volume_prototype_instance_by_source_snapshot_context_model - - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + volume_prototype_instance_by_source_snapshot_context_model = { + } # VolumePrototypeInstanceBySourceSnapshotContext + volume_prototype_instance_by_source_snapshot_context_model[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'user_tags'] = [] + + volume_attachment_prototype_instance_by_source_snapshot_context_model = { + } # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'volume'] = volume_prototype_instance_by_source_snapshot_context_model + + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' - - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' + + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a json representation of a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment model instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json = {} - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['keys'] = [key_identity_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['name'] = 'my-instance-template' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['profile'] = instance_profile_identity_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['resource_group'] = resource_group_reference_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['total_volume_bandwidth'] = 500 - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['user_data'] = 'testString' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['vpc'] = vpc_identity_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['zone'] = zone_identity_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'enable_secure_boot'] = True + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'keys'] = [key_identity_model] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'name'] = 'my-instance-template' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'resource_group'] = resource_group_reference_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'user_data'] = 'testString' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'vpc'] = vpc_identity_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'zone'] = zone_identity_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model # Construct a model instance of InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.from_dict(instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json) + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.from_dict( + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json + ) assert instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model != False # Construct a model instance of InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment by calling from_dict on the json representation - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_dict = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.from_dict(instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json).__dict__ - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model2 = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment(**instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_dict) + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_dict = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.from_dict( + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json + ).__dict__ + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model2 = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment( + ** + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_dict + ) # Verify the model instances are equivalent assert instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model == instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json2 = instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model.to_dict() + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json2 = instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model.to_dict( + ) assert instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json2 == instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json @@ -94047,62 +112152,82 @@ class TestModel_InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextI Test Class for InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface """ - def test_instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_serialization(self): + def test_instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_serialization( + self): """ Test serialization/deserialization for InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface """ # Construct dict forms of any model objects needed in order to build this model. - instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype + instance_availability_policy_prototype_model = { + } # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById - trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' + trusted_profile_identity_model = { + } # TrustedProfileIdentityTrustedProfileById + trusted_profile_identity_model[ + 'id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype + instance_default_trusted_profile_prototype_model = { + } # InstanceDefaultTrustedProfilePrototype instance_default_trusted_profile_prototype_model['auto_link'] = False - instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model + instance_default_trusted_profile_prototype_model[ + 'target'] = trusted_profile_identity_model key_identity_model = {} # KeyIdentityById key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype + instance_metadata_service_prototype_model = { + } # InstanceMetadataServicePrototype instance_metadata_service_prototype_model['enabled'] = False instance_metadata_service_prototype_model['protocol'] = 'https' instance_metadata_service_prototype_model['response_hop_limit'] = 2 - instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById - instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_placement_target_prototype_model = { + } # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById + instance_placement_target_prototype_model[ + 'id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName instance_profile_identity_model['name'] = 'cx2-16x32' reservation_identity_model = {} # ReservationIdentityById - reservation_identity_model['id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_identity_model[ + 'id'] = '7187-ba49df72-37b8-43ac-98da-f8e029de0e63' - instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype + instance_reservation_affinity_prototype_model = { + } # InstanceReservationAffinityPrototype instance_reservation_affinity_prototype_model['policy'] = 'disabled' - instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + instance_reservation_affinity_prototype_model['pool'] = [ + reservation_identity_model + ] resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' - resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model[ + 'id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'my-resource-group' - volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById - volume_attachment_prototype_volume_model['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_model = { + } # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById + volume_attachment_prototype_volume_model[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' volume_attachment_prototype_model = {} # VolumeAttachmentPrototype - volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False + volume_attachment_prototype_model[ + 'delete_volume_on_instance_delete'] = False volume_attachment_prototype_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + volume_attachment_prototype_model[ + 'volume'] = volume_attachment_prototype_volume_model vpc_identity_model = {} # VPCIdentityById vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' volume_profile_identity_model = {} # VolumeProfileIdentityByName volume_profile_identity_model['name'] = 'general-purpose' @@ -94113,106 +112238,182 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' - volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext - volume_prototype_instance_by_source_snapshot_context_model['capacity'] = 100 - volume_prototype_instance_by_source_snapshot_context_model['encryption_key'] = encryption_key_identity_model - volume_prototype_instance_by_source_snapshot_context_model['iops'] = 10000 - volume_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume' - volume_prototype_instance_by_source_snapshot_context_model['profile'] = volume_profile_identity_model - volume_prototype_instance_by_source_snapshot_context_model['resource_group'] = resource_group_identity_model - volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model - volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = [] - - volume_attachment_prototype_instance_by_source_snapshot_context_model = {} # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext - volume_attachment_prototype_instance_by_source_snapshot_context_model['delete_volume_on_instance_delete'] = True - volume_attachment_prototype_instance_by_source_snapshot_context_model['name'] = 'my-volume-attachment' - volume_attachment_prototype_instance_by_source_snapshot_context_model['volume'] = volume_prototype_instance_by_source_snapshot_context_model - - virtual_network_interface_ip_prototype_model = {} # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext + volume_prototype_instance_by_source_snapshot_context_model = { + } # VolumePrototypeInstanceBySourceSnapshotContext + volume_prototype_instance_by_source_snapshot_context_model[ + 'capacity'] = 100 + volume_prototype_instance_by_source_snapshot_context_model[ + 'encryption_key'] = encryption_key_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'iops'] = 10000 + volume_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume' + volume_prototype_instance_by_source_snapshot_context_model[ + 'profile'] = volume_profile_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'resource_group'] = resource_group_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'source_snapshot'] = snapshot_identity_model + volume_prototype_instance_by_source_snapshot_context_model[ + 'user_tags'] = [] + + volume_attachment_prototype_instance_by_source_snapshot_context_model = { + } # VolumeAttachmentPrototypeInstanceBySourceSnapshotContext + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'delete_volume_on_instance_delete'] = True + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'name'] = 'my-volume-attachment' + volume_attachment_prototype_instance_by_source_snapshot_context_model[ + 'volume'] = volume_prototype_instance_by_source_snapshot_context_model + + virtual_network_interface_ip_prototype_model = { + } # VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext virtual_network_interface_ip_prototype_model['address'] = '10.0.0.5' virtual_network_interface_ip_prototype_model['auto_delete'] = False virtual_network_interface_ip_prototype_model['name'] = 'my-reserved-ip' - virtual_network_interface_primary_ip_prototype_model = {} # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext - virtual_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - virtual_network_interface_primary_ip_prototype_model['auto_delete'] = False - virtual_network_interface_primary_ip_prototype_model['name'] = 'my-reserved-ip' + virtual_network_interface_primary_ip_prototype_model = { + } # VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext + virtual_network_interface_primary_ip_prototype_model[ + 'address'] = '10.0.0.5' + virtual_network_interface_primary_ip_prototype_model[ + 'auto_delete'] = False + virtual_network_interface_primary_ip_prototype_model[ + 'name'] = 'my-reserved-ip' security_group_identity_model = {} # SecurityGroupIdentityById - security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_identity_model[ + 'id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - instance_network_attachment_prototype_virtual_network_interface_model = {} # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext - instance_network_attachment_prototype_virtual_network_interface_model['allow_ip_spoofing'] = True - instance_network_attachment_prototype_virtual_network_interface_model['auto_delete'] = False - instance_network_attachment_prototype_virtual_network_interface_model['enable_infrastructure_nat'] = True - instance_network_attachment_prototype_virtual_network_interface_model['ips'] = [virtual_network_interface_ip_prototype_model] - instance_network_attachment_prototype_virtual_network_interface_model['name'] = 'my-virtual-network-interface' - instance_network_attachment_prototype_virtual_network_interface_model['primary_ip'] = virtual_network_interface_primary_ip_prototype_model - instance_network_attachment_prototype_virtual_network_interface_model['resource_group'] = resource_group_identity_model - instance_network_attachment_prototype_virtual_network_interface_model['security_groups'] = [security_group_identity_model] - instance_network_attachment_prototype_virtual_network_interface_model['subnet'] = subnet_identity_model - - instance_network_attachment_prototype_model = {} # InstanceNetworkAttachmentPrototype - instance_network_attachment_prototype_model['name'] = 'my-instance-network-attachment' - instance_network_attachment_prototype_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model + instance_network_attachment_prototype_virtual_network_interface_model = { + } # InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext + instance_network_attachment_prototype_virtual_network_interface_model[ + 'allow_ip_spoofing'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'auto_delete'] = False + instance_network_attachment_prototype_virtual_network_interface_model[ + 'enable_infrastructure_nat'] = True + instance_network_attachment_prototype_virtual_network_interface_model[ + 'ips'] = [virtual_network_interface_ip_prototype_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'name'] = 'my-virtual-network-interface' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'primary_ip'] = virtual_network_interface_primary_ip_prototype_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'protocol_state_filtering_mode'] = 'auto' + instance_network_attachment_prototype_virtual_network_interface_model[ + 'resource_group'] = resource_group_identity_model + instance_network_attachment_prototype_virtual_network_interface_model[ + 'security_groups'] = [security_group_identity_model] + instance_network_attachment_prototype_virtual_network_interface_model[ + 'subnet'] = subnet_identity_model + + instance_network_attachment_prototype_model = { + } # InstanceNetworkAttachmentPrototype + instance_network_attachment_prototype_model[ + 'name'] = 'my-instance-network-attachment' + instance_network_attachment_prototype_model[ + 'virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' - network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext + network_interface_ip_prototype_model = { + } # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext network_interface_ip_prototype_model['address'] = '10.0.0.5' network_interface_ip_prototype_model['auto_delete'] = False network_interface_ip_prototype_model['name'] = 'my-reserved-ip' network_interface_prototype_model = {} # NetworkInterfacePrototype network_interface_prototype_model['allow_ip_spoofing'] = True - network_interface_prototype_model['name'] = 'my-instance-network-interface' - network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model - network_interface_prototype_model['security_groups'] = [security_group_identity_model] + network_interface_prototype_model[ + 'name'] = 'my-instance-network-interface' + network_interface_prototype_model[ + 'primary_ip'] = network_interface_ip_prototype_model + network_interface_prototype_model['security_groups'] = [ + security_group_identity_model + ] network_interface_prototype_model['subnet'] = subnet_identity_model # Construct a json representation of a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface model instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json = {} - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['availability_policy'] = instance_availability_policy_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['created_at'] = '2019-01-01T12:00:00Z' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['keys'] = [key_identity_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['metadata_service'] = instance_metadata_service_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['name'] = 'my-instance-template' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['placement_target'] = instance_placement_target_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['profile'] = instance_profile_identity_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['reservation_affinity'] = instance_reservation_affinity_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['resource_group'] = resource_group_reference_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['total_volume_bandwidth'] = 500 - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['user_data'] = 'testString' - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['volume_attachments'] = [volume_attachment_prototype_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['vpc'] = vpc_identity_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['network_attachments'] = [instance_network_attachment_prototype_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['primary_network_attachment'] = instance_network_attachment_prototype_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['zone'] = zone_identity_model - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['network_interfaces'] = [network_interface_prototype_model] - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['primary_network_interface'] = network_interface_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'availability_policy'] = instance_availability_policy_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'confidential_compute_mode'] = 'disabled' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'default_trusted_profile'] = instance_default_trusted_profile_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'enable_secure_boot'] = True + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'keys'] = [key_identity_model] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'metadata_service'] = instance_metadata_service_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'name'] = 'my-instance-template' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'placement_target'] = instance_placement_target_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'profile'] = instance_profile_identity_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'reservation_affinity'] = instance_reservation_affinity_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'resource_group'] = resource_group_reference_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'total_volume_bandwidth'] = 500 + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'user_data'] = 'testString' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'volume_attachments'] = [volume_attachment_prototype_model] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'vpc'] = vpc_identity_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'network_attachments'] = [ + instance_network_attachment_prototype_model + ] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'primary_network_attachment'] = instance_network_attachment_prototype_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'zone'] = zone_identity_model + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'network_interfaces'] = [network_interface_prototype_model] + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json[ + 'primary_network_interface'] = network_interface_prototype_model # Construct a model instance of InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.from_dict(instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json) + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.from_dict( + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json + ) assert instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model != False # Construct a model instance of InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface by calling from_dict on the json representation - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_dict = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.from_dict(instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json).__dict__ - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model2 = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface(**instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_dict) + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_dict = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.from_dict( + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json + ).__dict__ + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model2 = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface( + ** + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_dict + ) # Verify the model instances are equivalent assert instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model == instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model2 # Convert model instance back to dict and verify no loss of data - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json2 = instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model.to_dict() + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json2 = instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model.to_dict( + ) assert instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json2 == instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json @@ -94221,28 +112422,38 @@ class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoa Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref """ - def test_load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_serialization(self): + def test_load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref """ # Construct a json representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref model load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json = {} - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict(load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json) + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json + ) assert load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict(load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json).__dict__ - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(**load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict) + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json + ).__dict__ + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref( + ** + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model == load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model.to_dict() + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model.to_dict( + ) assert load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 == load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json @@ -94251,28 +112462,38 @@ class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoa Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById """ - def test_load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_serialization(self): + def test_load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById """ # Construct a json representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json = {} - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict(load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json) + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json + ) assert load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict(load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json).__dict__ - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById(**load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict) + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict( + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json + ).__dict__ + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 = LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById( + ** + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model == load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model.to_dict() + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model.to_dict( + ) assert load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 == load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json @@ -94281,28 +112502,38 @@ class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentit Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref """ - def test_load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_serialization(self): + def test_load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref """ # Construct a json representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref model load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json = {} - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json) + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json + ) assert load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json).__dict__ - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(**load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict) + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json + ).__dict__ + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref( + ** + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model == load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model.to_dict() + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model.to_dict( + ) assert load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json2 == load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model_json @@ -94311,28 +112542,38 @@ class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentit Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById """ - def test_load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_serialization(self): + def test_load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_serialization( + self): """ Test serialization/deserialization for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById """ # Construct a json representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json = {} - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json[ + 'id'] = '70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json) + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json + ) assert load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model != False # Construct a model instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById by calling from_dict on the json representation - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict(load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json).__dict__ - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById(**load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict) + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.from_dict( + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json + ).__dict__ + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 = LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById( + ** + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model == load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model.to_dict() + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model.to_dict( + ) assert load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json2 == load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json @@ -94341,28 +112582,38 @@ class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIde Test Class for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN """ - def test_load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_serialization(self): + def test_load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_serialization( + self): """ Test serialization/deserialization for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN """ # Construct a json representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN model load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json = {} - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict(load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json) + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict( + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json + ) assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model != False # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_dict = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict(load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json).__dict__ - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model2 = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(**load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_dict) + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_dict = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.from_dict( + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json + ).__dict__ + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model2 = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN( + ** + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model == load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json2 = load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model.to_dict() + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json2 = load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model.to_dict( + ) assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json2 == load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_crn_model_json @@ -94371,28 +112622,38 @@ class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIde Test Class for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref """ - def test_load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_serialization(self): + def test_load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_serialization( + self): """ Test serialization/deserialization for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref """ # Construct a json representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref model load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json = {} - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_1e09281b-f177-46fb-b1f1-bc152b2e391a' # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict(load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json) + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict( + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json + ) assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model != False # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_dict = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict(load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json).__dict__ - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model2 = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(**load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_dict) + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_dict = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.from_dict( + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json + ).__dict__ + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model2 = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref( + ** + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model == load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json2 = load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model.to_dict() + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json2 = load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model.to_dict( + ) assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json2 == load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_href_model_json @@ -94401,28 +112662,38 @@ class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIde Test Class for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById """ - def test_load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_serialization(self): + def test_load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_serialization( + self): """ Test serialization/deserialization for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById """ # Construct a json representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json = {} - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json['id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json[ + 'id'] = '0717_1e09281b-f177-46f2-b1f1-bc152b2e391a' # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict(load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json) + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict( + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json + ) assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model != False # Construct a model instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById by calling from_dict on the json representation - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_dict = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict(load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json).__dict__ - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model2 = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById(**load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_dict) + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_dict = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.from_dict( + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json + ).__dict__ + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model2 = LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById( + ** + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model == load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json2 = load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model.to_dict() + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json2 = load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model.to_dict( + ) assert load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json2 == load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json @@ -94431,28 +112702,38 @@ class TestModel_NetworkInterfaceIPPrototypeReservedIPIdentityByHref: Test Class for NetworkInterfaceIPPrototypeReservedIPIdentityByHref """ - def test_network_interface_ip_prototype_reserved_ip_identity_by_href_serialization(self): + def test_network_interface_ip_prototype_reserved_ip_identity_by_href_serialization( + self): """ Test serialization/deserialization for NetworkInterfaceIPPrototypeReservedIPIdentityByHref """ # Construct a json representation of a NetworkInterfaceIPPrototypeReservedIPIdentityByHref model network_interface_ip_prototype_reserved_ip_identity_by_href_model_json = {} - network_interface_ip_prototype_reserved_ip_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + network_interface_ip_prototype_reserved_ip_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of NetworkInterfaceIPPrototypeReservedIPIdentityByHref by calling from_dict on the json representation - network_interface_ip_prototype_reserved_ip_identity_by_href_model = NetworkInterfaceIPPrototypeReservedIPIdentityByHref.from_dict(network_interface_ip_prototype_reserved_ip_identity_by_href_model_json) + network_interface_ip_prototype_reserved_ip_identity_by_href_model = NetworkInterfaceIPPrototypeReservedIPIdentityByHref.from_dict( + network_interface_ip_prototype_reserved_ip_identity_by_href_model_json + ) assert network_interface_ip_prototype_reserved_ip_identity_by_href_model != False # Construct a model instance of NetworkInterfaceIPPrototypeReservedIPIdentityByHref by calling from_dict on the json representation - network_interface_ip_prototype_reserved_ip_identity_by_href_model_dict = NetworkInterfaceIPPrototypeReservedIPIdentityByHref.from_dict(network_interface_ip_prototype_reserved_ip_identity_by_href_model_json).__dict__ - network_interface_ip_prototype_reserved_ip_identity_by_href_model2 = NetworkInterfaceIPPrototypeReservedIPIdentityByHref(**network_interface_ip_prototype_reserved_ip_identity_by_href_model_dict) + network_interface_ip_prototype_reserved_ip_identity_by_href_model_dict = NetworkInterfaceIPPrototypeReservedIPIdentityByHref.from_dict( + network_interface_ip_prototype_reserved_ip_identity_by_href_model_json + ).__dict__ + network_interface_ip_prototype_reserved_ip_identity_by_href_model2 = NetworkInterfaceIPPrototypeReservedIPIdentityByHref( + ** + network_interface_ip_prototype_reserved_ip_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert network_interface_ip_prototype_reserved_ip_identity_by_href_model == network_interface_ip_prototype_reserved_ip_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - network_interface_ip_prototype_reserved_ip_identity_by_href_model_json2 = network_interface_ip_prototype_reserved_ip_identity_by_href_model.to_dict() + network_interface_ip_prototype_reserved_ip_identity_by_href_model_json2 = network_interface_ip_prototype_reserved_ip_identity_by_href_model.to_dict( + ) assert network_interface_ip_prototype_reserved_ip_identity_by_href_model_json2 == network_interface_ip_prototype_reserved_ip_identity_by_href_model_json @@ -94461,28 +112742,38 @@ class TestModel_NetworkInterfaceIPPrototypeReservedIPIdentityById: Test Class for NetworkInterfaceIPPrototypeReservedIPIdentityById """ - def test_network_interface_ip_prototype_reserved_ip_identity_by_id_serialization(self): + def test_network_interface_ip_prototype_reserved_ip_identity_by_id_serialization( + self): """ Test serialization/deserialization for NetworkInterfaceIPPrototypeReservedIPIdentityById """ # Construct a json representation of a NetworkInterfaceIPPrototypeReservedIPIdentityById model network_interface_ip_prototype_reserved_ip_identity_by_id_model_json = {} - network_interface_ip_prototype_reserved_ip_identity_by_id_model_json['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + network_interface_ip_prototype_reserved_ip_identity_by_id_model_json[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of NetworkInterfaceIPPrototypeReservedIPIdentityById by calling from_dict on the json representation - network_interface_ip_prototype_reserved_ip_identity_by_id_model = NetworkInterfaceIPPrototypeReservedIPIdentityById.from_dict(network_interface_ip_prototype_reserved_ip_identity_by_id_model_json) + network_interface_ip_prototype_reserved_ip_identity_by_id_model = NetworkInterfaceIPPrototypeReservedIPIdentityById.from_dict( + network_interface_ip_prototype_reserved_ip_identity_by_id_model_json + ) assert network_interface_ip_prototype_reserved_ip_identity_by_id_model != False # Construct a model instance of NetworkInterfaceIPPrototypeReservedIPIdentityById by calling from_dict on the json representation - network_interface_ip_prototype_reserved_ip_identity_by_id_model_dict = NetworkInterfaceIPPrototypeReservedIPIdentityById.from_dict(network_interface_ip_prototype_reserved_ip_identity_by_id_model_json).__dict__ - network_interface_ip_prototype_reserved_ip_identity_by_id_model2 = NetworkInterfaceIPPrototypeReservedIPIdentityById(**network_interface_ip_prototype_reserved_ip_identity_by_id_model_dict) + network_interface_ip_prototype_reserved_ip_identity_by_id_model_dict = NetworkInterfaceIPPrototypeReservedIPIdentityById.from_dict( + network_interface_ip_prototype_reserved_ip_identity_by_id_model_json + ).__dict__ + network_interface_ip_prototype_reserved_ip_identity_by_id_model2 = NetworkInterfaceIPPrototypeReservedIPIdentityById( + ** + network_interface_ip_prototype_reserved_ip_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert network_interface_ip_prototype_reserved_ip_identity_by_id_model == network_interface_ip_prototype_reserved_ip_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - network_interface_ip_prototype_reserved_ip_identity_by_id_model_json2 = network_interface_ip_prototype_reserved_ip_identity_by_id_model.to_dict() + network_interface_ip_prototype_reserved_ip_identity_by_id_model_json2 = network_interface_ip_prototype_reserved_ip_identity_by_id_model.to_dict( + ) assert network_interface_ip_prototype_reserved_ip_identity_by_id_model_json2 == network_interface_ip_prototype_reserved_ip_identity_by_id_model_json @@ -94491,28 +112782,38 @@ class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIden Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress """ - def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_serialization(self): + def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_serialization( + self): """ Test serialization/deserialization for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress """ # Construct a json representation of a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress model public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json = {} - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json['address'] = '203.0.113.1' + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json[ + 'address'] = '203.0.113.1' # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model != False # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json).__dict__ - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(**public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_dict) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json + ).__dict__ + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress( + ** + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_dict + ) # Verify the model instances are equivalent assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model.to_dict() + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model.to_dict( + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json2 == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_address_model_json @@ -94521,28 +112822,38 @@ class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIden Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN """ - def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_serialization(self): + def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_serialization( + self): """ Test serialization/deserialization for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN """ # Construct a json representation of a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN model public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json = {} - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689' # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model != False # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json).__dict__ - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(**public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_dict) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json + ).__dict__ + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN( + ** + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model.to_dict() + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model.to_dict( + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json2 == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_crn_model_json @@ -94551,28 +112862,38 @@ class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIden Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref """ - def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_serialization(self): + def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_serialization( + self): """ Test serialization/deserialization for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref """ # Construct a json representation of a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref model public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json = {} - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689' # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model != False # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json).__dict__ - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(**public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_dict) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json + ).__dict__ + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref( + ** + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model.to_dict() + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model.to_dict( + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json2 == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_href_model_json @@ -94581,28 +112902,38 @@ class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIden Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById """ - def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_serialization(self): + def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_serialization( + self): """ Test serialization/deserialization for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById """ # Construct a json representation of a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById model public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json = {} - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json[ + 'id'] = '39300233-9995-4806-89a5-3c1b6eb88689' # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model != False # Construct a model instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById by calling from_dict on the json representation - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.from_dict(public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json).__dict__ - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById(**public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_dict) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_dict = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.from_dict( + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json + ).__dict__ + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model2 = PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById( + ** + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model.to_dict() + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json2 = public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model.to_dict( + ) assert public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json2 == public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json @@ -94611,28 +112942,38 @@ class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayI Test Class for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN """ - def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_serialization(self): + def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN """ # Construct a json representation of a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN model reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json = {} - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' # Construct a model instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN by calling from_dict on the json representation - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.from_dict(reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json) + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.from_dict( + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json + ) assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model != False # Construct a model instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN by calling from_dict on the json representation - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_dict = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.from_dict(reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json).__dict__ - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model2 = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(**reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_dict) + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_dict = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.from_dict( + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json + ).__dict__ + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model2 = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN( + ** + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model == reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json2 = reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model.to_dict() + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json2 = reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model.to_dict( + ) assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json2 == reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_crn_model_json @@ -94641,28 +112982,38 @@ class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayI Test Class for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref """ - def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_serialization(self): + def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref """ # Construct a json representation of a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref model reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json = {} - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' # Construct a model instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref by calling from_dict on the json representation - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.from_dict(reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json) + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.from_dict( + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json + ) assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model != False # Construct a model instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref by calling from_dict on the json representation - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_dict = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.from_dict(reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json).__dict__ - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model2 = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(**reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_dict) + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_dict = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.from_dict( + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json + ).__dict__ + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model2 = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref( + ** + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model == reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json2 = reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model.to_dict() + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json2 = reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model.to_dict( + ) assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json2 == reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_href_model_json @@ -94671,28 +113022,38 @@ class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayI Test Class for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById """ - def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_serialization(self): + def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById """ # Construct a json representation of a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById model reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json = {} - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json['id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json[ + 'id'] = 'r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5' # Construct a model instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById by calling from_dict on the json representation - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.from_dict(reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json) + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.from_dict( + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json + ) assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model != False # Construct a model instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById by calling from_dict on the json representation - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_dict = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.from_dict(reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json).__dict__ - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model2 = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById(**reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_dict) + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_dict = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.from_dict( + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json + ).__dict__ + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model2 = ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById( + ** + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model == reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json2 = reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model.to_dict() + reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json2 = reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model.to_dict( + ) assert reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json2 == reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway_identity_by_id_model_json @@ -94701,28 +113062,38 @@ class TestModel_ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualN Test Class for ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ - def test_reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization(self): + def test_reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ # Construct a json representation of a ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN model reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json = {} - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json) + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ) assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model != False # Construct a model instance of ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json).__dict__ - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(**reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict) + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ).__dict__ + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ** + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model == reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict() + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict( + ) assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 == reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json @@ -94731,28 +113102,38 @@ class TestModel_ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualN Test Class for ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ - def test_reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization(self): + def test_reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ # Construct a json representation of a ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref model reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json = {} - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json) + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ) assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model != False # Construct a model instance of ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json).__dict__ - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(**reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict) + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ).__dict__ + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ** + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model == reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict() + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict( + ) assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 == reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json @@ -94761,28 +113142,38 @@ class TestModel_ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualN Test Class for ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ - def test_reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization(self): + def test_reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ # Construct a json representation of a ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById model reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json = {} - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json) + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ) assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model != False # Construct a model instance of ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json).__dict__ - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(**reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict) + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ).__dict__ + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ** + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model == reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict() + reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict( + ) assert reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 == reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json @@ -94791,28 +113182,38 @@ class TestModel_RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP: Test Class for RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP """ - def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_serialization(self): + def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_serialization( + self): """ Test serialization/deserialization for RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP """ # Construct a json representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json = {} - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json['address'] = '0.0.0.0' + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json[ + 'address'] = '0.0.0.0' # Construct a model instance of RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model = RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json) + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model = RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.from_dict( + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json + ) assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model != False # Construct a model instance of RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict = RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json).__dict__ - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 = RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(**route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict) + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict = RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.from_dict( + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json + ).__dict__ + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 = RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP( + ** + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict + ) # Verify the model instances are equivalent assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model == route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 # Convert model instance back to dict and verify no loss of data - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict() + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict( + ) assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 == route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json @@ -94821,28 +113222,38 @@ class TestModel_RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP: Test Class for RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP """ - def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_serialization(self): + def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_serialization( + self): """ Test serialization/deserialization for RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP """ # Construct a json representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP model route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json = {} - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json['address'] = '192.168.3.4' + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json[ + 'address'] = '192.168.3.4' # Construct a model instance of RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model = RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json) + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model = RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.from_dict( + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json + ) assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model != False # Construct a model instance of RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict = RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json).__dict__ - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 = RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(**route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict) + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict = RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.from_dict( + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json + ).__dict__ + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 = RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP( + ** + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict + ) # Verify the model instances are equivalent assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model == route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 # Convert model instance back to dict and verify no loss of data - route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict() + route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict( + ) assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 == route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json @@ -94851,28 +113262,38 @@ class TestModel_RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectio Test Class for RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref """ - def test_route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_serialization(self): + def test_route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_serialization( + self): """ Test serialization/deserialization for RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref """ # Construct a json representation of a RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref model route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json = {} - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' # Construct a model instance of RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref by calling from_dict on the json representation - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict(route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json) + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict( + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json + ) assert route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model != False # Construct a model instance of RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref by calling from_dict on the json representation - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict(route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json).__dict__ - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(**route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict) + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict( + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json + ).__dict__ + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref( + ** + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model == route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 = route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model.to_dict() + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 = route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model.to_dict( + ) assert route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 == route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json @@ -94881,28 +113302,38 @@ class TestModel_RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectio Test Class for RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById """ - def test_route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_serialization(self): + def test_route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_serialization( + self): """ Test serialization/deserialization for RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById """ # Construct a json representation of a RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById model route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json = {} - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' # Construct a model instance of RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById by calling from_dict on the json representation - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict(route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json) + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict( + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json + ) assert route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model != False # Construct a model instance of RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById by calling from_dict on the json representation - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict(route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json).__dict__ - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(**route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict) + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict( + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json + ).__dict__ + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 = RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById( + ** + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model == route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 = route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model.to_dict() + route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 = route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model.to_dict( + ) assert route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 == route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json @@ -94911,28 +113342,38 @@ class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNex Test Class for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP """ - def test_route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_serialization(self): + def test_route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_serialization( + self): """ Test serialization/deserialization for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP """ # Construct a json representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json = {} - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json['address'] = '0.0.0.0' + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json[ + 'address'] = '0.0.0.0' # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json) + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict( + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json + ) assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model != False # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json).__dict__ - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(**route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict) + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict( + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json + ).__dict__ + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP( + ** + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict + ) # Verify the model instances are equivalent assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 # Convert model instance back to dict and verify no loss of data - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict() + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict( + ) assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json @@ -94941,28 +113382,38 @@ class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNex Test Class for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP """ - def test_route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_serialization(self): + def test_route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_serialization( + self): """ Test serialization/deserialization for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP """ # Construct a json representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP model route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json = {} - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json['address'] = '192.168.3.4' + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json[ + 'address'] = '192.168.3.4' # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json) + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict( + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json + ) assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model != False # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json).__dict__ - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(**route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict) + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict( + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json + ).__dict__ + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP( + ** + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict + ) # Verify the model instances are equivalent assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 # Convert model instance back to dict and verify no loss of data - route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict() + route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict( + ) assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json @@ -94971,28 +113422,38 @@ class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionId Test Class for RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref """ - def test_route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_serialization(self): + def test_route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_serialization( + self): """ Test serialization/deserialization for RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref """ # Construct a json representation of a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref model route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json = {} - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict(route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json) + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict( + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json + ) assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model != False # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict(route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json).__dict__ - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(**route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict) + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict( + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json + ).__dict__ + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref( + ** + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model == route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 = route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model.to_dict() + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 = route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model.to_dict( + ) assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 == route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json @@ -95001,28 +113462,38 @@ class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionId Test Class for RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById """ - def test_route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_serialization(self): + def test_route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_serialization( + self): """ Test serialization/deserialization for RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById """ # Construct a json representation of a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById model route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json = {} - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict(route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json) + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict( + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json + ) assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model != False # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById by calling from_dict on the json representation - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict(route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json).__dict__ - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(**route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict) + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict( + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json + ).__dict__ + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 = RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById( + ** + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model == route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 = route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model.to_dict() + route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 = route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model.to_dict( + ) assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 == route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json @@ -95031,28 +113502,38 @@ class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupId Test Class for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN """ - def test_security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_serialization(self): + def test_security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN """ # Construct a json representation of a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN model security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json = {} - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN by calling from_dict on the json representation - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict(security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json) + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict( + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json + ) assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model != False # Construct a model instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN by calling from_dict on the json representation - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_dict = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict(security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json).__dict__ - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model2 = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(**security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_dict) + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_dict = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict( + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json + ).__dict__ + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model2 = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN( + ** + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model == security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json2 = security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model.to_dict() + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json2 = security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model.to_dict( + ) assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json2 == security_group_rule_remote_patch_security_group_identity_security_group_identity_by_crn_model_json @@ -95061,28 +113542,38 @@ class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupId Test Class for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref """ - def test_security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_serialization(self): + def test_security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref """ # Construct a json representation of a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref model security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json = {} - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref by calling from_dict on the json representation - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict(security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json) + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict( + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json + ) assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model != False # Construct a model instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref by calling from_dict on the json representation - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_dict = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict(security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json).__dict__ - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model2 = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(**security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_dict) + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_dict = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict( + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json + ).__dict__ + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model2 = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref( + ** + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model == security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json2 = security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model.to_dict() + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json2 = security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model.to_dict( + ) assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json2 == security_group_rule_remote_patch_security_group_identity_security_group_identity_by_href_model_json @@ -95091,28 +113582,38 @@ class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupId Test Class for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById """ - def test_security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_serialization(self): + def test_security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById """ # Construct a json representation of a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById model security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json = {} - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById by calling from_dict on the json representation - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.from_dict(security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json) + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.from_dict( + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json + ) assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model != False # Construct a model instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById by calling from_dict on the json representation - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_dict = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.from_dict(security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json).__dict__ - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model2 = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById(**security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_dict) + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_dict = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.from_dict( + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json + ).__dict__ + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model2 = SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById( + ** + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model == security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json2 = security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model.to_dict() + security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json2 = security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model.to_dict( + ) assert security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json2 == security_group_rule_remote_patch_security_group_identity_security_group_identity_by_id_model_json @@ -95121,28 +113622,38 @@ class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGro Test Class for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN """ - def test_security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_serialization(self): + def test_security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN """ # Construct a json representation of a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN model security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json = {} - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN by calling from_dict on the json representation - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict(security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json) + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict( + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json + ) assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model != False # Construct a model instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN by calling from_dict on the json representation - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_dict = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict(security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json).__dict__ - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model2 = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(**security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_dict) + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_dict = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.from_dict( + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json + ).__dict__ + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model2 = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN( + ** + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model == security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json2 = security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model.to_dict() + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json2 = security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model.to_dict( + ) assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json2 == security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model_json @@ -95151,28 +113662,38 @@ class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGro Test Class for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref """ - def test_security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_serialization(self): + def test_security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref """ # Construct a json representation of a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref model security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json = {} - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref by calling from_dict on the json representation - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict(security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json) + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict( + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json + ) assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model != False # Construct a model instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref by calling from_dict on the json representation - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_dict = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict(security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json).__dict__ - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model2 = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(**security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_dict) + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_dict = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.from_dict( + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json + ).__dict__ + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model2 = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref( + ** + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model == security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json2 = security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model.to_dict() + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json2 = security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model.to_dict( + ) assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json2 == security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model_json @@ -95181,28 +113702,38 @@ class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGro Test Class for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById """ - def test_security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_serialization(self): + def test_security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_serialization( + self): """ Test serialization/deserialization for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById """ # Construct a json representation of a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById model security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json = {} - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json[ + 'id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' # Construct a model instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById by calling from_dict on the json representation - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.from_dict(security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json) + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.from_dict( + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json + ) assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model != False # Construct a model instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById by calling from_dict on the json representation - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_dict = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.from_dict(security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json).__dict__ - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model2 = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById(**security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_dict) + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_dict = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.from_dict( + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json + ).__dict__ + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model2 = SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById( + ** + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model == security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json2 = security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model.to_dict() + security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json2 = security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model.to_dict( + ) assert security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json2 == security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_id_model_json @@ -95211,28 +113742,38 @@ class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkIn Test Class for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ - def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization(self): + def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_serialization( + self): """ Test serialization/deserialization for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN """ # Construct a json representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN model share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json = {} - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model != False # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json).__dict__ - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(**share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json + ).__dict__ + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( + ** + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict() + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model.to_dict( + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json2 == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model_json @@ -95241,28 +113782,38 @@ class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkIn Test Class for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ - def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization(self): + def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_serialization( + self): """ Test serialization/deserialization for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref """ # Construct a json representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref model share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json = {} - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model != False # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json).__dict__ - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref(**share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json + ).__dict__ + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref( + ** + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict() + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model.to_dict( + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json2 == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model_json @@ -95271,28 +113822,38 @@ class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkIn Test Class for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ - def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization(self): + def test_share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_serialization( + self): """ Test serialization/deserialization for ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById """ # Construct a json representation of a ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById model share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json = {} - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json['id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json[ + 'id'] = '0767-fa41aecb-4f21-423d-8082-630bfba1e1d9' # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model != False # Construct a model instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById by calling from_dict on the json representation - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict(share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json).__dict__ - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById(**share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict) + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById.from_dict( + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json + ).__dict__ + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 = ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById( + ** + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict() + share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 = share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model.to_dict( + ) assert share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json2 == share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model_json @@ -95301,28 +113862,38 @@ class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerP Test Class for VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch """ - def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_serialization(self): + def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch """ # Construct a json representation of a VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch model vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json = {} - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json['address'] = '169.21.50.5' + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json[ + 'address'] = '169.21.50.5' # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model != False # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json).__dict__ - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch(**vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json + ).__dict__ + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch( + ** + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model == vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model.to_dict() + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model.to_dict( + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json2 == vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json @@ -95331,28 +113902,38 @@ class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerP Test Class for VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch """ - def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_serialization(self): + def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch """ # Construct a json representation of a VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch model vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json = {} - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json['fqdn'] = 'my-service.example.com' + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json[ + 'fqdn'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model != False # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json).__dict__ - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch(**vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json + ).__dict__ + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch( + ** + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model == vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model.to_dict() + vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model.to_dict( + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json2 == vpn_gateway_connection_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_policy_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json @@ -95361,28 +113942,38 @@ class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteMode Test Class for VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch """ - def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_serialization(self): + def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch """ # Construct a json representation of a VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch model vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json = {} - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json['address'] = '169.21.50.5' + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json[ + 'address'] = '169.21.50.5' # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model != False # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json).__dict__ - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch(**vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json + ).__dict__ + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch( + ** + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model == vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model.to_dict() + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model.to_dict( + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json2 == vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_address_patch_model_json @@ -95391,28 +113982,38 @@ class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteMode Test Class for VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch """ - def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_serialization(self): + def test_vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch """ # Construct a json representation of a VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch model vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json = {} - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json['fqdn'] = 'my-service.example.com' + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json[ + 'fqdn'] = 'my-service.example.com' # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model != False # Construct a model instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch by calling from_dict on the json representation - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict(vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json).__dict__ - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch(**vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict) + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch.from_dict( + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json + ).__dict__ + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model2 = VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch( + ** + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model == vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model.to_dict() + vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json2 = vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model.to_dict( + ) assert vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json2 == vpn_gateway_connection_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_static_route_mode_peer_patch_vpn_gateway_connection_peer_fqdn_patch_model_json @@ -95421,7 +114022,8 @@ class TestModel_VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode Test Class for VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode """ - def test_vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_serialization(self): + def test_vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_serialization( + self): """ Test serialization/deserialization for VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode """ @@ -95434,90 +114036,148 @@ def test_vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_m vpn_gateway_connection_dpd_model['timeout'] = 120 ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted - ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + ike_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' ike_policy_reference_model = {} # IKEPolicyReference - ike_policy_reference_model['deleted'] = ike_policy_reference_deleted_model - ike_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - ike_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'deleted'] = ike_policy_reference_deleted_model + ike_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + ike_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' ike_policy_reference_model['name'] = 'my-ike-policy' ike_policy_reference_model['resource_type'] = 'ike_policy' - i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted - i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + i_psec_policy_reference_deleted_model = { + } # IPsecPolicyReferenceDeleted + i_psec_policy_reference_deleted_model[ + 'more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' i_psec_policy_reference_model = {} # IPsecPolicyReference - i_psec_policy_reference_model['deleted'] = i_psec_policy_reference_deleted_model - i_psec_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' - i_psec_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'deleted'] = i_psec_policy_reference_deleted_model + i_psec_policy_reference_model[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b' + i_psec_policy_reference_model[ + 'id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' i_psec_policy_reference_model['name'] = 'my-ipsec-policy' i_psec_policy_reference_model['resource_type'] = 'ipsec_policy' - vpn_gateway_connection_status_reason_model = {} # VPNGatewayConnectionStatusReason - vpn_gateway_connection_status_reason_model['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_status_reason_model['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' - - vpn_gateway_connection_ike_identity_model = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN + vpn_gateway_connection_status_reason_model = { + } # VPNGatewayConnectionStatusReason + vpn_gateway_connection_status_reason_model[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_status_reason_model[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + + vpn_gateway_connection_ike_identity_model = { + } # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' - vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' - - vpn_gateway_connection_static_route_mode_local_model = {} # VPNGatewayConnectionStaticRouteModeLocal - vpn_gateway_connection_static_route_mode_local_model['ike_identities'] = [vpn_gateway_connection_ike_identity_model] - - vpn_gateway_connection_static_route_mode_peer_model = {} # VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress - vpn_gateway_connection_static_route_mode_peer_model['ike_identity'] = vpn_gateway_connection_ike_identity_model + vpn_gateway_connection_ike_identity_model[ + 'value'] = 'my-service.example.com' + + vpn_gateway_connection_static_route_mode_local_model = { + } # VPNGatewayConnectionStaticRouteModeLocal + vpn_gateway_connection_static_route_mode_local_model[ + 'ike_identities'] = [vpn_gateway_connection_ike_identity_model] + + vpn_gateway_connection_static_route_mode_peer_model = { + } # VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress + vpn_gateway_connection_static_route_mode_peer_model[ + 'ike_identity'] = vpn_gateway_connection_ike_identity_model vpn_gateway_connection_static_route_mode_peer_model['type'] = 'address' - vpn_gateway_connection_static_route_mode_peer_model['address'] = '169.21.50.5' + vpn_gateway_connection_static_route_mode_peer_model[ + 'address'] = '169.21.50.5' ip_model = {} # IP ip_model['address'] = '192.168.3.4' - vpn_gateway_connection_tunnel_status_reason_model = {} # VPNGatewayConnectionTunnelStatusReason - vpn_gateway_connection_tunnel_status_reason_model['code'] = 'cannot_authenticate_connection' - vpn_gateway_connection_tunnel_status_reason_model['message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' - vpn_gateway_connection_tunnel_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' - - vpn_gateway_connection_static_route_mode_tunnel_model = {} # VPNGatewayConnectionStaticRouteModeTunnel - vpn_gateway_connection_static_route_mode_tunnel_model['public_ip'] = ip_model + vpn_gateway_connection_tunnel_status_reason_model = { + } # VPNGatewayConnectionTunnelStatusReason + vpn_gateway_connection_tunnel_status_reason_model[ + 'code'] = 'cannot_authenticate_connection' + vpn_gateway_connection_tunnel_status_reason_model[ + 'message'] = 'Failed to authenticate a connection because of mismatched IKE ID and PSK.' + vpn_gateway_connection_tunnel_status_reason_model[ + 'more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-health#vpn-connection-health' + + vpn_gateway_connection_static_route_mode_tunnel_model = { + } # VPNGatewayConnectionStaticRouteModeTunnel + vpn_gateway_connection_static_route_mode_tunnel_model[ + 'public_ip'] = ip_model vpn_gateway_connection_static_route_mode_tunnel_model['status'] = 'down' - vpn_gateway_connection_static_route_mode_tunnel_model['status_reasons'] = [vpn_gateway_connection_tunnel_status_reason_model] + vpn_gateway_connection_static_route_mode_tunnel_model[ + 'status_reasons'] = [ + vpn_gateway_connection_tunnel_status_reason_model + ] # Construct a json representation of a VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode model vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json = {} - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['admin_state_up'] = True - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['authentication_mode'] = 'psk' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['created_at'] = '2019-01-01T12:00:00Z' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['dead_peer_detection'] = vpn_gateway_connection_dpd_model - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['establish_mode'] = 'bidirectional' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['ike_policy'] = ike_policy_reference_model - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['ipsec_policy'] = i_psec_policy_reference_model - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['mode'] = 'route' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['name'] = 'my-vpn-connection' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['psk'] = 'lkj14b1oi0alcniejkso' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['resource_type'] = 'vpn_gateway_connection' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['status'] = 'down' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['status_reasons'] = [vpn_gateway_connection_status_reason_model] - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['local'] = vpn_gateway_connection_static_route_mode_local_model - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['peer'] = vpn_gateway_connection_static_route_mode_peer_model - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['routing_protocol'] = 'none' - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['tunnels'] = [vpn_gateway_connection_static_route_mode_tunnel_model] + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'admin_state_up'] = True + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'authentication_mode'] = 'psk' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'created_at'] = '2019-01-01T12:00:00Z' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'dead_peer_detection'] = vpn_gateway_connection_dpd_model + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'establish_mode'] = 'bidirectional' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'ike_policy'] = ike_policy_reference_model + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'ipsec_policy'] = i_psec_policy_reference_model + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'mode'] = 'route' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'name'] = 'my-vpn-connection' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'psk'] = 'lkj14b1oi0alcniejkso' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'resource_type'] = 'vpn_gateway_connection' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'status'] = 'down' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'status_reasons'] = [vpn_gateway_connection_status_reason_model] + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'local'] = vpn_gateway_connection_static_route_mode_local_model + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'peer'] = vpn_gateway_connection_static_route_mode_peer_model + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'routing_protocol'] = 'none' + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json[ + 'tunnels'] = [ + vpn_gateway_connection_static_route_mode_tunnel_model + ] # Construct a model instance of VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode by calling from_dict on the json representation - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model = VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.from_dict(vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json) + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model = VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.from_dict( + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json + ) assert vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model != False # Construct a model instance of VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode by calling from_dict on the json representation - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_dict = VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.from_dict(vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json).__dict__ - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model2 = VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode(**vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_dict) + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_dict = VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode.from_dict( + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json + ).__dict__ + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model2 = VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode( + ** + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_dict + ) # Verify the model instances are equivalent assert vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model == vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model2 # Convert model instance back to dict and verify no loss of data - vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json2 = vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model.to_dict() + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json2 = vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model.to_dict( + ) assert vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json2 == vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json @@ -95526,28 +114186,38 @@ class TestModel_VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetwo Test Class for VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref """ - def test_virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_serialization(self): + def test_virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref """ # Construct a json representation of a VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref model virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json = {} - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref by calling from_dict on the json representation - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.from_dict(virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json) + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.from_dict( + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json + ) assert virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model != False # Construct a model instance of VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref by calling from_dict on the json representation - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_dict = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.from_dict(virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json).__dict__ - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model2 = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref(**virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_dict) + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_dict = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref.from_dict( + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json + ).__dict__ + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model2 = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref( + ** + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model == virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json2 = virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model.to_dict() + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json2 = virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model.to_dict( + ) assert virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json2 == virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model_json @@ -95556,28 +114226,38 @@ class TestModel_VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetwo Test Class for VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById """ - def test_virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_serialization(self): + def test_virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById """ # Construct a json representation of a VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById model virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json = {} - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById by calling from_dict on the json representation - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.from_dict(virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json) + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.from_dict( + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json + ) assert virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model != False # Construct a model instance of VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById by calling from_dict on the json representation - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_dict = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.from_dict(virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json).__dict__ - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model2 = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById(**virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_dict) + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_dict = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById.from_dict( + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json + ).__dict__ + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model2 = VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById( + ** + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model == virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json2 = virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model.to_dict() + virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json2 = virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model.to_dict( + ) assert virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json2 == virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model_json @@ -95586,28 +114266,38 @@ class TestModel_VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtu Test Class for VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref """ - def test_virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_serialization(self): + def test_virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref """ # Construct a json representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref model virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json = {} - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-bea6a632-5e13-42a4-b4b8-31dc877abfe4/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref by calling from_dict on the json representation - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.from_dict(virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json) + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.from_dict( + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json + ) assert virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model != False # Construct a model instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref by calling from_dict on the json representation - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_dict = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.from_dict(virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json).__dict__ - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model2 = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref(**virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_dict) + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_dict = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref.from_dict( + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json + ).__dict__ + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model2 = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref( + ** + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model == virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json2 = virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model.to_dict() + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json2 = virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model.to_dict( + ) assert virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json2 == virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model_json @@ -95616,28 +114306,38 @@ class TestModel_VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtu Test Class for VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById """ - def test_virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_serialization(self): + def test_virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_serialization( + self): """ Test serialization/deserialization for VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById """ # Construct a json representation of a VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById model virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json = {} - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json['id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json[ + 'id'] = '0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById by calling from_dict on the json representation - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.from_dict(virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json) + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.from_dict( + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json + ) assert virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model != False # Construct a model instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById by calling from_dict on the json representation - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_dict = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.from_dict(virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json).__dict__ - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model2 = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById(**virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_dict) + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_dict = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById.from_dict( + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json + ).__dict__ + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model2 = VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById( + ** + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_dict + ) # Verify the model instances are equivalent assert virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model == virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model2 # Convert model instance back to dict and verify no loss of data - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json2 = virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model.to_dict() + virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json2 = virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model.to_dict( + ) assert virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json2 == virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model_json @@ -95646,28 +114346,38 @@ class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN Test Class for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN """ - def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_serialization(self): + def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN """ # Construct a json representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN model volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json = {} - volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json[ + 'crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.from_dict(volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json) + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.from_dict( + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json + ) assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model != False # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_dict = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.from_dict(volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json).__dict__ - volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model2 = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(**volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_dict) + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_dict = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.from_dict( + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json + ).__dict__ + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model2 = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN( + ** + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_dict + ) # Verify the model instances are equivalent assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model == volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json2 = volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model.to_dict() + volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json2 = volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model.to_dict( + ) assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json2 == volume_attachment_prototype_volume_volume_identity_volume_identity_by_crn_model_json @@ -95676,28 +114386,38 @@ class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHre Test Class for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref """ - def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_serialization(self): + def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref """ # Construct a json representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref model volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json = {} - volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json[ + 'href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.from_dict(volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json) + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.from_dict( + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json + ) assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model != False # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_dict = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.from_dict(volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json).__dict__ - volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model2 = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(**volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_dict) + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_dict = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.from_dict( + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json + ).__dict__ + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model2 = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref( + ** + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_dict + ) # Verify the model instances are equivalent assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model == volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json2 = volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model.to_dict() + volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json2 = volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model.to_dict( + ) assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json2 == volume_attachment_prototype_volume_volume_identity_volume_identity_by_href_model_json @@ -95706,28 +114426,38 @@ class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById: Test Class for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById """ - def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_serialization(self): + def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById """ # Construct a json representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json = {} - volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json['id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json[ + 'id'] = 'r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.from_dict(volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json) + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.from_dict( + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json + ) assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model != False # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_dict = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.from_dict(volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json).__dict__ - volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model2 = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById(**volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_dict) + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_dict = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.from_dict( + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json + ).__dict__ + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model2 = VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById( + ** + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_dict + ) # Verify the model instances are equivalent assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model == volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json2 = volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model.to_dict() + volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json2 = volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model.to_dict( + ) assert volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json2 == volume_attachment_prototype_volume_volume_identity_volume_identity_by_id_model_json @@ -95736,7 +114466,8 @@ class TestModel_VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVol Test Class for VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity """ - def test_volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_serialization(self): + def test_volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity """ @@ -95750,31 +114481,47 @@ def test_volume_attachment_prototype_volume_volume_prototype_instance_context_vo resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' # Construct a json representation of a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity model volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json = {} - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json['iops'] = 10000 - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json['name'] = 'my-volume' - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json['profile'] = volume_profile_identity_model - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json['resource_group'] = resource_group_identity_model - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json['user_tags'] = [] - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json['capacity'] = 100 - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json['encryption_key'] = encryption_key_identity_model + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json[ + 'iops'] = 10000 + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json[ + 'name'] = 'my-volume' + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json[ + 'profile'] = volume_profile_identity_model + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json[ + 'resource_group'] = resource_group_identity_model + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json[ + 'user_tags'] = [] + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json[ + 'capacity'] = 100 + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json[ + 'encryption_key'] = encryption_key_identity_model # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.from_dict(volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json) + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.from_dict( + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json + ) assert volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model != False # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_dict = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.from_dict(volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json).__dict__ - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model2 = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(**volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_dict) + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_dict = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.from_dict( + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json + ).__dict__ + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model2 = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity( + ** + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_dict + ) # Verify the model instances are equivalent assert volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model == volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json2 = volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model.to_dict() + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json2 = volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model.to_dict( + ) assert volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json2 == volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model_json @@ -95783,7 +114530,8 @@ class TestModel_VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVol Test Class for VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot """ - def test_volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_serialization(self): + def test_volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_serialization( + self): """ Test serialization/deserialization for VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot """ @@ -95797,35 +114545,52 @@ def test_volume_attachment_prototype_volume_volume_prototype_instance_context_vo resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN - encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' + encryption_key_identity_model[ + 'crn'] = 'crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179' snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f' # Construct a json representation of a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot model volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json = {} - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['iops'] = 10000 - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['name'] = 'my-volume' - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['profile'] = volume_profile_identity_model - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['resource_group'] = resource_group_identity_model - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['user_tags'] = [] - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['capacity'] = 100 - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['encryption_key'] = encryption_key_identity_model - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json['source_snapshot'] = snapshot_identity_model + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'iops'] = 10000 + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'name'] = 'my-volume' + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'profile'] = volume_profile_identity_model + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'resource_group'] = resource_group_identity_model + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'user_tags'] = [] + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'capacity'] = 100 + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'encryption_key'] = encryption_key_identity_model + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json[ + 'source_snapshot'] = snapshot_identity_model # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.from_dict(volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json) + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.from_dict( + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json + ) assert volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model != False # Construct a model instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot by calling from_dict on the json representation - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_dict = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.from_dict(volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json).__dict__ - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model2 = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(**volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_dict) + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_dict = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.from_dict( + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json + ).__dict__ + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model2 = VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot( + ** + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_dict + ) # Verify the model instances are equivalent assert volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model == volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model2 # Convert model instance back to dict and verify no loss of data - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json2 = volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model.to_dict() + volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json2 = volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model.to_dict( + ) assert volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json2 == volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model_json @@ -95834,35 +114599,49 @@ class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCro Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup """ - def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_serialization(self): + def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup """ # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_scheduled_action_group_prototype_model = {} # InstanceGroupManagerScheduledActionGroupPrototype - instance_group_manager_scheduled_action_group_prototype_model['membership_count'] = 10 + instance_group_manager_scheduled_action_group_prototype_model = { + } # InstanceGroupManagerScheduledActionGroupPrototype + instance_group_manager_scheduled_action_group_prototype_model[ + 'membership_count'] = 10 # Construct a json representation of a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup model instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json = {} - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json['group'] = instance_group_manager_scheduled_action_group_prototype_model + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json[ + 'cron_spec'] = '30 */2 * * 1-5' + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json[ + 'group'] = instance_group_manager_scheduled_action_group_prototype_model # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json) + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model != False # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json).__dict__ - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(**instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_dict) + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json + ).__dict__ + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup( + ** + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model == instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model.to_dict() + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model.to_dict( + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json2 == instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_group_model_json @@ -95871,37 +114650,53 @@ class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCro Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager """ - def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_serialization(self): + def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager """ # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_scheduled_action_manager_prototype_model = {} # InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById - instance_group_manager_scheduled_action_manager_prototype_model['max_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_model['min_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_scheduled_action_manager_prototype_model = { + } # InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById + instance_group_manager_scheduled_action_manager_prototype_model[ + 'max_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_model[ + 'min_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a json representation of a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager model instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json = {} - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json['cron_spec'] = '30 */2 * * 1-5' - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json['manager'] = instance_group_manager_scheduled_action_manager_prototype_model + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json[ + 'cron_spec'] = '30 */2 * * 1-5' + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json[ + 'manager'] = instance_group_manager_scheduled_action_manager_prototype_model # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json) + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model != False # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json).__dict__ - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(**instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_dict) + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json + ).__dict__ + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager( + ** + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model == instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model.to_dict() + instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model.to_dict( + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json2 == instance_group_manager_action_prototype_scheduled_action_prototype_by_cron_spec_by_manager_model_json @@ -95910,35 +114705,49 @@ class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRun Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup """ - def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_serialization(self): + def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup """ # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_scheduled_action_group_prototype_model = {} # InstanceGroupManagerScheduledActionGroupPrototype - instance_group_manager_scheduled_action_group_prototype_model['membership_count'] = 10 + instance_group_manager_scheduled_action_group_prototype_model = { + } # InstanceGroupManagerScheduledActionGroupPrototype + instance_group_manager_scheduled_action_group_prototype_model[ + 'membership_count'] = 10 # Construct a json representation of a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup model instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json = {} - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json['run_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json['group'] = instance_group_manager_scheduled_action_group_prototype_model + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json[ + 'run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json[ + 'group'] = instance_group_manager_scheduled_action_group_prototype_model # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json) + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model != False # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json).__dict__ - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(**instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_dict) + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json + ).__dict__ + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup( + ** + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model == instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model.to_dict() + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model.to_dict( + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json2 == instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_group_model_json @@ -95947,37 +114756,53 @@ class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRun Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager """ - def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_serialization(self): + def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_serialization( + self): """ Test serialization/deserialization for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager """ # Construct dict forms of any model objects needed in order to build this model. - instance_group_manager_scheduled_action_manager_prototype_model = {} # InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById - instance_group_manager_scheduled_action_manager_prototype_model['max_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_model['min_membership_count'] = 10 - instance_group_manager_scheduled_action_manager_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_manager_scheduled_action_manager_prototype_model = { + } # InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById + instance_group_manager_scheduled_action_manager_prototype_model[ + 'max_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_model[ + 'min_membership_count'] = 10 + instance_group_manager_scheduled_action_manager_prototype_model[ + 'id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' # Construct a json representation of a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager model instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json = {} - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json['name'] = 'my-instance-group-manager-action' - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json['run_at'] = '2019-01-01T12:00:00Z' - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json['manager'] = instance_group_manager_scheduled_action_manager_prototype_model + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json[ + 'name'] = 'my-instance-group-manager-action' + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json[ + 'run_at'] = '2019-01-01T12:00:00Z' + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json[ + 'manager'] = instance_group_manager_scheduled_action_manager_prototype_model # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json) + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model != False # Construct a model instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager by calling from_dict on the json representation - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.from_dict(instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json).__dict__ - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(**instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_dict) + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_dict = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.from_dict( + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json + ).__dict__ + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model2 = InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager( + ** + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_dict + ) # Verify the model instances are equivalent assert instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model == instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model2 # Convert model instance back to dict and verify no loss of data - instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model.to_dict() + instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json2 = instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model.to_dict( + ) assert instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json2 == instance_group_manager_action_prototype_scheduled_action_prototype_by_run_at_by_manager_model_json